/* Reset base */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Urbanist', sans-serif;
  background: #efe9e9;
  color: black;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  background-color: white;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

header .logo {
  height: 60px; /* Ridotto leggermente per default */
  width: auto;
}

/* Link di navigazione */
nav {
  display: flex;
  flex-wrap: wrap; /* Permette ai link di andare a capo se necessario */
}

nav a {
  color: #333;
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 1.1rem;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background-color: #004d99;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Hero section a tutto schermo */
.hero {
  width: 100%;
  height: 100vh; /* Occupa il 100% dell'altezza del display */
  margin: 0;
  position: relative;
  background-size: cover;
  background-position: center; /* Mantiene la foto centrata */
  background-repeat: no-repeat;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra verticalmente il contenuto */
  align-items: center;     /* Centra orizzontalmente il contenuto */
  text-align: center;
  padding: 0; /* Rimuoviamo il padding fisso per lasciare che flex gestisca lo spazio */
}

.hero-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-logo {
  max-width: 600px; /* Leggermente più grande se vuoi più impatto */
  width: 90%;
  margin-bottom: 2rem; /* Spazio tra logo e scritta */
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

/* Overlay opzionale per scurire sfondo se necessario */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 0;
}


.hero-text h1 {
  font-weight: 600;
  font-size: 2.7rem;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
  margin-top: 0;
}

/***** SERVIZI *****/
.servizi-wrapper {
  padding: 4rem 1rem;
  display: flex;
  justify-content: center;
}

.servizi-box {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  max-width: 1200px;
  width: 100%;
}

.servizi-advanced {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
}

.servizi-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.servizi-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centra la card singola nella riga sotto */
  gap: 30px;               /* Spazio tra le card */
  max-width: 1000px;       /* Regola questa larghezza per farne stare esattamente 2 per riga */
  margin: 50px auto;
}

/* Card Quadrata */
.servizio-card {
  position: relative;
  width: 450px;            /* Larghezza generosa */
  aspect-ratio: 1 / 1;     /* Forza la forma quadrata */
  border-radius: 20px;
  overflow: hidden;        /* Nasconde l'overlay quando è fuori */
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.servizio-card:hover img {
  transform: scale(1.05); /* Effetto zoom al passaggio del mouse */
}

.servizio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* Adatta la foto al quadrato senza deformarla */
  transition: transform 0.5s ease;
}
.servizio-title-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: black;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: bold;
  z-index: 2;
}
.servizio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;               /* Parte da altezza zero (invisibile) */
  background: rgba(0, 0, 0, 0.8); /* Sfondo scuro semitrasparente */
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: height 0.4s ease; /* Effetto scorrimento verso l'alto */
  padding: 0 20px;
  overflow: hidden;
}
.servizio-card:hover .servizio-overlay {
  height: 50%; /* Mostra i servizi su metà della card alta */
  padding: 2rem;
}

.servizio-overlay ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.5rem;
}

.servizio-overlay ul li::before {
  content: "• ";
  color: #2e5cff;
  font-weight: bold;
}

/* Carousel */
.carousel-container {
  position: relative;
  width: 100%;
  height: 70vh; /* Altezza relativa invece di fissa 800px */
  min-height: 400px;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 3s ease;
  z-index: 0;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

/* Costi orari */
.schedule-prices {
  background-color: #000000;
  color: white;
  padding: 5rem 2rem;
  text-align: center;
}

.schedule-prices h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 3rem;
  color:#e6e6e6;
}

.schedule-prices-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.schedule-block {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.schedule-block:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.schedule-block h3 {
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #2e5cff;
  display: inline-block;
  padding-bottom: 0.3rem;
}

.schedule-block table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-block td {
  font-size: 1rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d1d1;
}

.schedule-block tr:last-child td {
  border-bottom: none;
}

/* Reviews */
.reviews {
  padding: 80px 20px;
  text-align: center;
}

.reviews h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.reviews .subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 40px;
}

.google-review-box a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 2px solid #ccc;
  border-radius: 14px;
  background-color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 100%;
}
/* Aggiunta per mobile */
.google-review-box a span {
    white-space: normal;
    text-align: left;
}

.google-review-box a:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.google-review-box img {
  width: 30px;
  height: 30px;
}

.google-review-box span {
  font-size: 1.05rem;
  color: #333;
  font-weight: 500;
}

/* Map */
.map-section {
  padding: 4rem 1rem;
  display: flex;
  justify-content: center;
}

.map-container {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  width: 100%;
  padding: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.map-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  text-align: center;
}

.map-wrapper {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

/* Contacts */
.contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.contact {
  background:#ffffff;
  padding: 3rem 2rem;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-width: 600px;
  width: 100%;
  color:#0b0f1a;
  animation: fadeInUp 1s ease forwards;
}

.contact h2 {
  font-size: 2.2rem;
  color:#000;
  margin-bottom: 1.5rem;
}

.contact p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color:#0b0f1a;
  word-wrap: break-word; /* Evita che email lunghe escano dal box */
}

/* Socials */
.socials {
  max-width: 400px;
  margin: 2rem auto 3rem;
  text-align: center;
}

.social-icons a {
  margin: 0 1rem;
  display: inline-block;
}

.social-icons img {
  width: 32px;
  height: 32px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.social-icons a:hover img {
  filter: grayscale(0);
}

/* Card Info Section */
.card-info-section {
  background: #000000;
  color: white;
  padding: 4rem 2rem;
}

.card-info-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
}

.card-info-left {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-info-left h2{
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  line-height: 1.1;
}
.card-info-left h3{
  font-size: 2.2rem;
  font-weight: 800;
  color: #2e5cff;
  margin-top: 0;
  line-height: 1.1;
}

.card-info-right {
  flex: 1 1 300px;
  text-align: center;
}

.card-info-right img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

/* Accordion */
.accordion-item {
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  color: #333;
  border-radius: 8px; /* Miglioramento estetico */
}

.accordion-btn {
  width: 100%;
  padding: 1rem;
  font-weight: bold;
  background: #e6e6e6;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  transition: background 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px; /* Miglioramento estetico */
}

.accordion-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
  margin-left: 1rem;
  font-weight: bold;
}

.accordion-btn:hover {
  background: #d4d4d4;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  background: #f9f9f9;
  transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
  opacity: 0;
  margin-top: 2px;
  border-radius: 8px;
}

.accordion-item.active .accordion-content {
  max-height: 200px;
  opacity: 1;
  padding: 1rem;
}
.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

/* Location Section */
.location-section {
  padding: 80px 20px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.location-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.location-img img {
  width: 100%;
  max-width: 450px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.location-text {
  flex: 1;
  min-width: 280px;
  max-width: 450px;
}

.location-text .subtitle {
  color: #2e5cff;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 1.8rem;
}

.location-text h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.location-text p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.6;
}

/* Green Section */
.green-section {
  padding: 4rem 2rem;
  border-radius: 14px;
}

.containergreen {
  background-color: #e8f9ed;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  border-radius: 14px;
  padding: 2rem;
  margin-top: 2rem;
}

.title {
  font-size: 5rem;
  font-weight: 800;
  color:forestgreen;
  margin-bottom: 0.5rem;
}

.big-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
}

.green-box-wrapper {  
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.green-box {
  background: white;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 1.8rem;
  max-width: 270px;
  width: 100%; /* Si adatta su mobile */
  min-height: 280px;
  transition: transform 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.green-box:hover {
  transform: translateY(-5px);
}

.green-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 0.6rem;
  text-align: left;
}

.green-box p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  text-align: left;
}

.box-blue {
  background-color: #cdeeff;
  color: #010509;
}
.box-blue h3 {
  color: #0d3fac;
}

/* Animazioni e Footer */
.fade-in { animation: fadeInUp 0.9s ease forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

footer {
  background: #000000;
  color: white;
  text-align: center;
  padding: 1rem 2rem;
  font-size: 0.9rem;
}

#scrollTopBtn {
  position: fixed; 
  bottom: 40px;
  right: 40px;
  background:#0b0f1a ;
  border: none;
  color: white;
  padding: 0.75rem 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 1000;
  border-radius: 50%;
}

#scrollTopBtn.show {
  opacity: 0.7;  
  visibility: visible;
}


/* =========================================
   MEDIA QUERIES (RESPONSIVE MOBILE)
   ========================================= */

@media (max-width: 992px) {
      .servizi-grid {
    gap: 15px; /* Spazio più piccolo su mobile */
    padding: 10px;
  }


    .title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
  
  /* Header Stacked per Mobile */
  header {
    flex-direction: column;
    padding: 1rem;
  }
  
  header .logo {
    height: 50px;
    margin-bottom: 10px;
  }
  
  nav {
    justify-content: center;
    gap: 10px;
  }
  
  nav a {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    font-size: 1rem;
  }

  /* Hero Section */
  .hero {
    height: 100vh; /* Mantiene l'altezza piena anche su smartphone */
    padding-top: 0; /* Rimuovi eventuali padding-top eccessivi */
  }

  .servizio-card {
    width: 100%;          /* Occupa tutta la larghezza */
    aspect-ratio: 1 / 1;  /* Forza il quadrato: l'altezza diventerà uguale alla larghezza */
    height: auto;         /* Fondamentale: rimuove l'altezza fissa che le rendeva rettangolari */
  }
  .hero-text h1 {
    font-size: 1.8rem;
  }
  
  .hero-logo {
      max-width: 80%;
  }

  /* Typography generale più piccola */
  h2, .servizi-title, .schedule-prices h2 {
    font-size: 2rem;
  }
  
  .location-text h2, .card-info-left h2 {
      font-size: 2rem;
  }
  
  .title {
      font-size: 3rem; /* Green title */
  }
  
  .big-number {
      font-size: 1.8rem;
  }

  /* Griglie a singola colonna */
  .servizi-grid {
    grid-template-columns: 1fr;
  }

  .schedule-prices-wrapper, 
  .card-info-container,
  .location-content {
    flex-direction: column;
    align-items: center;
  }

  /* Padding ridotti per guadagnare spazio */
  .green-section, .card-info-section, .schedule-prices {
      padding: 3rem 1rem;
  }
  
  .containergreen {
      padding: 1rem;
  }
  
  .servizi-advanced {
      padding: 1rem 0;
  }
  
  /* Carousel height */
  .carousel-container {
      height: 50vh;
      min-height: 300px;
  }
  
  /* Card Info */
  .card-info-left, .card-info-right {
      flex: 1 1 100%;
      width: 100%;
  }
}

@media (max-width: 480px) {
    /* Smartphone piccoli */
    nav a {
        font-size: 0.9rem;
        margin: 5px;
    }
    .hero-text h1 {
        font-size: 1.5rem;
    }
    .title {
        font-size: 2.5rem;
    }
    .map-container, .contact {
        padding: 1.5rem;
    }
}