/* ============================================ */
/* QUIBARCA — Estilos de la página /galeria     */
/* ============================================ */

header { z-index: 50; }
footer { position: relative; z-index: 1; }

#overlayGallery,
#popupGallery,
#popupVideo {
  z-index: 99999 !important;
}

/* ---------- Animación de entrada del grid ---------- */
#galleryGrid .group {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

#galleryGrid .group:nth-child(1) { animation-delay: 0.05s; }
#galleryGrid .group:nth-child(2) { animation-delay: 0.10s; }
#galleryGrid .group:nth-child(3) { animation-delay: 0.15s; }
#galleryGrid .group:nth-child(4) { animation-delay: 0.20s; }
#galleryGrid .group:nth-child(5) { animation-delay: 0.25s; }
#galleryGrid .group:nth-child(6) { animation-delay: 0.30s; }
#galleryGrid .group:nth-child(7) { animation-delay: 0.35s; }
#galleryGrid .group:nth-child(8) { animation-delay: 0.40s; }
#galleryGrid .group:nth-child(9) { animation-delay: 0.45s; }
#galleryGrid .group:nth-child(10) { animation-delay: 0.50s; }
#galleryGrid .group:nth-child(11) { animation-delay: 0.55s; }
#galleryGrid .group:nth-child(12) { animation-delay: 0.60s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Popups (overlay e imagen/video) ---------- */
.popup-overlay {
  transition: opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-overlay.hidden {
  display: none;
}

.popup-overlay .absolute {
  background: rgba(0, 0, 0, 0.7);
}

.popup-content {
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: scale(0.95);
  opacity: 0;
}

.popup-content.active {
  transform: scale(1);
  opacity: 1;
}

.popup-content-video {
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: scale(0.95);
  opacity: 0;
}

.popup-content-video.active {
  transform: scale(1);
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-link.active {
  color: #0a5c6e;
  background-color: #f0f9fa;
}