/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
    /* DARK MODE VARIABLES */
    --bg-primary: #121212;      
    --bg-secondary: #1a1a1a;    
    --bg-card: #212121;         
    --bg-overlay: rgba(18, 18, 18, 0.95); 
    
    --text-primary: #E0E0E0;    
    --text-secondary: #b0b0b0;  
    --border-color: #333333;    
    
    --accent-color: #00FFC2;     /* Cyan Neon */
    --secondary-accent: #4CAF50; /* Green */
    
    --section-padding: 80px 0;
    --font-stack: 'Montserrat', sans-serif;
    --matrix-font: 'Share Tech Mono', monospace;
}

/* LIGHT MODE OVERRIDES */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f4f7f6;
        --bg-card: #ffffff;
        --bg-overlay: rgba(255, 255, 255, 0.95);
        
        --text-primary: #1a1a1a;
        --text-secondary: #555555;
        --border-color: #e0e0e0;
        
        --accent-color: #008f72; 
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; 
}

/* Force hide the old rain class if it exists in HTML */
.rain { display: none !important; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-weight: 900;
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-accent);
}

section {
    padding: var(--section-padding);
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: var(--bg-overlay);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--accent-color);
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
}

nav a:hover {
    color: var(--accent-color);
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--bg-primary) !important;
    padding: 8px 18px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--secondary-accent);
    color: #fff !important;
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero-section {
    --grid: 10rem;
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden; 
    display: flex;
    justify-content: center;
    align-items: center;
    isolation: isolate; 
}

.grid-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    perspective: 40rem; 
    z-index: 1; 
    pointer-events: none; 
}

.plane {
    width: 300%;
    height: 150%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform-style: preserve-3d;
    transform-origin: bottom center;
    transform: translateX(-50%) rotateX(75deg); 
}

.plane.top-plane {
    top: 0;
    bottom: auto;
    transform-origin: top center;
    transform: translateX(-50%) rotateX(-75deg);
}

.grid-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
}

.grid-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(to left, var(--accent-color), var(--accent-color) 2px, transparent 2px, transparent var(--grid)), 
        repeating-linear-gradient(to bottom, var(--accent-color), var(--accent-color) 2px, transparent 2px, transparent var(--grid));
    animation: move 1s linear infinite forwards;
}

.grid-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to bottom, #000 15%, transparent 80%);
    z-index: 1;
}

.plane.top-plane .grid-layer::after {
    background-image: linear-gradient(to top, #000 15%, transparent 80%);
}

.glow {
    filter: blur(10px);
    opacity: 0.5;
    mix-blend-mode: screen;
}

.hero-content {
    position: relative;
    z-index: 999; 
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    pointer-events: auto;
    transform: translateZ(100px); 
    transform-style: preserve-3d;
}

.matrix-title {
    font-family: var(--matrix-font);
    color: var(--accent-color);
    font-size: 5rem;
    filter: drop-shadow(0px 0px 5px currentColor);
    margin-bottom: 20px;
    display: inline-block;
    line-height: 1;
}

.matrix-title::after {
    content: '';
    display: inline-block;
    width: .2em;
    height: .7em;
    background-color: currentColor;
    margin-left: .1em;
    animation: blink 1s linear infinite forwards;
    vertical-align: baseline;
}

.tagline {
    font-family: var(--font-stack);
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 4px 8px #000;
}

.description {
    font-family: var(--font-stack);
    font-size: 1.1em;
    color: #ccc;
    margin-bottom: 30px;
    text-shadow: 0 4px 8px #000;
}

.hero-cta-main {
    display: inline-block;
    background-color: var(--accent-color);
    color: #000;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1em;
    transition: transform 0.3s, box-shadow 0.3s;
    font-family: var(--font-stack);
    position: relative;
}

.hero-cta-main:hover {
    background-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 0 20px var(--accent-color);
}

/* ==========================================================================
   4. SOLUTIONS & PRODUCTS (SHARED)
   ========================================================================== */
.solutions-section { background-color: var(--bg-secondary); }
.products-section { background-color: var(--bg-primary); }

.solution-grid {
    display: flex;
    gap: 30px;
    text-align: center;
    margin-top: 50px;
}

.solution-item {
    flex: 1;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-card);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.solution-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.solution-item i {
    font-size: 3em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.products-section { text-align: center; }
.products-section .subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-style: italic;
}

.product-links a {
    font-size: 1.2em;
    margin: 0 15px;
    padding: 10px 20px;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
    color: var(--text-primary);
}

.product-links a:hover {
    background-color: var(--accent-color);
    color: var(--bg-primary);
}

/* ==========================================================================
   5. NEW: TRAINING SECTION
   ========================================================================== */
.training-section {
    background-color: var(--bg-secondary);
}

.training-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: var(--text-secondary);
    font-size: 1.1em;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
    text-align: left;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.course-icon {
    font-size: 2em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.course-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.course-card p {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* ==========================================================================
   6. VISION & RESPONSIBLE AI
   ========================================================================== */
.vision-section {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    text-align: center;
    padding: 60px 0;
}

.vision-section h2, .vision-section p {
    color: #121212;
}
.vision-section h2::after { background-color: #121212; }

.vision-cta {
    display: inline-block;
    background-color: #121212;
    color: var(--accent-color);
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 700;
    transition: background-color 0.3s;
}

.vision-cta:hover {
    background-color: #333;
    color: var(--secondary-accent);
}

/* NEW: Responsible AI Section */
.responsible-section {
    background-color: var(--bg-primary);
    padding: 100px 0;
}

.responsible-wrapper {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-card));
    padding: 40px;
    border-radius: 12px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.responsible-text h2 i {
    color: var(--accent-color);
    margin-right: 10px;
}

.responsible-text .lead-text {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.responsible-list {
    list-style: none;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.responsible-list li {
    flex: 1 1 30%;
    min-width: 200px;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 6px;
}

.responsible-list li i {
    color: var(--accent-color);
    margin-right: 8px;
}

/* ==========================================================================
   7. CONTACT SECTION & FOOTER
   ========================================================================== */
.contact-section {
    background-color: var(--bg-secondary);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 1em;
}

.submit-button {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    padding: 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-button:hover {
    background-color: var(--secondary-accent);
    color: #fff;
    transform: translateY(-2px);
}

.contact-note {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

/* NEW: Contact Details */
.contact-info-box {
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-item i {
    font-size: 1.5em;
    color: var(--accent-color);
    margin-top: 5px;
}

.info-item h4 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.info-item p, .info-item a {
    color: var(--text-secondary);
    font-size: 0.95em;
}

footer {
    background-color: var(--bg-primary);
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.social-links a {
    margin-left: 15px;
    font-size: 1.5em;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   8. ANIMATIONS & MEDIA QUERIES
   ========================================================================== */
@keyframes move {
    from { transform: translateY(0px); }
    to { transform: translateY(var(--grid)); }
}

@keyframes blink {
    0%, 50% { visibility: visible; }
    51%, 100% { visibility: hidden; }
}

@media (max-width: 900px) {
    .solution-grid { flex-direction: column; }
}

@media (max-width: 600px) {
    .matrix-title { font-size: 3rem; }
    .hero-cta-main { font-size: 1em; padding: 12px 20px; }
    
    nav ul { gap: 15px; }
    nav ul li:last-child { display: none; }
    header .container { flex-direction: column; }
    nav { margin-top: 10px; }
    nav ul { justify-content: center; width: 100%; flex-wrap: wrap; }
    
    .product-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-info-box {
        flex-direction: column;
        align-items: flex-start;
    }
}
