/* ===================================
   CLINICA MOBILE - DESIGN PULITO
   Colori esatti dal sito originale
   =================================== */

/* Colori Solidi */
:root {
  --rosa-primary: #B04872;
  --azzurro-primary: #51AFDA;  /* Navy professionale */
  --azzurro-light: #51AFDA;    /* Navy unificato */
  --blu-scuro: #51AFDA;        /* Navy professionale */
  --rosa-light: #B04872;       /* Fucsia unificato */
  --grigio-light: #F5F5F5;     /* Grigio chiarissimo per background */
  --bianco: #FFFFFF;
  --nero: #000000;
  --verde-telefono: #4CAF50;
}

/* ===================================
   HEADER E LOGO
   =================================== */

.logo img {
  max-width: 80px !important;
  height: auto !important;
  display: block;
}

.btn--phone {
  background: var(--verde-telefono) !important;
  color: white !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 1000px;
}

/* Header nascosto al caricamento - appare allo scroll */
.header {
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.header--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -80px; /* Compensa spazio header quando nascosto */
  padding-top: 80px; /* Mantiene contenuto centrato */
  transition: margin-top 0.4s ease, padding-top 0.4s ease;
}

/* Hero senza margine negativo quando header è visibile */
.header--visible ~ main .hero,
body:has(.header--visible) .hero {
  margin-top: 0;
  padding-top: 0;
}

/* Nasconde bottone scroll circolare */
.hero__scroll {
  display: none !important;
}

/* Hero Animation - Sequenza 5 secondi fluida (inizia a 1.5s) */
@keyframes heroFadeToWhite {
  0%, 30% {
    filter: blur(0px);
    opacity: 1;
  }
  100% {
    filter: blur(4px);
    opacity: 0.1;
  }
}

@keyframes overlayFadeIn {
  0%, 30% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes logoMaterialize {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero__background img {
  animation: heroFadeToWhite 5s ease-out forwards;
}

.hero__overlay {
  animation: overlayFadeIn 5s ease-out forwards;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: #51AFDA;
  text-align: center;
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  color: #B04872;
  text-align: center;
  margin-bottom: 0.5rem;
}

.hero__brand {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: #FFFFFF;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: inline-block;
  background: #B04872;
  border: none;
  border-radius: 1000px;
  padding: 1rem 3rem;
  cursor: default;
  box-shadow: 0 4px 20px rgba(176, 72, 114, 0.3);
}

/* ===================================
   STATISTICHE
   =================================== */

.stats-section {
  background: var(--bianco);
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  background: var(--bianco);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-number,
.stat-card__number {
  font-size: 3rem;
  font-weight: 800;
  color: #B04872;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}

.stat-label,
.stat-card__label {
  font-size: 1.125rem;
  color: #000000;
  font-weight: 600;
  line-height: 1.4;
  display: block;
}

/* ===================================
   PREVENZIONE CON GRAFICI
   =================================== */

.prevention-section {
  background: var(--bianco);
  padding: 5rem 0;
}

.prevention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.prevention-card {
  background: var(--bianco);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.prevention-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.prevention-percentage {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.prevention-card:nth-child(1) .prevention-percentage {
  border: 8px solid #B04872;
  color: #B04872;
}

.prevention-card:nth-child(2) .prevention-percentage {
  border: 8px solid #51AFDA;
  color: #51AFDA;
}

.prevention-card:nth-child(3) .prevention-percentage {
  border: 8px solid #B04872;
  color: #B04872;
}

.prevention-card:nth-child(4) .prevention-percentage {
  border: 8px solid #51AFDA;
  color: #51AFDA;
}

.prevention-text {
  font-size: 1.125rem;
  color: #000000;
  font-weight: 600;
  line-height: 1.5;
}

/* ===================================
   SERVIZI
   =================================== */

.services-grid,
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--bianco);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.service-card:nth-child(odd) {
  background: #FFFFFF;
  border: 2px solid #51AFDA;
}

.service-card:nth-child(even) {
  background: #FFFFFF;
  border: 2px solid #B04872;
}

.service-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.service-card__content {
  padding: 2rem;
}

.service-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #B04872;
  margin-bottom: 1rem;
}

.service-card__description {
  font-size: 1rem;
  color: #000000;
  line-height: 1.6;
}

/* ===================================
   SEZIONI COLORATE
   =================================== */

.colored-section {
  padding: 5rem 0;
  color: var(--text-primary);
}

.colored-section--rosa {
  background: #FFF5F8;
}

.colored-section--azzurro {
  background: #D9EDF7;
  border-top: 2px solid #51AFDA;
  border-bottom: 2px solid #51AFDA;
}

.colored-section h2 {
  color: #B04872;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.colored-section p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #000000;
}

/* ===================================
   CASE STUDY
   =================================== */

.case-study {
  background: var(--bianco);
  padding: 5rem 0;
}

.case-study__content {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bianco);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.case-study__title {
  font-size: 2rem;
  font-weight: 700;
  color: #51AFDA;
  margin-bottom: 1.5rem;
}

.case-study__text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #000000;
  margin-bottom: 1rem;
}

/* ===================================
   BOTTONI
   =================================== */

.btn--primary {
  background: var(--rosa-primary) !important;
  color: var(--bianco) !important;
  border-radius: 1000px;
  padding: 1rem 2.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn--primary:hover {
  background: #8E3A5C !important;
  transform: scale(1.05);
}

.btn--white {
  background: var(--bianco);
  color: var(--rosa-primary);
  border-radius: 1000px;
  padding: 1rem 2.5rem;
  font-weight: 600;
}

/* ===================================
   SECTION HEADERS
   =================================== */

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #51AFDA;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #000000;
  font-weight: 600;
  line-height: 1.6;
}

/* ===================================
   FOOTER
   =================================== */

.footer__logo {
  display: block;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
  max-width: 150px;
}

.footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer__social a {
  width: 40px;
  height: 40px;
  background: #51AFDA;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.footer__social a:hover {
  background: #B04872;
  transform: scale(1.1);
}

/* ===================================
   SOCIAL FEED - NASCOSTA
   =================================== */

.social-feed {
  display: none;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .stats-grid,
  .prevention-grid,
  .services-grid,
  .services__grid {
    grid-template-columns: 1fr;
  }

  .logo img {
    max-width: 80px !important;
  }

  .prevention-percentage {
    width: 140px;
    height: 140px;
    font-size: 2rem;
  }
}

/* FIX LOGO HEADER ANCORA PIU' PICCOLO */
.logo img {
  max-width: 80px !important;
  height: auto !important;
  display: block;
}

@media (min-width: 768px) {
  .logo img {
    max-width: 110px !important;
  }
}

/* FIX SEZIONE CTA - SFONDO ROSA CON TESTO BIANCO */
.cta-section {
  background: var(--rosa-primary);
  padding: 5rem 0;
}

.cta-box {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-box h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--bianco);
  margin-bottom: 1rem;
}

.cta-box p {
  font-size: 1.25rem;
  color: var(--bianco);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  min-width: 200px;
}

/* Bottone outline bianco */
.btn--outline {
  background: transparent;
  color: var(--bianco);
  border: 2px solid var(--bianco);
  border-radius: 1000px;
  padding: 1rem 2.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn--outline:hover {
  background: var(--bianco);
  color: var(--rosa-primary);
}

/* Fix per centrare scritta CLINICA MOBILE che è inline-block */
.hero__content {
  text-align: center;
}

.hero__content img {
  animation: logoMaterialize 4s ease-out 2s forwards;
  opacity: 0;
}
/* LOGO RIDOTTO 20% */
.logo img {
  max-width: 64px !important;
  height: auto !important;
  display: block;
}

@media (min-width: 768px) {
  .logo img {
    max-width: 88px !important;
  }
}

@media (max-width: 768px) {
  .logo img {
    max-width: 64px !important;
  }
}

/* SCRITTA CLINICA MOBILE PIU' GRANDE */
.hero__brand {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--bianco);
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: inline-block;
  background: var(--rosa-primary);
  border: none;
  border-radius: 1000px;
  padding: 1rem 3rem;
  cursor: default;
  box-shadow: 0 4px 20px rgba(176, 72, 114, 0.3);
}

/* GRAFICI A BARRE CHART.JS */
.prevention-chart-container {
  width: 100%;
  max-width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
}

.prevention-chart {
  width: 100% !important;
  height: 100% !important;
}

/* Sovrascrive vecchi stili cerchi */
.prevention-percentage {
  display: none !important;
}
/* LAYOUT PREVENTION CONTENT - GRAFICO + BOX AFFIANCATI */
.prevention-content {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  align-items: flex-start;
}

/* GRAFICO - 48% WIDTH */
.prevention-chart-single {
  flex: 0 0 48%;
  max-width: 48%;
  padding: 2rem;
  background: #FFFFFF;
  border: 2px solid #51AFDA;
  border-radius: 20px;
  box-shadow: 0px 4px 20px rgba(81, 175, 218, 0.15);
}

.prevention-chart-single canvas {
  width: 100% !important;
  height: 400px !important;
}

/* INFO BOX - 48% WIDTH */
.prevention-info-box {
  flex: 0 0 48%;
  max-width: 48%;
  padding: 2.5rem;
  background: #FFFFFF;
  border: 2px solid #B04872;
  border-radius: 20px;
  box-shadow: 0px 4px 20px rgba(176, 72, 114, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prevention-info-box__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #B04872;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.prevention-info-box__subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #B04872;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.prevention-info-box__content {
  margin-top: 1rem;
}

.prevention-info-box__content p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #000000;
  margin-bottom: 1rem;
  text-align: justify;
}

.prevention-info-box__content p:last-child {
  margin-bottom: 0;
}

.prevention-info-box__content strong {
  font-weight: 700;
}

/* RESPONSIVE - STACK SU MOBILE */
@media (max-width: 1024px) {
  .prevention-content {
    flex-direction: column;
  }

  .prevention-chart-single,
  .prevention-info-box {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .prevention-chart-single canvas {
    height: 350px !important;
  }
}

@media (max-width: 768px) {
  .prevention-info-box {
    padding: 1.5rem;
  }

  .prevention-info-box__title {
    font-size: 1.5rem;
  }

  .prevention-info-box__subtitle {
    font-size: 1rem;
  }

  .prevention-chart-single canvas {
    height: 300px !important;
  }

  .prevention-chart-single {
    padding: 1.5rem;
  }
}
/* SEZIONI COLORATE - CENTRARE TUTTO */
.colored-section .section-header {
  text-align: center;
}

.colored-section .section-header h2 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.colored-section .section-header p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.colored-section p.text-center {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.colored-section .text-center {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

/* ALLINEAMENTO TESTI NEI SERVIZI */
.service-card__title {
  text-align: left;
}

.service-card__description {
  text-align: left;
}

/* TESTI HERO - COLORI VISIBILI SU SFONDO BIANCO */
.hero__description {
  font-size: 1.25rem;
  color: #51AFDA;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 600;
}

/* BOTTONI HERO */
.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__cta .btn--outline {
  background: transparent;
  color: #51AFDA;
  border: 2px solid #51AFDA;
}

.hero__cta .btn--outline:hover {
  background: #51AFDA;
  color: #FFFFFF;
}

/* SERVICE CARDS - ALLINEAMENTO PERFETTO */
.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  flex-shrink: 0;
}

.service-card__content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #B04872;
  margin-bottom: 1rem;
  height: 4.8rem;
  display: flex;
  align-items: flex-end;
}

.service-card__description {
  font-size: 1rem;
  color: #000000;
  line-height: 1.6;
  flex-grow: 1;
}

/* SERVIZI - 2 COLONNE CON DISTANZE UNIFORMI */
.services-grid,
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.service-card__content {
  padding: 2rem;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rosa-primary);
  margin-bottom: 1rem;
  height: 4.8rem;
  display: flex;
  align-items: flex-end;
  padding-top: 0;
}

@media (max-width: 768px) {
  .services-grid,
  .services__grid {
    grid-template-columns: 1fr;
  }
}
