/* =================================================================== */
/* 1. ESTILOS GENERALES Y LAYOUT */
/* =================================================================== */

.logo-splash-section {
    flex-direction: column; 
    /* Aseguramos que el contenido base esté centrado */
    display: flex;
    align-items: center;
}

.centered-logo {
    /* Ajusta esto según el tamaño de tu logo si es necesario */
    max-width: 100%;
    height: auto;
}

/* =================================================================== */
/* 2. BOTONES PRINCIPALES */
/* =================================================================== */

.years-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 5.3rem;
    width: 100%;
    z-index: 10;
    flex-wrap: wrap; /* Permite que bajen si no caben */
}

.year-btn {
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    /* Color base por si falla la variable */
    background-color: var(--link-color, #333); 
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    white-space: nowrap; /* Evita que el texto se parta en dos líneas */
}

/* --- COLORES Y HOVER --- */

/* Botón 2024 */
.year-btn.btn-2024:hover {
    background-color: #dd728a; /* Azul oscuro */
    transform: translateY(-3px) scale(1.05);
}

/* Botón 2025 */
.year-btn.btn-2025:hover {
    background-color: #a69b49; /* Dorado */
    transform: translateY(-3px) scale(1.05);
}

/* Botón Divulgación */
.year-btn.btn-divulgacion:hover {
    background-color: #17a2b8; /* Turquesa/Teal */
    transform: translateY(-3px) scale(1.05);
}

/* =================================================================== */
/* 3. MODALES (BASE) */
/* =================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro */
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

/* Contenedor genérico del modal */
.modal-content {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border: none;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Botón de cerrar (la X) */
.close-modal-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: white;
    color: black;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #333;
    cursor: pointer;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.close-modal-btn:hover {
    transform: scale(1.1);
    background-color: #f0f0f0;
    color: red;
}

/* =================================================================== */
/* 4. ESTILOS ESPECÍFICOS: PÓSTER (2024/2025) */
/* =================================================================== */

.poster-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* =================================================================== */
/* 5. ESTILOS ESPECÍFICOS: GALERÍA (DIVULGACIÓN) - CORREGIDO */
/* =================================================================== */

.gallery-modal-content {
    background: #fff;
    padding: 2.5rem 1rem 1rem 1rem; /* Mucho espacio arriba para la X */
    max-width: 65rem; /* Un poco más ancho para que quepan las flechas */
    max-height: 95vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: relative; /* Necesario para ubicar la X */
}

/* --- CORRECCIÓN BOTÓN CERRAR (X) --- */
/* Forzamos que la X de la galería esté DENTRO del cuadro blanco */
.gallery-modal-content .close-modal-btn {
    top: 10px;      /* 10px desde arriba (adentro) */
    right: 10px;    /* 10px desde la derecha (adentro) */
    background-color: #f0f0f0; /* Gris claro para diferenciarlo */
    border: none;
    color: #333;
    box-shadow: none; /* Quitamos sombra para diseño más plano */
}

.gallery-modal-content .close-modal-btn:hover {
    background-color: #e74c3c; /* Rojo al pasar mouse */
    color: white;
}

/* --- WRAPPER PARA ALINEAR FLECHAS Y FOTOS --- */
.gallery-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem; /* Espacio entre flecha y foto */
    width: 100%;
    position: relative;
}

.gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 30rem; /* Altura fija en escritorio */
    background-color: #000; /* Fondo negro estético */
    border-radius: 4px;
    flex-grow: 1; /* Ocupa el espacio central */
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.gallery-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.gallery-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* --- FLECHAS (AHORA FUERA DE LA FOTO) --- */
.prev-btn, .next-btn {
    position: static; /* Ya no son absolute, son parte del flexbox */
    transform: none;  /* Quitamos centrado manual */
    background: #333; /* Botón oscuro */
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 50%;
    width: 3rem;   /* Un poco más grandes */
    height: 3rem;
    display: flex; /* Flex para centrar el icono */
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    flex-shrink: 0; /* Evita que se aplasten */
}

.prev-btn:hover, .next-btn:hover {
    background: #20a3b2; /* Turquesa al hover */
    transform: scale(1.1);
}

.gallery-indicators {
    text-align: center;
    padding-top: 1rem;
    height: auto;
}

.indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: #17a2b8;
}

/* =================================================================== */
/* 📱 RESPONSIVE CORREGIDO (CELULAR) */
/* =================================================================== */

@media (max-width: 768px) {
    /* Ajustes generales */
    .years-container {
        flex-direction: column;
        gap: 1rem;
        margin-top: 3rem;
        padding: 0 1rem;
    }
    .year-btn {
        width: 100%;
        max-width: 280px;
    }

    /* Modal Galería en Móvil */
    .gallery-modal-content {
        padding: 3rem 0.5rem 1rem 0.5rem; /* Padding arriba para la X */
        width: 95%;
    }

    /* En móvil, cambiamos la estructura para que las flechas bajen */
    .gallery-wrapper {
        flex-direction: column; /* Apilar verticalmente */
        gap: 0.5rem;
    }

    .gallery-container {
        height: 45vh; /* Altura responsiva */
        width: 100%;
    }

    /* Contenedor extra para poner las flechas juntas abajo (opcional, o usamos order) */
    /* Usaremos una técnica simple: Posicion absolute en móvil para ponerlas ABAJO */
    
    .prev-btn, .next-btn {
        /* Convertimos los botones en botones inferiores anchos o círculos flotantes */
        position: absolute;
        bottom: 12px; /* Alineados con los indicadores */
        width: 2.5rem;
        height: 2.5rem;
        background: rgba(0,0,0,0.1); /* Gris muy suave */
        color: #333;
        border: 1px solid #ccc;
        z-index: 20;
    }

    /* Ubicación específica en móvil (esquinas inferiores) */
    .prev-btn {
        left: 1rem;
        bottom: 1rem;
    }
    
    .next-btn {
        right: 1rem;
        bottom: 1rem;
        position: absolute; /* Reafirmar */
    }

    /* Ajuste para que los indicadores no choquen con los botones en móvil */
    .gallery-indicators {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Ajuste de la X en móvil */
    .gallery-modal-content .close-modal-btn {
        top: 5px;
        right: 5px;
        width: 35px;
        height: 35px;
    }
}
/* =================================================================== */
/* 📱 MEDIA QUERIES (RESPONSIVE PARA CELULAR Y TABLET) */
/* =================================================================== */

@media (max-width: 768px) {

    /* 1. Ajuste de Botones Principales */
    .years-container {
        flex-direction: column;
        gap: 1rem;
        margin-top: 3rem;
        padding: 0 1rem;
    }

    .year-btn {
        width: 100%;       /* Ocupan todo el ancho disponible */
        max-width: 240px;  /* Pero no más de 280px */
        padding: 0.4rem 1rem;
        font-size: 1.2rem;
    }

    /* 2. Ajuste del Modal Póster (Imagen Cartel) */
    .poster-img {
        max-width: 95vw;   /* Aprovechar más ancho en móvil */
        max-height: 80vh;  /* Dejar espacio para el botón de cerrar arriba */
    }

    /* Movemos el botón de cerrar DENTRO del área visible o ajustamos posición */
    .close-modal-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        /* En móvil, pegarlo más a la esquina para que no se salga de pantalla */
        top: -10px;
        right: -5px;
        background-color: rgba(255, 255, 255, 0.9);
    }

    /* 3. Ajuste de la Galería (Divulgación) */
    .gallery-modal-content {
        padding: 0.5rem;   /* Menos borde blanco para ganar espacio */
        width: 95%;        /* Casi todo el ancho de pantalla */
    }

    .gallery-container {
        height: 50vh;      /* Altura proporcional a la pantalla del móvil */
        min-height: 200px;
    }

    .prev-btn, .next-btn {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
        background: rgba(0,0,0,0.3); /* Fondo oscuro semitransparente para ver mejor en fotos claras */
    }
}