/* Palette IDI Evolution: bianco e nero, con gradienti solo nelle card in evidenza */
:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --ink: #000000;
  --text: #171717;
  --muted: #6b6b6b;
  --line: #e0e0e0;
  --dark: #000000;
  --dark-2: rgba(255, 255, 255, .12);
  --dark-line: rgba(255, 255, 255, .12);
  --dark-muted: #b3b3b3;
  /* Colori dei livelli, presi dal gradiente */
  --lv-base: #1d7a78;
  --lv-avanzato: #2c3fa6;
  --lv-eccellenza: linear-gradient(135deg, #a8232b 0%, #2c3fa6 55%, #1d7a78 100%);
  --radius: 16px;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  /* Gradiente luminoso: corallo, indaco, verde acqua (testo bianco sempre leggibile) */
  --grad:
    radial-gradient(65% 90% at 0% 0%, #e2474b, transparent 70%),
    radial-gradient(60% 90% at 100% 0%, #16a39a, transparent 70%),
    radial-gradient(70% 90% at 55% 100%, #6a4fe0, transparent 75%),
    linear-gradient(120deg, #c2334a 0%, #4655d6 50%, #158a86 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: #fff; color: var(--text); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.025em; line-height: 1.1; }
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }

/* Bottoni: neri pieni o trasparenti con bordo nero */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border: 1.5px solid var(--ink); border-radius: 999px; font: 600 15px var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: #333; border-color: #333; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; color: var(--ink); }
.logo-word { font-weight: 700; font-size: 16px; letter-spacing: .18em; }
.logo-by { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.nav a:not(.btn):hover { color: var(--ink); }

/* Sezioni */
.eyebrow { margin: 0 0 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.dark .eyebrow { color: #fff; }
.section { padding: clamp(56px, 9vw, 112px) var(--gutter); }
.section > * { max-width: 1240px; margin-inline: auto; }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2, .cta h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 600; max-width: 20ch; }
.sub { max-width: 62ch; margin: 18px 0 0; font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); }
.section.dark { margin-inline: clamp(8px, 2vw, 24px); border-radius: clamp(20px, 3vw, 32px); background: var(--grad); color: #fff; }
.section.dark .sub { color: rgba(255, 255, 255, .88); }
.section.light { background: #fff; border-top: 1px solid var(--line); }
/* Sezioni grigio chiaro per dare ritmo alla pagina */
.section.tint { background: var(--bg); border-top: 0; }
.section.tint + .section.dark { margin-top: clamp(8px, 2vw, 24px); }
.minor { margin: clamp(48px, 6vw, 72px) auto 20px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.note { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* Hero */
.hero { padding: clamp(56px, 10vw, 120px) var(--gutter) clamp(48px, 7vw, 80px); background: #fff; }
.hero-inner { max-width: 1240px; margin: 0 auto; }
.hero h1 { font-size: clamp(36px, 6.2vw, 80px); font-weight: 600; max-width: 18ch; }
.hero h1 span { color: var(--muted); }
.lead { max-width: 58ch; margin: 24px 0 0; font-size: clamp(16px, 1.7vw, 20px); color: var(--muted); }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-split h1 { font-size: clamp(32px, 4vw, 56px); max-width: 20ch; }
.grad-text { background: linear-gradient(100deg, #c2334a 0%, #4655d6 55%, #158a86 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .grad-text { color: transparent; }
.hero-split .searchbar { max-width: none; }
.hero-media { position: relative; margin: 0; }
.hero-media img { display: block; width: 100%; height: clamp(380px, 46vw, 600px); object-fit: cover; object-position: 40% center; border-radius: clamp(20px, 3vw, 32px); }
.hero-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; border-radius: 0 0 clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px); background: linear-gradient(transparent, rgba(0, 0, 0, .28)); pointer-events: none; }
.hero-chip { position: absolute; z-index: 1; left: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-size: 13px; color: var(--muted); }
.hero-chip strong { display: block; font-size: 14.5px; color: var(--ink); }
.hero-chip-mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--lv-eccellenza); color: #fff; font-weight: 700; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.stats { display: flex; gap: clamp(28px, 6vw, 72px); margin-top: clamp(48px, 7vw, 72px); padding: clamp(24px, 4vw, 44px); background: var(--grad); border-radius: clamp(18px, 2.5vw, 28px); color: #fff; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1; color: #fff; }
.stats span { margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, .85); }

/* Barra di ricerca a segmenti (home e pagina di ricerca) */
.searchbar { display: flex; align-items: center; max-width: 860px; margin-top: 40px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 12px 40px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04); }
.searchbar .field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; border-radius: 999px; cursor: pointer; transition: background .15s; }
/* Divisori dritti fra i campi, nascosti vicino al campo attivo */
.searchbar .field + .field::before { content: ""; position: absolute; left: 0; top: 24%; height: 52%; width: 1px; background: var(--line); transition: opacity .15s; }
.searchbar .field:hover, .searchbar .field:focus-within { background: var(--bg); }
.searchbar .field:hover::before, .searchbar .field:hover + .field::before,
.searchbar .field:focus-within::before, .searchbar .field:focus-within + .field::before { opacity: 0; }
.searchbar .field:has(select:focus-visible) { box-shadow: inset 0 0 0 2px var(--ink); }
.field-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); transition: background .15s; }
.field-icon svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s; }
.searchbar .field:hover .field-icon, .searchbar .field:focus-within .field-icon { background: #fff; }
.searchbar .field.is-set .field-icon { background: var(--ink); }
.searchbar .field.is-set .field-icon svg { stroke: #fff; }
.field-text { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 1px; }
.searchbar label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.field-value { overflow: hidden; font-size: 16px; font-weight: 500; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.searchbar .field.is-set .field-value { font-weight: 600; color: var(--ink); }
.field .chev { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform .15s, stroke .15s; }
.searchbar .field:hover .chev { stroke: var(--ink); transform: translateY(1px); }
/* La select copre tutto il campo: si apre cliccando ovunque */
.searchbar select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; appearance: none; -webkit-appearance: none; font: 16px var(--sans); }
.searchbar .btn { flex: none; height: 56px; margin-left: 6px; padding: 0 28px; font-size: 16px; }
.searchbar .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.searchbar.compact { max-width: 1000px; margin: 0 auto; box-shadow: 0 6px 24px rgba(0, 0, 0, .07); }
.searchbar.compact .field { padding: 6px 16px 6px 8px; }
.searchbar.compact .field-icon { width: 34px; height: 34px; }
.searchbar.compact .field-icon svg { width: 17px; height: 17px; }
.searchbar.compact .field-value { font-size: 15px; }
.searchbar .reset { flex: none; margin: 0 10px 0 4px; padding: 8px 12px; border: 0; border-radius: 999px; background: none; font: 600 13.5px var(--sans); color: var(--ink); text-decoration: underline; cursor: pointer; }
.searchbar .reset:hover { background: var(--bg); }
.searchbar .reset[hidden] { display: none; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.trust li::before { content: "✓"; margin-right: 8px; color: var(--ink); font-weight: 700; }

/* Griglia di studi stile directory */
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.row-head a.link { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.studio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.scard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.scard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .10); }
.scard-cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 124px; padding: 16px; color: #fff; }
.scard-cover.base { background: radial-gradient(80% 120% at 0% 0%, #3cc4bc, transparent 70%), linear-gradient(135deg, #1a9a93, #126b6a); }
.scard-cover.avanzato { background: radial-gradient(80% 120% at 0% 0%, #7d8cf0, transparent 70%), linear-gradient(135deg, #4655d6, #2c3aa6); }
.scard-cover.eccellenza {
  background:
    radial-gradient(70% 110% at var(--a, 0%) 0%, #e2474b, transparent 70%),
    radial-gradient(60% 100% at var(--b, 100%) 0%, #16a39a, transparent 70%),
    radial-gradient(70% 90% at 50% 100%, #6a4fe0, transparent 75%),
    linear-gradient(120deg, #c2334a 0%, #4655d6 50%, #158a86 100%);
}
/* Foto dello studio sopra il gradiente del livello, che resta come filo colorato in basso */
.scard-cover { height: 176px; overflow: hidden; }
.scard-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.scard-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, transparent 30%, transparent 45%, rgba(0, 0, 0, .7) 100%); }
.scard-cover::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: inherit; }
.scard-cover > :not(img) { position: relative; z-index: 1; }
.scard:hover .scard-cover img { transform: scale(1.04); }
.scard-cover .badge.badge { align-self: flex-start; background: rgba(255, 255, 255, .95); color: #000; }
.scard-city { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.scard-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.scard-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.scard-body .who { margin: 4px 0 14px; font-size: 14px; color: var(--muted); }
.scard-body .tags { margin-top: auto; }
.scard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.scard-foot strong { color: var(--ink); }
/* Sei tacche: le fasi certificate dello studio */
.scard-meter { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.scard-meter i { width: 10px; height: 4px; border-radius: 2px; background: var(--line); }
.scard-meter i.on { background: var(--ink); }
.scard-meter strong { margin-left: 6px; font-variant-numeric: tabular-nums; }
.city-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.city-grid a { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; background: #fff; transition: border-color .15s, background .15s; }
.city-grid a::after { content: "→"; position: absolute; top: 18px; right: 18px; color: var(--ink); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.city-grid a:hover { border-color: var(--ink); }
.city-grid a:hover::after { opacity: 1; transform: none; }
.city-grid strong { font-size: 16px; color: var(--ink); }
.city-grid span { font-size: 13px; color: var(--muted); }

/* Elementi condivisi per filtri ed elenco */
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; padding: 12px 0; border: 0; background: none; font: inherit; color: var(--ink); outline: none; }
.search:focus-within { border-color: var(--ink); }
select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: 500 13px var(--sans); color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.badge { display: inline-block; flex: none; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; color: #fff; }
.badge.base { background: var(--lv-base); }
.badge.avanzato { background: var(--lv-avanzato); }
.badge.eccellenza { background: var(--lv-eccellenza); }
.phases { display: flex; gap: 3px; }
.phase { flex: 1; padding: 4px 0; border-radius: 5px; background: var(--bg); color: #b5b5b5; font-size: 10.5px; font-weight: 600; text-align: center; }
.phase.on { background: var(--lv-avanzato); color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 3px 9px; border-radius: 6px; background: var(--bg); font-size: 12px; font-weight: 500; color: var(--text); }
.empty { padding: 48px 18px; text-align: center; color: var(--muted); font-size: 15px; }

/* Pagina di ricerca: elenco a sinistra, mappa a destra */
.dir-bar { position: sticky; top: 63px; z-index: 900; padding: 14px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
.dir { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; }
.dir-list { padding: 28px var(--gutter) 48px; }
.dir-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dir-head h1 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; }
.dir-head label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.dir-tools { display: grid; gap: 12px; margin-bottom: 20px; }
.results { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.result { position: relative; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.result:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .07); }
.result.active { border-color: var(--lv-avanzato); box-shadow: 0 0 0 1px var(--lv-avanzato); }
.result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result h3 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.result h3 a { text-decoration: none; }
.result h3 a:hover { text-decoration: underline; }
.result .cats { margin: 8px 0 10px; font-size: 14px; color: var(--muted); }
.result .cats span + span::before { content: " · "; }
.result .desc { margin: 0 0 14px; font-size: 15px; color: var(--text); }
.result .meta { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; color: var(--text); }
.result .meta li { display: flex; align-items: center; gap: 10px; }
.result .meta svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.dir-map { position: sticky; top: 157px; height: calc(100vh - 157px); }
#map { position: absolute; inset: 0; background: #e5e5e5; }
.leaflet-tile-pane { filter: saturate(.85); }
.legend { position: absolute; z-index: 500; left: 12px; bottom: 12px; display: flex; gap: 12px; padding: 8px 12px; background: rgba(255, 255, 255, .95); border-radius: 10px; font-size: 12px; font-weight: 500; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }

.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); transition: transform .15s; }
.pin.active { transform: rotate(-45deg) scale(1.3); }
.c-base { background: var(--lv-base); }
.c-avanzato { background: var(--lv-avanzato); }
.c-eccellenza { background: var(--lv-eccellenza); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 14px 16px; font-family: var(--sans); min-width: 220px; }
.leaflet-container a.popup-link { color: var(--ink); font-weight: 600; }
.popup h3 { font-size: 15px; margin: 8px 0 2px; }
.popup p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

/* Flusso in 6 fasi */
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin: 0; padding: 0; list-style: none; counter-reset: f; }
.flow li { padding: 24px 20px 28px; background: var(--dark-2); backdrop-filter: blur(8px); }
.flow li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.flow li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.flow li::before { counter-increment: f; content: "0" counter(f); display: block; margin-bottom: 36px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.flow h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.flow p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .88); }

/* Griglie di contenuto */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pillar { padding: clamp(24px, 3vw, 40px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pillar-num { display: block; margin-bottom: 28px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pillar h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; margin-bottom: 12px; }
.pillar p { margin: 0; color: var(--muted); }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.products li { padding: 12px 14px; background: var(--bg); border-radius: 12px; font-size: 13px; color: var(--muted); }
.products strong { display: block; font-size: 15px; color: var(--ink); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; list-style: none; }
.steps li { position: relative; font-size: 14px; color: var(--muted); }
/* Linea che collega i passaggi */
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: 48px; right: -4px; height: 1px; background: var(--line); }
.steps span { position: relative; display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.steps strong { display: block; margin-bottom: 4px; font-size: 17px; color: var(--ink); }

.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.level { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.level.eccellenza { background: var(--grad); border-color: transparent; color: #fff; }
.level.eccellenza h4 { color: #fff; }
.level .dot { width: 14px; height: 14px; margin-bottom: 20px; }
.level h4 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.01em; }
.level p { margin: 0; font-size: 14px; color: var(--muted); }
.level.eccellenza p { color: rgba(255, 255, 255, .88); }
.level.eccellenza .dot { box-shadow: none; }

.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.course { display: flex; flex-direction: column; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.course-phase { align-self: flex-start; margin-bottom: 18px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); font-size: 12px; font-weight: 600; }
.course h3 { font-size: 19px; font-weight: 600; margin-bottom: 18px; }
.course dl { margin: auto 0 0; display: grid; gap: 10px; font-size: 13.5px; }
.course dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.course dd { margin: 2px 0 0; }

.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 16px; }
.benefits > div { padding-top: 20px; border-top: 2px solid var(--ink); }
.dark .benefits > div { border-top-color: #fff; }
.benefits h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.benefits p { margin: 0; font-size: 14.5px; color: var(--muted); }
.dark .benefits p { color: var(--dark-muted); }

/* FAQ */
.faq { max-width: 860px !important; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 18px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 22px; max-width: 64ch; color: var(--muted); }
.faq summary:hover { color: var(--muted); }
/* FAQ su due colonne: titolo fisso a sinistra, domande a destra */
.faq-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-layout .section-head { position: sticky; top: 104px; margin: 0; }
.faq-layout .faq { width: 100%; border-top: 1px solid var(--line); }
.faq-layout summary { padding: 24px 0; }

/* Chiusura */
.closing { padding-bottom: clamp(72px, 10vw, 128px); }
.closing .eyebrow { text-align: center; }
.closing h2 { max-width: 24ch; }

/* Visibilità e badge (sezione studi) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.visibility-list { display: grid; gap: 18px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: v; }
.visibility-list li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; color: var(--muted); font-size: 15px; }
.visibility-list li::before { counter-increment: v; content: counter(v); display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--ink); border-radius: 50%; font-weight: 600; color: var(--ink); }
.visibility-list strong { display: block; color: var(--ink); font-size: 16px; }
.embed { padding: clamp(20px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.embed-preview { display: grid; place-items: center; padding: 44px 16px; margin-bottom: 16px; background: var(--grad); border-radius: 12px; }
.embed pre { margin: 0 0 14px; padding: 14px 16px; overflow-x: auto; background: var(--dark); color: #e6e6e6; border-radius: 12px; font: 12.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-all; }
.embed-label { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Il badge certificato */
.seal { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; background: var(--ink); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; text-decoration: none; }
.seal-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid #fff; border-radius: 50%; font-size: 17px; font-weight: 700; }
.seal-text { display: flex; flex-direction: column; line-height: 1.2; }
.seal-text strong { font-size: 12px; letter-spacing: .16em; }
.seal-text span { font-size: 11px; color: var(--dark-muted); }

.quote { margin: 0 auto; padding: clamp(48px, 8vw, 104px) clamp(20px, 6vw, 96px); background: var(--grad); border-radius: clamp(20px, 3vw, 32px); color: #fff; text-align: center; }
.quote::before { content: "“"; display: block; font-size: clamp(64px, 8vw, 104px); font-weight: 700; line-height: .7; margin-bottom: 8px; }
.quote p { max-width: 26ch; margin: 0 auto; font-size: clamp(26px, 4vw, 48px); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; }
.quote cite { display: block; margin-top: 28px; font-size: 14px; font-style: normal; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }

/* CTA */
.cta { text-align: center; }
.cta h2, .cta .sub { margin-inline: auto; }
.cta .hero-cta { justify-content: center; }

/* Scheda studio */
.profile { max-width: 1240px; margin: 0 auto; padding: clamp(20px, 3vw, 36px) var(--gutter) clamp(56px, 8vw, 104px); box-sizing: content-box; }
.crumbs { margin: 0 0 20px; font-size: 13.5px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
/* Galleria: una foto grande e due piccole, come una scheda di prenotazione */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: clamp(320px, 38vw, 480px); border-radius: clamp(18px, 2.5vw, 28px); overflow: hidden; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--bg); }
.gallery img:first-child { grid-row: span 2; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "head aside" "body aside"; column-gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: clamp(28px, 4vw, 48px); }
.profile-head { grid-area: head; padding-bottom: clamp(28px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.profile-head h1 { margin: 14px 0 8px; font-size: clamp(32px, 4.6vw, 56px); font-weight: 600; }
.profile-head .who { margin: 0; font-size: 18px; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 28px 0 0; padding: 0; list-style: none; }
.facts li { display: flex; flex-direction: column; }
.facts strong { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.facts span { font-size: 13.5px; color: var(--muted); }
.profile-body { grid-area: body; min-width: 0; padding-top: clamp(28px, 4vw, 40px); }
.block { margin-top: clamp(48px, 6vw, 72px); }
.block h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 600; }
.block .sub { margin-top: 12px; }

/* Contatti: colonna che resta visibile mentre si scorre */
.contact { grid-area: aside; position: sticky; top: 88px; }
.contact-card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .08); }
.contact-level { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink); }
.contact dl { display: grid; gap: 14px; margin: 0 0 22px; }
.contact dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact dd { margin: 2px 0 0; font-weight: 500; color: var(--ink); }
.contact dd a { text-decoration: none; }
.contact .btn { width: 100%; }
.contact .btn + .btn { margin-top: 8px; }
.contact-note { margin: 14px 4px 0; font-size: 13px; color: var(--muted); }
.mini-map { height: clamp(260px, 30vw, 360px); margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

/* Certificato */
.cert { padding: clamp(22px, 3vw, 32px); background: var(--grad); border-radius: var(--radius); color: #fff; }
.cert-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cert small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.cert strong { display: block; margin-top: 6px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -.02em; }
.cert-year { text-align: right; }
.cert-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 24px; }
.cert-bar span { overflow: hidden; padding: 8px 4px; border-radius: 8px; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .65); border: 1px dashed rgba(255, 255, 255, .45); font-size: 11.5px; font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cert-bar span.on { background: #fff; color: var(--ink); border: 1px solid #fff; }

/* Fasi: elenco numerato, quelle non certificate restano visibili ma spente */
.phase-list { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.phase-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.phase-num { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.phase-list strong { display: block; margin-bottom: 2px; font-size: 17px; color: var(--ink); }
.phase-list p { margin: 0; max-width: 56ch; font-size: 14.5px; color: var(--muted); }
.phase-state { padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.phase-list li.off strong, .phase-list li.off p, .phase-list li.off .phase-num { color: #b0b0b0; }
.phase-list li.off .phase-state { background: transparent; border: 1px dashed #c4c4c4; color: var(--muted); }

.treatments { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.treatments li { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--bg); border-radius: 14px; font-size: 15px; font-weight: 500; color: var(--ink); }
.treatments li::before { content: "✓"; display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; font-size: 12px; font-weight: 700; }

/* Footer */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 28px var(--gutter); background: var(--dark); color: var(--dark-muted); font-size: 13px; }
.footer .logo-word { color: #fff; font-size: 13px; }
.footer p { margin: 0; }
.footer a { color: #fff; }

/* Responsive */
@media (max-width: 1080px) {
  .nav a:not(.btn) { display: none; }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .flow li { border-radius: 0 !important; }
  .flow li:first-child { border-top-left-radius: var(--radius) !important; }
  .flow li:nth-child(3) { border-top-right-radius: var(--radius) !important; }
  .flow li:nth-child(4) { border-bottom-left-radius: var(--radius) !important; }
  .flow li:last-child { border-bottom-right-radius: var(--radius) !important; }
  .courses, .benefits, .nearby { grid-template-columns: repeat(2, 1fr); }
  .studio-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(3, 1fr); }
  .dir { grid-template-columns: 1fr 1fr; }
  .dir-list { min-width: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .split, .profile-head, .hero-split, .faq-layout { grid-template-columns: 1fr; }
  .faq-layout .section-head { position: static; }
  .profile-grid { grid-template-columns: 1fr; grid-template-areas: "head" "aside" "body"; }
  .contact { position: static; margin-top: 28px; }
  .steps li:nth-child(2)::after { display: none; }
  .hero-media img { height: clamp(260px, 60vw, 460px); }
}
@media (max-width: 760px) {
  .logo-by { display: none; }
  .logo-word { font-size: 14px; letter-spacing: .14em; }
  .nav .btn { padding: 8px 12px; font-size: 12.5px; }
  .dir { display: flex; flex-direction: column-reverse; }
  .dir-map { position: relative; top: 0; height: 320px; }
  .dir-bar { position: static; }
  .dir-list { padding-top: 20px; }
  .studio-grid, .city-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow li { border-radius: 0 !important; padding: 20px; }
  .flow li:first-child { border-radius: var(--radius) var(--radius) 0 0 !important; }
  .flow li:last-child { border-radius: 0 0 var(--radius) var(--radius) !important; }
  .flow li::before { margin-bottom: 12px; }
  .pillars, .levels, .courses, .benefits, .steps, .phase-list, .nearby { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 260px; }
  .gallery img:not(:first-child) { display: none; }
  .gallery img:first-child { grid-row: auto; }
  .phase-list li { grid-template-columns: 32px 1fr; }
  .phase-state { grid-column: 2; justify-self: start; }
  .cert-bar { grid-template-columns: repeat(3, 1fr); }
  .stats { gap: 24px; flex-wrap: wrap; }
  .legend { flex-direction: column; gap: 4px; top: 10px; right: 10px; bottom: auto; left: auto; padding: 6px 10px; font-size: 11px; }
  .searchbar { flex-direction: column; align-items: stretch; padding: 6px; border-radius: 24px; }
  .searchbar .field { padding: 10px 14px 10px 10px; border-radius: 18px; }
  .searchbar .field + .field::before { left: 14px; right: 14px; top: 0; width: auto; height: 1px; }
  .searchbar .btn { margin: 6px 0 0; }
  .studio-grid { grid-template-columns: 1fr; }
  .dir-head { flex-wrap: wrap; }
  .row-head { flex-direction: column; align-items: flex-start; }
  .searchbar.compact { flex-direction: row; align-items: center; padding: 4px; border-radius: 16px; }
  .searchbar.compact .field { padding: 6px 8px 6px 10px; border-radius: 12px; }
  .searchbar.compact .field + .field::before { left: 0; right: auto; top: 24%; width: 1px; height: 52%; }
  .searchbar.compact .field-icon, .searchbar.compact .chev { display: none; }
  .searchbar.compact label { font-size: 9.5px; letter-spacing: .08em; }
  .searchbar.compact .field-value { font-size: 13.5px; }
  .searchbar.compact .reset { margin: 0 2px; padding: 6px 8px; font-size: 12px; }
}
