/* =========================================
   1. VARIABLES & CONFIGURACIÓN (TEMA DARK)
   ========================================= */
:root {
    /* Paleta de Colores */
    --bg-dark: #0a192f;        /* Azul Noche Profundo */
    --bg-secondary: #112240;   /* Azul Marino (Tarjetas) */
    --primary-color: #64ffda;  /* Turquesa Neón */
    --primary-gradient: linear-gradient(135deg, #64ffda 0%, #48c6ef 100%);
    
    /* Tipografía y Textos */
    --text-light: #e6f1ff;     /* Blanco Hueso */
    --text-muted: #8892b0;     /* Gris Azulado */
    --white: #ffffff;
    
    /* Configuración */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =========================================
   2. RESET & ESTILOS GLOBALES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark); 
    color: var(--text-light);
    line-height: 1.7;
    position: relative;
    overflow-x: hidden; /* Evita scroll lateral accidental */
}

/* OPTIMIZACIÓN DE RENDIMIENTO (Fondo Grid Fijo) */
/* Usamos un pseudo-elemento para no repintar el body al hacer scroll */
body::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

a { text-decoration: none; }

/* =========================================
   3. HEADER & NAVEGACIÓN
   ========================================= */
.main-header {
    background: rgba(10, 25, 47, 0.85); /* Semitransparente */
    backdrop-filter: blur(12px);        /* Efecto Vidrio */
    -webkit-backdrop-filter: blur(12px);
    padding: 0.8rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO SVG */
.logo {
    display: flex;
    align-items: center;
    font-size: 0; /* Elimina espacios extra */
}

.logo img {
    height: 45px; /* Altura ideal */
    width: auto;
    display: block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(100, 255, 218, 0.5));
}

.highlight { color: var(--primary-color); }

/* MENÚ ESCRITORIO */
.nav-list {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-list a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-list a:hover { color: var(--primary-color); }

.btn-nav {
    border: 1px solid var(--primary-color);
    color: var(--primary-color) !important;
    padding: 8px 22px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: rgba(100, 255, 218, 0.1);
}

/* BOTÓN HAMBURGUESA (Oculto en PC) */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* =========================================
   4. HERO SECTION (PORTADA)
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: left;
    padding-top: 80px;
}

.hero-content { max-width: 800px; }

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Texto responsivo */
    line-height: 1.3; /* Espaciado correcto para escritorio */
    margin-bottom: 25px;
    color: var(--text-light);
    font-weight: 800;
}

.text-turquoise {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(100, 255, 218, 0.25);
    display: block; /* Fuerza salto de línea limpio */
    margin-top: 5px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

/* BOTONES PRINCIPALES */
.buttons { display: flex; gap: 20px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--bg-dark);
    box-shadow: 0 10px 20px -10px rgba(100, 255, 218, 0.5);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -10px rgba(100, 255, 218, 0.7);
}

.btn-outline {
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* =========================================
   5. SECCIÓN SERVICIOS
   ========================================= */
.section-padding { padding: 100px 0; }
.section-header { margin-bottom: 60px; text-align: center; }

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.section-header p { color: var(--text-muted); font-size: 1.1rem; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* TARJETAS OPTIMIZADAS (GPU) */
.service-card {
    background-color: var(--bg-secondary);
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    /* Optimización de animación */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, 
                border-color 0.3s ease, 
                background-color 0.3s ease;
    will-change: transform, box-shadow;
}

.service-card:hover {
    transform: translateY(-10px) translateZ(0);
    border-color: var(--primary-color);
    background-color: #172a45;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5);
}

/* ICONOS DE NEÓN (BOXICONS) */
.service-card .icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
    transition: transform 0.3s ease, text-shadow 0.3s ease, color 0.3s ease;
}

.service-card:hover .icon {
    transform: scale(1.1) translateY(-5px);
    text-shadow: 0 0 25px rgba(100, 255, 218, 0.8);
    color: #ffffff;
}

.service-card h3 { font-size: 1.5rem; color: var(--text-light); margin-bottom: 15px; }
.service-card p { color: var(--text-muted); line-height: 1.6; }

/* =========================================
   6. SECCIÓN PREMIUM (GLASSMORPHISM)
   ========================================= */
.premium-vision {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.ambient-light {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.15) 0%, rgba(10, 25, 47, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    animation: pulseLight 8s infinite alternate ease-in-out;
    will-change: transform, opacity;
}

@keyframes pulseLight {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0.8; }
}

.vision-container { position: relative; z-index: 2; display: flex; justify-content: center; }

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 60px;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.glass-panel h2 { font-size: 3rem; line-height: 1.2; margin-bottom: 25px; color: var(--text-light); }

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.glass-panel p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }

.stats-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    flex-wrap: wrap;
}

.stat .number { font-size: 2.5rem; font-weight: 700; color: var(--white); display: block; }
.stat .label { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; }

/* =========================================
   7. FOOTER CORPORATIVO
   ========================================= */
.footer-corporate {
    background-color: #020c1b;
    padding-top: 80px;
    padding-bottom: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-desc { color: var(--text-muted); margin: 20px 0; max-width: 300px; line-height: 1.6; }
.footer-col h4 { color: var(--text-light); margin-bottom: 25px; font-weight: 600; }
.footer-menu li { margin-bottom: 12px; list-style: none; }
.footer-menu a { color: var(--text-muted); transition: 0.3s; }
.footer-menu a:hover { color: var(--primary-color); padding-left: 5px; }

.contact-list li { margin-bottom: 15px; display: flex; gap: 10px; color: var(--text-muted); list-style: none;}

.social-links { display: flex; gap: 15px; }
.social-icon {
    display: flex; justify-content: center; align-items: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-light);
    transition: all 0.3s ease;
}
.social-icon:hover { border-color: var(--primary-color); color: var(--primary-color); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    flex-wrap: wrap;
    gap: 20px;
}
.legal-links a { color: #555; margin-left: 20px; transition: color 0.3s; }
.legal-links a:hover { color: var(--primary-color); }

/* =========================================
   8. ANIMACIONES DE ENTRADA (SCROLL)
   ========================================= */
.hidden {
    opacity: 0;
    transform: translate3d(0, 40px, 0); /* Usamos 3d para activar GPU */
}

.show {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:nth-child(2) { transition-delay: 150ms; }
.service-card:nth-child(3) { transition-delay: 300ms; }

/* =========================================
   9. PÁGINAS LEGALES
   ========================================= */
.legal-header {
    padding-top: 150px;
    padding-bottom: 50px;
    text-align: center;
}

.legal-header h1 { font-size: 3rem; color: var(--white); }

.legal-content {
    background: rgba(17, 34, 64, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 60px;
    margin-bottom: 100px;
}

.legal-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content p, .legal-content li { color: #a8b2d1; margin-bottom: 15px; }
.last-updated { font-size: 0.9rem; color: var(--text-muted); margin-top: -30px; display: block; margin-bottom: 30px;}

/* =========================================
   10. MEDIA QUERIES (MÓVIL & TABLET)
   ========================================= */
@media (max-width: 768px) {
    
    /* LOGO */
    .logo img { height: 35px; }

    /* HEADER & NAVEGACIÓN */
    .menu-toggle {
        display: block;
        z-index: 200;
        margin-left: auto; /* IMPORTANTE: Alinea el botón a la derecha */
    }

    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 25, 47, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-list.active { right: 0; }
    
    .nav-list li { margin: 20px 0; opacity: 0; transform: translateX(50px); }
    .nav-list.active li { opacity: 1; transform: translateX(0); transition: all 0.5s ease 0.2s; }

    /* Ajuste para que el nav no ocupe espacio físico en el header */
    nav { width: 0; }

    /* CONTENIDO */
    .hero { padding-top: 120px; text-align: center; }
    
    /* AQUÍ ESTÁ EL ARREGLO DE TEXTO MÓVIL: */
    .hero h1 { 
        font-size: 2.2rem; /* Tamaño seguro para celulares */
        line-height: 1.4; /* Espacio para que no choquen */
    }
    .hero p { margin-left: auto; margin-right: auto; }
    
    .buttons { justify-content: center; }

    .glass-panel { padding: 30px 20px; }
    .glass-panel h2 { font-size: 2rem; }
    
    .footer-top { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .contact-list li { justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .legal-links { display: flex; flex-direction: column; gap: 10px; }
    .legal-links a { margin: 0; }
}
/* --- 14. AVISO DE COOKIES PREMIUM --- */
.cookie-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 350px;
    background: rgba(17, 34, 64, 0.95); /* Fondo oscuro casi sólido */
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color); /* Borde fino turquesa */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999; /* Por encima de todo */
    
    /* Estado inicial: Oculto y abajo */
    opacity: 0;
    transform: translateY(50px);
    pointer-events: none; /* No se puede tocar si está invisible */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Clase para mostrarlo */
.cookie-container.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.cookie-content {
    display: flex;
    gap: 15px;
    align-items: start;
    margin-bottom: 15px;
}

.cookie-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.cookie-container p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.cookie-container a {
    color: var(--primary-color);
    text-decoration: underline;
}

.btn-cookie {
    width: 100%;
    padding: 10px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 5px;
    color: var(--bg-dark);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-cookie:hover {
    transform: scale(1.02);
}

/* En móvil, que ocupe todo el ancho abajo */
@media (max-width: 768px) {
    .cookie-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
        width: auto; /* Ancho automático */
    }
}
/* --- 15. PÁGINA DE CONTACTO (LANDING) --- */

.contact-page {
    min-height: 90vh; /* Ocupa casi toda la pantalla */
    display: flex;
    align-items: center; /* Centrado Vertical */
    justify-content: center; /* Centrado Horizontal */
    position: relative;
    padding-top: 80px;
}

.contact-card {
    max-width: 500px; /* Tarjeta más compacta */
    margin: 0 auto;
    text-align: center;
    padding: 50px 30px;
}

.icon-header i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.contact-card h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--white);
}

.contact-card p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* BOTÓN WHATSAPP PERSONALIZADO */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366; /* Color oficial WhatsApp */
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px; /* Redondo */
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(37, 211, 102, 0.4);
    width: 100%; /* Botón ancho en móvil */
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: scale(1.05);
    box-shadow: 0 15px 30px -5px rgba(37, 211, 102, 0.6);
}

.btn-whatsapp i {
    font-size: 1.5rem;
}

.response-time {
    margin-top: 25px;
    font-size: 0.9rem !important;
    color: var(--text-muted);
}