/* ============================================================================
   gallery.css  —  image gallery grids, preview cards, and the gallery page
   ============================================================================
   Built by gallery.js from `.gallery-embed` elements and on gallery.html.
   The tile look is shared with the legacy `.campaign-gallery` grid so campaign
   photos and standalone galleries are visually identical (see campaign.css,
   which no longer restyles its own tiles).
   ============================================================================ */

/* ── Tile grid (shared with .campaign-gallery) ──────────────────────────────
   Tiles flow 3→2→1 with the column width; object-fit keeps every photo the
   same shape regardless of its native aspect ratio. */
.gallery-grid,
.campaign-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.gallery-grid img,
.campaign-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(30, 90, 60, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid img:hover,
.campaign-gallery img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(30, 90, 60, 0.16);
}

/* ── Preview card — a compact reference that links to the full gallery ──────── */
.gallery-preview-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--warm-white);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(30, 90, 60, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-preview-card:hover,
.gallery-preview-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(30, 90, 60, 0.16);
}

.gallery-preview-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
}

.gallery-preview-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-preview-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
}

.gallery-preview-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  color: var(--charcoal);
}

.gallery-preview-date {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
}

.gallery-preview-link {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--forest);
}

/* ── gallery.html — page header + index layout ─────────────────────────────── */
.gallery-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 32px 96px;
}

.gallery-page-header {
  margin-bottom: 12px;
  text-align: center;
}

.gallery-page-header .section-body {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* The full-gallery grid sits below the centered header. */
.gallery-page .gallery-grid {
  margin-top: 40px;
}

/* Index: a responsive row of preview cards. */
.gallery-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .gallery-page {
    padding: 48px 20px 64px;
  }
}
