/* Agenda Salone - sito pubblico. Nessuna risorsa esterna: niente font, script o immagini da terzi. */

:root {
  --petrolio: #00687c;
  --petrolio-scuro: #004e60;
  --inchiostro: #041c22;
  --testo-tenue: #46626a;
  --acqua: #d1e9ee;
  --acqua-chiara: #eef7f9;
  --carta: #ffffff;
  --arancio: #c96a00;
  --arancio-chiaro: #fff1dd;
  --riga: #b4d5db;

  --titoli: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
  --corpo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --misura: 68ch;
  --largo: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--carta);
  color: var(--inchiostro);
  font-family: var(--corpo);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--petrolio); text-underline-offset: 0.18em; }
a:hover { color: var(--petrolio-scuro); }

:focus-visible { outline: 3px solid var(--arancio); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--titoli);
  color: var(--petrolio-scuro);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0; }

.contenitore { width: min(100% - 2.5rem, var(--largo)); margin-inline: auto; }

.salta {
  position: absolute; left: -999px; top: 0;
  background: var(--inchiostro); color: #fff; padding: 0.6rem 1rem; z-index: 10;
}
.salta:focus { left: 0; }

/* Intestazione */

.testata { background: var(--acqua); }
.testata .contenitore {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 0.7rem;
}
.testata .marchio img { width: 190px; }
.testata nav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; justify-content: flex-end; }
.testata nav a { color: var(--petrolio-scuro); font-weight: 600; text-decoration: none; }
.testata nav a:hover { text-decoration: underline; }
.testata nav a.bottone { color: #fff; }

/* Bottoni */

.bottone {
  display: inline-block;
  background: var(--petrolio);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--petrolio);
}
.bottone:hover { background: var(--petrolio-scuro); border-color: var(--petrolio-scuro); color: #fff; text-decoration: none; }
.bottone.contorno { background: transparent; color: var(--petrolio-scuro); }
.bottone.contorno:hover { background: var(--petrolio-scuro); color: #fff; }
.bottone.piccolo { padding: 0.45rem 1rem; }

/* Apertura */

.apertura { background: linear-gradient(var(--acqua), var(--acqua-chiara)); padding-block: clamp(2.5rem, 6vw, 5rem); }
.apertura .contenitore {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.apertura .sommario { font-size: 1.2rem; max-width: 34ch; margin-top: 1.2rem; color: var(--inchiostro); }
.apertura .azioni { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.apertura .nota { margin-top: 1rem; font-size: 0.95rem; color: var(--testo-tenue); }

/* La giornata in agenda: l'elemento che racconta il prodotto */

.giornata {
  background: var(--carta);
  border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(0, 78, 96, 0.45);
  padding: 1rem 1rem 1.2rem;
}
.giornata .barra {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.2rem 0.3rem 0.8rem;
}
.giornata .data { font-family: var(--titoli); font-weight: 800; font-size: 1.25rem; color: var(--petrolio-scuro); }
.giornata .vista { font-size: 0.9rem; color: var(--testo-tenue); }

.griglia {
  display: grid;
  grid-template-columns: 3.2rem repeat(3, minmax(0, 1fr));
  grid-template-rows: 2rem repeat(8, 2.35rem);
  gap: 3px;
  font-size: 0.86rem;
}
.griglia .operatore {
  font-family: var(--titoli); font-weight: 700; color: var(--petrolio-scuro);
  align-self: center; text-align: center;
}
.griglia .ora { color: var(--testo-tenue); font-variant-numeric: tabular-nums; padding-top: 0.15rem; text-align: right; padding-right: 0.5rem; }
.griglia .casella { background: var(--acqua-chiara); border-radius: 6px; }
.griglia .appuntamento {
  border-radius: 8px; padding: 0.35rem 0.55rem; line-height: 1.25;
  color: var(--inchiostro); overflow: hidden;
}
.griglia .appuntamento strong { display: block; font-size: 0.9rem; }
.griglia .appuntamento span { font-size: 0.8rem; color: #24434b; }
.griglia .a1 { background: #bfe3ea; }
.griglia .a2 { background: #9fd0da; }
.griglia .a3 { background: #d9e8c4; }
.griglia .a4 { background: #f2dcc0; }
.griglia .chiuso { background: repeating-linear-gradient(135deg, #ebebeb 0 6px, #f6f6f6 6px 12px); border-radius: 6px; }
.griglia a.libero {
  display: flex; flex-direction: column; justify-content: center;
  border: 2px dashed var(--arancio); background: var(--arancio-chiaro);
  border-radius: 8px; padding: 0.3rem 0.55rem; line-height: 1.25;
  color: #7a3f00; text-decoration: none; font-weight: 700;
}
.griglia a.libero span { font-weight: 400; font-size: 0.8rem; }
.griglia a.libero:hover { background: #ffe4bd; }

/* Sezioni */

.sezione { padding-block: clamp(3rem, 7vw, 5.5rem); }
.sezione.tinta { background: var(--acqua-chiara); }
.sezione .attacco { max-width: 46ch; margin-bottom: 2.2rem; }
.sezione .attacco p { margin-top: 0.8rem; font-size: 1.1rem; color: var(--testo-tenue); }

.due-pubblici { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); }
.due-pubblici > div { border-top: 4px solid var(--petrolio); padding-top: 1.3rem; }
.due-pubblici ul { margin: 1rem 0 1.5rem; padding-left: 1.1rem; }
.due-pubblici li { margin-bottom: 0.55rem; }
.due-pubblici li::marker { color: var(--petrolio); }

.passi { list-style: none; margin: 0; padding: 0; counter-reset: passo; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.passi li { counter-increment: passo; }
.passi li::before {
  content: counter(passo);
  display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: 10px;
  background: var(--petrolio); color: #fff;
  font-family: var(--titoli); font-weight: 800; font-size: 1.25rem;
  margin-bottom: 0.9rem;
}
.passi p { margin-top: 0.4rem; color: var(--testo-tenue); }

.domande { max-width: var(--misura); }
.domande details { border-bottom: 1px solid var(--riga); padding-block: 1rem; }
.domande summary { cursor: pointer; font-family: var(--titoli); font-weight: 700; font-size: 1.12rem; color: var(--petrolio-scuro); }
.domande details p { margin-top: 0.7rem; }

.chiamata { background: var(--petrolio-scuro); color: #fff; }
.chiamata h2 { color: #fff; }
.chiamata p { margin-top: 0.8rem; max-width: 52ch; color: #d1e9ee; }
.chiamata .azioni { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.chiamata .bottone { background: #fff; color: var(--petrolio-scuro); border-color: #fff; }
.chiamata .bottone:hover { background: var(--acqua); border-color: var(--acqua); color: var(--petrolio-scuro); }
.chiamata .bottone.contorno { background: transparent; color: #fff; }
.chiamata .bottone.contorno:hover { background: #fff; color: var(--petrolio-scuro); }

/* Piede */

.piede { background: var(--inchiostro); color: #c7dde2; font-size: 0.95rem; padding-block: 2.5rem; }
.piede .contenitore { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.piede strong { color: #fff; font-family: var(--titoli); }
.piede a { color: #fff; }
.piede ul { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.piede li { margin-bottom: 0.35rem; }
.piede p { margin-top: 0.6rem; }

/* Pagine di testo (privacy, condizioni, cookie) */

.documento { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.documento .contenitore { max-width: 860px; }
.documento h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); }
.documento .aggiornata { margin-top: 0.8rem; color: var(--testo-tenue); }
.documento .in-breve {
  margin-top: 1.8rem; background: var(--acqua-chiara); border-left: 5px solid var(--petrolio);
  border-radius: 0 12px 12px 0; padding: 1.2rem 1.4rem;
}
.documento .in-breve ul { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.documento .in-breve li { margin-bottom: 0.4rem; }
.documento .indice { margin-top: 1.8rem; }
.documento .indice ol { margin: 0.5rem 0 0; padding-left: 1.3rem; columns: 2; column-gap: 2.5rem; }
.documento .indice li { margin-bottom: 0.3rem; break-inside: avoid; }
.documento section { margin-top: 2.6rem; scroll-margin-top: 1rem; }
.documento section > h2 { font-size: 1.5rem; }
.documento section p, .documento section ul, .documento section ol { margin-top: 0.9rem; max-width: var(--misura); }
.documento section ul, .documento section ol { padding-left: 1.2rem; }
.documento section li { margin-bottom: 0.4rem; }
.documento h3 { margin-top: 1.5rem; }

.tabella-scorri { overflow-x: auto; margin-top: 1.1rem; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 0.97rem; }
caption { text-align: left; color: var(--testo-tenue); padding-bottom: 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--riga); }
thead th { background: var(--acqua); color: var(--petrolio-scuro); font-family: var(--titoli); }

/* Punti ancora da confermare prima della pubblicazione: visibili apposta nella bozza */
.dc { background: #fff1a8; border-radius: 3px; padding: 0 0.2em; }

@media (max-width: 860px) {
  .apertura .contenitore, .due-pubblici, .passi, .piede .contenitore { grid-template-columns: 1fr; }
  .testata .marchio img { width: 150px; }
  .testata nav { gap: 0.9rem; }
  .testata nav .solo-largo { display: none; }
  .documento .indice ol { columns: 1; }
}

@media (max-width: 420px) {
  .griglia { grid-template-columns: 2.6rem repeat(3, minmax(0, 1fr)); font-size: 0.78rem; }
  .griglia .appuntamento span { display: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .testata nav, .chiamata, .salta { display: none; }
  .piede { background: none; color: #000; }
  .piede a, .piede strong { color: #000; }
}
