/* Variable Definitions based on CEA Branding */
:root {
    --primary-color: #00ACC1;
    --primary-hover: #008394;
    --accent-color: #00BCD4;
    --accent-orange: #FF6D00;
    /* Vivid Orange for details */
    --text-color: #FFFFFF;
    --text-muted: #B0BEC5;
    --bg-dark: #0b0f14;
    /* Card background matching the system screenshots: Dark semi-transparent */
    --card-bg: rgba(13, 16, 22, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', sans-serif;
    --font-header: 'Outfit', sans-serif;
    --nav-height: 80px;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-dark);
    /* Softened background with overlay/cover */
    background-image:
        linear-gradient(rgba(11, 15, 20, 0.90), rgba(11, 15, 20, 0.90)),
        url('../assets/images/bg-circuit-final.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Removed potential jittery animation for a cleaner look */
    line-height: 1.6;
    overflow-x: hidden;
}

@keyframes bgScroll {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* Optional Overlay to ensure text readability if BG is too bright */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    pointer-events: none;
}

/* Typography Utility Classes */
h1,
h2,
h3 {
    font-family: var(--font-header);
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.text-cyan {
    color: var(--primary-color);
}

.text-orange {
    color: var(--accent-orange);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Utilities */
.glass-header,
.glass-card,
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 0.666px solid var(--glass-border);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(0, 217, 255, 0.05);
}

.glass-card {
    border-radius: 12px;
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 172, 193, 0.3);
    /* Cyan hint on border */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: -2px;
    /* Pull closer */
    line-height: 1;
}

.logo .tagline {
    font-size: 0.70rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    display: block;
    text-transform: uppercase;
    margin-top: 4px;
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.25rem;
    }

    .logo .tagline {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 15px rgba(0, 172, 193, 0.5);
    transform: translateY(-2px);
}

.btn-sistema {
    background-color: var(--accent-orange);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-sistema:hover {
    background-color: #E65100;
    box-shadow: 0 0 15px rgba(255, 109, 0, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    padding: 8px 22px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background: rgba(0, 172, 193, 0.1);
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Unified Hero Section Styles */
.unified-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

.unified-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.3;
}

.unified-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content-box {
    position: relative;
    background: linear-gradient(#0d1016, #0d1016) padding-box,
        linear-gradient(135deg, #00E5FF, #D500F9) border-box;
    border: 3px solid transparent;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
    backdrop-filter: blur(10px);
}

.hero-visual-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 900px) {
    .unified-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-content-box {
        padding: 35px;
    }
}

/* Hero Section Quantum */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
    /* Removed the previous overlay to let the image shine */
}

/* Background circuit lines effect (optional simplified version or relying on image) */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.3;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-text-col {
    padding-right: 20px;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #E0E0E0;
    margin-bottom: 40px;
    max-width: 500px;
}

.robot-img {
    width: 100%;
    max-width: 650px;
    height: auto;
    /* Blend mode to make black background transparent and glow brighter */
    mix-blend-mode: screen;
    /* Radial mask to soften edges and remove hard borders */
    -webkit-mask-image: radial-gradient(closest-side, black 60%, transparent 100%);
    mask-image: radial-gradient(closest-side, black 60%, transparent 100%);
    animation: floatRobot 6s ease-in-out infinite;
}

@keyframes floatRobot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Quantum Solid Button */
.btn-quantum {
    background: #FF6D00;
    /* Solid Orange */
    color: #fff;
    /* Dark text for contrast on bright button */
    padding: 15px 40px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 800;
    text-transform: none;
    /* Can be uppercase or normal */
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 109, 0, 0.4);
}

.btn-quantum:hover {
    background: #E65100;
    /* Darker Orange on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 109, 0, 0.6);
    color: #fff;
}

/* Services Section */
.services-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

.text-left.section-title {
    left: 0;
    transform: none;
    text-align: left;
}

.text-left.section-title::after {
    margin-left: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    margin-bottom: 20px;
}

/* Neon Cards for Services Page */
.neon-card {
    position: relative;
    background: rgba(13, 16, 22, 0.15);
    border: none;
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 30px var(--card-glow),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.neon-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 25px;
    padding: 3px;
    background: linear-gradient(135deg, var(--card-color-1), var(--card-color-2));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.neon-card .card-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
}

.neon-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.neon-card p {
    font-size: 0.95rem;
    color: #B0BEC5;
    line-height: 1.5;
}

/* Cyan Theme */
.neon-cyan {
    --card-color-1: #00E5FF;
    --card-color-2: #00BFA5;
    --card-glow: rgba(0, 229, 255, 0.4);
}

.neon-cyan .card-icon,
.neon-cyan h3 {
    color: #00E5FF;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
}

.neon-cyan:hover {
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.6),
        inset 0 0 25px rgba(0, 229, 255, 0.15);
    transform: translateY(-8px) scale(1.02);
}

/* Purple Theme */
.neon-purple {
    --card-color-1: #D500F9;
    --card-color-2: #AA00FF;
    --card-glow: rgba(213, 0, 249, 0.4);
}

.neon-purple .card-icon,
.neon-purple h3 {
    color: #D500F9;
    text-shadow: 0 0 15px rgba(213, 0, 249, 0.6);
}

.neon-purple:hover {
    box-shadow: 0 0 50px rgba(213, 0, 249, 0.6),
        inset 0 0 25px rgba(213, 0, 249, 0.15);
    transform: translateY(-8px) scale(1.02);
}

/* Orange Theme */
.neon-orange {
    --card-color-1: #FF6D00;
    --card-color-2: #FF9100;
    --card-glow: rgba(255, 109, 0, 0.4);
}

.neon-orange .card-icon,
.neon-orange h3 {
    color: #FF6D00;
    text-shadow: 0 0 15px rgba(255, 109, 0, 0.6);
}

.neon-orange:hover {
    box-shadow: 0 0 50px rgba(255, 109, 0, 0.6),
        inset 0 0 25px rgba(255, 109, 0, 0.15);
    transform: translateY(-8px) scale(1.02);
}

/* Green Theme (Instagram) */
.neon-green {
    --card-color-1: #00E676;
    --card-color-2: #69F0AE;
    --card-glow: rgba(0, 230, 118, 0.4);
}

.neon-green .card-icon,
.neon-green h3 {
    color: #00E676;
    text-shadow: 0 0 15px rgba(0, 230, 118, 0.6);
}

.neon-green:hover {
    box-shadow: 0 0 50px rgba(0, 230, 118, 0.6),
        inset 0 0 25px rgba(0, 230, 118, 0.15);
    transform: translateY(-8px) scale(1.02);
}

/* Contact Specifics */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    /* Space between cards */
    margin: 50px auto;
    width: 70%;
    /* Requested 70% width */
    max-width: 1400px;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        width: 90%;
        /* Mobile width */
        max-width: 400px;
    }
}

.page-container {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 80px;
    min-height: 100vh;
}

.icon-box {
    font-size: 3rem;
    color: var(--accent-orange);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
}

/* About Section */
.about-section {
    padding: 80px 0;
    margin: 50px 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
}



/* About Section Quantum */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    min-height: 60vh;
}

.about-card-quantum {
    position: relative;
    background: linear-gradient(#0d1016, #0d1016) padding-box,
        linear-gradient(135deg, #00E5FF, #D500F9) border-box;
    border: 3px solid transparent;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}







.ai-globe-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    mix-blend-mode: screen;
    /* Blend black bg into circuit bg */
    border-radius: 20px;
    animation: floatRobot 6s ease-in-out infinite;
}



.about-image-col img {
    width: 100%;
    max-width: 500px;
    filter: drop-shadow(0 0 40px rgba(213, 0, 249, 0.3));
    /* Soft blend if using rectangular image */
    mix-blend-mode: screen;
    border-radius: 20px;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Contact Page - Full Screen Hero Design */
.contact-page-hero {
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.contact-hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a0e1a;
}

.contact-hero-content {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-background-image {
        object-fit: contain;
    }
}

@media (max-width: 768px) {
    .contact-hero-section {
        min-height: 100vh;
    }

    .hero-background-image {
        object-fit: cover;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    padding: 30px 0;
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Animation Utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    /* JS will trigger this or we use simple animation directly */
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        /* Solid background for mobile menu */
        flex-direction: column;
        padding: 20px 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* =========================================
   MOBILE OPTIMIZATION OVERRIDES (v2)
   ========================================= */

@media (max-width: 768px) {

    /* --- GLOBAL & LAYOUT --- */
    body {
        overflow-x: hidden;
        /* Prevent horizontal scroll */
        font-size: 16px;
        /* Base font size for readability */
    }

    .container {
        padding: 0 20px;
        width: 100%;
        max-width: 100%;
    }

    /* Force grids to single column */
    .hero-grid,
    .unified-hero-grid,
    .about-grid,
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    /* --- TYPOGRAPHY --- */
    h1,
    .hero-title,
    .nosotros-content h1,
    .section-title {
        font-size: 2.5rem !important;
        /* Scale down giant titles */
        line-height: 1.2 !important;
        word-wrap: break-word;
        /* Prevent long words breaking layout */
    }

    .hero-subtitle,
    .nosotros-content p,
    .neon-card p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* --- NAVIGATION --- */
    .logo h1 {
        font-size: 1.2rem;
        /* Smaller logo on mobile */
    }

    .glass-header {
        height: 70px;
        /* Slightly shorter header */
    }

    .nav-links {
        top: 70px;
        /* Match new header height */
        background: rgba(13, 16, 22, 0.95);
        /* More solid background */
        backdrop-filter: blur(20px);
        padding: 40px 0;
        height: calc(100vh - 70px);
        /* Full screen menu */
        justify-content: flex-start;
        padding-top: 60px;
    }

    .nav-links li {
        margin-bottom: 25px;
    }

    .nav-links a {
        font-size: 1.5rem;
        /* Larger touch targets */
    }

    /* --- COMPONENT SPECIFICS --- */

    /* Hero Badge/Buttons */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .btn-quantum {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
    }

    /* Cards */
    .neon-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .neon-card .card-icon {
        font-size: 2.5rem;
    }

    /* Images */
    .robot-img,
    .hero-background-image {
        max-width: 80%;
        /* Don't take full width to avoid edge touching */
        margin: 0 auto;
        display: block;
    }

    /* Contact Page */
    .contact-hero-content {
        flex-direction: column;
        height: auto;
        padding-top: 100px;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
        /* Allow wrapping if icons are many */
    }
}