/* Font e base */
body {
  margin: 0;
  font-family: 'Quicksand', sans-serif;
  background-color: #e0d1b3; /* Beige scuro uniforme */
  color: #333;
}

header {
  text-align: center;
  padding: 20px 0;
}

.logo {
  max-width: 200px;
}

/* Sezione introduzione */
.intro {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.6;
}

/* Galleria */
.gallery {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery h2 {
  text-align: center;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.gallery-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-img:hover {
  transform: scale(1.03);
}

/* Contatti */
.contact {
  /* background-color rimosso per uniformare */
  padding: 30px 20px;
  margin-top: 40px;
}

.contact h2 {
  margin-bottom: 20px;
}

.contact p {
  margin: 5px 0;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #a76f3f;
  color: white;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: 600;
  margin: 10px 8px;
  transition: background-color 0.3s;
}

.btn-contact:hover {
  background-color: #8a5832;
}

.btn-contact svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Popup per immagini */
.popup {
  display: none;
  position: fixed;
  z-index: 99;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
}

.popup img {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
}

.close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Pulsanti di navigazione popup */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}

#prevBtn {
  left: 30px;
}

#nextBtn {
  right: 30px;
}

@media (max-width: 850px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-img {
    height: 160px;
  }
}

@media (max-width: 450px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .gallery-img {
    height: 140px;
  }
  .popup img {
    max-width: 95%;
    max-height: 70vh;
  }
  .close {
    top: 20px;
    right: 20px;
    font-size: 32px;
  }
  .nav-btn {
    font-size: 32px;
  }
  #prevBtn {
    left: 15px;
  }
  #nextBtn {
    right: 15px;
  }
}
