.photo-page { padding-bottom: clamp(2rem, 5vw, 5rem); }
.gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.15fr);
  align-items: center;
  background: #e8eee8;
  border-radius: .9rem;
  overflow: hidden;
  margin-block: clamp(1.2rem, 4vw, 3.5rem);
}
.gallery-hero-text { padding: clamp(1.4rem, 4vw, 4.5rem); }
.gallery-hero h1 { font-size: clamp(2.4rem, 5vw, 5rem); text-wrap: balance; }
.gallery-hero p { color: #435d5d; max-width: 32ch; margin: 0 0 1.4rem; }
.gallery-hero-text a, .gallery-next a { font-weight: 700; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(.85rem, 2.4vw, 1.65rem);
}
.gallery-section { scroll-margin-top: 1.5rem; }
.gallery-section h2 { margin-bottom: 1.2rem; }
.gallery-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ded8cb;
  border-radius: .65rem;
  text-decoration: none;
  background: #fffcf6;
  color: #15383b;
}
.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e0e8e2;
}
.gallery-cover { border: 0; border-radius: 0; }
.gallery-cover img { aspect-ratio: 5 / 4; }
.gallery-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  font-weight: 650;
}
.gallery-card:hover .gallery-caption, .gallery-card:focus-visible .gallery-caption {
  color: white;
  background: #20595a;
}
.gallery-card:focus-visible { outline-offset: -3px; }
.gallery-next { margin: 2rem 0 0; }
.gallery-viewer {
  width: min(calc(100% - 1.25rem), 65rem);
  max-height: 95vh;
  border: 0;
  border-radius: .7rem;
  padding: clamp(.65rem, 2vw, 1.35rem);
  color: white;
  background: #15383b;
}
.gallery-viewer::backdrop { background: rgb(10 27 30 / .85); }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.gallery-position { margin: 0; }
.gallery-toolbar button {
  min-height: 44px;
  padding: .5rem .85rem;
  border: 1px solid #b2c6bd;
  border-radius: .4rem;
  background: #fffcf6;
  color: #15383b;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.gallery-viewer figure { margin: .75rem 0; text-align: center; }
.gallery-viewer figure img {
  display: block;
  max-height: 67vh;
  max-height: 67dvh;
  margin: 0 auto;
  object-fit: contain;
}
.gallery-viewer figcaption { margin-top: .55rem; }
@media (max-width: 42rem) {
  .gallery-hero { grid-template-columns: 1fr; }
  .gallery-cover img { aspect-ratio: 4 / 3; }
}
