/* Gallery page — uses variables from index.css */

.gallery-page {
  padding-bottom: 0;
}

/* ── Intro ── */
.gallery-intro {
  margin: 28px 48px 0;
  padding-bottom: 22px;
  border-bottom: 1px solid #ece6df;
}

.gallery-breadcrumb {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 14px;
}

.gallery-breadcrumb a {
  color: var(--dark);
  text-decoration: none;
  transition: color .2s;
}

.gallery-breadcrumb a:hover { color: var(--rose); }

.gallery-intro h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 12px;
}

.gallery-intro-lead {
  font-size: 14px;
  color: var(--mid);
  max-width: 620px;
  line-height: 1.7;
}

/* ── Filter bar ── */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 28px 48px 0;
}

.gallery-filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mid);
  background: transparent;
  border: 1px solid #ddd7d0;
  border-radius: 2px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.gallery-filter-btn:hover {
  color: var(--dark);
  border-color: var(--dark);
}

.gallery-filter-btn.is-active {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

/* ── Grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  grid-auto-flow: row dense;
  gap: 12px;
  margin: 24px 48px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 3px;
  background: var(--cream);
  margin: 0;
}

.gallery-item--wide  { grid-column: span 2; }
.gallery-item--tall  { grid-row: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94);
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.06);
}

/* Caption overlay */
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 32px 16px 14px;
  background: linear-gradient(to top, rgba(11,11,11,.72) 0%, transparent 100%);
  color: var(--white);
  font-size: 12.5px;
  line-height: 1.4;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.gallery-item figcaption span {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 3px;
}

.gallery-item:hover figcaption,
.gallery-item:focus-visible figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Focus ring */
.gallery-item:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 2px;
}

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

/* ── Empty state ── */
.gallery-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--light);
}

.gallery-empty i {
  font-size: 48px;
  margin-bottom: 14px;
  display: block;
}

.gallery-empty p {
  font-size: 14px;
}

/* ── CTA strip ── */
.gallery-cta {
  background: var(--dark);
  color: var(--white);
  margin-top: 48px;
  padding: 56px 48px;
}

.gallery-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-cta h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
  line-height: 1.2;
}

.gallery-cta p {
  font-size: 14px;
  color: rgba(255,255,255,.7);
}

.gallery-cta-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Reuse .btn-dark from index.css but with inverted border here */
.gallery-cta .btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dark);
  background: var(--white);
  border-radius: 2px;
  padding: 13px 28px;
  transition: background .2s, color .2s;
}

.gallery-cta .btn-dark:hover {
  background: var(--cream);
}

.gallery-cta-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 2px;
  padding: 13px 24px;
  transition: border-color .2s, background .2s;
}

.gallery-cta-wa:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.07);
}

.gallery-cta-wa i { color: #25d366; font-size: 15px; }

/* ─────────────────── LIGHTBOX ─────────────────── */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11,11,11,.93);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  animation: lbFadeIn .2s ease;
}

.gallery-lightbox[hidden] { display: none; }

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gallery-lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  width: 100%;
  gap: 12px;
}

.gallery-lb-img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 3px;
  display: block;
  animation: lbImgIn .25s ease;
}

@keyframes lbImgIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}

.gallery-lb-caption {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  text-align: center;
  letter-spacing: .3px;
}

/* Nav buttons */
.gallery-lb-prev,
.gallery-lb-next,
.gallery-lb-close {
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--white);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 16px;
  transition: background .2s, border-color .2s;
}

.gallery-lb-prev:hover,
.gallery-lb-next:hover,
.gallery-lb-close:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
}

.gallery-lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 18px;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
  }
}

@media (max-width: 768px) {
  .gallery-intro,
  .gallery-filters { margin-left: 24px; margin-right: 24px; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    margin: 20px 24px 0;
    gap: 8px;
  }

  .gallery-item--wide { grid-column: span 2; }

  .gallery-cta { padding: 40px 24px; }

  .gallery-cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 500px) {
  .gallery-intro { margin: 18px 16px 0; }
  .gallery-filters { margin: 20px 16px 0; gap: 6px; }

  .gallery-filter-btn { padding: 7px 13px; font-size: 11px; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 160px;
    margin: 16px 16px 0;
  }

  .gallery-intro h1 { font-size: 32px; }

  .gallery-cta { padding: 32px 16px; }
  .gallery-cta h2 { font-size: 24px; }

  .gallery-lb-prev,
  .gallery-lb-next { width: 36px; height: 36px; font-size: 13px; }
}
