/* ============================================
   MOTO IN LOMBARDIA — Palette Lago
   Design tokens & base
   ============================================ */
:root {
  /* Sfondi - sabbia/avorio */
  --sand: #F7F4ED;
  --sand-2: #F0EBDD;
  --sand-3: #E8DFC9;
  --paper: #FFFFFF;

  /* Inchiostri - blu lago profondo */
  --ink: #1B2D3A;
  --ink-2: #25394A;
  --ink-3: #4F5D67;
  --ink-soft: #7A8590;
  --hairline: #E5DDC9;
  --hairline-soft: #EFE9D8;

  /* Accenti */
  --lake: #2F5E76;
  --lake-deep: #1F4A60;
  --coral: #DC5B4D;
  --coral-deep: #B44638;
  --olive: #6B7A4E;
  --gold: #D4A24A;

  /* Type */
  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(27,45,58,0.06), 0 1px 3px rgba(27,45,58,0.04);
  --shadow-md: 0 4px 12px rgba(27,45,58,0.08), 0 2px 4px rgba(27,45,58,0.04);
  --shadow-lg: 0 12px 32px rgba(27,45,58,0.12);

  --container: 1280px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
img { display: block; max-width: 100%; }
h1,h2,h3,h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
p { margin: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* HEADER */
.site-header { background: var(--paper); color: var(--ink); position: relative; z-index: 50; border-bottom: 1px solid var(--hairline); }
.site-header__inner { display: flex; align-items: center; gap: 32px; padding: 14px var(--gutter); max-width: var(--container); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 56px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; flex: 1; justify-content: center; }
.site-nav a {
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); opacity: 0.75;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.site-nav a:hover, .site-nav a.active { opacity: 1; border-bottom-color: var(--coral); }
/* Allineamento verticale: voci top-level (dirette + "Attivita" in .nav-parent) con box
   model uniforme -> voce attiva e non-attiva stessa altezza/baseline. Il bordo 2px
   trasparente di base e' gia su .site-nav a; qui solo normalizzazione del box. */
.site-nav > a,
.site-nav > .nav-parent > a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.nav-parent { position: relative; }
.nav-submenu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: var(--paper); border: 1px solid var(--hairline); border-radius: 6px; padding: 6px 0; min-width: 180px; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.08); flex-direction: column; }
.nav-parent:hover .nav-submenu { display: flex; }
.nav-submenu a { padding: 7px 18px; border-bottom: none; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); transition: background 0.15s; }
.icon-btn:hover { background: var(--sand-2); }
/* Header responsive (SPEC 2026-06-08): wrapper nav + CTA-in-panel + hamburger.
   Desktop (>=1201px): invariato — il pannello e' trasparente, hamburger e CTA-in-panel nascosti. */
.site-nav-panel { flex: 1; display: flex; align-items: center; justify-content: center; }
/* .site-header prefix per battere la specificita' di .btn (entrambe 0,1,0 -> serve 0,2,0) */
.site-header .site-nav-panel__cta { display: none; }
.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; flex-shrink: 0; }
.nav-toggle__bar { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: all 0.15s; cursor: pointer; border: 0;
  font-family: var(--font-sans);
}
.btn--primary { background: var(--coral); color: #fff; }
.btn--primary:hover { background: var(--coral-deep); }
.btn--ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.08); }
.btn--outline { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
.btn--outline:hover { background: var(--sand-2); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--sm { padding: 8px 14px; font-size: 11px; }
.btn--lg { padding: 14px 26px; font-size: 13px; }
.btn--block { display: flex; width: 100%; justify-content: center; }

/* FAQ (CPT-09) — Domande frequenti scheda concessionaria */
.faq-sec { padding: 36px 0; background: var(--paper); border-top: 1px solid var(--hairline); }
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 14px 18px; }
.faq-item summary { font-weight: 600; font-size: 14.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 18px; font-weight: 400; color: var(--ink-soft); margin-left: 12px; flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.faq-answer p { margin: 0 0 8px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* FOOTER */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.78); padding: 60px 0 24px; font-size: 13.5px; }
.site-footer .footer-section-title { font-family: var(--font-sans); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin: 0 0 16px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid ul a:hover { color: #fff; }
.footer-brand img { width: 60%; max-width: 220px; height: auto; margin-bottom: 14px; }
.footer-brand p { line-height: 1.55; max-width: 280px; color: rgba(255,255,255,0.65); margin-bottom: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 6px; }
.footer-social a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,0.08); color: #fff; }
.footer-social a:hover { background: var(--coral); }
.footer-newsletter form { display: flex; margin-top: 12px; border-radius: var(--r-sm); overflow: hidden; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); }
.footer-newsletter input { flex: 1; background: transparent; border: 0; outline: 0; padding: 12px 14px; color: #fff; font: inherit; font-size: 13px; }
.footer-newsletter input::placeholder { color: rgba(255,255,255,0.45); }
.footer-newsletter button { background: var(--coral); color: #fff; padding: 0 18px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-bottom .links { display: flex; gap: 22px; }
.footer-bottom .links ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.footer-bottom .links a { color: inherit; border: 0; }
.footer-bottom .links a:hover { color: #fff; }
.footer-bottom .heart { color: var(--coral); }

/* SECTIONS */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 24px; }
.section-eyebrow { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); display: inline-block; padding: 4px 10px; background: var(--coral); color: #fff; border-radius: var(--r-xs); }
.section-link { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.section-link:hover { color: var(--coral); }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: var(--r-xs); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.badge--featured { background: var(--coral); color: #fff; }
.badge--premium { background: var(--gold); color: var(--ink); }
.badge--verified { background: var(--olive); color: #fff; }
.badge--official { background: var(--coral); color: #fff; }
.badge--sponsor { background: var(--ink); color: var(--gold); }

/* CARD */
.card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; transition: all 0.18s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* FORM */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field select { font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-sm); background: #fff; color: var(--ink); outline: 0; }
.field input:focus, .field select:focus { border-color: var(--lake); }

/* Stars */
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 14px; height: 14px; }

.muted { color: var(--ink-soft); }

/* Page switcher (only for prototype) */
.page-switcher { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); border-radius: 999px; padding: 6px; display: flex; gap: 4px; z-index: 100; box-shadow: var(--shadow-lg); }
.page-switcher button { padding: 8px 18px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); border-radius: 999px; }
.page-switcher button.active { background: var(--coral); color: #fff; }
.page-switcher button:hover:not(.active) { color: #fff; }

/* ==========================================================================
 *  SPEC 2026-06-08 — Header responsive (hamburger). Breakpoint 1200px:
 *  l'header desktop richiede ~1192px (brand 185 + nav 667 + azioni 228 + gap/pad);
 *  sotto i 1200 la riga sfondava -> menu a comparsa. Desktop >=1201 INVARIATO.
 * ========================================================================== */
@media (max-width: 1200px) {
  /* Safety net: clip eventuale overflow orizzontale residuo (footer/hero non responsive,
     fuori scope). 'clip' NON crea uno scroll container -> NON rompe position:sticky. */
  html, body { overflow-x: clip; }
  .site-header__inner { justify-content: space-between; gap: 16px; }
  .nav-toggle { display: inline-flex; }
  .header-actions__cta { display: none; }

  /* Pannello nav a comparsa (assoluto sotto l'header): chiuso di default */
  .site-nav-panel { display: none; flex: 0 0 auto; }
  .site-header.is-open .site-nav-panel {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-top: 1px solid var(--hairline);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
    padding: 6px 0 12px; gap: 0; z-index: 60;
    max-height: calc(100vh - 84px); overflow-y: auto;
  }
  .site-header.is-open .site-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav-panel .site-nav > a,
  .site-nav-panel .site-nav > .nav-parent > a {
    display: flex; align-items: center; min-height: 44px;
    padding: 10px var(--gutter); opacity: 1; border-bottom: 0;
  }
  .site-nav-panel .nav-parent { position: static; }
  /* Sottomenu espansi inline (no hover su touch) */
  .site-header.is-open .nav-submenu {
    display: flex; position: static; transform: none;
    background: transparent; border: 0; box-shadow: none;
    min-width: 0; padding: 0 0 4px;
  }
  .site-nav-panel .nav-submenu a {
    display: flex; align-items: center; min-height: 40px;
    padding: 8px var(--gutter) 8px calc(var(--gutter) + 16px);
    color: var(--ink); opacity: 0.7; white-space: normal;
  }
  /* CTA dentro il pannello (la CTA in barra e' nascosta) */
  .site-header .site-nav-panel__cta { display: inline-flex; justify-content: center; margin: 10px var(--gutter) 2px; }

  /* Hamburger -> X quando aperto */
  .site-header.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .site-header.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   SPEC 2026-06-08 — Fix mobile responsivita' body (chrome)
   Desktop >=1201 invariato.
   ============================================================ */

/* sr-only standard (mancante): nasconde la label visibile/schiacciata
   "La tua email" del newsletter nel footer. Always-on = corretto. */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 768px) {
  /* Footer (plugin E tema condividono .footer-grid / .footer-bottom).
     !important OBBLIGATORIO: la home rende <div class="footer-grid"
     style="grid-template-columns:1.6fr 1fr 1fr 1fr"> INLINE. */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 28px 20px; } /* SPEC 2026-06-09 A: griglia 2x2 piena (brand cella normale) */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-bottom .links,
  .footer-bottom .links ul { flex-wrap: wrap; }

  /* Intestazioni di sezione (titolo + link): a capo se strette */
  .section-header { flex-wrap: wrap; gap: 6px 20px; }
}

/* ====== SPEC 2026-06-09 #1: barra azioni mobile (fixed bottom) ====== */
.mil-mobilebar { display: none; } /* nascosta su desktop */
@media (max-width: 768px) {
  .mil-mobilebar {
    display: flex; justify-content: space-around; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--ink); border-top: 1px solid rgba(255,255,255,0.10);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.18);
  }
  .mil-mobilebar__btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; min-height: 58px; padding: 8px 4px;
    color: rgba(255,255,255,0.86); font-family: var(--font-sans);
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em; background: transparent; border: 0;
  }
  .mil-mobilebar__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mil-mobilebar__btn:active { color: var(--coral); }
  .mil-mobilebar__btn span { line-height: 1; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
