.gallery-page {
  background: #fbf8f2;
}

.gallery-page h1,
.gallery-page h2,
.gallery-page h3,
.gallery-page h4 {
  font-family: var(--font-serif);
}

.gallery-page p,
.gallery-page input,
.gallery-page button,
.gallery-page select,
.gallery-page textarea,
.gallery-page a,
.gallery-page span,
.gallery-page figcaption,
.gallery-page small {
  font-family: var(--font-sans);
}

body[data-page="gallery"] {
  background: #fbf8f2;
}

body[data-page="gallery"]::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(251, 248, 242, 0.18));
}

body[data-page="gallery"] #site-shell,
body[data-page="gallery"] .site-main {
  background: #fbf8f2;
}

.gallery-page { padding-top: 2.5rem; }

.gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.7fr);
  gap: 1.25rem;
  align-items: stretch;
  padding-bottom: 0.2rem;
}

.gallery-hero-copy,
.gallery-hero-badge {
  border: 1px solid #d9d5cc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 248, 242, 0.92));
}

.gallery-hero-copy {
  display: grid;
  gap: 0.7rem;
  padding: clamp(1.35rem, 3vw, 2.3rem);
}

.gallery-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  color: #cb6548;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-hero-kicker::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: #95b75e;
}

.gallery-hero-copy h1 {
  margin: 0;
  color: #1d221f;
  font-size: clamp(2.25rem, 4.8vw, 4rem);
  line-height: 0.98;
}

.gallery-hero-copy p {
  max-width: 42rem;
  margin: 0;
  color: #646861;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.7;
}

.gallery-hero-badge {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  padding: 1.4rem;
  text-align: center;
}

.gallery-hero-badge strong {
  color: #1a2f23;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 600;
  line-height: 1;
}

.gallery-hero-badge span {
  color: #7b7b75;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-page .section-header {
  border-bottom: 1px solid #d9d5cc;
  padding-bottom: 1rem;
}

.gallery-page .section-header span {
  color: #cb6548;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.gallery-page .section-header h1,
.gallery-page .section-header h2 {
  color: #1d221f;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
}

.gallery-page .section-header p {
  color: #646861;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.5;
}

.gallery-controls { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid #d9d5cc; }
.gallery-filter-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.gallery-filter-list button { padding: .62rem .9rem; border: 1px solid #d9d5cc; border-radius: 0; background: #fff; color: #7b7b75; cursor: pointer; font-size: .6rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.gallery-filter-list button.active { background: #131f1c; color: #f8f5ef; }
.gallery-search { display: grid; gap: .35rem; min-width: min(22rem,100%); color: #7b7b75; font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.gallery-search input { width: 100%; border: 1px solid #d9d5cc; border-radius: 0; background: #fff; padding: .75rem .9rem; color: var(--charcoal); }
.featured-gallery { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(18rem,1fr); overflow: hidden; border: 1px solid #d9d5cc; border-radius: 0; background: #fbf8f2; box-shadow: none; }
.featured-gallery-image { min-height: 24rem; }
.featured-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-gallery > div { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1rem; padding: clamp(1.5rem,4vw,3rem); }
.featured-gallery h2,.gallery-album-card h2 { margin: 0; color: #1d221f; font-family: var(--font-serif); line-height: 1.08; font-weight: 600; }
.featured-gallery h2 { font-size: clamp(1.9rem,2.55vw,2.6rem); }
.featured-gallery p,.gallery-album-card p { margin: 0; color: #646861; line-height: 1.5; font-family: var(--font-body); font-size: 0.82rem; }
.gallery-album-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.35rem; margin-top: 1.5rem; }
.gallery-album-grid > .empty-state,.gallery-album-grid > .error-state,.gallery-album-grid > .loading-state { grid-column: 1/-1; }
.gallery-album-image { position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: transparent; cursor: zoom-in; }
.gallery-album-image img { display: block; width: 100%; height: auto; object-fit: contain; object-position: center; transition: transform .5s ease; background: #e9ede9; }
.gallery-album-image:hover img { transform: scale(1.035); }
.gallery-album-image > span { position: absolute; right: .7rem; bottom: .7rem; border-radius: 0; background: #cb6548; color: #fff; padding: .35rem .65rem; font-size: .6rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.gallery-meta,.gallery-detail-meta { display: flex; flex-wrap: wrap; gap: .7rem 1rem; color: #8d8c86; font-family: var(--font-body); font-size: .63rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.gallery-detail-meta { margin-top: .65rem; }
.gallery-load-row { display: flex; justify-content: center; margin-top: 1.5rem; }
.gallery-back { width: fit-content; color: var(--forest); font-size: .82rem; font-weight: 700; }
.gallery-photo-grid { columns: 3 18rem; column-gap: 1rem; }
.gallery-photo-grid figure { break-inside: avoid; margin: 0 0 1rem; overflow: hidden; border: 1px solid rgba(26,47,35,.14); border-radius: .55rem; background: rgba(255,255,255,.82); }
.gallery-photo-grid button { display: block; width: 100%; padding: 0; background: transparent; cursor: zoom-in; }
.gallery-photo-grid img { width: 100%; height: auto; }
.gallery-photo-grid figcaption { display: grid; gap: .3rem; padding: .8rem; color: #3d4b45; font-size: .82rem; line-height: 1.5; }
.gallery-photo-grid figcaption small { color: var(--sage); }
.gallery-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 1rem; background: rgba(7,16,13,.96); padding: 3.5rem 1rem 1rem; color: #fff; }
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox figure { display: grid; place-items: center; gap: .8rem; min-width: 0; margin: 0; }
.gallery-lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; touch-action: pan-y; }
.gallery-lightbox figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem 1.2rem; color: #d8e1dc; text-align: center; }
.gallery-lightbox figcaption small { color: #8da095; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; }
.lightbox-close,.lightbox-nav { border: 1px solid rgba(255,255,255,.3); border-radius: .35rem; background: rgba(255,255,255,.08); color: #fff; padding: .65rem .8rem; cursor: pointer; }
@media (max-width:900px){.gallery-hero{grid-template-columns:1fr}.featured-gallery{grid-template-columns:1fr}.featured-gallery-image{min-height:18rem}.gallery-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.gallery-page{padding-top:1.5rem}.gallery-hero{gap:.9rem;padding-bottom:0}.gallery-controls{align-items:stretch;flex-direction:column}.gallery-search{min-width:0}.gallery-album-grid{grid-template-columns:1fr}.gallery-photo-grid{columns:1}.gallery-lightbox{grid-template-columns:1fr;padding:4rem .6rem 4.5rem}.lightbox-nav{position:absolute;bottom:1rem}.lightbox-nav.previous{left:1rem}.lightbox-nav.next{right:1rem}}
@media (max-width:560px){.gallery-page{padding-top:1rem}.gallery-hero-copy,.gallery-hero-badge,.featured-gallery>div{padding:1rem}.gallery-hero-copy h1{font-size:clamp(2rem,12vw,2.9rem)}.gallery-filter-list{gap:.35rem}.gallery-filter-list button{padding:.58rem .8rem}.gallery-lightbox img{max-height:68vh}}
