/* =======================================================
    ESTILOS COMPLETO PARA GALERÍA DE EVENTOS (ep.css) 
    ======================================================= */

/* HERO SECTION MEJORADA */
.container1 {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.eventos-hero {
  background-color: var(--color-light-gray);
  color: var(--color-extra-dark);
  padding: 60px 20px;
  text-align: center;
}

.eventos-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.eventos-hero p {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* SECCIÓN DEL VIDEO */
.video-section {
    padding: 2rem 0;
    background: var(--color-dark);
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.video-watermark {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.video-watermark span {
    font-style: italic;
}

/* FILTROS CON FONDO #BCBCBC */
.filtros-section {
  padding: 2rem 0;
  background-color: #BCBCBC; /* Color solicitado */
  border-bottom: 1px solid #a0a0a0; 
}

.filtros-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.filtro-btn {
  background: white;
  border: 2px solid var(--color-primary); 
  color: var(--color-primary); 
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.filtro-btn:hover {
  background: var(--color-primary); 
  color: white;
  transform: translateY(-2px);
}

.filtro-btn.active {
  background: var(--color-primary); 
  color: white;
  box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3); 
}

/* =======================================================
    GALERÍA MODERNA CON FONDO #BCBCBC 
    ======================================================= */
.galeria-moderna {
  padding: 2rem 0;
  background-color: #BCBCBC; /* Color solicitado */
}

/* =======================================================
    EVENTO-AÑO - SIN BORDES, CON FONDO RESPONSIVO MEJORADO
    ======================================================= */
.evento-ano {
  margin-bottom: 3rem; /* REDUCIDO de 5rem a 3rem */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  
  /* Quitamos bordes, sombras y padding innecesarios */
  padding: 2rem 0;
  border-radius: 0;
  box-shadow: none;
  
  /* Propiedades del fondo responsivo */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.evento-ano.hidden {
  opacity: 0;
  transform: translateY(20px);
  display: none;
}

/* =======================================================
    FONDOS RESPONSIVOS PARA CADA EVENTO-AÑO (ALTERNANDO)
    ======================================================= */

/* EVENTO 2025 - usa las imágenes v2 (versión 2) */
.evento-ano[data-year="2025"] {
  background-image: url('../img/background/background-large-v2.png'); /* Imagen por defecto */
}

/* EVENTO 2024 - usa las imágenes originales (versión 1) */
.evento-ano[data-year="2024"] {
  background-image: url('../img/background/background-large.png'); /* Imagen por defecto */
}

/* EVENTO 2023 - usa las imágenes v2 */
.evento-ano[data-year="2023"] {
  background-image: url('../img/background/background-large-v2.png'); /* Imagen por defecto */
}

/* EVENTO 2019 - usa las imágenes originales */
.evento-ano[data-year="2019"] {
  background-image: url('../img/backgroundbackground-large.png'); /* Imagen por defecto */
}

/* =======================================================
    MEDIA QUERIES COMUNES PARA TODOS LOS EVENTO-AÑO
    ======================================================= */

/* Pantallas 4K/Ultra grandes */
@media (min-width: 2560px) {
  .evento-ano[data-year="2025"],
  .evento-ano[data-year="2023"] {
    background-image: url('../img/background/background-xxlarge-v2.png');
  }
  
  .evento-ano[data-year="2024"],
  .evento-ano[data-year="2019"] {
    background-image: url('../img/background/background-xxlarge.png');
  }
}

/* Pantallas grandes (desktop Full HD) */
@media (min-width: 1920px) and (max-width: 2559px) {
  .evento-ano[data-year="2025"],
  .evento-ano[data-year="2023"] {
    background-image: url('../img/background/background-xxlarge-v2.png');
  }
  
  .evento-ano[data-year="2024"],
  .evento-ano[data-year="2019"] {
    background-image: url('../img/background/background-xxlarge.png');
  }
}

/* Laptops y desktops estándar (HD) */
@media (min-width: 1200px) and (max-width: 1919px) {
  .evento-ano[data-year="2025"],
  .evento-ano[data-year="2023"] {
    background-image: url('../img/background/background-large-v2.png');
  }
  
  .evento-ano[data-year="2024"],
  .evento-ano[data-year="2019"] {
    background-image: url('../img/background/background-large.png');
  }
}

/* Tablets y laptops pequeñas */
@media (min-width: 768px) and (max-width: 1199px) {
  .evento-ano[data-year="2025"],
  .evento-ano[data-year="2023"] {
    background-image: url('../img/background/background-medium-v2.png');
  }
  
  .evento-ano[data-year="2024"],
  .evento-ano[data-year="2019"] {
    background-image: url('../img/background/background-medium.png');
  }
  
  .evento-ano {
    margin-bottom: 2.5rem; /* REDUCIDO de 4rem a 2.5rem */
  }
}

/* Móviles grandes */
@media (min-width: 480px) and (max-width: 767px) {
  .evento-ano[data-year="2025"],
  .evento-ano[data-year="2023"] {
    background-image: url('../img/background/background-small-v2.png');
  }
  
  .evento-ano[data-year="2024"],
  .evento-ano[data-year="2019"] {
    background-image: url('../img/background/background-small.png');
  }
  
  .evento-ano {
    margin-bottom: 2rem; /* REDUCIDO de 3rem a 2rem */
    padding: 1.5rem 0;
    background-attachment: scroll;
  }
}

/* Móviles pequeños */
@media (max-width: 479px) {
  .evento-ano[data-year="2025"],
  .evento-ano[data-year="2023"] {
    background-image: url('../img/background/background-mobile-v2.png');
  }
  
  .evento-ano[data-year="2024"],
  .evento-ano[data-year="2019"] {
    background-image: url('../img/background/background-mobile.png');
  }
  
  .evento-ano {
    margin-bottom: 1.5rem; /* REDUCIDO de 2.5rem a 1.5rem */
    padding: 1rem 0;
    background-attachment: scroll;
  }
}

/* =======================================================
    ANO-HEADER CON EFECTO VIDRIO SUTIL
    ======================================================= */
.ano-header {
  text-align: center;
  margin-bottom: 2rem; /* REDUCIDO de 3rem a 2rem */
  
  /* Efecto vidrio sutil */
  background: rgba(0,0,0, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  
  /* Bordes suaves */
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  
  /* Sombra sutil */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ano-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: larger;
  margin-bottom: 1rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ano-header h2 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ano-header p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* =======================================================
    CONTENIDO DE GALERÍA MEJORADO
    ======================================================= */

/* GRID DE GALERÍA: ESENCIAL PARA EL LAYOUT DINÁMICO */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 250px;
  gap: 1.5rem;
  margin-bottom: 1.5rem; /* REDUCIDO de 2rem a 1.5rem */
  width: 100%;
}

.galeria-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.galeria-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.galeria-item:hover img {
  transform: scale(1.05);
}

/* TAMAÑOS ESPECIALES PARA EL LAYOUT MASONRY */
.galeria-item.grande {
  grid-column: span 2;
  grid-row: span 2;
}

.galeria-item.ancho {
  grid-column: span 2;
}

.galeria-item.alto {
  grid-row: span 2;
}

/* OVERLAY Y CONTROLES */
.galeria-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.7));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.galeria-item:hover .galeria-overlay {
  opacity: 1;
}

.galeria-info h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.galeria-info p {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.galeria-zoom {
  background: rgba(255,255,255,0.9);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--color-primary); 
  font-size: 1.1rem;
}

.galeria-zoom:hover {
  background: white;
  transform: scale(1.1);
}

/* =======================================================
    EVENTO-ACTIONS - BOTONES IGUALES A WSW.PHP
    ======================================================= */
.evento-actions {
  text-align: center;
  margin-top: 0.5rem; /* Espacio mínimo arriba del botón */
}

/* Botón IGUAL a wsw.php - CONSISTENTE */
.btn-album {
  display: inline-block;
  background-color: var(--color-primary);
  color: white !important;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  max-width: 100%;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(88, 136, 166, 0.3);
  width: auto;
  white-space: nowrap;
}

.btn-album:hover {
  background-color: var(--color-accent) !important;
  color: white !important;
  transform: translateY(-2px);
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(242, 92, 5, 0.4);
}

/* Asegurar consistencia */
.btn-album:link,
.btn-album:visited,
.btn-album:hover,
.btn-album:active,
.btn-album:focus {
  color: white !important;
  text-decoration: none !important;
  outline: none;
}

/* Focus para accesibilidad */
.btn-album:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
}

.modal-close:hover {
  color: #bbb;
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 2rem;
}

.modal-prev,
.modal-next {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-prev:hover,
.modal-next:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
  .galeria-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 200px;
  }
}

@media (max-width: 768px) {
  .eventos-hero h1 {
    font-size: 2.2rem;
  }
  
  .eventos-hero p {
    font-size: 1.1rem;
  }
  
  .video-section {
    padding: 1.5rem 0;
  }
  
  .video-container {
    border-radius: 8px;
  }
  
  .video-watermark {
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 3px 10px;
  }
  
  .galeria-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 300px;
  }
  
  .galeria-item.grande,
  .galeria-item.ancho,
  .galeria-item.alto {
    grid-column: 1 / span 1 !important;
    grid-row: auto !important;
  }
  
  .filtros-container {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
  }
  
  .filtro-btn {
    flex-shrink: 0;
  }
  
  .ano-header {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  
  .ano-header h2 {
    font-size: 1.8rem;
  }
  
  .ano-header p {
    font-size: 1rem;
  }
  
  .galeria-grid {
    margin-bottom: 1rem;
  }
  
  .btn-album {
    padding: 12px 25px;
    font-size: 0.95rem;
  }
  
  .modal-nav {
    padding: 0 1rem;
  }
  
  .modal-prev,
  .modal-next {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .eventos-hero {
    padding: 3rem 0;
  }
  
  .eventos-hero h1 {
    font-size: 1.8rem;
  }
  
  .video-section {
    padding: 1rem 0;
  }
  
  .ano-header h2 {
    font-size: 1.7rem;
  }
  
  .ano-header {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  .galeria-grid {
    grid-auto-rows: 250px;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .galeria-overlay {
    padding: 1rem;
    opacity: 1; 
  }
  
  .btn-album {
    padding: 12px 20px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
  }
  
  .evento-actions {
    margin-top: 0.25rem;
  }
}

/* Optimización para dispositivos con soporte limitado de backdrop-filter */
@supports not (backdrop-filter: blur(5px)) {
  .ano-header {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .ano-badge {
    background: var(--color-primary);
  }
}

/* Para móviles con rendimiento limitado */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .evento-ano {
    transition: none;
  }
  
  .galeria-item:hover {
    transform: none;
  }
  
  .galeria-item img {
    transition: none;
  }
  
  .btn-album:hover {
    transform: none;
  }
}

/* Asegurar que el contenedor no sea demasiado alto */
.evento-ano .container1 {
  position: relative;
  z-index: 2;
}

/* =======================================================
    CARRUSEL DE BANDERAS - VERSIÓN CORREGIDA
    ======================================================= */
.banderas-carousel-section {
    padding: 3rem 0;
    background-color: #bcbcbc;
    overflow: hidden;
}

.banderas-titulo {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--color-dark);
    display: inline-block;
    width: 100%;
}

.banderas-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    padding: 30px 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Cambiado a 0.5s para que coincida con JS */
    gap: 20px;
    align-items: center;
    will-change: transform;
}

/* Estilos para cada slide/bandera - SIN SOMBRA Y NÍTIDO */
.bandera-slide {
    flex: 0 0 calc(20% - 16px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    aspect-ratio: 4/3;
    filter: blur(1px) brightness(0.9);
    opacity: 0.7;
    transform: scale(0.85);
    cursor: pointer;
    box-shadow: none; /* SIN SOMBRA */
}

/* Efecto cilindro - las de los extremos más pequeñas */
.bandera-slide.prev-prev,
.bandera-slide.next-next {
    filter: blur(2px) brightness(0.8);
    opacity: 0.5;
    transform: scale(0.7);
}

.bandera-slide.prev,
.bandera-slide.next {
    filter: blur(1.5px) brightness(0.85);
    opacity: 0.6;
    transform: scale(0.8);
}

/* Slide activo (centro) - NÍTIDO Y SIN SOMBRA */
.bandera-slide.active {
    filter: blur(0) brightness(1);
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
    box-shadow: none; /* SIN SOMBRA */
}

/* Imagen dentro del slide */
.bandera-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Botones de navegación - TRANSPARENTES CON ICONOS BLANCOS */
.carousel-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid white;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    flex-shrink: 0;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.carousel-nav i {
    font-size: 1.2rem;
    color: white;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .banderas-titulo {
        font-size: 2rem;
    }
    
    .bandera-slide {
        flex: 0 0 calc(20% - 16px);
    }
    
    .bandera-slide.active {
        transform: scale(1.05);
    }
}

@media (max-width: 768px) {
    .banderas-carousel-section {
        padding: 2rem 0;
    }
    
    .banderas-titulo {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .bandera-slide {
        flex: 0 0 calc(20% - 16px);
    }
    
    .bandera-slide.active {
        transform: scale(1.05);
    }
    
    .carousel-wrapper {
        gap: 10px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .banderas-carousel-section {
        padding: 1.5rem 0;
    }
    
    .banderas-titulo {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .bandera-slide {
        flex: 0 0 calc(20% - 10px);
        gap: 10px;
    }
    
    .bandera-slide.active {
        transform: scale(1.03);
    }
    
    .carousel-wrapper {
        gap: 5px;
    }
    
    .carousel-nav {
        width: 36px;
        height: 36px;
    }
}

/* Soporte para reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    .carousel-track,
    .bandera-slide,
    .bandera-slide img {
        transition: none;
    }
}