/* css/style.css - Estilos visuales para el proyecto GSAP */

/* --- IMPORTACIÓN DE FUENTES Y VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=Manrope:wght@600;700;800&display=swap');

:root {
    --primary-color: #e91e63;
    --primary-light: #f48fb1;
    --primary-dark: #ad1457;
    --accent-color: #007ACC;
    --accent-light: #42a5f5;
    --accent-dark: #0d47a1;
    --bg-glass: rgba(245, 245, 245, 0.5);
    --bg-glass-hover: rgba(255, 255, 255, 0.6);
    --text-primary: #0f0f0f;
    --text-secondary: rgba(53, 53, 53, 0.85);
    --font-primary: 'DM Sans', sans-serif;
    --font-display: 'Manrope', sans-serif;
    --border-radius: 16px;
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* --- CONFIGURACIÓN BASE --- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #111; /* Un fondo oscuro base */
    font-family: var(--font-primary);
    color: var(--text-primary);
}

/* El canvas 3D siempre al fondo */
#application-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none; /* Por defecto no interactúa, para poder hacer scroll */
}
/* En desktop permitimos la interacción si el ratón está sobre el canvas */
.is-desktop #application-canvas {
    pointer-events: auto;
}

/* El contenedor de scroll ahora es controlado por Lenis/Nativo */
#uiScrollContainer {
    position: relative;
    z-index: 1;
    width: 100%;
    /* Dejamos que el contenido determine la altura */
}

/* --- SECCIONES Y CONTENIDO --- */
.scroll-section {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: flex-end; /* Alinea el contenido a la derecha */
    align-items: center;
    padding: 2rem 5vw;
    box-sizing: border-box;
    pointer-events: none; /* El panel no captura eventos, solo sus hijos */
}

@media (max-width: 768px) {
    .scroll-section {
        justify-content: center; /* Centrado en móvil */
        padding: 1rem;
    }
}

.section-content {
    width: 40vw;
    max-width: 450px;
    padding: 2.5rem;
    pointer-events: auto; /* El contenido sí es interactivo */
    
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden; /* Para los botones de navegación internos */
}

.section-content:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-0px);
    box-shadow: var(--shadow-hover);
}

@media (max-width: 768px) {
    .section-content {
        width: 90vw;
        max-width: none;
        padding: 1.5rem;
    }
}

/* --- ESTILOS PARA SECCIONES DE PRESENTACIÓN AMPLIADAS --- */

/* Contenedor de texto para layout en dos columnas */
.text-content {
    flex-basis: 45%; /* Ocupa el 45% del espacio */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 1. Estilo para el contenido de sección a pantalla casi completa */
.content-fullscreen {
    width: 90vw;
    max-width: 1400px;
    height: 85vh; /* <-- CAMBIO: Vuelve a una altura fija */
    max-height: 95vh; /* Permite que el contenido ocupe toda la altura disponible */
    margin-top: 0.0vh; /* Centramos el panel de 85vh en la pantalla de 100vh */
    display: flex; /* Añadimos para tener control sobre el contenido interno */
    flex-direction: row; 
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
}

/* 2. Estilo específico para la sección HERO a pantalla completa */
/* Modificador para que la sección Hero ocupe el 100% del ancho sin padding */
#hero.scroll-section {
    padding: 0;
    align-items: flex-start;
}

/* 2. Estilo específico para la sección HERO a pantalla completa */
.hero-fullscreen {
    width: 100%;
    min-height: 100vh;
    max-width: none;
    padding: 4rem 2rem; /* Añadimos padding vertical y mantenemos el horizontal */
    box-sizing: border-box; /* Importante para que el padding no incremente el tamaño */
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff; /* Fondo 100% opaco */
    display: flex; /* Aseguramos que es un contenedor flex */
    flex-direction: column;
    justify-content: flex-start; /* <-- CAMBIO CLAVE: Alinea el contenido arriba */
    align-items: center; /* Centra el contenido horizontalmente */
    text-align: center;
    transition: background-color 0.3s ease-in-out;
}

/* Anulamos cualquier efecto hover sobre el Hero */
.hero-fullscreen:hover {
    background: #ffffff; /* Mantiene el fondo opaco */
    transform: none;
    box-shadow: none;
}


/* Modificador para centrar el contenido en lugar de alinearlo a la derecha */
.scroll-section.centered {
    justify-content: center;
    /* align-items: flex-start; */
}


/* 3. Contenedor para el contenido gráfico (imagen o video) */
.graphic-content {
    flex-basis: 50%;
    height: 100%;
    max-height: 450px; /* <-- CAMBIO: Altura máxima para el contenido multimedia */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(228, 228, 228, 0.219); 
    border-radius: var(--border-radius);
    overflow: hidden;
}

.graphic-content img,
.graphic-content video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* La imagen/video cubre el contenedor */
}

/* --- CLASE PARA VIDEOS EN BUCLE CON BORDES REDONDEADOS --- */
.video-loop {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto asegura que el video llene el contenedor */
    border-radius: var(--border-radius); /* Aplica el redondeo */
}


/* 4. Estilo para una galería de imágenes sencilla */
.simple-gallery {
    flex-basis: 50%;
    height: 100%;
    display: grid;
    /* Crea 2 columnas y 2 filas */
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
}

.simple-gallery .gallery-item {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--border-radius) / 1.5);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.simple-gallery .gallery-item:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 10;
}

.simple-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ajustes responsivos para las nuevas secciones */
@media (max-width: 1024px) {
    .content-fullscreen {
        flex-direction: column; /* Apila las columnas en tablet/móvil */
        height: auto; /* Altura automática para que quepa el contenido */
        max-height: 95vh;
        padding: 2rem;
        overflow-y: auto; /* Permite scroll si el contenido es muy alto */
    }
    .text-content,
    .graphic-content,
    .simple-gallery {
        flex-basis: auto; /* Anula el tamaño base */
        width: 100%;
    }
    .graphic-content,
    .simple-gallery {
        margin-top: 2rem;
        min-height: 300px;
    }
}



/* --- TIPOGRAFÍA --- */
.section-content h1, .section-content h2, .section-content h3 {
    font-family: var(--font-display);
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.section-content h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; }
.section-content h2 { font-size: clamp(1.8rem, 4vw, 2.2rem); font-weight: 700; }
.section-content h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 600; color: var(--text-secondary); }
.section-content p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
}

/* --- BOTONES --- */
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-start; }

.section-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.section-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.section-button.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}
.section-button.primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}
.section-button.secondary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
}
.section-button.secondary:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-color));
}

@media (max-width: 768px) {
    .hero-buttons, .section-button {
        width: 100%;
        display: block;
        text-align: center;
    }
    .hero-buttons {
        display: flex;
        flex-direction: column;
    }
}

/* --- BOTONES DE NAVEGACIÓN ENTRE SECCIONES --- */
.btn-sec-nav {
    position: absolute;
    left: 0;
    width: 100%;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}
.btn-sec-nav:hover {
    background: rgba(0, 0, 0, 0.6);
    color: white;
}
.btn-sec-nav.top {
    top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}
.btn-sec-nav.bottom {
    bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}
/* Ocultar botones en primera y última sección (GSAP podría manejar esto, pero CSS es más simple) */
#hero .btn-sec-nav.top,
#sec6 .btn-sec-nav.bottom {
    display: none;
}


/* CABECERA ===========================================================================================================================*/

/* css/style.css */

/* --- ESTILOS DE LA CABECERA (VERSIÓN DESPLEGABLE) --- */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 900px;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), top 0.4s ease;
}

.main-header.header-hidden {
    transform: translate(-50%, -150%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 25px;
    box-sizing: border-box;
    background-color: #c73c6a; /* Color sólido, más optimizado */
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-glass);
}

.header-logo {
    display: flex;
    align-items: center;
}

/* El <nav> ahora es un contenedor relativo para el desplegable */
.main-header nav {
    position: relative;
}

/* Botón del menú de escritorio */
#desktop-menu-button {
    padding: 0.5rem 1.25rem; /* Hacemos el botón un poco más pequeño */
    background: rgba(0,0,0,0.15);
    border-color: transparent;
    color: white;
}
#desktop-menu-button:hover {
    background: rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

/* El menú desplegable (la lista) */
.main-header nav ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    
    position: absolute;
    top: calc(100% + 15px); /* <-- CAMBIO: Aumentamos el espacio con la barra */
    right: 0;
    
    width: 250px;
    /* --- CAMBIOS DE ESTILO --- */
    background: rgba(255, 255, 255, 0.75); /* Fondo blanco semitransparente */
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil para el efecto cristal */
    /* --- FIN DE CAMBIOS --- */
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Clase que se añade con JS para mostrar el desplegable */
.main-header.desktop-menu-open nav ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-header nav a {
    text-decoration: none;
    color: #c73c6a;
    font-weight: 500;
    font-size: 1rem;
    padding: 12px 20px;
    display: block; /* Para que ocupe todo el ancho del item */
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.main-header nav a:hover {
    background-color: rgba(0, 0, 0, 0.2);
    padding-left: 25px; /* Pequeño efecto visual al pasar el ratón */
}

.mobile-menu-toggle {
    display: none;
    /* ... (resto de estilos del botón hamburguesa sin cambios) ... */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* --- ESTILOS RESPONSIVOS (VERSIÓN DESPLEGABLE) --- */
@media (max-width: 768px) {
    /* Ocultamos el botón de escritorio y mostramos el de hamburguesa */
    #desktop-menu-button {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }

    /* La lista de enlaces se posiciona para móvil */
    .main-header nav ul {
        display: none; /* Oculta por defecto */
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        width: 100%;
        background: #c73c6a;
        border-radius: 20px;
        padding: 1rem 0;
        box-shadow: var(--shadow-hover);
        opacity: 1; /* La visibilidad la controla 'display' */
        visibility: visible;
        transform: none;
    }
    
    /* La clase para abrir el menú móvil ahora solo cambia el display */
    .main-header.mobile-menu-open nav ul {
        display: block;
    }

    /* Animación del botón hamburguesa a 'X' */
    .main-header.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .main-header.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }
    .main-header.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}