/* === Gallery page only === */
.gallery-page .page-hero {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-block: clamp(24px, 6vw, 80px);
}
.gallery-page .page-hero .hero__logo {
  height: 48px;
  width: auto;
  margin: 0 0 12px 0;
  display: block;
}
@media (max-width: 600px) {
  .gallery-page .page-hero .hero__logo {
    height: 40px;
  }
}

/* Responsive grid that stays tidy */
.gallery-page .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

/* Uniform tiles with earthy card styling */
.gallery-page .gallery-grid figure {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0;
}
.gallery-page .gallery-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1; /* uniform squares; remove if you want natural heights */
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Optional masonry look (natural heights). To use, remove aspect-ratio above. */
/* .gallery-page .gallery-grid img { height: auto; } */

/* Simple lightbox styles */
#lightbox[hidden] {
  display: none !important;
}
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 24px;
}
#lightbox img {
  max-width: min(1200px, 90vw);
  max-height: 85vh;
  border-radius: var(--radius);
  background: var(--panel);
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 28px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
