/* ========================== */
/* SFONDO PAGINA */
/* ========================== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Forum';
  background: url("../img/header_sito_giornalino_originale.png")
    center / cover no-repeat fixed;
  background-blend-mode: overlay;
  background-color: rgba(255, 255, 255, 0.88);
}

/* ========================== */
/* SEZIONE PRINCIPALE */
/* ========================== */
.gallery-main {
  padding: 6rem 2rem 3rem;
  background: rgba(245, 245, 245, 0.96);
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.22);
  width: 100%;
}

@media (min-width: 1024px) {
  .gallery-main {
    max-width: 1400px;
  }
}

/* ========================== */
/* INTRO */
/* ========================== */
.gallery-intro {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 3.5rem;
}

.gallery-logo {
  max-width: 320px;
  margin: 0 auto 2rem;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-intro h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color, #004e89);
  font-weight: 800;
}

.gallery-intro p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #444;
}

/* ========================== */
/* GRIGLIA */
/* ========================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2.2rem;
  margin: 0 auto;
  width: 100%;
  max-width: 1200px;
}

.gallery-card {
  background: #fff;
  border-radius: 18px;
  padding: 1.6rem;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(25px);
  animation: fadeInUp 0.7s ease forwards;
  animation-delay: calc(0.12s * var(--i));
  transition: all 0.35s ease;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.gallery-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 0.5rem;
}

.gallery-role {
  font-size: 1.05rem;
  color: #666;
  font-weight: 500;
}

/* ========================== */
/* BACK BUTTON */
/* ========================== */
.back-btn {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.8rem 1.8rem;
  background: #764ba2;
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.3);
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: #5a3b8c;
  transform: translateY(-3px);
}

/* ========================== */
/* RESPONSIVE */
/* ========================== */
@media (max-width: 768px) {
  .gallery-main {
    padding: 6rem 1.5rem calc(3rem + var(--player-safe-space));
    border-radius: 14px;
  }

  .gallery-grid {
    gap: 1.8rem;
  }

  .gallery-intro h2 {
    font-size: 1.9rem;
  }
}

@media (max-width: 480px) {
  .gallery-main {
    padding: 5rem 1rem calc(3rem + var(--player-safe-space));
  }

  .gallery-logo {
    max-width: 240px;
  }

  .gallery-intro h2 {
    font-size: 1.7rem;
  }

  .gallery-intro p {
    font-size: 1rem;
  }

  .gallery-img {
    height: 220px;
  }

  .gallery-name {
    font-size: 1.25rem;
  }
}