/* --- 1. VARIABLES & RESET (Identidad Corporativa) --- */
:root {
    /* Colores */
    --color-primary: #08182B;  /* Azul Profundo ÈTIKA */
    --color-accent: #D4AF37;   /* Dorado Iniciático */
    --color-bg: #F9F9F7;       /* Beige Orgánico / Off-White */
    --color-text: #2C3E50;     /* Gris Oscuro Lectura */
    --color-white: #FFFFFF;
    
    /* Tipografía */
    --font-heading: 'Playfair Display', serif; /* Autoridad */
    --font-body: 'Lato', sans-serif;           /* Lógica/Claridad */
    
    /* Espaciado y Dimensiones AUMENTADAS */
    --nav-height: 120px;       /* Más alto para que entre el logo grande */
    --section-padding: 5rem 0;
    --border-radius: 8px;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-family: 'Lato', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* --- 2. UTILIDADES --- */
.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-accent { color: var(--color-accent); }
.bg-light { background-color: #f0f0eb; } 
.mt-2 { margin-top: 2rem; }
.align-center { align-items: center; }
.text-small { font-size: 0.9rem; } /* Utilidad para textos pequeños */

/* Grid System */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }

/* --- 3. TIPOGRAFÍA --- */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-primary); margin-bottom: 1rem; }
h1 { font-size: 3.5rem; line-height: 1.1; }
h2 { font-size: 2.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; color: var(--color-accent); font-weight: 700; display: block; margin-bottom: 0.5rem; }
.text-link { color: var(--color-primary); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--color-accent); transition: 0.3s; }
.text-link:hover { color: var(--color-accent); border-color: transparent; }

/* --- 4. COMPONENTES: BOTONES --- */
.btn { display: inline-block; padding: 1rem 2rem; border-radius: 4px; font-weight: 700; text-decoration: none; transition: all 0.3s ease; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }

.btn-primary { background-color: var(--color-accent); color: var(--color-primary); border: 2px solid var(--color-accent); }
.btn-primary:hover { background-color: transparent; color: var(--color-white); } 

.btn-outline { background-color: transparent; color: var(--color-white); border: 2px solid var(--color-white); margin-left: 1rem; }
.btn-outline:hover { background-color: var(--color-white); color: var(--color-primary); }

.btn-login { border: 1px solid var(--color-accent); padding: 0.5rem 1.5rem; border-radius: 20px; color: var(--color-accent) !important; transition: 0.3s; }
.btn-login:hover { background-color: var(--color-accent); color: var(--color-primary) !important; }

/* Botón WhatsApp Flotante */
.btn-whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background-color: #25D366; border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease;
}
.btn-whatsapp-float:hover { transform: scale(1.1); }
.btn-whatsapp-float svg { width: 35px; height: 35px; fill: white; }

/* --- 5. NAVEGACIÓN --- */
.navbar { 
    position: fixed; width: 100%; top: 0; z-index: 1000; transition: 0.4s; 
    padding: 0; 
    height: var(--nav-height);
    display: flex; align-items: center;
    background-color: var(--color-primary); /* Default sólido (internas) */
}

/* Home: transparente */
body#home .navbar { background-color: transparent; box-shadow: none; }
/* Home Scrolled: sólido */
body#home .navbar.scrolled { background-color: var(--color-primary); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.nav-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }

/* --- LOGO GRANDE --- */
.logo { display: flex; align-items: center; height: 100%; padding: 5px 0; }
.logo img { 
    max-height: 90px; 
    width: auto; 
    object-fit: contain; 
}

/* --- MENÚ GRANDE --- */
.nav-links { list-style: none; display: flex; gap: 2rem; align-items: center; }
.nav-links a { 
    color: var(--color-white); text-decoration: none; 
    font-size: 1.05rem; 
    font-weight: 600;   
    transition: 0.3s; 
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nav-links a:hover, .nav-links a.active-link { color: var(--color-accent); }

/* HAMBURGUESA (ESTILOS Y ANIMACIÓN) */
.hamburger { display: none; cursor: pointer; z-index: 2001; } /* Z-index mayor que el menú desplegado */
.hamburger span { 
    display: block; width: 30px; height: 3px; 
    background-color: var(--color-accent); margin: 6px 0; 
    transition: all 0.3s ease; 
}

/* Animación cuando está activo (Clase .toggle agregada por JS) */
.hamburger.toggle span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.hamburger.toggle span:nth-child(2) { opacity: 0; }
.hamburger.toggle span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

/* --- 6. SECCIÓN HERO (HOME) --- */
.hero { 
    height: 100vh; min-height: 600px; display: flex; align-items: center; 
    position: relative; background-size: cover; background-position: center; 
}
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(8,24,43,0.9), rgba(8,24,43,0.4)); }
.hero-content { position: relative; z-index: 2; color: var(--color-white); max-width: 800px; margin-left: 5%; } 
.hero h1 { color: #FFFFFF; } /* Texto blanco forzado */
.hero-subtitle { font-size: 1.25rem; margin-bottom: 2rem; font-weight: 300; max-width: 600px; }

/* --- 6.1 HEADER INTERNO (FIX ALINEACIÓN Y ALTURA) --- */
.internal-header {
    position: relative;
    background-color: var(--color-primary);
    background-size: cover;
    background-position: top center !important;
    text-align: left; 
    display: flex;
    align-items: flex-start; /* Alinea contenido a la izquierda */
    justify-content: center; /* Centrado vertical */
    flex-direction: column;
    color: var(--color-white);
    padding-top: calc(var(--nav-height) + 2rem); 
    padding-bottom: 6rem;
    min-height: 60vh; 
}

.internal-header .hero-content { 
    margin: 0; 
    margin-left: 5%; 
    text-align: left; 
    max-width: 800px;
}
.internal-header h1 { font-size: 3.5rem; color: #FFFFFF; }

/* --- 7. TRUST BAR --- */
.trust-bar { background-color: #eaeaea; padding: 1rem 0; text-align: center; color: #666; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

/* --- 8. CARDS & SECCIONES --- */
.section-padding { padding: var(--section-padding); }
.section-header { margin-bottom: 4rem; } 

.premium-card { background: var(--color-white); padding: 2.5rem; border-radius: var(--border-radius); box-shadow: var(--shadow); transition: transform 0.3s; border-top: 4px solid transparent; height: 100%; display: flex; flex-direction: column; }
.premium-card:hover { transform: translateY(-5px); border-color: var(--color-accent); }
.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }

/* Card Genérico */
.card { 
    background: var(--color-white); 
    padding: 2.5rem; 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow); 
    border-top: 4px solid transparent; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    position: relative; /* Necesario para el overlay */
    overflow: hidden;   /* Necesario para contener el overlay */
}
.card:hover { border-color: var(--color-accent); }

/* Listas estilizadas */
.info-list { list-style: none; margin-top: 1rem; text-align: left; }
.info-list li { margin-bottom: 0.8rem; padding-left: 1.5rem; position: relative; color: #555; }
.info-list li::before { content: '•'; color: var(--color-accent); font-weight: bold; position: absolute; left: 0; font-size: 1.2rem; line-height: 1; }

/* --- 9. ABOUT SECTION --- */
.about-image img { width: 100%; max-width: 500px; border-radius: var(--border-radius); box-shadow: var(--shadow); }

/* --- 10. TIENDA IMAGES Y OVERLAY (NUEVO) --- */

/* Estilo para LIBROS (Verticales) */
.product-img-book {
    width: 100%;
    height: 450px; /* Altura fija vertical */
    object-fit: cover;
    object-position: top;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    display: block;
}

/* Estilo para VIDEOTALLERES / MÓDULOS (Horizontales) */
.product-img-video {
    width: 100%;
    aspect-ratio: 16 / 9; /* Mantiene formato pantalla ancha */
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    display: block;
}

/* Overlay de descripción */
.product-desc-full {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    overflow-y: auto; 
    z-index: 10;
    border: 1px solid var(--color-accent);
    display: flex;
    flex-direction: column;
}

.more-info-trigger {
    display: inline-block; margin-bottom: 1rem; color: var(--color-primary);
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    border-bottom: 1px dotted var(--color-primary); transition: color 0.3s;
}
.more-info-trigger:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* Mostrar al hacer hover (PC) O si tiene la clase .active (Móvil/JS) */
.more-info-trigger:hover + .product-desc-full,
.product-desc-full:hover,
.product-desc-full.active {
    opacity: 1;
    visibility: visible;
}

.product-desc-full h4 {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 0.5rem;
}

.product-desc-full p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

/* --- 12. FOOTER --- */
.footer { background-color: var(--color-primary); color: #ccc; padding: 4rem 0 0; }
.footer h4 { color: var(--color-white); font-size: 1.1rem; margin-bottom: 1.5rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.8rem; }
.footer a { color: #ccc; text-decoration: none; transition: 0.3s; }
.footer a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; margin-top: 3rem; font-size: 0.85rem; }

/* --- 13. RESPONSIVE --- */
@media (max-width: 900px) {
    h1 { font-size: 2.5rem; }
    
    .hamburger { display: block; } /* Mostrar icono en móvil */

    .nav-links { 
        position: fixed; 
        right: -100%; /* Oculto por defecto */
        top: 0; 
        height: 100vh; 
        background-color: var(--color-primary); 
        flex-direction: column; 
        width: 80%; 
        justify-content: center; 
        transition: 0.4s; 
        z-index: 2000; /* Menor que hamburger (2001) para que la X se vea */
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }
    
    /* Clase que activa el menú en móvil */
    .nav-links.active { right: 0; }
    
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 3rem; }
    
    /* En móvil, texto del Hero centrado */
    .hero-content, .internal-header .hero-content { 
        margin: 0 auto; 
        text-align: center; 
        margin-left: 0; 
    }
    .internal-header { 
        padding-top: 140px; 
        align-items: center; 
    }
    
    .btn-outline { margin: 1rem 0 0 0; display: block; width: 100%; text-align: center; }
}