/* =====================================================
   GALLERY PUBLIC PAGE — Joginder Gymkhana Club
   ===================================================== */

.filter-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
  padding: 9px 22px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── MASONRY GALLERY ── */
.gallery-masonry { columns: 3; column-gap: 1rem; }
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  display: block;
}
.gallery-item img { width: 100%; display: block; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-cap {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(13,34,64,0.9));
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-cap { opacity: 1; }
.gallery-cap-title { font-family: 'Playfair Display', serif; font-size: 0.9rem; color: var(--white); margin-bottom: 3px; }
.gallery-cap-cat { font-size: 0.68rem; color: var(--gold-light); letter-spacing: 0.1em; text-transform: uppercase; }
.gallery-expand {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-expand { opacity: 1; }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5,10,20,0.97);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; animation: lbIn 0.3s ease; }
@keyframes lbIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.lightbox-inner { position: relative; max-width: 90vw; }
.lightbox-img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 4px; box-shadow: 0 40px 80px rgba(0,0,0,0.8); display: block; }
.lb-close {
  position: absolute;
  top: -18px; right: -18px;
  width: 40px; height: 40px;
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(184,147,58,0.4);
}
.lb-close:hover { transform: rotate(90deg) scale(1.1); }
.lb-caption { text-align: center; margin-top: 1rem; }
.lb-caption h4 { font-family: 'Playfair Display', serif; color: var(--white); margin-bottom: 4px; }
.lb-caption p { font-size: 0.72rem; color: var(--gold-light); text-transform: uppercase; letter-spacing: 0.1em; }

@media (max-width: 800px) { .gallery-masonry { columns: 2; } }
@media (max-width: 500px) { .gallery-masonry { columns: 1; } }
