/* ==========================================================
   Galería — filtros, mosaico en columnas y visor
   ========================================================== */
.hero-down { margin-top: 48px; }

.gallery { padding-top: clamp(70px, 8vw, 120px); }
.gallery-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding-bottom: 28px; margin-bottom: 44px;
  border-bottom: 1px solid rgba(21,32,42,.14);
}
.g-filters { display: flex; flex-wrap: wrap; gap: 6px 34px; }
.g-filter {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; font-weight: 400;
  padding: 8px 0; color: var(--text-soft);
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.g-filter:hover { color: var(--text); }
.g-filter.is-active { color: var(--text); border-color: #b8862a; }

.g-grid { columns: 3 320px; column-gap: 18px; }
.g-item { break-inside: avoid; margin-bottom: 18px; }
.g-item[hidden] { display: none; }
.g-open { display: block; width: 100%; padding: 0; overflow: hidden; cursor: zoom-in; }
.g-open img { width: 100%; height: auto; filter: saturate(.88); transition: transform 1.2s var(--ease-out), filter .6s; }
.g-open:hover img { transform: scale(1.04); filter: saturate(1); }
.g-item figcaption { margin-top: 10px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-soft); }
.g-item.pending .pending-frame { aspect-ratio: 4 / 3; }

/* Visor */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(7,14,20,.96); color: var(--cream);
}
.lightbox[open] { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; }
.lightbox::backdrop { background: rgba(7,14,20,.9); }
.lb-figure { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 70px 0 40px; height: 100%; justify-content: center; min-width: 0; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 160px); width: auto; height: auto; object-fit: contain; }
.lb-figure figcaption { font-family: var(--serif); font-style: italic; font-size: 20px; opacity: .85; text-align: center; }
.lb-close { position: absolute; top: 30px; right: var(--gutter); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; }
.lb-nav { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.lb-nav svg { width: 34px; height: 17px; }
.lb-prev svg { transform: scaleX(-1); }

@media (max-width: 700px) {
  .g-grid { columns: 2 140px; column-gap: 10px; }
  .g-item { margin-bottom: 10px; }
  .g-filters { gap: 4px 22px; }
  .lightbox[open] { grid-template-columns: 44px 1fr 44px; }
}
