.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Gallery thumbnails are buttons so they are keyboard reachable. */
.gallery-item {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  display: block;
  line-height: 0;
}
.gallery-item:focus-visible {
  outline: 3px solid #1e6fd9;
  outline-offset: 3px;
}

/* Lightbox */
body.lb-open { overflow: hidden; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.92);
}
.lb[hidden] { display: none; }

.lb-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 96px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lb-cap {
  color: #cfcfcf;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.lb-nav,
.lb-close {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  flex: none;
}
.lb-nav {
  width: 48px;
  height: 48px;
  font-size: 2rem;
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
}
.lb-nav:hover,
.lb-close:hover { background: rgba(255, 255, 255, 0.25); }
.lb-nav[hidden] { display: none; }

@media (max-width: 40em) {
  .lb-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .lb-img { max-height: calc(100vh - 140px); }
}

/* Preview thumbnails on the section list cards (2x2 mosaic, or one wide
   image when a page only offers a single photo). Fixed aspect ratios keep
   every card the same height regardless of the source photos. */
.card-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 1rem;
  border-radius: 4px;
  overflow: hidden;
}
.card-thumbs-1 { grid-template-columns: 1fr; }

.card-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}
.card-thumbs-1 img { aspect-ratio: 16 / 9; }

/* ==========================================================================
   Typography & rhythm pass
   Palette stays the theme's black / near-white. The only colour introduced is
   a single accent, so links stop rendering as browser-default purple/blue.
   ========================================================================== */

:root {
  --ink:        #14181b;
  --muted:      #5f6b73;
  --accent:     #00713b;   /* club green, darkened from the logo's #008244 for text contrast */
  --accent-dk:  #005a2f;
  --brand:      #008244;   /* exact logo green, for solid fills only */
  --rule:       #e4e7e9;
  --ground:     #f4f4f4;
  --card:       #fff;
}

/* ---- Links ------------------------------------------------------------- */
.prose a,
.nested-links a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}
.prose a:hover,
.nested-links a:hover { color: var(--accent-dk); }

/* Card titles and buttons are not body links. */
.band-grid h2 a,
.band-grid h2 a.link,
.band-grid a.ba {
  color: var(--ink);
  text-decoration: none;
}
.band-grid h2 a:hover { color: var(--accent); }

/* ---- Body copy --------------------------------------------------------- */
.prose,
.nested-copy-line-height {
  text-align: left;          /* the theme centred this on wide screens */
}
.prose {
  max-width: 38rem;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.65;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
}
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.2rem; }
.prose ul { padding-left: 1.15em; }
.prose li + li { margin-top: 0.45em; }
.prose img { border-radius: 4px; }

/* ---- Hero -------------------------------------------------------------- */
.hero-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.hero-btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 3px;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background-color .15s ease, border-color .15s ease;
}
.hero-btn:hover { background: rgba(255,255,255,0.14); border-color: #fff; }
.hero-btn--primary { background: #fff; color: var(--ink); border-color: #fff; }
.hero-btn--primary:hover { background: rgba(255,255,255,0.86); }

/* ---- Home bands -------------------------------------------------------- */
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }

.home-band { padding: 3.5rem 0; }
.home-band--alt { background: var(--ground); }

.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.75rem;
}
.band-title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.band-more {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.band-more:hover { text-decoration: underline; }

.band-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 62em) { .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40em) { .band-grid { grid-template-columns: 1fr; } }
/* The summary card carries its own theme wrappers; neutralise their margins. */
.band-grid > div { margin-bottom: 0; }

@media (max-width: 30em) {
  .home-band { padding: 2.5rem 0; }
  .hero-actions { justify-content: flex-start; }
}

/* ---- Cards ------------------------------------------------------------- */
.band-grid > div,
.band-grid > div > div {
  height: 100%;
}
.band-grid > div > div {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.band-grid h2 {
  font-size: 1.075rem;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 0 0 0.6rem;
}
.band-grid .card-thumbs { margin-bottom: 0.9rem; }
/* Push the read-more button to the bottom so buttons line up across a row. */
.band-grid a.ba { margin-top: auto; align-self: flex-start; }

/* The club logo in the home about block should not dominate the section. */
.home-band--alt .prose img { max-width: 260px; }

/* Section label, shown only on tag/category pages. */
.card-kicker {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* Attribution required by the Flaticon Free licence (favicon artwork). */
.footer-credit {
  padding: 0.75rem 1rem 0;
  font-size: 0.72rem;
  line-height: 1.4;
}
.footer-credit a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}
.footer-credit a:hover {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}
