/* =============================================
   GALLERY PAGE
   ============================================= */

/* Filter Buttons */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.filter-btn {
  background: #fff;
  border: 1.5px solid var(--light-border);
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted-gray);
  padding: 0.55rem 1.3rem;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--cream);
  box-shadow: 0 4px 16px rgba(128,0,32,0.3);
}

/* Gallery Masonry Grid */
.gallery-masonry {
  columns: 3;
  column-gap: 1rem;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item.gallery-wide {
  break-inside: avoid;
}
.gallery-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.65s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item.gallery-tall img { min-height: 380px; object-fit: cover; }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45,10,20,0.75) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  font-style: italic;
}

/* Hidden items for filter */
.gallery-item.hidden {
  display: none;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30,5,12,0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; animation: fadeIn 0.3s ease; }
.lightbox-content {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}
#lightboxCaption {
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(247,240,230,0.75);
  font-size: 1rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(247,240,230,0.1);
  border: 1px solid rgba(247,240,230,0.2);
  color: var(--cream);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  font-size: 1.3rem;
}
.lightbox-close { top: 1.5rem; right: 1.5rem; width: 44px; height: 44px; font-size: 1rem; }
.lightbox-prev  { left: 1.5rem;  top: 50%; transform: translateY(-50%); width: 50px; height: 50px; }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--saffron);
  border-color: var(--saffron);
}

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