/* Balzo Check-up. Stile sobrio, coerente con www.balzo.eu (Figtree per i titoli, Inter per i testi,
   testata e piede scuri, viola Balzo per l'azione principale) ma con il contenuto su fondo chiaro,
   più leggibile per tabelle di prezzi. Prima il telefono, poi gli schermi larghi. */

@font-face { font-family: "Figtree"; src: url("/font/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/font/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --inchiostro: #111318;
  --testo: #1d2027;
  --testo-tenue: #5a5f6b;
  --sfondo: #ffffff;
  --sfondo-tenue: #f4f4f7;
  --bordo: #e2e3e8;
  --viola: #8a00d9;          /* viola Balzo (#a200ff) scurito per il contrasto con il testo bianco */
  --viola-chiaro: #f3e6ff;
  --blu: #4637f1;            /* link */
  --verde: #12693a;
  --verde-sfondo: #ebf7ef;
  --ambra: #8a5a00;
  --ambra-sfondo: #fff4dc;
  --font-titoli: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-testo: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --margine: 16px;
  --larghezza: 1120px;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --margine: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sfondo); color: var(--testo); font: 16px/1.55 var(--font-testo); }
h1, h2, h3 { font-family: var(--font-titoli); color: var(--inchiostro); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 1.15rem + .7vw, 1.6rem); font-weight: 650; margin-top: 2rem; }
h3 { font-size: 1.15rem; font-weight: 650; margin-top: 1.5rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
a { color: var(--blu); text-underline-offset: 3px; }
a:hover { color: var(--viola); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--blu); outline-offset: 2px; }
main:focus { outline: none; }

.contenitore { max-width: calc(var(--larghezza) + 2 * var(--margine)); margin: 0 auto; padding: 0 var(--margine); }
.pagina { padding-bottom: 3rem; }
.tenue { color: var(--testo-tenue); }
.nota-piccola { font-size: .875rem; color: var(--testo-tenue); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.salta { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: #fff; color: #000; border-radius: 6px; transform: translateY(-200%); }
.salta:focus { transform: none; }

/* Testata e piede: scuri come balzo.eu */
.testata { background: var(--inchiostro); color: #fff; }
.testata__riga { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.marchio { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 1.05rem var(--font-titoli); }
.marchio img { width: 54px; height: auto; }
.marchio span { padding-left: 10px; border-left: 1px solid #ffffff55; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 18px; font: 500 .95rem var(--font-titoli); }
.menu a { color: #e8e8ee; text-decoration: none; padding: 8px 0; }
.menu a:hover { color: #d9b3ff; }
.piede { background: var(--inchiostro); color: #cfd0d6; padding: 32px 0 40px; font-size: .875rem; }
.piede a { color: #fff; }
.piede a:hover { color: #d9b3ff; }
.piede__link { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; font: 500 1rem var(--font-titoli); }
.piede__link a { padding: 6px 0; }

.briciole ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 14px 0 0; margin: 0; font-size: .875rem; color: var(--testo-tenue); }
.briciole li + li::before { content: "›"; margin-right: 4px; }
.briciole a { color: var(--testo-tenue); }

.intestazione { padding: 1.25rem 0 .5rem; }
.sottotitolo { font-size: 1.05rem; color: var(--testo-tenue); max-width: 46em; }

/* Bottoni */
.bottone { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 6px; background: var(--viola); color: #fff; font: 600 1rem var(--font-titoli); text-decoration: none; cursor: pointer; transition: background-color .15s ease, transform .1s ease; }
.bottone:hover, .bottone:focus-visible { background: #6f00ae; color: #fff; }
.bottone:active { transform: scale(.98); }
.bottone--piccolo { min-height: 40px; padding: 8px 14px; font-size: .9rem; white-space: nowrap; }
.bottone--secondario { background: var(--inchiostro); }
.bottone--secondario:hover { background: #2c2f38; }
.bottone--chiaro { background: #fff; color: var(--verde); border: 2px solid var(--verde); }
.bottone--chiaro:hover, .bottone--chiaro:focus-visible { background: var(--verde); color: #fff; }

/* Home */
.apertura { background: var(--sfondo-tenue); border-bottom: 1px solid var(--bordo); padding: 2rem 0 2.25rem; }
.cerca { display: grid; gap: 12px; margin-top: 1.25rem; max-width: 760px; }
@media (min-width: 640px) { .cerca { grid-template-columns: 1fr 2fr auto; align-items: end; } }
.cerca__campo label { display: block; font: 600 .9rem var(--font-titoli); margin-bottom: 4px; }
select, input[type=email], input[type=text], textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b9bcc6; border-radius: 6px; background: #fff; color: var(--testo); font: inherit; }
textarea { min-height: 88px; resize: vertical; }
.principi { list-style: none; padding: 0; display: grid; gap: 12px; margin: 1.75rem 0 .5rem; }
@media (min-width: 768px) { .principi { grid-template-columns: repeat(3, 1fr); } }
.principi li { padding: 14px 16px; border: 1px solid var(--bordo); border-radius: 8px; }
.blocco-citta h2 a { color: inherit; text-decoration: none; }
.blocco-citta h2 a::after { content: " ›"; color: var(--viola); }

/* Elenchi delle prestazioni */
.categorie { display: grid; gap: 0 32px; }
@media (min-width: 768px) { .categorie { grid-template-columns: repeat(2, 1fr); } }
.elenco { list-style: none; padding: 0; margin: 0 0 1rem; border-top: 1px solid var(--bordo); }
.elenco li { border-bottom: 1px solid var(--bordo); }
.elenco a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 12px 2px; text-decoration: none; color: var(--testo); min-height: 44px; }
.elenco a:hover .elenco__nome { color: var(--viola); text-decoration: underline; }
.elenco__nome { font-weight: 600; }
.elenco__dati { color: var(--testo-tenue); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* Statistiche */
.statistiche { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 1rem 0 .25rem; max-width: 560px; }
.statistiche div { background: var(--sfondo-tenue); border-radius: 8px; padding: 10px 12px; }
.statistiche dt { font-size: .8rem; color: var(--testo-tenue); }
.statistiche dd { margin: 0; font: 700 1.25rem var(--font-titoli); font-variant-numeric: tabular-nums; }

/* Riquadro screening: prima dei prezzi privati */
.screening { margin: 1rem 0 1.5rem; padding: 18px 18px 8px; border: 2px solid var(--verde); border-radius: 10px; background: var(--verde-sfondo); }
.screening h2 { margin-top: 0; color: var(--verde); }
.screening__occhiello { margin: 0 0 4px; font: 700 .8rem var(--font-titoli); text-transform: uppercase; letter-spacing: .06em; color: var(--verde); }
.screening__dati, .ssn__dati { display: grid; gap: 8px; }
@media (min-width: 640px) { .screening__dati { grid-template-columns: 1fr 1fr 2fr; } .ssn__dati { grid-template-columns: 1fr 1fr; max-width: 560px; } }
.screening__dati div, .ssn__dati div { background: #fff; border-radius: 8px; padding: 10px 12px; }
.screening__dati dt, .ssn__dati dt { font-size: .8rem; color: var(--testo-tenue); }
.screening__dati dd, .ssn__dati dd { margin: 0; font-weight: 600; }
.ssn__dati dd { font: 700 1.25rem var(--font-titoli); }
.screening__prenota { display: flex; flex-wrap: wrap; gap: 8px; }

.ssn { margin-top: 2rem; padding: 18px 18px 6px; border-radius: 10px; background: var(--sfondo-tenue); }
.ssn h2 { margin-top: 0; }
.ssn__dati div { border: 1px solid var(--bordo); }
.attesa { width: 100%; max-width: 640px; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .925rem; background: #fff; border-radius: 8px; overflow: hidden; }
.attesa caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.attesa th, .attesa td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bordo); vertical-align: top; }
.attesa thead th { font-size: .8rem; color: var(--testo-tenue); font-weight: 600; }
.attesa td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.attesa tbody th { font-weight: 500; }

/* Tabella delle strutture: schede sul telefono, tabella dai 900px */
.tabella-strutture table { width: 100%; border-collapse: collapse; }
.tabella-strutture thead { display: none; }
.tabella-strutture tr { display: block; border: 1px solid var(--bordo); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.tabella-strutture th, .tabella-strutture td { display: block; text-align: left; padding: 3px 0; font-weight: 400; }
.tabella-strutture td[data-campo="Cosa include"]::before { content: "Cosa include: "; font-weight: 600; color: var(--testo); }
.tabella-strutture td[data-campo="Rilevato il"] { font-size: .875rem; color: var(--testo-tenue); }
.tabella-strutture td[data-campo="Rilevato il"]::before { content: "Rilevato il "; }
.struttura__nome { display: block; font: 650 1.05rem var(--font-titoli); color: var(--inchiostro); }
.struttura__tipo { display: inline-block; font-size: .8rem; color: var(--testo-tenue); margin-right: 8px; }
.struttura__sede { display: block; font-size: .875rem; color: var(--testo-tenue); }
.prezzo { font: 700 1.35rem var(--font-titoli); color: var(--inchiostro); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prezzo__da { font-size: .85rem; font-weight: 600; color: var(--testo-tenue); }
.etichette { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.etichetta { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--viola-chiaro); color: #5b0091; white-space: nowrap; }
.etichetta--promo { background: var(--ambra-sfondo); color: var(--ambra); }
.etichetta--tenue { background: var(--sfondo-tenue); color: var(--testo-tenue); font-weight: 500; }
.etichetta--avviso { background: #ffe9e6; color: #9a2412; }
.include { font-size: .925rem; overflow-wrap: anywhere; }
.fonte { margin-left: 10px; }
.azioni { padding-top: 10px !important; }
@media (min-width: 900px) {
  .tabella-strutture thead { display: table-header-group; }
  .tabella-strutture tr { display: table-row; border: 0; padding: 0; margin: 0; }
  .tabella-strutture th, .tabella-strutture td { display: table-cell; padding: 12px 10px; border-bottom: 1px solid var(--bordo); vertical-align: top; }
  .tabella-strutture thead th { font: 600 .8rem var(--font-titoli); color: var(--testo-tenue); text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--inchiostro); white-space: nowrap; }
  .tabella-strutture th[scope=row] { width: 24%; }
  .tabella-strutture td[data-campo="Prezzo"] { width: 13%; }
  .tabella-strutture td[data-campo="Cosa include"]::before, .tabella-strutture td[data-campo="Rilevato il"]::before { content: none; }
  .tabella-strutture td[data-campo="Rilevato il"] { white-space: nowrap; }
  .fonte { display: block; margin: 4px 0 0; }
  .azioni { text-align: right; padding-top: 12px !important; }
}

.indice-tipi ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.gruppo { margin-top: 1.5rem; }
.gruppo h3 { padding-top: .5rem; border-top: 2px solid var(--inchiostro); }

/* Pannello «Richiedi prenotazione» */
.pannello { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 12px; padding: 22px 20px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--testo); }
.pannello::backdrop { background: rgba(17,19,24,.55); }
.pannello h2 { margin-top: 0; padding-right: 40px; }
.pannello hr { border: 0; border-top: 1px solid var(--bordo); margin: 1.25rem 0; }
.pannello__chiudi { position: absolute; top: 10px; right: 10px; margin: 0; }
.pannello__chiudi button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.75rem; line-height: 1; cursor: pointer; color: var(--testo-tenue); }
.avviso-attivo { padding: 12px 14px; border-radius: 8px; background: var(--ambra-sfondo); color: #4a3200; }

/* Segnalazione errori */
.segnala { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--bordo); max-width: 640px; }

/* Pagine di testo */
.testo { max-width: 760px; }
.testo h1 { margin-top: 1.25rem; }
.testo li { margin-bottom: .4rem; }
.cose { max-width: 760px; }

/* Pagina /stats */
.tabella-stats { overflow-x: auto; }
.tabella-stats table { max-width: none; }

/* Legenda delle etichette sotto ogni tabella */
.legenda { margin: .25rem 0 1rem; font-size: .85rem; color: var(--testo-tenue); display: grid; gap: 4px; }
.legenda div { display: flex; flex-wrap: wrap; gap: 0 6px; }
.legenda dt { font-weight: 600; color: var(--testo); }
.legenda dd { margin: 0; }
.riassunto { font: 600 1rem var(--font-titoli); color: var(--inchiostro); }
.prezzo__extra { display: block; font-size: .875rem; font-weight: 600; color: var(--testo); }
.prezzo__totale { display: block; font-size: .875rem; color: var(--testo-tenue); }
