/* ═══════════════════════════════════════════════════════════
   gallery.css — Filter bar · Masonry grid · Lightbox
   ═══════════════════════════════════════════════════════════ */

/* ── Filter bar ───────────────────────────────────────── */
.gallery-filter-bar {
  background: var(--cream);
  border-bottom: 1px solid rgba(26,37,53,.1);
  position: sticky; top: 72px; z-index: 80;
}
.gallery-filter-bar__inner {
  max-width: 1160px; margin: 0 auto; padding: 0 var(--pad-x);
  display: flex; gap: .3rem; flex-wrap: wrap;
}
.gf-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .95rem 1.4rem;
  font-family: 'Jost', sans-serif; font-size: .7rem;
  font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: color .2s, border-color .2s; white-space: nowrap;
}
.gf-btn:hover  { color: var(--navy); }
.gf-btn.active { color: var(--heading); border-bottom-color: var(--heading); font-weight: 600; }
.gf-btn__count {
  background: rgba(26,37,53,.1); color: var(--muted);
  font-size: .6rem; padding: 1px 7px; border-radius: 20px;
}
.gf-btn.active .gf-btn__count { background: var(--heading); color: var(--white); }

/* ── Gallery section ──────────────────────────────────── */
.gallery-section { background: var(--warm); padding: 3rem 0 5rem; }
.gallery-wrap    { max-width: 1360px; margin: 0 auto; padding: 0 var(--pad-x); }

/* Masonry-style CSS grid */
.gallery-masonry {
  columns: 4 240px;
  column-gap: 4px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 4px;
  cursor: pointer;
  position: relative; overflow: hidden;
}
.gallery-item__inner {
  position: relative; overflow: hidden;
  background: var(--cream);
}
.gallery-item__inner img {
  width: 100%; height: auto; display: block;
  transition: transform .5s ease, opacity .3s;
}
.gallery-item:hover .gallery-item__inner img {
  transform: scale(1.06); opacity: .82;
}
.gallery-item__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .4rem;
  background: rgba(26,37,53,.55);
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }

.gallery-item__zoom {
  font-size: 1.6rem; color: var(--white); line-height: 1;
}
.gallery-item__cap {
  font-family: 'Jost', sans-serif; font-size: .65rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.8); text-align: center; padding: 0 1rem;
}

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

/* Animate in on filter */
.gallery-item.show-in {
  animation: galleryFadeIn .35s ease both;
}
@keyframes galleryFadeIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* Empty state */
.gallery-empty {
  text-align: center; padding: 60px 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; color: var(--muted);
}

/* ── Lightbox ─────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,15,20,.96);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }

.lightbox__wrap {
  max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
}
.lightbox__img {
  max-width: 100%; max-height: 82vh;
  object-fit: contain; display: block;
  border-radius: 2px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.lightbox__caption {
  font-family: 'Jost', sans-serif; font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.5); text-align: center; margin: 0;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: fixed; background: none; border: none;
  color: rgba(255,255,255,.6); cursor: pointer;
  font-size: 2rem; line-height: 1;
  transition: color .2s, transform .2s;
  z-index: 2001;
}
.lightbox__close { top: 20px; right: 24px; font-size: 2.2rem; }
.lightbox__prev  { left: 16px; top: 50%; transform: translateY(-50%); font-size: 2.8rem; }
.lightbox__next  { right:16px; top: 50%; transform: translateY(-50%); font-size: 2.8rem; }
.lightbox__close:hover { color: var(--white); }
.lightbox__prev:hover  { color: var(--accent); transform: translateY(-50%) scale(1.1); }
.lightbox__next:hover  { color: var(--accent); transform: translateY(-50%) scale(1.1); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-masonry { columns: 3 180px; }
}
@media (max-width: 600px) {
  .gallery-masonry { columns: 2 140px; }
  .gf-btn          { font-size: .62rem; padding: .8rem .9rem; }
  .lightbox__prev  { left: 6px; }
  .lightbox__next  { right: 6px; }
}
