/* =============================================
   THE FROZEN TIMES — Gallery Page Styles
   ============================================= */

/* ---- GALLERY HERO ---- */
.gallery-hero {
  min-height: 340px;
  background: linear-gradient(135deg, #040c1f 0%, #0a1628 50%, #0d1f3c 100%);
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  padding-top: 120px;
  position: relative;
  overflow: hidden;
}

.gallery-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 60% 60%, rgba(14,165,233,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(99,102,241,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(4,9,26,0.3), rgba(4,9,26,0.5));
  pointer-events: none;
}

/* ---- FILTER BAR ---- */
.filter-bar { background: #fff; }

.filter-btn {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(14,165,233,0.35);
}

/* ---- GALLERY CARDS ---- */
.gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: #111827;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 40px rgba(14,165,233,0.25);
}

.gallery-card img,
.gallery-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover img,
.gallery-card:hover video {
  transform: scale(1.07);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(14,165,233,0.6), rgba(99,102,241,0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 14px;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  font-size: 2.4rem;
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

/* Video badge */
.video-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(10,15,30,0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 2;
}
.video-badge i { color: var(--primary); }

/* ---- GALLERY ITEM FILTER ANIMATION ---- */
.gallery-item {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* ---- LIGHTBOX ---- */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 26, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-media {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  display: block;
}

.lightbox-media video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  display: block;
  background: #000;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 2010;
}
.lightbox-close:hover {
  background: rgba(239,68,68,0.8);
  border-color: transparent;
  transform: scale(1.1);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 2010;
}
.lightbox-nav:hover {
  background: rgba(14,165,233,0.6);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  z-index: 2010;
  letter-spacing: 0.06em;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 767px) {
  .gallery-hero { min-height: 260px; padding-top: 100px; padding-bottom: 40px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 1rem; }
}

