/* Impostazioni generali */
html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Garamond', serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Navbar con effetto flottante e trasparenza */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* sottolineatura elegante */
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
  height: 60px;
  z-index: 9999;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(10px);
}

/* Effetto della navbar quando si scorre */
header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  height: 50px;
  padding: 6px 20px;
  transition: all 0.3s ease-in-out;
}

header.scrolled .logo img {
  height: 40px;
  transition: height 0.3s ease;
}

header.scrolled .menu-toggle {
  font-size: 22px;
  top: 10px;
}

/* Contenitore del Logo */
.logo {
  flex: 1;
  display: flex;
  align-items: center;
  z-index: 1002;
position: relative;

}

.logo img {
  height: 60px;
  width: auto;
  display: block;
}

/* Navbar */
nav {
  flex: 2;
  display: flex;
  justify-content: flex-end; /* Spinge il menu a destra */
  overflow: visible;
  flex-wrap: nowrap;
  margin-right: 40px; /* Distanza dal bordo destro */
}


/* Lista di navigazione */
nav ul {
  list-style: none;
  display: flex;
  gap: 5px; /* Aumenta la spaziatura tra le voci */
  align-items: center;
  margin: 0;
  padding: 0;
  white-space: nowrap; /* Impedisce il taglio del testo */
  flex-wrap: nowrap; /* Mantiene tutto su una riga */
}

nav ul li {
  min-width: max-content; /* Impedisce il taglio della scritta */
  padding: 0 20px; /* Aggiunge margini tra le voci */
}



/* Stile link navbar */
nav ul li a {

  font-family: 'Garamond', serif;   
  color: #4B0082;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  transition: color 0.3s ease, background 0.3s ease, transform 0.2s ease;
  border-radius: 5px;
  white-space: nowrap;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.3);
}

nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: #4B0082;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav ul li a:hover::after {
  width: 100%;
}


/* Effetto Hover */
nav ul li a:hover {
  background: rgba(75, 0, 130, 0.2);
  color: #4B0082;
  transform: scale(1.05);
}



/* Responsive Navbar */
@media (max-width: 768px) {
  header {
      flex-direction: row; /* <-- RESTA row anche su mobile */
      justify-content: space-between;
      height: auto;
  }
  .logo {
      justify-content: flex-start;
      flex: 0 0 auto;
    }
    .logo img {
      margin-left: 0;
    }
    
  nav {
      justify-content: center;
      margin-left: 0;
  }

  nav ul {
      flex-direction: column;
      width: 100%;
      text-align: center;
  }

  nav ul li {
      width: 100%;
      padding: 10px 0;
  }
}

/* Stili per la navbar mobile */
.menu-toggle {
  display: none; /* Nascondilo su desktop */
  font-size: 28px;
  cursor: pointer;
  color: #4B0082;
  position: absolute;
  right: 20px;
  top: 15px;
}
.menu-toggle:hover {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}

/* Stile del menu mobile */

@media (max-width: 768px) {
  header {
     position: fixed;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      padding: 10px 20px;
    }

  .logo {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: flex-start;
  }

  .menu-toggle {
    display: block;
    font-size: 28px;
    color: #4B0082;
    cursor: pointer;
    position:absolute; 
     right: 50px; /* ✅ forza il posizionamento a destra */
    z-index: 1001;
  }

  nav {
    width: 100%;
  }

  .nav-menu {
      visibility: hidden;
      opacity: 0;
      transform: translateY(-20px);
      transition: all 0.3s ease-in-out;
      pointer-events: none;
      position: fixed;
      top: 0;
      margin-top: 0;
      z-index: 1000;
      right: 0;
      width: 100%;
      animation: fadeSlide 0.3s ease forwards;
      background-color: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(8px);
      padding: 20px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
      
    }
    

    .nav-menu.active {
      visibility: visible;
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
    

  .nav-menu li {
    margin: 10px 0;
    text-align: center;
  }
  
}


/* Hero Section */
.hero {
  position: relative;
  height: 100svh;
  display: flex;
  align-items: flex-end; /* Sposta il contenuto in basso */
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
}
.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* Rende l’immagine centrata e adattata */
  object-position: center; /* Centra anche verticalmente */
  z-index: -1;             /* Va sotto il contenuto */
}


/* Box trasparente migliorato */
.overlay {
  background: rgba(255, 255, 255, 0.3); /* Aumentata la trasparenza */
  padding: 40px;
  border-radius: 15px;
  max-width: 650px;
  position: relative;
  text-align: center;
  backdrop-filter: blur(4px); /* Ridotta la sfocatura */
  margin-bottom: 50px; /* Posizionato più in basso */
  box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.3); /* Leggero effetto luminoso */
}

/* Testo più leggibile */



/* Stile della scritta "IRIS" */
/* Stile della scritta "IRIS" */
.hero h1 {
  font-size: 60px;
  font-weight: bold;
  font-family: 'Garamond', serif;
  color: #3b1654; /* Colore più scuro per migliorare il contrasto */
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  margin-bottom: 5px; /* Ridotto lo spazio sotto il titolo */
}

/* Stile della scritta "Ambulatorio Polispecialistico per la Famiglia" */
.hero p {
  font-size: 22px;
  font-family: 'Garamond', serif;
  color: #3b1654; /* Colore più scuro per migliorare il contrasto */
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  margin-top: 0; /* Elimina spazio sopra il paragrafo */
}


/* Pulsante con effetto migliorato */
.pulse-button {
  display: inline-block;
  padding: 12px 30px;
  font-size: 18px;
  background: #3b1654;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(66, 9, 52, 0.3);
}

/* Effetto hover migliorato */
.pulse-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 14px rgba(50, 13, 45, 0.4);
}


/* Effetto di comparsa più morbido */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(30px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Applica l'animazione */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
}

.hero-fade {
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeIn 1s ease forwards;
}

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

.delay-1 {
  animation-delay: 0.4s;
}
.delay-2 {
  animation-delay: 1s;
}


/* Sezione CHI SIAMO */
.about-section {
  padding: 40px 0;
  background: #f9f9fb;
  
}

/* Contenitore che affianca testo e immagine */
.about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}
.about-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #4B0082;
  margin: 10px auto 30px auto;
  border-radius: 2px;
}

/* Titolo "Chi Siamo" centrato */
.about-title {
  text-transform: none;
  color: #4d2667;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  width: 100%;
  position:relative;
}

/* Sottotitolo */
.about-subtitle {
  font-size: 26px;
  font-weight: 600;
  color: #4d2667;
  margin-bottom: 20px;
  margin-top: -10px;
}

/* Testo della sezione */
.about-content {
  text-align: left;
}

.about-content p {
  font-size: 18px;
  line-height: 1.9;
  color: #444;
  margin-bottom: 18px;
}

.about-wrapper {
  transition: all 0.4s ease-in-out;
}

.about-wrapper:hover {
  transform: translateY(-2px);
}

/* Bottone */
.cta-button {
  display: inline-block;
  padding: 12px 28px;
  background-color: #4B0082;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  background-color: #5c0baa;
}

/* Immagine */
.about-image {
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 450px;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsivo */
@media (max-width: 1024px) {
  .about-wrapper {
      grid-template-columns: 1fr;
      text-align: center;
  }

  .about-content {
      text-align: center;
  }

  .about-image {
      margin-top: 30px;
      justify-content: center;
  }
}
.services {
  background-color: #f0f0f5;
  padding: 40px 0;
}

/* SEZIONE "SERVIZI" */
.services-section {
  padding-top: 30px;
  padding-bottom: 30px;
  
}

#services .section-title {
  color: #4d2667;
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  position: relative;
  margin-bottom: 40px;
}
#services .section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #4B0082;
  margin: 10px auto 0 auto;
  border-radius: 2px;
}

.services-container {
  
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: auto;
}

/* Box servizio */
.service-box {
  
  width: 250px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}
.service-box:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}
/* Immagini servizi */
.service-box img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.service-box:hover img {
  transform: scale(1.05);
}
.service-text {
  padding: 20px;
}

.service-text h3 {
  font-size: 20px;
  padding-bottom: 8px;
  color: #4B0082;
  text-align: center;
}

.service-text p {
  font-size: 18px;
  color: #666;
}


/* SEZIONE "TEAM" */
.team-section {
  padding: 80px 0;
  background-color: #f9f9fb;
  text-align: center;
}
.team-section .section-title {
  color: #4B0082;
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  position: relative;
  margin-bottom: 40px;
}

/* Linea sotto il titolo */
.team-section .section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #4B0082;
  margin: 10px auto 0 auto;
  border-radius: 2px;
}
/* Contenitore team */
.team-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding: 40px;
  max-width: 1200px;
  margin: auto;
}

.team-intro {
  font-size: 23px;
  color: #666;
  max-width: 700px;
  margin: 0 auto 40px auto;
  font-style:italic;
}


/* Singolo membro team */
.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  width: 260px;
}


/* Immagini team */
.team-member img {
  width: 240px; /* Aumenta la dimensione */
  height: 280px; /* Leggermente ovale */
  object-fit: cover;
  border-radius: 50%; /* Rimane circolare/ovale */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  margin-bottom: 15px;
}


.team-member img:hover {
  transform: scale(1.1);
}

.team-member h3 {
  margin: 15px 0 5px;
  font-size: 20px;
  font-weight: bold;
  color: #4B0082;
  min-height: 40px; /* fissa lo spazio per il nome */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}


.team-member p {
  font-size: 18px;
  color: #666;
  min-height: 35px; /* fissa anche lo spazio del ruolo */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Stile carosello team */
.team-swiper {
  width: 100%;
  padding: 30px 0;
}

.swiper-slide.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 10px;
  width: auto !important; /* Adatta la larghezza al contenuto */
}

.swiper-slide.team-member img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.swiper-slide.team-member img:hover {
  transform: scale(1.05);
}
/* Riduce lo spazio orizzontale tra le slide */
.swiper-wrapper {
  gap: 20px !important;
  overflow: visible !important;
}


/* Media Query per mobile */
@media (max-width: 768px) {
  .team-wrapper {
      gap: 10px;
  }
  .team-member {
      width: 200px;
  }
  .team-member img {
      width: 150px;
      height: 150px;
  }
  .carousel-btn {
      font-size: 18px;
      padding: 8px;
  }
}


.team-button {
margin-top: 15px;
display: inline-block;
padding: 10px 20px;
font-size: 15px;
color: white;
background-color: #4B0082;
border-radius: 25px;
text-decoration: none;
font-family: 'Garamond', serif;
transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
box-shadow: 0 4px 10px rgba(75, 0, 130, 0.2);
}

.team-button:hover {
background-color: #5c0baa;
transform: scale(1.05);
box-shadow: 0 6px 14px rgba(75, 0, 130, 0.3);
}


/* SEZIONE "CONTATTACI" */
.contact-section {
  text-align: center;
  padding-top: 30px;
  padding-bottom: 30px;
  background: #f9f9fb;
 
}


.contact-section .section-title {
  font-size: 28px;
  font-weight: bold;
  color: #4B0082;
  text-align: center;
  position: relative;
  margin-bottom: 30px;
}


.contact-section .section-title.contact-title-centered {
  font-size: 32px;
  margin-top: 0;
  margin-bottom: 40px;
  color: #4B0082;
}
/* Titoli delle sezioni allineati al centro */
.section-title, 
.section-subtitle, 
.team-section h2, 
.contact-section h2 {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  color: #222;
  margin-bottom: 30px;
  width: 100%;
}
.contact-section .section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: #4B0082;
  margin: 10px auto 0;
}

/* Testo della sezione */
.contact-section p {
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #333;
  color: white;
  font-size: 14px;
  line-height: 1.6;
}

footer a {
  color: #a6d1ff;
  text-decoration: none;
}
footer p {
  margin-bottom: 0px; /* Riduce spazio sotto al testo legale */
}

footer a:hover {
  text-decoration: underline;
}
.footer-dev {
  margin-top: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #ccc;
}

.footer-dev img.melatek-logo {
  height: 80px;
  width: auto;
  vertical-align: middle;
  filter: drop-shadow(0 0 1px black);
}

.footer-dev a i.fab.fa-instagram {
  color: #d020cd !important;
  transition: color 0.3s;
}

.footer-dev a:hover i.fab.fa-instagram {
  color: #a03c75 !important; /* Colore tipico di Instagram */
}

/* Forza il centramento di tutti i titoli delle sezioni */
/* Stili per centrare i titoli delle sezioni */
.section-title, 
.section-subtitle, 
.team-section h2, 
.contact-section h2 {
  text-align: center !important; /* Forza il centramento */
  width: 100%;
  font-size: 32px;
  font-weight: bold;
  color: #222;
  margin: 30px 0; /* Spazio sopra e sotto */
  display: block;
}

/* Centrare tutto il contenuto delle sezioni */
.team-section {
  padding-top: 30px;
  padding-bottom: 30px;
  background-color: #f9f9fb;
}
.contact-section {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* Assicura che il contenuto sia al centro */
  background-color: #f0f0f5;
}

/* Stile del logo sopra la scritta */
.hero-logo {
  width: 120px; /* Regola la dimensione in base al design */
  display: block;
  margin: 0 auto; /* Centra orizzontalmente */
  position: relative;
  top: 30px; /* Regola la distanza dalla scritta IRIS */
  animation: heroLogoFadeIn 1s ease forwards;
}
@keyframes heroLogoFadeIn {
  from {
    transform: scale(1.5); /* Logo inizialmente zoomato */
  }
  to {
    transform: scale(1); /* Logo alla dimensione normale */
  }
}

/* Modifica della sezione hero per il logo */
.hero .overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#services .section-title {
  color: #4d2667; /* oppure il colore che desideri */
}


.section-box {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  max-width: 1100px;
  margin: auto;
}

* {
  transition: all 0.3s ease-in-out;
}

html {
  scroll-behavior: smooth;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}

.social-icons a {
  font-size: 24px;
  color: #4B0082;
  transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: #a64bf4;
}


.contact-box i {
  color: #4B0082;
  margin-right: 10px;
}
.contact-box p {
  font-size: 16px;
  line-height: 1.6;
  color: #444;
}

.contact-wrapper {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 4rem; /* distanza tra box e mappa */
  margin-top: 2rem;
}

.contact-box {
  flex: 1;
  max-width: 650px;
  padding: 2rem;
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-image img {
  border-radius: 20px;
  height: 100%;
  object-fit: cover;
}
.map-box {
  flex: 1;
  max-width: 650px;
  height: auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
}

.map-box iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


/* Responsive */
@media (max-width: 768px) {
  .contact-wrapper {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }

  .contact-box {
    width: 100%;
  }
  .map-box {
    border-radius: 16px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  }

  .map-box iframe {
    height: 100%;
    width: 100%;
  }
}
/* Icona WhatsApp fissa */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 25px;
  background-color: #25D366;
  color: white;
  font-size: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}


.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1ebe5d;
}
/* Ottimizzazione per dispositivi mobili */



@media screen and (max-width: 768px) {
  nav ul li a {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
  }

  nav ul li {
    text-align: center;
  }
}


@media screen and (max-width: 768px) {
  .about-section,
  .services,
  .team-section
  .contact-section {
    padding: 40px 0; /* invece di 80px */
  }
  .hero h1 {
      font-size: 34px; /* 👈 più piccolo rispetto ai 60px desktop */
    }
  
    .hero p {
      font-size: 12px; /* 👈 anche la sotto-scritta più compatta */
    }
  
    .pulse-button {
      font-size: 16px;
      padding: 10px 24px;
    }
  
  .overlay {
    margin-bottom: 30px; /* meno spazio sotto il contenuto nella hero */
  }

  .team-container {
    padding: 20px;
    gap: 30px;
  }

  .contact-wrapper {
    gap: 30px;
    padding: 20px;
  }
}

/* Mostra/Nasconde elementi per desktop e mobile */
.desktop-only {
display: block;
}
.mobile-only {
display: none;
}

@media (max-width: 768px) {
.desktop-only {
  display: none !important;
}
.mobile-only {
  display: block !important;
}
}

/* Griglia Team su Desktop */
.team-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 60px 40px; /* più spazio verticale tra le righe */
max-width: 1200px;
margin: 0 auto;
padding: 50px 20px;
position: relative;
}




/* Singolo membro */
.team-grid .team-member {
  text-align: center;
  max-width: 220px;
  min-height: 380px; /* Altezza ridotta */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between; /* Cambiato da flex-start a space-between */
  transition: transform 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}




/* Immagini */
.team-grid .team-member img {
width: 220px;
height: 220px;
object-fit: cover;
border-radius: 50%;
transition: transform 0.3s ease;

box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.team-grid .team-member img:hover {
transform: scale(1.07);
box-shadow: 0 0 25px rgba(75, 0, 130, 0.25);

}

/* Nome */
.team-grid .team-member h3 {
font-size: 18px;
color: #4B0082;
font-family: 'Garamond', serif;
font-weight: bold;
margin-top: 15px;
margin-bottom: 5px;
}

/* Ruolo */
.team-grid .team-member p {
font-size: 16px;
color: #666;
margin: 0;
}

/* Animazione fadeInUp */
@keyframes fadeInUp {
from {
  opacity: 0;
  transform: translateY(30px);
}
to {
  opacity: 1;
  transform: translateY(0);
}
}
/* 🔒 Nasconde Swiper mobile su desktop */
.team-swiper.mobile-only {
display: none;
}

/* 📱 Mostra solo su mobile */
@media (max-width: 768px) {
.team-swiper.mobile-only {
  display: block !important;
}
}


@media (max-width: 768px) {
  /* Contenitore del carosello team mobile */
  .team-swiper.mobile-only {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw; /* ⬅️ forza larghezza a tutta viewport */
    overflow: hidden;
  }

  /* Singola slide */
  .swiper-slide.team-member {
    width: auto !important;
    max-width: 220px;
    margin: 0 4px !important; /* spazio ridotto tra i “pallini” */
    flex-shrink: 0;
    background: white;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 360px;
  }
  
  .swiper-slide.team-member.swiper-slide-active {
    transform: scale(1.02);
  }
  /* Immagine del membro team */
  .swiper-slide.team-member img {
    width: 180px;  /* leggermente più grande del contenitore */
    height: 180px;
    object-fit: cover;
    object-position: center top; /* sposta il volto più in alto, se necessario */
    border-radius: 50%;
    margin-bottom: 15px;
    transform: scale(1.1); /* 👈 Effetto zoom */
    transition: transform 0.3s ease;
  }
  

  .swiper-slide.team-member h3 {
    font-size: 18px;
    margin: 10px 0 5px;
  }

  .swiper-slide.team-member p {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .swiper-slide.team-member .team-button {
    font-size: 14px;
    padding: 8px 18px;
    margin-top: auto;
  }
  .team-section,
  .section-box {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
}


@media (max-width: 768px) {
  .team-swiper .swiper-pagination {
    margin-top: 20px;
    position: relative;
    text-align: center;
    bottom: 0;
  }

  .swiper-pagination-bullet {
    background-color: #4B0082;
    opacity: 0.5;
    transition: opacity 0.3s;
  }

  .swiper-pagination-bullet-active {
    opacity: 1;
    background-color: #4B0082;
  }
}

/* Mostra solo su mobile */


/* Stile base del carosello servizi mobile */

/* SOLO mobile: card più strette e centrate */


/* Desktop: card più larghe come prima */
@media (min-width: 769px) {
  .swiper-slide .service-box {
    width: 100%;
    max-width: 400px;
    margin: 0 10px;
    flex-shrink: 0;
  }
}


/* Carosello servizi visibile su tutti i dispositivi */
.service-swiper {
  padding: 40px 40px;
}

.service-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-swiper .swiper-slide {
  width: auto;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .service-swiper {
    padding-left: 0;
    padding-right: 0;
  }

  .service-swiper .swiper-slide {
    width: 85%;
    max-width: 280px;
    margin-right: 16px;
    flex-shrink: 0;
  }

  .swiper-slide .service-box {
    width: 100%;
    height: 420px; /* ⬅️ altezza fissa per tutte le card */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 380px;
    
  }

  .swiper-slide .service-box img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    
  }

  .service-text {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
  }

  .service-text p {
    font-size: 15px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
  
    -webkit-box-orient: vertical;
  }
}

@media (max-width: 768px) {
  .lazy-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .lazy-section.visible {
    opacity: 1;
    transform: translateY(0);
  }
}





.full-width-map {
  width: 100vw;
  margin: 40px 0 0 0;
  padding: 0;
  position: relative;
  left: 50%;
  right: 50%;
  transform: translateX(-50%);
  height: 400px;
  border-radius: 0;
  box-shadow: none;
}

.full-width-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


.contact-box {
  background: white;
  padding: 40px 50px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: 800px; /* <-- più largo */
  min-height: 450px;  /* <-- più alto */
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}


.contact-title {
  font-size: 20px;
  font-weight: bold;
  color: #4B0082;
  text-align: center;
  margin-bottom: 10px;
  margin-top: -20px;
}

.contact-row {
  display: flex;
  align-items: flex-start; /* 👈 per allineare verticalmente meglio */
  justify-content: flex-start; /* 👈 allinea a sinistra */
  gap: 12px;
  font-size: 16px;
  color: #333;
}

.contact-row i {
  color: #4B0082;
  font-size: 18px;
}

.contact-row a {
  color: #4B0082;
  text-decoration: none;
  font-weight: 500;
}

.contact-row a:hover {
  text-decoration: underline;
}

.contact-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, #ddd, #ccc, #ddd);
  margin: 10px 0;
}

.cta-button {
  align-self: center;
  padding: 10px 25px;
  background-color: #4B0082;
  color: white;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  background-color: #5c0baa;
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}


.contact-box.contact-desktop {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-image {
  flex: 1;
  text-align: center;
}

.contact-image img {
  max-width: 100%;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transform: scale(1.10);
}

@media (max-width: 768px) {
  .contact-box.contact-desktop {
    flex-direction: column;
  }

  .contact-image {
    display: none;
  }
}




@media (max-width: 768px) {
  .contact-box.contact-desktop {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-box .contact-image img {
    max-width: 90%;
    height: auto;
    border-radius: 16px;
  }

  
}

@media (max-width: 768px) {
  .contact-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* da 2rem a 1rem per meno spazio verticale */
    padding: 0 10px;
  }

  .contact-box.contact-desktop {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-box .contact-image {
    margin-top: 1rem;
  }

  .contact-box .contact-image img {
    max-width: 90%;
    height: auto;
    border-radius: 16px;
  }

  .map-box {
    width: 100%;
    height: 300px;
  }

  
}

@media (max-width: 768px) {
  .contact-box {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    transform: scale(1); /* elimina qualsiasi effetto di zoom */
  }
  .contact-box h3 {
    margin-bottom: 10px;  /* spazio sotto al titolo */
    margin-top: 10px;     /* spazio sopra */
    font-size: 20px;
    color: #4B0082;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
  }
  
}
@media (max-width: 768px) {
  .contact-address {
    text-align: left;
    display: block;
    margin-left: 4px;
  }
}

/* 🔷 GRIGLIA SERVIZI PER DESKTOP */
/* 🎨 GRIGLIA MIGLIORATA SERVIZI DESKTOP */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  justify-items: center;
  justify-content: center;
}

.services-grid .service-box {
  background: linear-gradient(135deg, #ffffff, #f8f8fb);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.services-grid .service-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.services-grid .service-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.services-grid .service-text {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.services-grid .service-text h3 {
  color: #4B0082;
  font-size: 21px;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: center;        /* 👈 aggiunto */
  width: 100%;               /* 👈 opzionale per sicurezza */
  padding-right: 0; 
}



.services-grid .service-box:hover h3::after {
  transform: translateX(4px);
}

.services-grid .service-text p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  flex-grow: 1;
}

.services-grid .service-button {
  margin-top: 20px;
  align-self: flex-start;
  background: #4B0082;
  color: white;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.services-grid .service-button:hover {
  background: #5c0baa;
  transform: scale(1.05);
}

@media (min-width: 769px) {
  .service-swiper {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    justify-items: center;
  }

  /* Se l'ultima è sola nella riga → centra */
  .services-grid > .service-box:nth-last-child(1):nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 768px) {
  .about-section .section-box {
    padding: 30px 20px;
   
  }

  .about-content p {
    font-size: 16px;
    line-height: 1.7;
  }
}

@media (max-width: 768px) {
  .cta-button {
    padding: 14px 28px;
    font-size: 16px;
    margin-top: 20px;
  }
}
@media (max-width: 768px) {
  .lazy-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .lazy-section.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .lazy-delay-0 {
    transition-delay: 0s;
  }

  .lazy-delay-1 {
    transition-delay: 0.3s;
  }

  .lazy-delay-2 {
    transition-delay: 0.6s;
  }

  .lazy-delay-3 {
    transition-delay: 0.9s;
  }
}
@media (max-width: 768px) {
  .about-image img {
    border-radius: 20px;
    border: 2px solid #ddd;
    animation: fadeUpImg 0.8s ease forwards;
    animation-delay: 0.2s;
  }
  @keyframes fadeUpImg {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (max-width: 768px) {
  .about-content p {
    margin-bottom: 22px;
    font-size: 17x;
    
  }
}
@media (max-width: 768px) {
  #services {
    padding-top: 30px !important; /* riduce lo spazio sopra */
    margin-top: -10px;            /* facoltativo, per stringere ancora */
  }

  #services .section-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .service-swiper {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .swiper-slide .service-box {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .team-section {
    padding-top: 40px;
    padding-bottom: 30px;
  }

  .team-section .section-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 30px;
  }
}
@media (max-width: 768px) {
  .swiper-slide.team-member img {
    border: 3px solid #eee;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 768px) {
  .swiper-slide.team-member h3 {
    font-size: 19px;
    color: #4B0082;
    margin-bottom: 6px;
  }

  .swiper-slide.team-member p {
    font-size: 17px;
    color: #555;
    margin: 0;
    line-height: 1.4;
  }
}
@media (max-width: 768px) {
  .team-intro {
    font-size: 19px;
    line-height: 1.6;
    padding: 0 10px;
  }
}


@media (max-width: 768px) {
  /* Wrapper centrato */
  .section-title-wrapper {
    text-align: center;
  }

  /* Titolo mobile elegante */
  .section-title,
  .about-title,
  #services .section-title,
  .team-section .section-title,
  .contact-section .section-title {
    font-style: italic;
    font-weight: bold;
    font-size: 26px;
    color: #4B0082;
    display: inline-block;
    position: relative;
    margin: 0 auto 20px auto;
    text-align: center;
    width: auto !important;

    /* ANIMAZIONE */
    animation: titleSlideIn 0.8s ease-out both;
  }

  .section-title::after,
  .about-title::after,
  #services .section-title::after,
  .team-section .section-title::after,
  .contact-section .section-title::after {
    content: "";
    display: block;
    height: 2px;
    background-color: #4B0082;
    width: 100%;
    margin: 8px auto 0 auto;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    animation: underlineSlideIn 0.8s ease-out 0.3s forwards;
  }

  @keyframes titleSlideIn {
    from {
      opacity: 0;
      transform: translateX(-40px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes underlineSlideIn {
    to {
      transform: scaleX(1);
    }
  }
}
@media (max-width: 768px) {
  .contact-box {
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
  }

  .contact-title {
    font-size: 18px;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #4B0082;
    font-style: italic;
  }

  .contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #333;
  }

  .contact-row i {
    font-size: 20px;
    color: #4B0082;
    margin-top: 2px;
  }

  .contact-row a {
    color: #4B0082;
    font-weight: bold;
    text-decoration: none;
  }

  .contact-row a:hover {
    text-decoration: underline;
  }
}
@media (max-width: 768px) {
  .contact-box {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.2s;
  }

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

/* Sezione contatti con layout tipo Lucea */

.contact-lucea-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr;
  gap: 40px;
  max-width: 1300px;
  margin: auto;
  align-items: center;
  padding: 40px 20px;
}

.contact-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

/* Colonna 1: Logo e social */
.logo-social {
  align-items: center;
  text-align: center;
}

.lucea-logo {
  width: 200px;
  max-width: 100%;
  height: auto;
}

.lucea-social {
  justify-content: center;
  gap: 18px;
}

.lucea-social a {
  font-size: 22px;
  color: #4B0082;
}

.lucea-social a:hover {
  color: #a64bf4;
}

/* Colonna 2: Contatti */
.info .contact-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 18px;
  color: #4B0082;
}

.info .contact-row i {
  font-size: 22px;
  margin-top: 3px;
}

.info .contact-row a {
  color: #4B0082;
  font-weight: bold;
  text-decoration: none;
}

.info .contact-row a:hover {
  text-decoration: underline;
}

/* Colonna 3: Mappa */
.contact-col.map {
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.contact-quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1400px;
  margin: auto;
  padding: 40px 20px;
  align-items: flex-start;
}

/* Colonne generali */
.contact-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  color: #4B0082;
}

/* Logo + social */
/* Colonna 1 */
.col-1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* per stare in alto */
  gap: 12px;
  text-align: center;
}

/* Logo più piccolo */
.quad-logo {
  width: 140px; /* era 180px */
  height: auto;
  margin-bottom: 0;
}


/* Sottotitolo "Seguici su:" */
.contact-subtitle {
  font-size: 16px;
  font-weight: bold;
  color: #4B0082;
  margin: 0;
}

/* Social */
.quad-social {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.quad-social a {
  font-size: 22px;
  color: #4B0082;
}

.quad-social a:hover {
  color: #a64bf4;
}

/* Riga contatto con icona */
.contact-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 10px;
  font-size: 1.2rem;
  color: #4B0082;
  min-height: 100px; /* <--- imposta altezza minima uguale per tutti */
}

.contact-col .social-icons a:hover {
  transform: scale(1.2);
  color: #5c0baa;
}

.contact-row i {
  font-size: 30px;
  color: #4B0082;
  margin-top: 2px;
}

.contact-row a {
  color: #4B0082;
  font-weight: bold;
  text-decoration: none;
}

.contact-row a:hover {
  text-decoration: underline;
}

/* Colonna mappa */
.contact-col.map {
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .contact-row {
    font-size: 1rem; /* Dimensione leggermente ridotta per schermi piccoli */
  }

  .contact-row i {
    font-size: 24px; /* Dimensione icone ridotta per schermi piccoli */
  }
}

@media (max-width: 768px) {
  .contact-quad-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px !important;
    padding: 30px 20px;
  }

  .contact-col {
    padding: 10px 16px !important; /* Riduce lo spazio interno ai blocchi */
    gap: 12px !important;
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .contact-col.map {
    width: 100%;
    height: 250px;
  }

  .quad-logo {
    width: 100px;
  }

  .contact-row {
    gap: 8px;
    font-size: 1.1rem;
    margin-bottom: 12px;
  }
  .contact-row:last-child {
    margin-bottom: 0; /* niente spazio dopo l'ultimo */
  }
  .contact-row i {
    font-size: 24px;
  }
  
  .quad-social {
    gap: 20px;
    margin-top: 8px;
  }

  .quad-social a {
    font-size: 22px;
  }

  .contact-section .section-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
}
@media (max-width: 768px) {
  .fade-in-mobile {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  }

  .fade-in-mobile.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .contact-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;              /* spazio tra icona e testo */
    margin-bottom: 24px;    /* spazio tra i blocchi */
  }

  .contact-row:last-child {
    margin-bottom: 0;       /* niente spazio sotto l'ultimo blocco */
  }
}



/* Banner cookie viola */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #4B0082;
  color: #fff;
  padding: 16px 20px;
  width: 95%;
  max-width: 360px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 9999;
  font-size: 14px;
  text-align: center;
}

#cookie-banner p {
  margin: 0 0 12px;
  line-height: 1.4;
}

#cookie-banner a {
  color: #ffd700;
  text-decoration: underline;
  font-weight: bold;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-buttons button {
  flex: 1 1 auto;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
}

#accept-cookies {
  background: #fff;
  color: #4B0082;
}

#decline-cookies {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

@media (max-width: 480px) {
  #cookie-banner {
    font-size: 13px;
    padding: 14px;
    bottom: 15px;
  }

  .cookie-buttons button {
    font-size: 13px;
    padding: 8px 10px;
  }
}

