/* Gallery — editorial photography with the site's brewery-garden palette. */
.gallery-page {
  padding-top: clamp(1.5rem, 3.5vw, 3rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
/* Match the homepage's photographic hero, but retain the Gallery heading
   size chosen to match the interior pages. The existing shared hero rules
   also show the full photo above the copy on narrow screens. */
.hero.hero-photo-banner.gallery-hero h1 {
  color: #fff8e8;
  font-size: clamp(2.65rem, 5.5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.hero.hero-photo-banner.gallery-hero .gallery-intro-caption {
  max-width: 40rem;
  color: #fff8e8;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.65;
  text-shadow: 0 2px 18px rgba(4, 15, 11, .45);
  margin-bottom: 0;
}
.gallery-masonry {
  columns: 3 260px;
  column-gap: clamp(1rem, 2vw, 1.5rem);
}
/* Keep the original photo ordering and mobile masonry. On desktop,
   photo 4 appears once beneath the eight other photos, at full width.
   The original fourth tile remains in the DOM for the lightbox sequence. */
.gallery-featured { display: none; }
@media (min-width: 992px) {
  .gallery-masonry > .gallery-tile:nth-child(4) {
    display: none;
  }
  .gallery-featured {
    display: block;
    width: 100%;
    margin-top: clamp(.75rem, 1.5vw, 1.25rem);
  }
  .gallery-featured .gallery-tile {
    width: 100%;
    margin-bottom: 0;
  }
  .gallery-featured .gallery-tile img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}
.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 6px;
  margin: 0 0 clamp(1rem, 2vw, 1.5rem);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  appearance: none;
  text-align: left;
  border: 1px solid var(--wedding-color-border);
  border-radius: clamp(.95rem, 2vw, 1.4rem);
  background: var(--wedding-color-surface);
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(7, 25, 17, .10);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gallery-tile img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(.65rem, 1.5vw, 1rem);
  background: var(--wedding-color-surface-alt);
}
.gallery-tile:hover,
.gallery-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--wedding-color-gold);
  box-shadow: 0 18px 40px rgba(7, 25, 17, .22);
}
.gallery-tile-action {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  border-radius: 100px;
  background: rgba(18, 48, 33, .93);
  color: #fff8e8;
  font-size: .82rem;
  font-weight: 700;
  padding: .65rem .95rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.gallery-tile-action span { font-size: 1rem; line-height: 1; }
.gallery-tile:hover .gallery-tile-action,
.gallery-tile:focus-visible .gallery-tile-action {
  opacity: 1;
  transform: translateY(0);
}
.gallery-empty {
  padding: 2.5rem;
  border: 1px solid var(--wedding-color-border);
  border-radius: var(--wedding-radius);
  background: var(--wedding-color-surface);
}
.gallery-lightbox {
  width: min(1150px, 96vw);
  max-width: none;
  max-height: 94dvh;
  padding: 0;
  border: 1px solid rgba(242, 186, 83, .42);
  border-radius: clamp(.75rem, 2vw, 1.35rem);
  background: #10281f;
  color: #fff4db;
  overflow: hidden;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .5);
}
.gallery-lightbox::backdrop {
  background: rgba(1, 11, 7, .88);
  backdrop-filter: blur(7px);
}
.gallery-lightbox-inner {
  display: flex;
  flex-direction: column;
  max-height: 94dvh;
  padding: clamp(.6rem, 1.7vw, 1rem);
}
.gallery-lightbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .15rem .5rem .8rem;
}
.gallery-lightbox-count {
  color: #f3c56f;
  font-weight: 750;
  font-size: .88rem;
  letter-spacing: .05em;
}
.gallery-lightbox-close,
.gallery-lightbox-arrow {
  color: #fff4db;
  border: 1px solid rgba(255, 248, 232, .33);
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  transition: background-color .16s;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-arrow:hover {
  color: #fff4db;
  background: rgba(255, 255, 255, .19);
}
.gallery-lightbox-close {
  border-radius: 100px;
  padding: .45rem .8rem .45rem 1rem;
  font-size: .85rem;
  font-weight: 700;
}
.gallery-lightbox-close span {
  margin-left: .3rem;
  font-size: 1.35rem;
  line-height: 0;
  vertical-align: -.1rem;
}
.gallery-lightbox-stage {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: clamp(.3rem, 1.1vw, 1rem);
  min-height: 0;
}
.gallery-lightbox-stage img {
  display: block;
  justify-self: center;
  max-width: 100%;
  max-height: calc(94dvh - 8.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: .5rem;
}
.gallery-lightbox-arrow {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
}
.gallery-lightbox-arrow span {
  line-height: 1;
  font-family: Georgia, serif;
  font-size: 2.2rem;
  margin-top: -.3rem;
}
.gallery-lightbox-hint {
  text-align: center;
  color: rgba(255, 244, 219, .72);
  font-size: .75rem;
  margin: .8rem 0 .1rem;
}
@media (max-width: 767.98px) {
  .gallery-masonry { columns: 2 160px; }
  .gallery-lightbox-stage { grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem; }
  .gallery-lightbox-hint { font-size: .7rem; }
}
@media (max-width: 480px) {
  .gallery-masonry { columns: 1; }
  .gallery-tile-action { opacity: 1; transform: none; padding: .45rem .7rem; }
  .gallery-lightbox-stage { grid-template-columns: 2rem minmax(0, 1fr) 2rem; gap: .15rem; }
  .gallery-lightbox-arrow span { font-size: 1.8rem; }
  .gallery-lightbox-hint { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-tile,
  .gallery-tile-action,
  .gallery-lightbox-close,
  .gallery-lightbox-arrow { transition: none; }
}
