/* --- DISEÑO SYSTEM: HIELO NEGRO EVOLUCIONADO (Landing Page) --- */

:root {
    /* Mismas variables que style.css para consistencia */
    --primary: #007FFF;
    --secondary: #FF6B6B;
    --bg-deep: #020C1B;  /* Alias local para bg-dark */
    --text-main: #FFFFFF;
    
    /* Variables Específicas de la Landing */
    --primary-glow: rgba(0, 127, 255, 0.6);
    --secondary-glow: rgba(255, 107, 107, 0.6);
    --bg-glass: rgba(10, 25, 45, 0.6);
    --bg-card: rgba(15, 30, 55, 0.8);
    --text-muted: #A8B2D1;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-active: rgba(0, 127, 255, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

/* Títulos con Gradiente */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

a { text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; }

/* --- UI COMPONENTS --- */

/* Botones Premium */
.cta-button {
    display: inline-block;
    padding: 16px 40px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    background: linear-gradient(90deg, var(--primary), #0055aa);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px rgba(0, 127, 255, 0.3);
    letter-spacing: 1px;
    text-align: center;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.cta-button:hover::before { left: 100%; }

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--primary-glow);
    background: var(--primary);
}

.cta-secondary {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    box-shadow: none;
}
.cta-secondary:hover {
    background: var(--secondary);
    color: #000;
    box-shadow: 0 0 20px var(--secondary-glow);
}

/* Tarjetas Glassmorphism */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    border-color: var(--border-active);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* --- HEADER & NAV --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%; /* Padding ajustado */
    background: rgba(2, 12, 27, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px; /* Altura fija para estabilidad */
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1002;
    cursor: pointer;
}

/* Ajuste del Logo para consistencia */
nav .logo span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.6rem; /* Tamaño ajustado */
    letter-spacing: 1px;
    text-transform: uppercase;
    color: white;
    line-height: 1;
    display: flex;
    align-items: center;
}

nav .logo img {
    height: 45px;
    width: auto;
}

/* Alineación Perfecta del Menú */
nav ul { 
    display: flex; 
    gap: 40px;
    align-items: center; /* CLAVE: Centrado vertical de items */
    margin: 0;
    padding: 0;
}

nav a.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 5px 0;
}

nav a.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0px; left: 0; width: 0%; height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

nav a.nav-link:hover { color: white; }
nav a.nav-link:hover::after { width: 100%; }

/* Botón pequeño en Navbar */
nav .cta-button.nav-cta {
    padding: 10px 24px;
    font-size: 0.85rem;
    margin-left: 10px;
}

.mobile-toggle { display: none; cursor: pointer; color: white; }

/* --- HERO SECTION --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 100px;
}

#matrix-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.2);
}

.hero h2 {
    font-size: clamp(2.5rem, 8vw, 4rem); /* Texto fluido */
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero h2 span {
    color: var(--primary);
    display: block;
    font-size: 1.8rem;
    margin-top: 15px;
    font-weight: 300;
    font-family: 'Roboto', sans-serif;
    opacity: 0.9;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 50px;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

/* --- SECTIONS GENERAL --- */
section { padding: 100px 20px; position: relative; }

.section-header {
    text-align: center;
    margin-bottom: 70px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px; height: 3px;
    background: var(--secondary);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* --- TRANSFORMACIÓN CARRUSEL (BENEFICIOS & TESTIMONIOS & PRECIOS) --- */
/* Estilos Base Desktop */
.value-grid, .pricing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.value-card h3 { font-size: 1.3rem; margin: 20px 0 10px; }
.value-card p { font-size: 1rem; color: var(--text-muted); }
.icon-wrapper {
    width: 60px; height: 60px;
    background: rgba(0, 127, 255, 0.1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    margin-bottom: 20px;
    transition: 0.3s;
}
.glass-card:hover .icon-wrapper {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* --- ARQUITECTURA (MODULOS) --- */
.curriculum { background: linear-gradient(to bottom, var(--bg-deep), #051429); }

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.module-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-light);
    padding: 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden; /* Clave para el acordeón */
}

.module-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary);
}

.module-header { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 20px;
    cursor: default; /* Desktop no es clickeable */
}

.module-icon { color: var(--secondary); transition: transform 0.3s; }

.module-list {
    list-style: none;
    padding: 0;
    transition: opacity 0.3s;
}

.module-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}
.module-list li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

/* --- ESTILOS ESPECÍFICOS MÓVILES (LA REVOLUCIÓN) --- */
@media (max-width: 900px) {
    
    /* 1. SECCIONES A CARRUSEL HORIZONTAL (Scroll Snap) */
    .value-grid, .pricing-container {
        display: flex; /* Cambio de Grid a Flex */
        flex-wrap: nowrap; /* No bajar de línea */
        overflow-x: auto; /* Scroll horizontal */
        scroll-snap-type: x mandatory; /* Efecto magnético */
        gap: 20px;
        padding-bottom: 30px; /* Espacio para scrollbar si aparece */
        margin: 0 -20px; /* Romper márgenes del contenedor */
        padding-left: 20px; /* Espacio inicial */
        padding-right: 20px; /* Espacio final */
        -webkit-overflow-scrolling: touch; /* Suavidad en iOS */
        scrollbar-width: none; /* Ocultar barra en Firefox */
    }

    .value-grid::-webkit-scrollbar, 
    .pricing-container::-webkit-scrollbar {
        display: none; /* Ocultar barra en Chrome/Safari */
    }

    /* Tarjetas dentro del carrusel */
    .value-grid .glass-card, 
    .pricing-container .price-card {
        flex: 0 0 85%; /* Ocupar 85% del ancho de pantalla (se ve la siguiente) */
        min-width: 85%;
        scroll-snap-align: center; /* Centrarse al soltar */
        margin-bottom: 0;
        height: auto; /* Altura automática */
        display: flex;
        flex-direction: column;
    }
    
    /* Indicador visual de swipe (opcional) */
    .value-grid::after, .pricing-container::after {
        content: '';
        min-width: 1px; /* Espaciador final */
    }

    /* 2. ARQUITECTURA A ACORDEÓN (Ingenioso) */
    .modules-grid {
        display: flex;
        flex-direction: column;
        gap: 10px; /* Menos espacio, apilados */
    }

    .module-card {
        padding: 0; /* Quitamos padding del contenedor */
        background: rgba(15, 30, 55, 0.6); /* Fondo más oscuro */
        border: 1px solid var(--border-light);
        border-radius: 8px;
        cursor: pointer; /* Indicar interactividad */
        max-height: 70px; /* Altura colapsada (solo header) */
        transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), background 0.3s;
        position: relative;
    }

    .module-card.active {
        max-height: 400px; /* Altura suficiente para contenido */
        background: rgba(15, 30, 55, 0.95);
        border-color: var(--primary);
        transition: max-height 0.4s ease-in-out;
    }

    .module-header {
        margin: 0;
        padding: 20px; /* Padding interno solo al header */
        position: relative;
        z-index: 2;
        background: transparent;
    }
    
    .module-header h3 {
        font-size: 1rem; /* Texto más pequeño */
        margin: 0;
        flex-grow: 1;
    }

    /* Flecha indicadora de acordeón */
    .module-header::after {
        content: '+';
        font-size: 1.5rem;
        color: var(--secondary);
        font-weight: bold;
        transition: transform 0.3s;
    }

    .module-card.active .module-header::after {
        content: '-';
        transform: rotate(180deg);
        color: var(--primary);
    }

    .module-card.active .module-icon {
        color: var(--primary);
        filter: drop-shadow(0 0 5px var(--primary));
    }

    .module-list {
        padding: 0 20px 20px 20px; /* Padding para el contenido desplegado */
        opacity: 0; /* Oculto inicialmente */
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .module-card.active .module-list {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Botones Hero Móvil */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .cta-button {
        width: 100%;
    }
    
    /* Header Móvil */
    nav ul {
        display: none;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--bg-deep);
        flex-direction: column;
        padding: 30px;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
        gap: 30px; /* Espacio en móvil */
    }
    nav ul.active { display: flex; }
    .mobile-toggle { display: block; font-size: 1.8rem; }
    
    nav .cta-button.nav-cta {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }
}

/* --- TESTIMONIOS (NUEVO) --- */
.quote-text {
    font-style: italic;
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 20px;
    position: relative;
}
.quote-text::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.3;
    position: absolute;
    top: -20px;
    left: -10px;
}
.author-block {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: auto; /* Empuja al fondo en flex */
}
.author-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}
.author-info h4 {
    font-size: 1rem; margin: 0; color: white;
}
.author-info span {
    font-size: 0.85rem; color: var(--secondary); font-family: 'Roboto', sans-serif;
}

/* --- PRICE CARD --- */
.price-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    border-top: 4px solid transparent;
}
.price-card.featured {
    border-top-color: var(--primary);
    background: linear-gradient(180deg, rgba(0, 127, 255, 0.1), rgba(10, 25, 45, 0.8));
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 2;
}

@media (max-width: 900px) {
    .price-card.featured { 
        transform: scale(1); /* Resetear escala en móvil */
        box-shadow: none;
        border: 1px solid var(--primary);
    }
}

.price-card h3 { font-size: 1.5rem; color: white; margin-bottom: 10px; }
.price-amount { font-size: 3.5rem; font-weight: 900; color: white; margin: 20px 0; }
.price-amount span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }

.features-list { margin: 30px 0; flex-grow: 1; }
.features-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ddd;
}

/* --- FAQ SECTION --- */
#faq { background: rgba(0,0,0,0.2); }
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.faq-item {
    padding: 20px;
    cursor: pointer;
    background: var(--bg-card);
}
.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    list-style: none;
    color: white;
    font-size: 1.1rem;
    transition: color 0.3s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    animation: fadeIn 0.4s ease;
}
.faq-item[open] summary { color: var(--primary); margin-bottom: 10px; }
.faq-item i { transition: transform 0.3s ease; }
.faq-item[open] i { transform: rotate(180deg); }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FORMULARIO --- */
.form-section { background: #000; }
.form-container { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 25px; position: relative; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}
.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #333;
    border-radius: 6px;
    color: white;
    font-size: 1rem; /* 16px para iOS zoom fix */
    transition: 0.3s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 127, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 127, 255, 0.1);
}
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}
select.form-input option { background-color: var(--bg-deep); color: white; padding: 10px; }

/* --- FOOTER --- */
footer {
    padding: 50px 20px;
    background: var(--bg-deep);
    text-align: center;
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.footer-logo { display: inline-block; text-decoration: none; transition: transform 0.3s ease; }
.footer-logo:hover { transform: scale(1.05); }
.footer-logo img { height: 60px; width: auto; display: block; }

/* Mensaje Exito Formulario */
#msg { color: #00FF9D; text-align: center; display: block; margin-top: 15px; font-weight: bold; height: 20px; }

/* Glitch Effect Minimal */
.glitch-text { position: relative; }
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-deep);
}
.glitch-text::before {
    left: 2px; text-shadow: -1px 0 var(--secondary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px; text-shadow: -1px 0 var(--primary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 81px, 0); }
    20% { clip: rect(64px, 9999px, 35px, 0); }
    100% { clip: rect(32px, 9999px, 94px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(44px, 9999px, 12px, 0); }
    20% { clip: rect(15px, 9999px, 66px, 0); }
    100% { clip: rect(88px, 9999px, 24px, 0); }
}