/* ============================================================
   GALLERIA.CSS — Stili dedicati Pagina 4 (Galleria Foto Redesign)
   ============================================================ */

/* ── HEADER ── */
/* Eredita lo stile coerente globale da styles.css. */
.site-header {
  background: var(--bg-dark);
}

.site-header.scrolled {
  background: rgba(253, 251, 247, 0.97);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* ── HERO ── */
.gallery-hero {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-height);
  background: var(--bg-dark);
  text-align: center;
}

.gallery-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(108,172,228,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(196,149,58,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.gallery-hero-content {
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

.gallery-hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.gallery-hero-content h1 em {
  font-style: italic;
  color: var(--accent-light);
  font-weight: 700;
}

.gallery-hero-content p {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 14px;
}

/* ── BARRA FILTRI ORIZZONTALE ── */
.gallery-filter-bar {
  background: #111111;
  padding: 20px 20px;
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-filter-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-filter-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-filter-btn:hover {
  color: #ffffff;
  border-color: rgba(108, 172, 228, 0.6);
}

.gallery-filter-btn.active {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(108, 172, 228, 0.3);
}

/* ── SEZIONE GALLERIA ── */
.galleria-section {
  background: #111111;
  padding: 50px 0 80px;
  min-height: 500px;
}

.galleria-grid {
  column-count: 1;
  column-gap: 20px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .galleria-grid {
    column-count: 2;
  }
}

@media (min-width: 960px) {
  .galleria-grid {
    column-count: 3;
  }
}

/* Elemento galleria */
.galleria-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  display: none; /* controllato via JS */
  background: #1a1a1a;
}

.galleria-item.show {
  display: inline-block;
  width: 100%;
  animation: scaleIn 0.4s ease forwards;
}

.galleria-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.galleria-item:hover img {
  transform: scale(1.05);
}

/* Animazione di entrata */
@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Stato vuoto */
.gallery-empty {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 60px 20px;
  width: 100%;
  grid-column: 1 / -1;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .gallery-filter-btn {
    font-size: 0.7rem;
    padding: 6px 12px;
  }
  .gallery-hero {
    height: 320px;
  }
  .galleria-section {
    padding: 30px 0 60px;
  }
}
