/* --- SEZIONE GALLERY --- */

.gallery-section {
  padding: 60px 20px;
  background-color: #f7f7f7;
  text-align: center;
}

.gallery-title {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #333;
}

.gallery-subtitle {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: #777;
}

/* Accordion */

.accordion-item {
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  background-color: #fff;
}

.accordion-header {
  width: 100%;
  text-align: left;
  padding: 20px;
  font-size: 1.3rem;
  background-color: #ececec;
  color: #333;
  border: none;
  cursor: pointer;
  outline: none;
  transition: background-color 0.3s ease;
}

.accordion-header:hover {
  background-color: #ddd;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.accordion-item.active .accordion-content {
  max-height: 2000px; /* abbastanza per contenere immagini */
  transition: max-height 1s ease;
}

/* Gallery Grid */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
  justify-items: center;
}

.gallery-grid img {
  width: 100%;
  height: 200px; /* puoi cambiare 200px se preferisci immagini più alte o più basse */
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Lightbox (inizialmente invisibile) */

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
  .gallery-title {
    font-size: 2rem;
  }

  .gallery-subtitle {
    font-size: 1rem;
  }

  .accordion-header {
    font-size: 1.1rem;
    padding: 15px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }

  .gallery-grid img {
    height: 150px;
  }
}
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ff5555;
}

.close-button {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  z-index: 1001;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 50px;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  background-color: rgba(0, 0, 0, 0.4);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 1010;
  border-radius: 50%;
  transition: background 0.3s;
}

.nav-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.prev-button {
  left: 20px;
}

.next-button {
  right: 20px;
}

/* ========================================
   HERO - Gallery (come Blog)
   ======================================== */

.hero {
  padding: 120px 20px 100px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  font-family: 'Quicksand', sans-serif;
}

.hero .hero-decor {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: url('../images/hero-wave.svg') no-repeat center bottom / cover;
  z-index: 1;
}

.hero .hero-inner {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.6;
  color: #e0eaf6;
}

.hero-gallery {
  background-color: #244C9A; /* stesso blu del blog */
}

.hero-gallery h1,
.hero-gallery p {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-gallery h1 {
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
}

.hero-gallery .hero-btn {
  background-color: #ffffff;
  color: #244C9A;
}

.hero-gallery .hero-btn:hover {
  background-color: #f3f3f3;
}

/* Animazione già usata nel blog */
@keyframes fadeInUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  .hero { padding: 90px 20px 80px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
}