/* Reset e impostazioni generali */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f4f4f4;
}

/* Contenitore centrale */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Header */
header {
  background: #17954c;
  color: #fff;
  padding: 1rem 0;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-area {
  display: flex;
  align-items: center;
}
.logo {
  width: 60px;
  margin-right: 0.8rem;
}
header h1 {
  font-size: 1.8rem;
}
header nav ul {
  list-style: none;
  display: flex;
}
header nav ul li {
  margin-left: 1.5rem;
}
header nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}
header nav ul li a:hover {
  color: #f4f4f4;
}

/* Sezione Hero */
/* Sezione Hero */
.hero {
  position: relative;
  background-color: #fff; /* sfondo bianco */
  width: 100%;
  height: 60vh;
  overflow: hidden; /* Importante per nascondere parti fuori dal contenitore */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenitore slider */
.slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Singola slide */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff; /* sfondo bianco */
  background-position: center;
  background-size: auto;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  /* Con z-index basso per sovrapporsi correttamente */
  z-index: 0;
}

/* Slide attiva visibile */
.slide.active {
  opacity: 1;
  z-index: 1;
}

/* Overlay con testo */
.hero .overlay {
  position: relative; /* Restiamo sopra le slide */
  background: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  text-align: center;
  color: #fff;
  z-index: 2; /* Sopra le slide */
  transition: transform 0.3s ease; /* per lo zoom graduale */
}
.hero .overlay:hover {
  transform: scale(1.05); /* ingrandimento del 5% */
}
.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}
/* Bottone (btn) */
.btn {
  display: inline-block;
  background: #27ae60;
  color: #fff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}
.btn:hover {
  background: #219653;
}

/* Sezione Servizi */
.services {
  padding: 3rem 0;
  background: #fff;
}
.services h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #333;
}
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.service {
  flex: 1 1 calc(33.333% - 1.5rem);
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;

  /* Transizione per l'effetto zoom */
  transition: transform 0.3s ease;
}
.service h3 {
  margin: 1rem 0 0.5rem;
  color: #27ae60;
}
.service p {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-top: 0.5rem;
}
.service-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
}

/* Classe aggiunta in JS per lo zoom */
.service.hover-zoom {
  transform: scale(1.05);
}

/* Sezione Chi Siamo */
.about {
  padding: 3rem 0;
  background: #e7e7e7;
}
.about h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #333;
}
.about p {
  max-width: 800px;
  margin: auto;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

/* Sezione Contatti */
.contact {
  padding: 3rem 0;
  background: #fff;
}
.contact h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #333;
}
.contact-info {
  text-align: center;        /* Centra i recapiti */
  margin-bottom: 1.5rem;     /* Spazio sotto */
}

.contact-info p {
  margin: 0.5rem 0;          /* Spazio tra le righe */
  font-size: 1.2rem;         /* Dimensione testo un po' più grande */
  color: #333;               /* Colore del testo */
  font-weight: 500;          /* Peso medio */
}

.contact-info .emoji {
  margin-right: 0.5rem;      /* Spazio dopo l’emoticon */
  font-size: 1.3rem;         /* Emoticon leggermente più grande */
}

.contact form {
  max-width: 600px;
  margin: auto;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.form-group input,
.form-group textarea {
  width: 100%;
  resize: vertical;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}
.contact button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: #e7e7e7;
  color: #333;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.contact button:hover {
  background: #219653;
}

/* Footer */
footer {
  background: #17954c;
  color: #fff;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Effetto Fade-In (animazione per gli elementi con classe "animate") */
.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal (Lightbox) */
.modal {
  display: none; /* nascosto di default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}
.modal-content {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: block;
  border-radius: 5px;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 2rem;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}
.modal-close:hover {
  color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
  }
  header nav ul {
    flex-direction: column;
    margin-top: 1rem;
  }
  header nav ul li {
    margin: 0.5rem 0;
  }
  .service-list {
    flex-direction: column;
  }
  .service-image {
    height: auto; /* Per evitare che si distorca su schermi più piccoli */
  }
}
