/* =====================================================
    PAGE HEADER
===================================================== */
.page-header {
  padding-block: var(--sp-xl) var(--sp-lg);
  border-bottom: 1px solid var(--stone);
  background: linear-gradient(150deg, var(--teal-pale) 0%, var(--cream) 60%);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%232A8B84' fill-opacity='.1'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .65;
}

.page-header-inner { position: relative; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: var(--sp-md);
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--ink-faint);
}

.breadcrumb a { color: var(--ink-soft); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb-sep { color: var(--stone-mid); font-size: .75em; user-select: none; }
.breadcrumb [aria-current="page"] { color: var(--teal-dark); }

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--orange-light);
  padding: .3rem .85rem;
  border-radius: var(--r-pill);
  width: fit-content;
  margin-bottom: var(--sp-sm);
}

.page-title {
  font-family: var(--f-display);
  font-size: var(--t-2xl);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
}

.page-title em { font-style: italic; color: var(--teal); }

.page-subtitle {
  margin-top: var(--sp-sm);
  font-size: var(--t-md);
  color: var(--ink-soft);
  max-width: 54ch;
  line-height: 1.65;
}

/* Count badge */
.page-meta {
  margin-top: var(--sp-md);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-light);
  padding: .3rem .75rem;
  border-radius: var(--r-pill);
}

.meta-note {
  font-size: var(--t-xs);
  color: var(--ink-faint);
}

/* =====================================================
    GALLERY SECTION
===================================================== */
.gallery-section {
  padding-block: var(--sp-xl);
}

/* Masonry-style grid using CSS columns */
.gallery-grid {
  columns: 2;
  column-gap: clamp(.5rem, 1.5vw, .875rem);
}

@media (min-width: 540px)  { .gallery-grid { columns: 2; } }
@media (min-width: 800px)  { .gallery-grid { columns: 3; } }
@media (min-width: 1040px) { .gallery-grid { columns: 4; } }

/* Each thumbnail item */
.gallery-item {
  display: block; /* <a> as block */
  break-inside: avoid;
  margin-bottom: clamp(.5rem, 1.5vw, .875rem);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--stone);
  cursor: pointer;
  position: relative;
  background: var(--cream-dark);
  /* Maintain aspect ratio placeholder while lazy-loading */
  /* aspect-ratio: 4 / 3; */
  aspect-ratio: 16 / 9;
  
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease, opacity .2s;
  opacity: 0;
}

/* Loaded state */
.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Zoom icon overlay on hover */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30,27,24,0);
  transition: background .2s;
  border-radius: var(--r-lg);
  pointer-events: none;
}

.gallery-item:hover::after,
.gallery-item:focus-visible::after {
  background: rgba(30,27,24,.18);
}

.gallery-item-zoom {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  background: rgba(250,248,244,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-zoom,
.gallery-item:focus-visible .gallery-item-zoom {
  opacity: 1;
}

/* =====================================================
    LIGHTBOX
===================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20,18,16,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
}

.lightbox-inner {
  position: relative;
  max-width: min(900px, 96vw);
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Inner only holds image + counter; buttons are on the backdrop */
  pointer-events: none;
}

/* Re-enable pointer events for the image wrap and counter */
.lightbox-img-wrap,
.lightbox-counter,
.lightbox-close {
  pointer-events: all;
}

.lightbox-img-wrap {
  /* border-radius: var(--r-xl); */
  overflow: hidden;
  box-shadow: var(--sh-lg);
  background: var(--ink);
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.lightbox-counter {
  margin-top: var(--sp-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--t-xs);
  font-weight: 500;
  color: rgba(255,255,255,.45);
  letter-spacing: .04em;
}

/* Navigation buttons */
.lightbox-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(250,248,244,.12);
  /* border: 1.5px solid rgba(0, 0, 0, 0.75);
  color: rgba(200,200,200,.85); */
  border: 1.5px solid rgba(233, 99, 28, 0.5);
  color: rgba(233, 99, 28, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  z-index: 1001;
  pointer-events: all;
}

.lightbox-btn:hover {
  background: rgba(250,248,244,.22);
  border-color: rgba(233, 99, 28, 0.3);
}

.lightbox-btn svg { pointer-events: none; }

/* Always at least 26px from the screen edge — never clips */
.lightbox-prev { left:  max(26px, calc(50vw - 450px - 64px)); }
.lightbox-next { right: max(26px, calc(50vw - 450px - 64px)); }


@media (max-width: 560px) {
  .lightbox-btn  { width: 38px; height: 38px; }
  .lightbox-prev { left:  8px; }
  .lightbox-next { right: 8px; }
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(250,248,244,.12);
  border: 1.5px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.lightbox-close:hover { background: rgba(250,248,244,.22); }
.lightbox-close svg { pointer-events: none; }

/* =====================================================
    CTA BAND
===================================================== */
.cta-band {
  background: var(--cream-dark);
  border-top: 1px solid var(--stone);
  padding-block: var(--sp-lg);
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.cta-band-text {
  font-size: var(--t-base);
  color: var(--ink-mid);
  max-width: 48ch;
}

.cta-band-text strong {
  color: var(--ink);
  font-weight: 600;
}

.cta-band-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
}

