/* --- CONTENEDOR PRINCIPAL 100VH --- */
#snap-gallery {
    height: 100vh;
    width: 100%;
    background-color: #1d2e28; /* Fondo muy oscuro */
    display: grid;
    /* Estructura: Header flotante (no ocupa espacio en grid), Principal (1fr), Miniaturas (auto) */
    grid-template-rows: 1fr auto; 
    position: relative;
}

/* --- CABECERA FLOTANTE --- */
.gallery-header {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
    pointer-events: none; /* Para poder hacer click a través del texto */
}

.gallery-title {
    font-size: 1.5rem;
    color: #f5da95;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(0,0,0,0.3);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

/* --- 1. ESCENARIO PRINCIPAL (MAIN STAGE) --- */
.main-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Animación de entrada */
}

/* La imagen de fondo grande */
#mainBg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out, transform 5s ease;
}

/* Efecto Ken Burns suave */
.main-stage:hover #mainBg {
    transform: scale(1.05);
}

/* Capa oscura para que se lea el texto */
.overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, #1d413d 5%, transparent);
    z-index: 1;
}

/* Contenido de texto principal */
.main-content {
    position: absolute;
    bottom: 40px; /* Un poco arriba de las miniaturas */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
    width: 90%;
    max-width: 600px;
    color: white;
}

.main-content h3 {
    font-size: 3rem;
    margin: 10px 0;
    color: #f5da95;
    line-height: 1.1;
}

.main-content p {
    font-size: 1.1rem;
    color: #ddd;
    margin-bottom: 20px;
}

.card-year {
    background: #f5da95;
    color: #1d413d;
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.card-btn {
    color: #f5da95;
    text-decoration: none;
    border-bottom: 1px solid #f5da95;
    padding-bottom: 3px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

/* --- 2. CINTA DE MINIATURAS (SECUNDARIAS) --- */
.thumbs-wrapper {
    background: #1d413d;
    padding: 20px 0 30px 0;
    width: 100%;
    z-index: 5;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

.thumbs-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 0 20px;
    scroll-snap-type: x mandatory;
    
    /* Centrar las miniaturas si son pocas */
    justify-content: flex-start; 
}

/* Scrollbar invisible */
.thumbs-scroll::-webkit-scrollbar { display: none; }

.thumb-card {
    flex: 0 0 140px; /* Ancho fijo de miniatura */
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5; /* Oscuro si no está activo */
    transition: all 0.3s ease;
    border: 2px solid transparent;
    scroll-snap-align: center;
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estado Activo y Hover */
.thumb-card:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

.thumb-card.active {
    opacity: 1;
    border-color: #f5da95;
    box-shadow: 0 0 15px rgba(245, 218, 149, 0.4);
    transform: scale(1.05);
}

/* --- MEDIA QUERY: MÓVIL --- */
@media screen and (max-width: 768px) {
    .main-content h3 { font-size: 2rem; }
    .thumb-card { flex: 0 0 100px; height: 70px; }
    .main-content { bottom: 20px; }
    .thumbs-wrapper { padding: 15px 0 20px 0; }
}