/* ─── GALLERY LIST PAGE ─────────────────────────────────────────────
   Sfondo chiaro, coerente con le pagine interne.
─────────────────────────────────────────────────────────────────── */

body.page-gallery { background: var(--paper); }

/* ══════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════ */
.gl-header {
  max-width: 1320px; margin: 0 auto;
  padding: 32px 40px 20px;
  border-bottom: 2px solid var(--teal);
  margin-bottom: 0;
}
.gl-header__row {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.gl-header__h1 {
  font-family: var(--f-d); font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--ink);
  letter-spacing: -.025em; line-height: 1.15; margin: 0;
}
.gl-header__sub {
  font-family: var(--f-b); font-size: 12px;
  color: var(--muted); margin-top: 4px;
}

/* ══════════════════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════════════════ */
.gl-search {
  max-width: 1320px; margin: 0 auto;
  padding: 20px 40px 0;
}
.gl-search__form {
  display: flex; gap: 8px; max-width: 440px;
}
.gl-search__input {
  flex: 1; font-family: var(--f-b); font-size: 14px;
  color: var(--ink); background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 14px; outline: none;
  transition: border-color .2s;
}
.gl-search__input::placeholder { color: var(--muted); }
.gl-search__input:focus { border-color: var(--teal); }
.gl-search__btn {
  font-family: var(--f-d); font-size: 12px; font-weight: 700;
  color: var(--ink); background: var(--teal);
  border: none; border-radius: 8px;
  padding: 9px 18px; cursor: pointer; transition: background .2s;
  white-space: nowrap;
}
.gl-search__btn:hover { background: var(--teal-d); }
.gl-search__clear {
  font-family: var(--f-d); font-size: 12px; font-weight: 600;
  color: var(--muted); background: transparent;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 14px; cursor: pointer; text-decoration: none;
  transition: color .2s, border-color .2s; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.gl-search__clear:hover { color: var(--ink); border-color: var(--ink); }

/* ══════════════════════════════════════════════════
   BODY
══════════════════════════════════════════════════ */
.gl-body {
  max-width: 1320px; margin: 0 auto;
  padding: 28px 40px 72px;
}

/* ══════════════════════════════════════════════════
   GRID
══════════════════════════════════════════════════ */
.gl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 48px;
}

/* ── Card ─────────────────────────────────────────── */
.gl-card {
  position: relative; aspect-ratio: 4/3;
  border-radius: 7px; overflow: hidden;
  display: block; text-decoration: none;
  background: var(--warm);
}
.gl-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease), filter .4s;
  filter: brightness(.88);
}
.gl-card:hover img {
  transform: scale(1.06);
  filter: brightness(.65);
}
.gl-card__grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(14,12,11,.88) 0%,
    rgba(14,12,11,.32) 45%,
    transparent 70%);
  pointer-events: none;
}
.gl-card__name {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 14px;
  font-family: var(--f-d); font-size: 13px; font-weight: 700;
  color: #fff; line-height: 1.25; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.gl-card__arr {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.6) rotate(-45deg);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  pointer-events: none;
}
.gl-card__arr svg { width: 13px; height: 13px; fill: var(--ink); }
.gl-card:hover .gl-card__arr { opacity: 1; transform: scale(1) rotate(0deg); }

/* ══════════════════════════════════════════════════
   PAGINAZIONE
══════════════════════════════════════════════════ */
.gl-pag {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap;
}
.gl-pag__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 7px; border: 1px solid var(--border);
  font-family: var(--f-d); font-size: 13px; font-weight: 600;
  color: var(--muted); background: #fff;
  text-decoration: none; transition: all .2s;
}
.gl-pag__btn:hover    { border-color: var(--teal); color: var(--teal); }
.gl-pag__btn.active   { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.gl-pag__btn.disabled { opacity: .3; pointer-events: none; }

/* ══════════════════════════════════════════════════
   NESSUN RISULTATO
══════════════════════════════════════════════════ */
.gl-empty {
  text-align: center; padding: 80px 20px;
  font-family: var(--f-b); font-size: 16px; color: var(--muted);
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .gl-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .gl-header { padding: 24px 20px 16px; }
  .gl-search  { padding: 16px 20px 0; }
  .gl-body   { padding: 20px 20px 56px; }
  .gl-grid   { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
@media (max-width: 480px) {
  .gl-grid       { gap: 6px; }
  .gl-card__name { font-size: 11px; padding: 10px; }
}
