/* Breathing room between the section heading and the image grid */
#gallery .section-heading {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.gallery-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
.gallery-card {
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.76);
  padding: 16px;
  border: 1px solid rgba(90,107,74,0.08);
}
.hero-proof-stack,
.split-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.gallery-images figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}
.gallery-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 4.7;
}
.gallery-images figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 700;
}
/* Tags sit above images: space below tag row, not above */
.gallery-copy { padding: 0 8px 14px; }
.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gallery-tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(90,107,74,0.14);
  background: rgba(255,255,255,0.88);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 500;
}

.gallery-more {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.gallery-more-toggle {
  margin: 0;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--earth);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.gallery-more-toggle:hover {
  color: var(--sage-dark);
}

.gallery-more-toggle:focus-visible {
  outline: 2px solid var(--earth);
  outline-offset: 3px;
  border-radius: 4px;
}

.gallery-grid-more {
  width: 100%;
}

/* Author display rules must not override the HTML hidden attribute */
#galleryMore[hidden],
.gallery-more[hidden] {
  display: none !important;
}

#galleryGridMore[hidden],
.gallery-grid-more[hidden] {
  display: none !important;
}
