.gallery-hero > img { object-position: center 60%; }
.gallery-heading { max-width: 68ch; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(9px, 1.8vw, 21px);
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.gallery-grid a {
  position: relative;
  display: block;
  border-radius: 12px 12px 24px 12px;
  overflow: hidden;
  background: #eae7db;
}
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-grid a::after {
  content: "+";
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fffaf0;
  color: #213e40;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.gallery-grid a:hover::after { background: #f5cf7e; }
.gallery-dialog {
  box-sizing: border-box;
  width: min(960px, calc(100vw - 24px));
  max-height: 94dvh;
  border: 0;
  border-radius: 15px;
  background: #172e30;
  color: white;
  padding: 10px;
}
.gallery-dialog::backdrop { background: #142829db; }
.gallery-dialog figure { margin: 0; }
.gallery-dialog img { width: 100%; height: min(65dvh, 650px); object-fit: contain; }
.gallery-dialog figcaption { text-align: center; font-size: 14px; padding: 7px 4px; }
.gallery-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
}
.gallery-tools button {
  cursor: pointer;
  border: 1px solid #d9ad57;
  border-radius: 30px;
  color: #fff;
  background: transparent;
  font: 800 14px/1.3 Nunito, Arial, sans-serif;
  padding: 8px 13px;
}
.gallery-tools button:hover { background: #ffffff22; }
.gallery-tools output { font-size: 14px; text-align: center; }
@media (max-width: 620px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
