/* ==========================================================================
   gallery.css — a single wedding's photo gallery.

   Shared by every gallery page (amy-matt, karter-ernzo, and any added
   later), so all galleries look and behave identically. Builds on site.css.
   ========================================================================== */

.nav-inner { padding: 1.4rem 4rem; }

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--light-text);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-back:hover { color: var(--ocean); }
.nav-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ── PAGE HEADER ── */
.page-header { padding: 9rem 4rem 3rem; text-align: center; }
.couple-names {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 300;
 
  color: var(--deep);
  margin-bottom: 0.6rem;
}
.couple-meta { font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--light-text); }
.header-divider { width: 48px; height: 1px; background: var(--sand); margin: 1.5rem auto 0; }

/* ── GALLERY GRID ── */
.gallery-wrap { padding: 3rem 4rem 6rem; max-width: 1400px; margin: 0 auto; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-item {
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  display: block;
  width: 100%;
  font: inherit;
}
.gallery-item img { width: 100%; height: auto; display: block; transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.02); }
.gallery-item:focus-visible { outline: 2px solid var(--ocean); outline-offset: 3px; }

/* ── LIGHTBOX (the full-screen photo viewer) ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 10, 0.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
}
.lightbox-close:hover { color: white; }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.2s;
}
.lightbox-prev:hover, .lightbox-next:hover { color: white; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ── FOOTER (gallery pages sit a little tighter) ── */
footer { padding: 2.5rem 4rem; }

@media (max-width: 900px) {
  .gallery-wrap { padding: 2rem 1rem 4rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .page-header { padding: 7rem 1.5rem 2rem; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
