/* =========================================================================
   Autoscuola — stile condiviso della direzione "Segnaletica"
   Token · header · bottoni · cartelli · intestazione pagine interne ·
   box contatto · footer · barra contatti mobile.
   Lo stile specifico di ogni pagina resta nella pagina stessa.
   ========================================================================= */
:root {
  --blue: #0B4EA2;
  --blue-d: #083C7E;
  --green: #0B7A3E;
  --red: #D0261C;
  --asphalt: #15171B;
  --asphalt-2: #1F2228;
  --paper: #F2F2EE;
  --line: #DCDCD6;
  --text: #15171B;
  --muted: #5E636B;
  --road: #F4C21B;
  --wrap: 1240px;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
body { font-family: var(--font); background: var(--paper); color: var(--text); font-size: 16.5px; line-height: 1.5; }
:focus-visible { outline: 3px solid var(--road); outline-offset: 3px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; color: #fff; background: rgba(21,23,27,.96); backdrop-filter: blur(10px); transition: background .3s; }
.header-in { display: flex; align-items: center; gap: 20px; height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-sign { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--blue); box-shadow: inset 0 0 0 3px var(--blue), inset 0 0 0 5px #fff; font: 800 22px/1 var(--cond); }
.logo-t { font: 700 20px/1 var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.logo-t b { color: var(--road); font-weight: 800; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a { position: relative; display: block; padding: 10px 14px; font: 700 17px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; background: var(--road); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-extra { display: none; }
.header-call { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 8px; background: var(--road); color: var(--asphalt); font: 700 17px/1 var(--cond); letter-spacing: .04em; }
.menu-btn { display: none; }

/* ---------- Elementi comuni ---------- */
.h2 { font: 800 clamp(38px, 5vw, 64px)/.95 var(--cond); text-transform: uppercase; letter-spacing: .005em; }
.status { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px; border-radius: 6px; background: rgba(0,0,0,.45); font-size: 14px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #999; }
[data-state="open"] .status-dot { background: #2BD66F; }
[data-state="closed"] .status-dot { background: #FF5A4E; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 8px; font: 700 18px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-road { background: var(--road); color: var(--asphalt); }
.btn-white { background: #fff; color: var(--asphalt); }
.btn-line { box-shadow: inset 0 0 0 2px var(--asphalt); }
.btn-ghost { box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); color: #fff; }

/* Cartello stradale (blu, bianco riga interna) */
.sign-box { border-radius: 12px; background: var(--blue); color: #fff; box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 6px #fff; }

/* Cartello di direzione a freccia */
.sign { --c: var(--blue); --ring: #fff; --fg: #fff; position: relative; isolation: isolate; display: flex; align-items: center; gap: 16px; min-height: 100px; padding: 16px 72px 16px 18px; color: var(--fg); filter: drop-shadow(0 16px 20px rgba(0,0,0,.4)); transition: transform .25s cubic-bezier(.2,.75,.25,1); }
.sign:hover { transform: translateX(8px); }
.sign::before, .sign::after, .sign-face { content: ""; position: absolute; z-index: -3; inset: 0; background: var(--c); clip-path: polygon(0 0, calc(100% - 38px) 0, 100% 50%, calc(100% - 38px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.sign::after { z-index: -2; inset: 5px 6px 5px 5px; background: var(--ring); clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 50%, calc(100% - 34px) 100%, 0 100%); border-radius: 5px 0 0 5px; }
.sign-face { z-index: -1; inset: 7.5px 9px 7.5px 7.5px; clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 50%, calc(100% - 32px) 100%, 0 100%); border-radius: 3px 0 0 3px; }
.sign-ic { display: grid; place-items: center; width: 54px; height: 54px; margin-left: 4px; border-radius: 8px; background: #fff; color: var(--c); flex: none; }
.sign-ic .i { width: 28px; height: 28px; stroke-width: 2; }
.sign-t { display: block; font: 800 clamp(24px, 2.3vw, 32px)/1 var(--cond); letter-spacing: .02em; text-transform: uppercase; }
.sign-s { display: block; margin-top: 5px; font-size: 14.5px; opacity: .9; }
.sign-green { --c: var(--green); }
.sign-white { --c: #fff; --ring: var(--asphalt); --fg: var(--asphalt); }
.sign-white .sign-ic { background: var(--asphalt); color: #fff; }

/* Età minima / numeri nel cerchio rosso (limite di velocità) */
.limit { display: grid; place-items: center; align-content: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--asphalt); box-shadow: inset 0 0 0 5px var(--red); font: 800 22px/.9 var(--cond); }
.limit small { font: 700 8.5px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Intestazione pagine interne ---------- */
.page-head { padding: 28px 0 44px; background: var(--asphalt); color: #fff; }
.crumbs ol { display: flex; gap: 8px; font: 600 15px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.crumbs a:hover { color: #fff; }
.page-title { margin-top: 12px; font: 800 clamp(48px, 7vw, 96px)/.88 var(--cond); text-transform: uppercase; }
.page-title span { color: var(--road); }
.page-lead { max-width: 52ch; margin-top: 16px; font-size: 17.5px; color: rgba(255,255,255,.74); }

/* ---------- Box "Hai dubbi?" ---------- */
.help-box { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 32px 36px; border-radius: 14px; background: var(--blue); color: #fff; box-shadow: inset 0 0 0 5px var(--blue), inset 0 0 0 8px #fff; }
.help-box b { display: block; font: 800 clamp(30px, 3.4vw, 44px)/.95 var(--cond); text-transform: uppercase; }
.help-box p { margin-top: 6px; opacity: .9; }
.help-box p a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.help-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { position: relative; background: var(--asphalt); color: rgba(255,255,255,.82); padding: 88px 0 32px; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--road) 0 56px, transparent 56px 96px); }
.f-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.25fr; gap: 40px; }
.f-name { font: 800 44px/.9 var(--cond); text-transform: uppercase; color: #fff; }
.f-brand address { margin: 14px 0 22px; font-size: 17px; line-height: 1.55; }
.f-h { margin-bottom: 16px; font: 700 18px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--road); }
.f-list li + li { margin-top: 11px; }
.f-list a { display: inline-flex; align-items: center; gap: 10px; }
.f-list a:hover { color: #fff; }
.footer .status { margin-bottom: 14px; background: rgba(255,255,255,.07); }
.hours div { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.18); }
.hours dt { white-space: nowrap; color: rgba(255,255,255,.6); }
.hours dd { text-align: right; }
.hours .is-today dt, .hours .is-today dd { color: #fff; font-weight: 700; }
.hours .is-today dt::before { content: "▶ "; color: var(--road); font-size: 11px; vertical-align: 2px; }
.map { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 10px; --ph: linear-gradient(135deg, #2A2E36, #17191E); }
.map-pin { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 8px; background: var(--blue); box-shadow: inset 0 0 0 3px var(--blue), inset 0 0 0 5px #fff; color: #fff; }
.map-go { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; background: var(--road); color: var(--asphalt); font: 700 15px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.reach { margin-top: 14px; display: grid; gap: 8px; font-size: 15px; }
.reach li { display: flex; gap: 10px; }
.reach .i { margin-top: 2px; color: var(--road); }
.f-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; color: rgba(255,255,255,.5); }
.f-bottom nav { display: flex; flex-wrap: wrap; gap: 18px; }
.f-bottom a:hover { color: #fff; }

/* ---------- Barra contatti mobile ---------- */
.mbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .header-in { height: 64px; gap: 10px; }
  .logo-sign { width: 38px; height: 38px; font-size: 20px; }
  .logo-t { font-size: 18px; }
  .menu-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: rgba(255,255,255,.12); }
  .header-call { margin-left: auto; width: 44px; padding: 0; justify-content: center; }
  .header-call span { display: none; }
  .nav { position: fixed; top: 64px; left: 0; right: 0; margin: 0; padding: 8px 16px 20px; background: var(--asphalt); border-bottom: 8px solid var(--road); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s; }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 16px 4px; font-size: 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav a::after { display: none; }
  .nav-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }

  .sign { min-height: 80px; padding: 12px 58px 12px 14px; gap: 12px; }
  .sign-ic { width: 46px; height: 46px; }
  .sign-ic .i { width: 24px; height: 24px; }
  .sign-t { font-size: 23px; }
  .sign-s { font-size: 13.5px; }
  .sign:hover { transform: none; }

  .page-head { padding: 22px 0 32px; }
  .page-lead { font-size: 16px; }
  .help-box { padding: 26px 24px; }
  .help-cta, .help-cta .btn { width: 100%; }

  .f-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer { padding-bottom: 110px; }

  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: env(safe-area-inset-bottom); background: var(--asphalt); border-top: 4px solid var(--road); transition: transform .35s cubic-bezier(.2,.75,.25,1); }
  .mbar[data-sticky-bar]:not(.is-visible) { transform: translateY(110%); }
  .mbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 12px; color: #fff; font: 700 14px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
  .mbar a:first-child { background: var(--blue); }
  .mbar a:nth-child(2) { background: var(--green); }
}
