* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}
a {
  color: #007bff;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.team-slider-section .container {
  max-width: 90%;
  width: 100%;
  padding: 0 20px;
}

/* Impostazioni generali per l'header */
.site-header img {
  height: 100px;      /* Impostazione per desktop */
  max-height: 80px;    /* Ridurre la dimensione del logo per dispositivi mobili */
  width: auto;
  display: flex;
  margin-right: 10px;
  vertical-align: middle;
}

.site-header {
  background-color: #fff;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

/* Gestione del titolo */
.site-header .logo-text {
  font-size: 26px;  /* Impostazione per desktop */
  display: flex;
  align-items: center;
}

.site-header .logo-text span {
  font-size: 30px;
  font-weight: bold;
  margin-left: 10px;
}

.site-header .logo-text img {
  height: 75px;
  max-height: 75px;
  width: auto;
}

/* ===== FIX DEFINITIVO HEADER MOBILE ===== */
@media (max-width: 768px) {

    .site-header {
        padding: 5px 10px !important;
    }

    .header-inner {
        flex-direction: column !important;
        height: auto !important;
        padding: 5px 0 !important;
        gap: 5px;
    }

    .logo-text {
        font-size: 18px !important;
    }

        .logo-text img {
            height: 50px !important;
        }

        .logo-text span {
            font-size: 18px !important;
        }

    .main-nav ul {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .menu-text a {
        font-size: 14px !important;
        padding: 4px 6px !important;
    }
}



.logo-text {
  display: flex;
  font-weight:bold;
  font-size: 30px;
  align-items: center;
  gap: 8px;
}

.logo-text img {
  height: 80px; /* leggermente più piccolo */
  width: auto;
}

.logo-text span {
  color: #004a99;
  font-weight: 700;
  font-size: 32px;
  user-select: none;
}

.menu-text{
	  display: flex;
	  font-size: 20px;
	  align-items: left;
	  gap: 8px;
}

@media (max-width: 768px) {
  /* Modifica la dimensione del testo dei link solo sui dispositivi mobili */
  .menu-text a {
    font-size: 17px;  /* Aumenta la dimensione del testo sui dispositivi mobili */
    padding: 10px;  /* Aumenta un po' il padding per una maggiore facilità di clic */
  }
}

.menu-text a {
  text-decoration: none;
  color: #0066cc;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.menu-text a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  left: 0;
  bottom: -4px;
  background-color: #004a99;
  transition: width 0.3s ease;
}

.menu-text a:hover,
.menu-text a:focus {
  color: #004a99;
}

.menu-text a:hover::after,
.menu-text a:focus::after {
  width: 100%;
}




.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;


}

@media (max-width: 600px) {
  .main-nav ul {
    gap: 0.5rem; /* gap molto più piccolo */
    flex-wrap: wrap; /* permette di andare a capo */
    justify-content: center;
  }
}

@media (max-width: 992px) {
  .main-nav ul {
    gap: 1.2rem; /* riduce lo spazio */
  }
}


.main-nav ul {
  list-style: none;
  display: flex;
  align-items:left;
  gap: 1rem;
}
.main-nav a {
  padding: 0.5rem 0.75rem;
}
.header-contact a {
  font-weight: bold;
}

/* Hero */
.hero {
  position: relative;
  background: url("img/clinic-background.jpg") center/cover no-repeat;
  height: 60vh;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.4);
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: #fff;
  border-radius: 4px;
}
.btn-primary:hover {
  background-color: #0056b3;
}

/* Sezioni */
.section {
  padding: 4rem 0;
  background-color: #fff;
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #387dfe;
}

.section h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #387dfe;
}

.colored-text{
  color: #387dfe;
}

/* Servizi */
.servizi-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.servizio-item {
  background: #ffffff;
  border: 1px solid #ddd;
  padding: 1.5rem;
  border-radius: 6px;
  text-align: center;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}
.team-member {
  text-align: center;
}
.team-member img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  max-width: 150px;
  margin-bottom: 0.75rem;
}

/* Contatti */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  /* Per schermi piccoli, rendi la griglia una colonna */
  .contact-grid {
    grid-template-columns: 1fr; /* Una sola colonna per i dispositivi mobili */
    gap: 1rem;  /* Riduci lo spazio tra gli elementi */
  }

  /* Assicurati che la mappa non strabordi */
  .map-embed iframe {
    width: 100%;  /* Adatta l'iframe alla larghezza del contenitore */
    height: 280px;  /* Imposta un'altezza fissa su dispositivi mobili */
  }
}
.contact-info p {
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background-color: #387dfe;;
  color: #eee;
  text-align: center;
  padding: 2rem 0;
}
.site-footer a {
  color: #aaa;
}
.site-footer a:hover {
  color: #fff;
}

/* Media Queries */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Sezione galleria */
.section.galleria {
  padding: 60px 20px;
  background-color: #f8f8f8;
  text-align: center;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section.galleria h2 {
  font-size: 2em;
  margin-bottom: 40px;
  color: #333;
}

/* Griglia immagini */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Card singola */
.gallery-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.gallery-card:hover {
  transform: scale(1.03);
}

/* Immagini */
.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
}

/* --- Stile specifico per la pagina equipe --- */
.equipe-hero-image {
  position: relative;
  text-align: center;
}

.equipe-hero-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.equipe-hero-image .hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background-color: rgba(0,0,0,0.4); /* sfondo trasparente sopra l'immagine */
  padding: 20px;
  border-radius: 10px;
}

.equipe-hero {
    background: url('img/team-hero.jpg') center/cover no-repeat;
    position: relative;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
}
.equipe-hero .hero-overlay {
    background-color: rgba(0,0,0,0.4);
    position: absolute;
    inset: 0;
}
.equipe-hero .hero-content {
    position: relative;
    z-index: 1;
}

.intro-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    color: #444;
}


.team-grid {
  display: grid;
  margin-top: 50px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-items: left;
  justify-content: center;
  gap: 30px;
}

.team-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
max-width: 320px;
}

.team-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: transform 0.3s ease;
}
/* MEDIA QUERY per mobile */
@media (max-width: 768px) {
  .card-img {
    height: 350px; /* altezza aumentata su mobile */
  }
}


.team-card-content {
  padding: 20px;
}

.team-card h4 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: #2b3a42;
}

.team-card .role {
  font-weight: 500;
  color: #4b8b80;
  margin-bottom: 10px;
}
.role {
  font-weight: bold;
  color: #4b8b80;
  margin-bottom: 10px;
}

.team-card p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .team-card img {
    height: 50vh; /* Aumenta l'altezza al 50% della finestra su mobile */
  }
}
.team-slider-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.team-slider-wrapper:hover .team-slider-track {
  animation-play-state: paused;
}

.team-slider {
  flex-wrap: nowrap;
  overflow-x: hidden; /* nasconde la scrollbar */
  display: flex;
  gap: 24px;
  padding-left: 10vw;
  padding-right: 10vw;
  width: max-content;
  animation: scroll-team 40s linear infinite;
}

@keyframes scroll-team {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
}

.team-slider::-webkit-scrollbar {
  display: none;            /* Chrome/Safari */
}

.team-card {
  flex: 0 0 calc((100% - 60px) / 4); /* Mostra 4 card (3 x 20px gap) */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.team-card img {
  width: 100%;
  height: 30rem;
  display: block;
}

.team-card-content {
  padding: 15px;
  text-align: center;
}


@media (max-width: 1024px) {
  .team-card {
    flex: 0 0 calc((100% - 40px) / 3);
  }
}
@media (max-width: 768px) {
  .team-card {
    flex: 0 0 calc((100% - 20px) / 2);
  }
}
@media (max-width: 480px) {
  .team-card {
    flex: 0 0 100%;
  }
}


/* Contenitore responsivo per la mappa */
.map-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio, adatta questa percentuale se vuoi un altro rapporto */
  overflow: hidden;
}

/* Iframe responsivo */
.map-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  /* Su dispositivi mobili, puoi ridurre l'altezza dell'iframe */
  .map-embed {
    padding-bottom: 50%; /* Riduce l'aspect ratio per dispositivi mobili, se necessario */
  }
  .map-embed iframe {
    height: 280px;  /* Altezza ottimizzata per schermi più piccoli */
  }
}

.ig-gradient {
  font-size: 18px;
  background: linear-gradient(
    45deg,
    #F58529,
    #DD2A7B,
    #8134AF,
    #515BD4
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}