/* THEME: Refinement — più profondità e tinta blu-ardesia (revert → vedi css/THEME-BASE-REFERENCE.md) */
:root{
  /* Base pagina (allineata a body / pattern) */
  --bg: #f8f9fd;
  --panel: rgba(255,255,255,1);
  --panel-2: #e6ebf6;
  --text: #141820;
  --muted: #4a5f78;
  --faint: #6b85a8;
  --line: rgba(45, 100, 160, .12);
  --shadow: 0 18px 44px rgba(30, 90, 160, .14), 0 2px 8px rgba(30, 90, 160, .06);

  --accent: #6bb8f0;
  --accent2: #3d7dcc;
  --warn: #7aa3d4;
  /* Hover lista servizi (accordion) */
  --services-hover-bg: linear-gradient(180deg, rgba(220, 238, 255, .98), rgba(190, 224, 252, .82));
  --services-hover-inset: 4px 0 0 var(--accent2);

  --radius: 18px;
  --radius2: 24px;

  /* Pattern pagina: solo nebbie morbide (niente cerchi) */
  --page-pattern-base: #f8f9fd;
  --page-pattern-mist: rgba(200, 215, 235, 0.22);
  --page-pattern-mist-soft: rgba(185, 200, 220, 0.12);
}

*{ box-sizing: border-box; }
html, body{ min-height: 100%; }
html{
  scroll-padding-top: var(--header-h, 80px);
  scroll-behavior: auto;
  background-color: var(--page-pattern-base);
}
body{
  margin: 0;
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: -0.01em;
  padding-top: var(--header-h, 80px);
  /* Sfondo: solo nebbie (nessun cerchio) */
  background-color: var(--page-pattern-base);
  background-image:
    radial-gradient(ellipse 110% 48% at 50% -12%, var(--page-pattern-mist), transparent 58%),
    radial-gradient(ellipse 42% 38% at 8% 42%, var(--page-pattern-mist-soft), transparent 72%),
    radial-gradient(ellipse 38% 36% at 94% 58%, var(--page-pattern-mist-soft), transparent 74%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-position: 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: scroll;
  transition: opacity 220ms ease, transform 220ms ease;
}
body.page-enter{
  opacity: 0;
  transform: translateY(8px);
}
body.page-leaving{
  opacity: 0;
  transform: translateY(10px);
}
@media (prefers-reduced-motion: reduce){
  body{
    transition: none;
  }
  body.page-enter,
  body.page-leaving{
    opacity: 1;
    transform: none;
  }
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

main{ background: transparent; }

/* Comparsa al scroll (vedi js/reveal-on-scroll.js) */
.reveal-on-scroll{
  opacity: 0;
  transform: translateY(18px);
  filter: blur(2px);
  transition:
    opacity 0.75s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.75s cubic-bezier(0.25, 0.1, 0.25, 1),
    filter 0.75s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}
.reveal-on-scroll.is-revealed{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce){
  .reveal-on-scroll{
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    will-change: auto;
  }
}

.wrap{
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
}
.skip-link:focus{ left: 16px; z-index: 50; }

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(24,32,40,.06);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo{
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  height: 44px;
  width: auto;
  object-fit: cover;
  object-position: top center;
}
.brand-name{
  font-family: "Montserrat", sans-serif;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 22px;
  line-height: 1.05;
}
.brand-tagline{
  display: none;
}

.nav{
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-link{
  font-size: 14px;
  color: #5a6f88;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.nav-link:hover{ color: var(--text); border-color: rgba(24,32,40,.06); background: rgba(24,32,40,.02); }
.nav-link.is-active{ color: var(--text); background: rgba(24,32,40,.04); border-color: rgba(24,32,40,.10); }

.nav-cta{
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(35, 95, 170, .92);
  background: linear-gradient(180deg, #8ad2ff, var(--accent2));
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(45, 110, 190, .38), 0 2px 8px rgba(45, 110, 190, .2);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover{
  border-color: #1e4d8c;
  background: linear-gradient(180deg, #9ad9ff, #3576c4);
  box-shadow: 0 12px 34px rgba(45, 110, 190, .45), 0 2px 10px rgba(45, 110, 190, .22);
}

.nav-toggle{
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(136,142,153,.7);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(9,13,20,.18);
}
.nav-toggle-bar{
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #3b3f47;
  border-radius: 2px;
}

/* Sections */
.section{
  padding: 72px 0;
}
/* Home: più aria verticale solo dove c’è la sbarra (non sulla sezione formazione sotto l’hero) */
body.page-home main > .section{
  border-top: none;
  position: relative;
}
body.page-home main > .section:not(.education-logos){
  padding-top: clamp(96px, 10vw, 132px);
  padding-bottom: clamp(96px, 10vw, 132px);
}
/* Nessun divisore tra hero e “formazione”; linea un filo più lunga sulle altre sezioni */
body.page-home main > .section:not(.education-logos)::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: min(280px, 62vw);
  height: 7px;
  border-radius: 999px;
  background: rgba(55, 115, 185, 0.48);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 14px rgba(45, 100, 160, 0.18);
  pointer-events: none;
  z-index: 1;
}
/*
 * Sbarra tra «formazione» e Trattamenti: più in basso (più distacco dal titolo sopra),
 * sempre sul bordo superiore di #services → sale e scende con la sezione Trattamenti.
 */
body.page-home #services::before{
  top: clamp(32px, 5.5vw, 52px);
  transform: translate(-50%, -50%);
}
/* Nessuna linea tra contatti e footer */
body.page-home .site-footer{
  border-top: none;
}
.section-head{
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}
h1,h2,h3{ margin: 0; }
h2{
  font-family: "Montserrat", sans-serif;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: clamp(26px, 3.1vw, 36px);
}
h3{
  font-weight: 700;
  letter-spacing: -0.02em;
}
p{ margin: 0; }
.lead{
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 64ch;
}

/* Sottolineature titoli (nero): underline con offset — ok anche su più righe */
.headline-under{
  border-bottom: none;
  text-decoration-line: underline;
  text-decoration-color: var(--text);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.32em;
  text-decoration-skip-ink: auto;
  padding-bottom: 0.12em;
}
.headline-rule-wide,
.headline-rule-fit{
  padding-bottom: 14px;
  margin-bottom: 2px;
  border-bottom: 3px solid var(--text);
  box-sizing: border-box;
}
.headline-rule-wide{
  display: block;
  width: 100%;
  max-width: 100%;
}
/* Trattamenti: più aria tra le righe e tra testo e riga sotto */
#services .services-intro h2.headline-rule-wide{
  line-height: 1.22;
  padding-bottom: 16px;
  margin-bottom: 4px;
}
/* Linea solo sotto il testo (es. «Dove siamo») */
.headline-rule-fit{
  display: inline-block;
  width: fit-content;
  max-width: 100%;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184,190,199,.55);
  background: rgba(255,255,255,.85);
  color: #4b4f58;
  width: fit-content;
  font-size: 13px;
}

.display{
  font-family: "Montserrat", sans-serif;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-top: 10px;
  font-size: clamp(38px, 5.3vw, 60px);
}
.accent{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero */
.hero{
  padding: 64px 0 44px;
  overflow: hidden;
}
@media (min-width: 941px){
  .hero.hero-centered{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-height: calc(100vh - var(--header-h, 80px));
    min-height: calc(100dvh - var(--header-h, 80px));
    padding: 36px 0 48px;
    box-sizing: border-box;
  }
}
.hero-layout{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
@media (min-width: 941px){
  /* Stemmi non più centrati sull’intera colonna (troppo in basso): offset ≈ centro “San Gratiliano” */
  .hero-centered .hero-layout{
    align-items: flex-start;
  }
  .hero-centered .hero-left,
  .hero-centered .hero-right{
    padding-top: clamp(72px, 10.5vw, 118px);
  }
}
.hero-left,
.hero-right{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.hero-left{
  justify-content: flex-start;
}
.hero-right{
  justify-content: flex-end;
}
.hero-doctor{
  max-height: 260px;
  width: auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.hero-side-logo{
  max-height: 182px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
}
.hero-mark-mobile{
  display: none;
  margin-top: 40px;
  max-height: 152px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
}

/* Education logos carousel + copy (loghi a sinistra, testo a destra) */
.education-logos{
  padding: 48px 0 88px;
}
.education-logos-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(28px, 4vw, 48px);
  row-gap: 14px;
  align-items: center;
}
/* Desktop: loghi a sinistra (due righe), titolo + paragrafo a destra */
.education-logos-media{
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  min-width: 0;
}
.education-logos-title{
  grid-column: 2;
  grid-row: 1;
  text-align: left;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: clamp(24px, 3.05vw, 33px);
  line-height: 1.28;
}
.education-logos-lead{
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.65;
  color: var(--muted);
  max-width: 38ch;
}
@media (min-width: 941px){
  .education-logos{
    padding-top: 72px;
  }
}
@media (max-width: 940px){
  body.page-home .hero{
    padding-bottom: 52px;
  }
  .education-logos{
    padding-top: 22px;
  }
  .education-logos-layout{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
  }
  /* Mobile: titolo → loghi → paragrafo */
  .education-logos-title{
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
    text-align: center;
    line-height: 1.46;
    padding-inline: 8px;
  }
  .education-logos-title .headline-under{
    text-underline-offset: 0.4em;
    text-decoration-thickness: 2px;
    padding-bottom: 0.2em;
  }
  .education-logos-media{
    grid-column: 1;
    grid-row: 2;
  }
  .education-logos-lead{
    grid-column: 1;
    grid-row: 3;
    max-width: none;
    margin-inline: auto;
    text-align: center;
  }
  /* Dopo .education-logos così vince sulla home */
  body.page-home .education-logos{
    padding-top: clamp(32px, 8vw, 48px);
    padding-bottom: clamp(88px, 16vw, 120px);
  }
}
.logo-carousel{
  overflow: hidden;
}
.logo-carousel-track{
  display: flex;
  width: 400%;
  transition: transform 0.95s ease-in-out;
}
.logo-carousel .logo-card{
  width: 25%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}
.logo-carousel .logo-card img{
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 2px solid rgba(100, 175, 230, .55);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(61, 125, 204, .12);
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 26px;
  align-items: center;
}
.hero-copy .lead{ margin-top: 14px; }

.hero-centered .hero-simple{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.hero-logo{
  width: min(300px, 72vw);
  height: auto;
  max-width: 100%;
  margin-top: -28px;
  margin-bottom: -4px;
  /* Solo il logo sale: translate non sposta il titolo come i margin negativi */
  transform: translateY(-28px);
}
@media (prefers-reduced-motion: reduce){
  .hero-logo{ transform: none; }
}
.hero-title{
  margin-top: 4px;
  margin-bottom: 13px;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(64px, 11vw, 108px);
}
.hero-subtitle{
  font-size: 16px;
  color: var(--text);
}
.hero-mission{
  margin-top: 50px;
  max-width: 48ch;
}

@media (max-width: 940px){
  .hero-layout{
    flex-direction: column;
  }
  .hero-left,
  .hero-right{
    justify-content: center;
  }
  .hero-logo{
    width: min(280px, 82vw);
    max-width: 100%;
    margin-top: -36px;
    margin-bottom: -4px;
    transform: translateY(-22px);
  }
  .hero-doctor{
    max-height: 220px;
  }
}
.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.hero-highlights{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(24,32,40,.08);
}
.hero-highlights dt{
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .09em;
}
.hero-highlights dd{
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
}

.hero-art{
  position: relative;
  min-height: 420px;
}
.orb{
  position: absolute;
  filter: blur(0px);
  border-radius: 999px;
  opacity: .95;
}
.orb-a{
  width: 340px;
  height: 340px;
  left: -60px;
  top: 18px;
  background: radial-gradient(circle at 30% 30%, rgba(130, 195, 255, .55), rgba(130, 195, 255, .06) 62%, transparent 72%);
}
.orb-b{
  width: 300px;
  height: 300px;
  right: -78px;
  bottom: -40px;
  background: radial-gradient(circle at 30% 30%, rgba(90, 170, 235, .48), rgba(90, 170, 235, .05) 66%, transparent 74%);
}

.glass{
  position: absolute;
  inset: 82px 10px auto 44px;
  padding: 18px 18px 14px;
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(240, 248, 255, .95));
  border: 1px solid rgba(100, 170, 230, .42);
  box-shadow: var(--shadow);
}
.card-title{
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.card-body{ margin-top: 12px; }
.checklist{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.checklist li{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}
.checklist li::before{
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(120, 200, 255, .95), rgba(61, 125, 204, .75));
  box-shadow: 0 6px 16px rgba(61, 125, 204, .35);
}
.card-foot{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Buttons & chips */
.button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(184,190,199,.7);
  background: #ffffff;
  color: #17181b;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}
.button:hover{
  border-color: var(--accent2);
  background: linear-gradient(180deg, #e8f4ff, #d4e9fc);
  box-shadow: 0 12px 28px rgba(61, 125, 204, .18);
}
/* CTA primari: stesso stile del banner (.nav-cta), colori più brillanti */
.button.primary{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(35, 95, 170, .92);
  background: linear-gradient(180deg, #8ad2ff, var(--accent2));
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(45, 110, 190, .38), 0 2px 8px rgba(45, 110, 190, .2);
}
.button.primary:hover{
  border-color: #1e4d8c;
  background: linear-gradient(180deg, #9ad9ff, #3576c4);
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(45, 110, 190, .45), 0 2px 10px rgba(45, 110, 190, .22);
}
.button.ghost{
  background: transparent;
}
.button.small{
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.button.primary.small{
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.chip{
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(184,190,199,.75);
  background: rgba(255,255,255,.85);
  color: #4b4f58;
  font-size: 12px;
  letter-spacing: -0.01em;
}
.chip-row{ display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards grid */
.grid{
  display: grid;
  gap: 14px;
}
/* Accordion Trattamenti + foto a fianco */
#services{
  padding-top: 88px;
  padding-bottom: 96px;
}
body.page-home #services{
  padding-top: clamp(108px, 11vw, 144px);
  padding-bottom: clamp(112px, 11vw, 140px);
}
#services .services-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.52fr);
  grid-template-rows: auto auto;
  column-gap: clamp(28px, 4.5vw, 52px);
  row-gap: 28px;
  align-items: start;
}
/* Riga 1: solo titolo intro | colonna 2 vuota */
#services .services-intro{
  grid-column: 1;
  grid-row: 1;
  max-width: 560px;
  margin: 0 0 0;
  text-align: left;
}
/* Riga 2: accordion allineato alla foto */
#services .services-layout > .service-accordion{
  grid-column: 1;
  grid-row: 2;
  max-width: 560px;
  margin: 0;
  min-width: 0;
}
/* Nessuno sticky: la foto scorre con la sezione e resta centrata in altezza rispetto all'accordion */
#services .services-aside{
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}
#services .section-head h2{
  font-size: clamp(32px, 4vw, 44px);
}
#services .section-head p{
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
}
#services .services-photo{
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(100, 170, 220, .35);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, #f2f8ff 0%, #e8f2fc 100%);
}
#services .services-photo img{
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 960px){
  /* Meno aria sopra: la foto arriva più in alto rispetto al blocco "Trattamenti" */
  #services{
    padding-top: 32px;
  }
  body.page-home #services{
    padding-top: clamp(60px, 14vw, 92px);
    padding-bottom: clamp(120px, 20vw, 152px);
  }
  body.page-home main > .section:not(.education-logos){
    padding-top: clamp(76px, 12vw, 112px);
    padding-bottom: clamp(76px, 12vw, 112px);
  }
  body.page-home main > .section.split{
    padding-top: clamp(76px, 12vw, 112px);
    padding-bottom: clamp(76px, 12vw, 112px);
  }
  /* Più aria tra sbarra blu e foto Daniele su mobile */
  body.page-home #services .services-aside{
    margin: clamp(20px, 5.5vw, 36px) auto 20px;
  }
  body.page-home #services::before{
    top: clamp(26px, 7vw, 48px);
  }
  #services .services-layout{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 20px;
    column-gap: 0;
  }
  /* Foto sopra, più compatta, leggermente più vicina alla sezione precedente */
  #services .services-aside{
    grid-column: 1;
    grid-row: 1;
    position: static;
    max-width: min(220px, 52vw);
    width: 100%;
    margin: -8px auto 12px;
    justify-self: center;
  }
  #services .services-intro{
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    text-align: center;
    margin-inline: auto;
    margin-bottom: 0;
  }
  /* Mobile: niente bordo a tutta larghezza — underline per riga, più leggibile */
  #services .services-intro h2.headline-rule-wide{
    display: inline-block;
    width: fit-content;
    max-width: min(360px, 92vw);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    padding-bottom: 0.2em;
    padding-inline: 8px;
    line-height: 1.4;
    border-bottom: none;
    text-decoration-line: underline;
    text-decoration-color: var(--text);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.38em;
    text-decoration-skip-ink: auto;
  }
  #services .services-layout > .service-accordion{
    grid-column: 1;
    grid-row: 3;
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
  }
}
.service-accordion{
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid rgba(100, 170, 220, .45);
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 50%, #e8f2fc 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.service-accordion-item{
  border-bottom: 1px solid rgba(100, 170, 220, .3);
}
.service-accordion-item:last-child{
  border-bottom: none;
}
.service-accordion-item > .service-body{
  overflow: hidden;
  /* Altezza animata da accordion.js per effetto a tendina */
}
.service-accordion-item:not([open]) > .service-body{
  height: 0;
}
.service-accordion-summary{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
  color: var(--text);
}
.service-accordion-icon{
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: .9;
  transition: color 0.22s ease, opacity 0.22s ease;
}
.service-accordion-summary::-webkit-details-marker{ display: none; }
.service-accordion-summary::marker{ content: none; }
.service-accordion-summary::after{
  content: "+";
  margin-left: auto;
  font-weight: 400;
  opacity: .7;
}
.service-accordion-item.accordion-open .service-accordion-summary::after{
  content: "−";
}
@media (hover: hover){
  .service-accordion-summary:hover{
    background: var(--services-hover-bg);
    box-shadow: inset var(--services-hover-inset);
  }
  .service-accordion-summary:hover .service-accordion-icon{
    color: var(--accent2);
    opacity: 1;
  }
  .service-accordion-item.accordion-open .service-accordion-summary:hover{
    background: linear-gradient(180deg, rgba(210, 235, 255, .99), rgba(180, 220, 252, .85));
    box-shadow: inset var(--services-hover-inset);
  }
}
.service-accordion-item .service-body{
  overflow: hidden;
  padding: 0;
  border-top: none;
}
.service-accordion-item .service-body .bullets{
  opacity: 0;
  transition: opacity 0.25s ease-out 0.1s;
}
.service-accordion-item.accordion-open .service-body .bullets{
  opacity: 1;
}
.service-accordion-item--long .service-accordion-summary{
  white-space: normal;
  word-wrap: break-word;
}
.service-body{
  display: block;
}
.service-body-inner{
  padding: 0 18px 16px;
  border-top: 1px solid rgba(184,190,199,.25);
}

.bullets{
  margin: 12px 0 0;
  padding-left: 24px;
  color: var(--muted);
}
.bullets li{ margin: 6px 0; }

/* Hover highlight for panels (accordion summary ha transizioni dedicate sopra) */
.info,
.map-shell,
.contact-item,
.cta,
.team-card{
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}
.info:hover,
.map-shell:hover,
.contact-item:hover,
.cta:hover,
.team-card:hover{
  border-color: rgba(148, 163, 184, .78);
  background: linear-gradient(180deg, #f0f2f6, #dfe3eb);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .14);
  transform: translateY(-1px);
}

/* Modal for treatments */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(9,13,20,.40);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  z-index: 40;
}
.modal-backdrop.is-open{
  opacity: 1;
  pointer-events: auto;
}
.modal{
  width: 100%;
  max-width: 520px;
  border-radius: 24px;
  border: 1px solid rgba(184,190,199,.8);
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(9,13,20,.35);
  padding: 18px 18px 16px;
  position: relative;
}
.modal-title{
  font-size: 18px;
  margin: 0 0 8px;
}
.modal-body{
  font-size: 14px;
  color: var(--muted);
}
.modal-body .bullets{
  margin-top: 8px;
}
.modal-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(184,190,199,.8);
  background: #ffffff;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover{
  background: #f0f2f6;
}

html.modal-open{
  overflow: hidden;
}

/* Split section */
.split{ padding-top: 56px; }
/* Su home .split non deve comprimere l’alto (vince su .split) */
body.page-home main > .section.split{
  padding-top: clamp(96px, 10vw, 132px);
  padding-bottom: clamp(96px, 10vw, 132px);
}
.split-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.info{
  margin-top: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(100, 170, 220, .4);
  background: linear-gradient(180deg, #ffffff, #f0f7ff);
  overflow: hidden;
}
.info-row{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid rgba(24,32,40,.08);
}
.info-row:first-child{ border-top: 0; }
.info-k{
  color: var(--faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .10em;
}
.info-v{ color: var(--text); line-height: 1.45; }
.mini-actions{ display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

.map-shell{
  border-radius: var(--radius2);
  border: 1px solid rgba(100, 170, 220, .42);
  border-bottom: none;
  background:
    radial-gradient(800px 360px at 30% 20%, rgba(120, 200, 255, .28), transparent 55%),
    radial-gradient(700px 340px at 80% 85%, rgba(100, 180, 240, .22), transparent 55%),
    linear-gradient(180deg, #ffffff, #eef6ff);
  min-height: 340px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.map-embed{
  padding: 14px;
}
.map-iframe{
  width: 100%;
  height: 320px;
  border: 1px solid rgba(184,190,199,.6);
  border-radius: 18px;
  background: #ffffff;
}
.map-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 14px 12px;
}
.map-note{
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* CTA */
.cta{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius2);
  border: 1px solid rgba(100, 170, 220, .38);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(232, 244, 255, .97));
  box-shadow: var(--shadow);
}
.contact-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.contact-grid-team{
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}
.contact-item{
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(100, 170, 220, .42);
  background: linear-gradient(180deg, #ffffff, #f0f7ff);
}
.contact-k{
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .10em;
}
.contact-v{
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.cta-form{
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  display: block;
}
.field{
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
input, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(184,190,199,.7);
  background: #ffffff;
  color: #17181b;
  outline: none;
}
input:focus, textarea:focus{
  border-color: rgba(210,214,222,.85);
  box-shadow: 0 0 0 4px rgba(210,214,222,.25);
}
.form-note{
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* Team */
.page-hero{
  padding: 52px 0 18px;
  background: transparent;
}
.page-hero-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.page-hero-copy{
  min-width: 0;
}
.page-hero-logo{
  width: min(220px, 34vw);
  height: auto;
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 64px;
}
.team-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: flex-start;
}
.team-card{
  border-radius: var(--radius2);
  border: 1px solid rgba(100, 170, 220, .42);
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.team-details{ padding: 0; }
.team-details > summary{ list-style: none; }
.team-details > summary::-webkit-details-marker{ display: none; }
.team-summary{
  display: grid;
  grid-template-columns: 68px 1fr 28px;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  cursor: pointer;
}
.avatar{
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184,190,199,.7);
  background:
    radial-gradient(26px 26px at 30% 25%, rgba(210,214,222,.42), transparent 65%),
    radial-gradient(26px 26px at 75% 80%, rgba(142,147,156,.28), transparent 65%),
    #ffffff;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .02em;
}
.avatar img{
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  display: block;
}
.team-name{
  font-weight: 800;
  letter-spacing: -0.02em;
}
.team-role{
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.team-tags{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.team-ctrl{
  display: grid;
  place-items: center;
}
.chev{
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(23,24,27,.62);
  border-bottom: 2px solid rgba(23,24,27,.62);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}
details[open] .chev{ transform: rotate(225deg); }

.team-body{
  padding: 0 16px 16px;
  border-top: 1px solid rgba(24,32,40,.08);
}
.team-bio{
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.team-cols{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mini-h{
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .10em;
  margin-top: 12px;
}
.mini-list{
  margin: 10px 0 0;
  padding: 0 0 0 16px;
  color: var(--muted);
}
.mini-list li{ margin: 6px 0; }
.muted{ color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 10px; }

.cv{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.cv-item{
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(184,190,199,.6);
  background: #ffffff;
}
.cv-top{
  display: grid;
  gap: 4px;
}
.cv-period{
  font-size: 12px;
  color: var(--faint);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cv-title{
  font-weight: 750;
  letter-spacing: -0.02em;
}
.cv-details{
  margin: 10px 0 0;
  padding: 0 0 0 16px;
  color: var(--muted);
}
.cv-details li{ margin: 6px 0; }

.note{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(210,214,222,.40);
  background: linear-gradient(180deg, rgba(210,214,222,.18), rgba(210,214,222,.04));
  color: var(--text);
  line-height: 1.5;
  font-size: 13px;
}

.empty{
  padding: 16px;
  border-radius: var(--radius2);
  border: 1px dashed rgba(184,190,199,.85);
  color: var(--muted);
  background: rgba(255,255,255,.75);
}

/* Footer */
.site-footer{
  padding: 26px 0 34px;
  border-top: none;
  background: transparent;
}
.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-brand{
  font-family: "Montserrat", sans-serif;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.footer-note{
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.footer-right{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-link{
  color: var(--muted);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.footer-link:hover{ color: var(--text); border-color: rgba(184,190,199,.65); background: rgba(255,255,255,.75); }

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(184,190,199,.75);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,.50);
  color: var(--text);
  font-size: 13px;
  z-index: 100;
}
.toast.is-on{
  transform: translate(-50%, 0px);
  opacity: 1;
}

/* Responsive */
@media (max-width: 940px){
  .hero{ padding-top: 28px; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-art{ min-height: 360px; }
  .glass{ inset: 62px 10px auto 10px; }
  .split-grid{ grid-template-columns: 1fr; }
  .cta{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .team-cols{ grid-template-columns: 1fr; }
  .contact-grid-team{ max-width: none; }
  .page-hero{ padding: 30px 0 10px; }
  .page-hero-inner{
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title logo"
      "lead lead";
    align-items: start;
    column-gap: 10px;
    row-gap: 8px;
    min-height: 0;
  }
  .page-hero-copy{ width: 100%; min-width: 0; display: contents; }
  .page-hero-copy .display{
    grid-area: title;
    font-size: clamp(44px, 10vw, 56px);
  }
  .page-hero-logo{
    grid-area: logo;
    width: min(124px, 32vw);
    margin: 0;
    flex: 0 0 auto;
  }
  .page-hero-copy .lead{
    grid-area: lead;
    margin-top: 0;
    max-width: none;
    white-space: normal;
    font-size: clamp(14px, 3.8vw, 16px);
  }
  .hero-side-logo{ display: none; }
  .hero-mark-mobile{ display: block; }
}

@media (max-width: 760px){
  .nav-toggle{ display: inline-block; }
  .nav{
    position: absolute;
    top: 70px;
    right: 22px;
    left: 22px;
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(184,190,199,.9);
    background: #edf0f5;
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }
  .nav.is-open{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-link,
  .nav-cta{
    width: 100%;
    text-align: left;
  }
  .nav-link{
    background: #ffffff;
    border-color: rgba(184,190,199,.6);
  }
  /* CTA resta evidente anche nel menu hamburger */
  .nav-cta{
    justify-content: flex-start;
  }
  .team-grid{ grid-template-columns: 1fr; }
  .hero-highlights{ grid-template-columns: 1fr; }
  .info-row{ grid-template-columns: 1fr; }
  .footer-inner{ flex-direction: column; align-items: flex-start; }
  .section{ padding: 40px 0; }
  body.page-home main > .section:not(.education-logos){
    padding-top: clamp(88px, 22vw, 128px);
    padding-bottom: clamp(88px, 22vw, 128px);
  }
  body.page-home main > .section.split{
    padding-top: clamp(88px, 22vw, 128px);
    padding-bottom: clamp(88px, 22vw, 128px);
  }
  body.page-home #services{
    padding-top: clamp(64px, 16vw, 96px);
    padding-bottom: clamp(128px, 24vw, 168px);
  }
  body.page-home #services::before{
    top: clamp(24px, 8vw, 46px);
  }
  body.page-home .education-logos{
    padding-bottom: clamp(96px, 20vw, 132px);
  }
}

