/* ==========================================================================
   DIA BONITO · gallery.css
   Photo gallery: tabs, a grid of thumbnails, and a tap-to-enlarge viewer.
   ========================================================================== */

.gal-top { padding: calc(var(--header-h) + 48px) 0 24px; }

.gal-title {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--bone);
}

.gal-rule { margin: 28px 0; }

.gal-tabs { display: flex; flex-wrap: wrap; gap: 10px; }

.gal-tab {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--bone-2);
  background: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 16px;
  cursor: pointer;
}
.gal-tab:hover { color: var(--bone); border-color: var(--bone-3); }
.gal-tab[aria-selected="true"] { color: var(--ink); background: var(--lagoon); border-color: var(--lagoon); }

.gal-body { padding: 8px var(--gutter) var(--section-y); }

.gal-grid {
  list-style: none;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) { .gal-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1200px) { .gal-grid { grid-template-columns: repeat(4, 1fr); } }

.gal-item[hidden] { display: none; }
.gal-item a { display: block; }
.gal-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--ink-2);
  transition: opacity 0.2s;
}
.gal-item a:hover img { opacity: 0.85; }

.gal-box {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(7, 15, 12, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 12px 72px;
}
.gal-box[hidden] { display: none; }

.gal-big { max-width: 100%; max-height: 100%; object-fit: contain; }

.gal-cap {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  text-align: center;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--bone-2);
}

.gal-close, .gal-prev, .gal-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--bone);
  font-size: 40px;
  line-height: 1;
  width: 52px;
  height: 52px;
  cursor: pointer;
}
.gal-close { top: 8px; right: 8px; }
.gal-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.gal-next { right: 4px; top: 50%; transform: translateY(-50%); }
