/* ── gallery.css ──────────────────────────── */

.page-hero--gallery {
  background: var(--warm-white);
  padding: calc(var(--header-h) + 1rem) 0 4rem;
}

.gallery-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}
.gallery-filter {
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--grey-pale);
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grey-mid);
  cursor: pointer;
  transition: all var(--transition);
}
.gallery-filter:hover { border-color: var(--coral); color: var(--coral); }
.gallery-filter.active {
  background: var(--coral);
  border-color: var(--coral);
  color: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 12px;
}
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius-md); cursor: pointer; }
.gallery-item--wide { grid-column: span 2; }
.gallery-item--tall { grid-row: span 2; }

.gallery-item__img-wrap { width: 100%; height: 100%; overflow: hidden; }
.gallery-item__img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.07); }

.gallery-item__zoom {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: none;
  font-size: 1rem; cursor: pointer;
  opacity: 0; transform: translateY(-4px);
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.gallery-item:hover .gallery-item__zoom { opacity: 1; transform: translateY(0); }

.gallery-item__label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(30,26,24,0.75));
  color: white; font-size: 0.8rem; font-weight: 500;
  padding: 1.5rem 0.75rem 0.75rem;
  transform: translateY(100%); transition: transform var(--transition);
}
.gallery-item:hover .gallery-item__label { transform: translateY(0); }

.gallery-item.is-hidden { display: none; }

.gallery-instagram {
  display: flex; align-items: center; gap: var(--space-lg);
  background: var(--coral-pale); border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl); margin-top: var(--space-xl);
  flex-wrap: wrap;
}
.gallery-instagram__icon { width: 2.5rem; height: 2.5rem; flex-shrink: 0; color: var(--coral); }
.gallery-instagram h3 { font-family: var(--font-display); font-size: 1.4rem; }
.gallery-instagram p { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.25rem; }
.gallery-instagram .btn--outline { margin-left: auto; flex-shrink: 0; }

.gallery-bottom-cta {
  text-align: center;
  margin-top: var(--space-xl);
}
.gallery-bottom-cta p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  z-index: 8999; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox-overlay.is-open { opacity: 1; pointer-events: auto; }
.lightbox__inner {
  position: relative; z-index: 9001;
  display: flex; flex-direction: column; align-items: center;
  max-width: 92vw;
}
.lightbox__viewport {
  width: 88vw; max-width: 1200px; height: 66vh;
  overflow: hidden; border-radius: var(--radius-md);
  background: rgba(0,0,0,0.2);
}
.lightbox__track {
  display: flex; height: 100%;
  transition: transform 0.45s var(--ease);
  will-change: transform;
}
.lightbox__slide {
  flex: 0 0 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__slide img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lightbox__caption { color: rgba(255,255,255,0.85); text-align: center; font-size: 0.9rem; margin-top: 0.9rem; }

.lightbox__thumbs {
  display: flex; gap: 8px; margin-top: 1rem;
  max-width: 88vw; overflow-x: auto; padding: 4px 4px 8px;
  scroll-behavior: smooth;
}
.lightbox__thumbs::-webkit-scrollbar { height: 6px; }
.lightbox__thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: var(--radius-full); }
.lightbox__thumb {
  flex: 0 0 auto; width: 84px; height: 62px;
  border-radius: 6px; overflow: hidden; cursor: pointer;
  padding: 0; border: 2px solid transparent; background: none;
  opacity: 0.5; transition: opacity var(--transition), border-color var(--transition);
}
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox__thumb:hover { opacity: 0.8; }
.lightbox__thumb.active { opacity: 1; border-color: var(--coral); }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: fixed; background: rgba(255,255,255,0.1); border: none;
  color: white; font-size: 1.5rem; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; z-index: 9002;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.25); }
.lightbox__close { top: 1.5rem; right: 1.5rem; }
.lightbox__prev { left: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lightbox__next { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item--wide { grid-column: span 2; }
  .gallery-item--tall { grid-row: span 1; }
  .gallery-instagram .btn--outline { margin-left: 0; width: 100%; text-align: center; }
}
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
}

@media (max-width: 700px) {
  .lightbox__viewport { width: 92vw; height: 48vh; }
  .lightbox__thumbs { max-width: 92vw; }
  .lightbox__thumb { width: 56px; height: 42px; }
  .lightbox__close, .lightbox__prev, .lightbox__next { width: 40px; height: 40px; font-size: 1.25rem; }
  .lightbox__prev, .lightbox__next { font-size: 1.6rem; }
  .lightbox__prev { left: 0.5rem; }
  .lightbox__next { right: 0.5rem; }
  .lightbox__close { top: 0.75rem; right: 0.75rem; }
}
