/* =========================================================
   HSS MUNDUR — gallery.css
   Gallery page-specific styles
   ========================================================= */

/* ── Gallery Section ───────────────────────────────────── */
.gallery-section { padding: 72px 0; background: var(--cream); }

/* ── Filter Buttons ────────────────────────────────────── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-btn {
  background: var(--white);
  border: 1.5px solid #ddd;
  color: var(--text-mid);
  padding: 8px 22px;
  border-radius: 100px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  transition: var(--transition);
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ── Gallery Grid ──────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  height: 240px;
  background: var(--cream-dark);
  cursor: pointer;
  transition: var(--transition);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(13,27,42,.82));
  color: white;
  padding: 24px 16px 14px;
  font-size: .85rem; font-weight: 500;
  transform: translateY(100%);
  transition: var(--transition);
}
.gallery-item:hover .overlay { transform: translateY(0); }

/* fallback placeholder via data-label attribute */
.gallery-item::before {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: .85rem;
  background: var(--cream-dark);
}
.gallery-item img.loaded { position: relative; z-index: 1; }

/* ── Lightbox ──────────────────────────────────────────── */
.lightbox-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 2000;
  justify-content: center; align-items: center;
  padding: 20px;
}
.lightbox-content {
  max-width: 90vw; max-height: 90vh;
  position: relative; text-align: center;
}
.lightbox-img {
  max-width: 100%; max-height: 78vh;
  border-radius: 8px; display: block; margin: 0 auto;
}
.lightbox-close {
  position: absolute; top: -48px; right: 0;
  background: rgba(255,255,255,.15);
  color: white; border: 1px solid rgba(255,255,255,.3);
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.lightbox-close:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.lightbox-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: white; width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
#lightboxPrev { left: -64px; }
#lightboxNext { right: -64px; }

.lightbox-caption {
  color: rgba(255,255,255,.7);
  margin-top: 16px; font-size: .9rem; letter-spacing: .03em;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  #lightboxPrev { left: -8px; }
  #lightboxNext { right: -8px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
