/* InfoComuni · Scheda comune · menù di sezione su mobile (10/09/2026)
   Sostituisce la striscia orizzontale delle tab (.comune-tabs) con una griglia
   di sezioni tutte visibili + barra sticky "Sezioni" dopo lo scroll.
   Attivo solo sotto 861px: desktop invariato. Token: navy #0B2340, blu #1E5EAB. */
@media (max-width: 860px) {
  html body nav.comune-tabs { display: none !important; }

  /* --- griglia --- */
  html body .ic-sez { display: block !important; margin: 0 !important; padding: 18px 16px 6px !important;
    background: #fff !important; border-bottom: 1px solid #E3E7EC !important; font-family: "Titillium Web", Inter, system-ui, sans-serif !important; }
  html body .ic-sez .ic-sez__h { margin: 0 0 10px !important; font: 600 13px/1.2 "Titillium Web", Inter, system-ui, sans-serif !important;
    letter-spacing: .02em !important; text-transform: none !important; color: #5A6B82 !important; }
  html body .ic-sez .ic-sez__grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; margin: 0 !important; padding: 0 !important; list-style: none !important; }
  html body .ic-sez .ic-sez__btn { display: flex !important; align-items: center !important; gap: 10px !important; width: 100% !important; min-height: 56px !important;
    padding: 10px 12px !important; box-sizing: border-box !important; border: 1px solid #D9DFE7 !important; border-radius:3px !important;
    background: #F5F7FA !important; color: #0B2340 !important; font: 600 16px/1.2 "Titillium Web", Inter, system-ui, sans-serif !important;
    text-transform: none !important; letter-spacing: 0 !important; text-align: left !important; cursor: pointer !important; -webkit-tap-highlight-color: transparent; transition: background .15s, border-color .15s; }
  html body .ic-sez .ic-sez__btn:active { background: #E8EEF6 !important; }
  html body .ic-sez .ic-sez__btn[aria-current="true"] { background: #0B2340 !important; border-color: #0B2340 !important; color: #fff !important; }
  html body .ic-sez .ic-sez__btn svg { flex: 0 0 22px !important; width: 22px !important; height: 22px !important; stroke: currentColor !important; fill: none !important; stroke-width: 1.8 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
  html body .ic-sez .ic-sez__btn:focus-visible { outline: 3px solid #1E5EAB !important; outline-offset: 2px !important; }

  /* --- barra sticky --- */
  html body #ic-sez-bar { position: fixed !important; left: 0 !important; right: 0 !important; top: var(--header-h, 64px) !important; z-index: 8900 !important;
    display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important;
    min-height: 48px !important; padding: 6px 16px !important; box-sizing: border-box !important;
    background: rgba(255,255,255,.96) !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid #E3E7EC !important; box-shadow: 0 4px 14px rgba(11,35,64,.08) !important;
    transform: translateY(-120%) !important; opacity: 0 !important; transition: transform .22s ease, opacity .2s ease !important; pointer-events: none !important;
    font-family: "Titillium Web", Inter, system-ui, sans-serif !important; }
  html body #ic-sez-bar.is-on { transform: none !important; opacity: 1 !important; pointer-events: auto !important; }
  html body #ic-sez-bar button { display: inline-flex !important; align-items: center !important; gap: 8px !important; min-height: 40px !important;
    padding: 6px 12px !important; border: 1px solid #D9DFE7 !important; border-radius:3px !important; background: #fff !important; color: #0B2340 !important;
    font: 600 15px/1 "Titillium Web", Inter, system-ui, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; cursor: pointer !important; }
  html body #ic-sez-bar button svg { width: 18px !important; height: 18px !important; stroke: currentColor !important; fill: none !important; stroke-width: 2 !important; }
  html body #ic-sez-bar .ic-sez-bar__cur { color: #1E5EAB !important; }
  html body #ic-sez-bar .ic-sez-bar__top { border-color: transparent !important; color: #5A6B82 !important; font-weight: 500 !important; }

  /* --- foglio a comparsa --- */
  html body #ic-sez-sheet { position: fixed !important; inset: 0 !important; z-index: 8950 !important; display: none !important; background: rgba(11,35,64,.45) !important; }
  html body #ic-sez-sheet.is-open { display: block !important; }
  html body #ic-sez-sheet .ic-sez-sheet__in { position: absolute !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    max-height: 80vh !important; overflow: auto !important; padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important; box-sizing: border-box !important;
    background: #fff !important; border-radius:3px 3px 0 0 !important; box-shadow: 0 -8px 30px rgba(11,35,64,.25) !important; }
  html body #ic-sez-sheet .ic-sez-sheet__in::before { content: "" !important; display: block !important; width: 40px !important; height: 4px !important; margin: 0 auto 12px !important; border-radius: 2px !important; background: #D9DFE7 !important; }
  html body #ic-sez-sheet .ic-sez { padding: 0 !important; border: 0 !important; }
  html body #ic-sez-sheet .ic-sez .ic-sez__h { font-size: 15px !important; color: #0B2340 !important; margin-bottom: 12px !important; }

  /* il contenuto attivo deve iniziare sotto la barra quando si salta a una sezione */
  html body .comune-panel { scroll-margin-top: calc(var(--header-h, 64px) + 56px) !important; }
}
@media (min-width: 861px) {
  html body .ic-sez, html body #ic-sez-bar, html body #ic-sez-sheet { display: none !important; }
}

/* ============================================================
   Scheda comune, tutti i viewport (10/09/2026): via il color panna,
   superfici bianche con bordo grigio e angoli a 6px.
   ============================================================ */
html body .ic-tourism {
  --t-bg: #ffffff !important; --t-bg-soft: #ffffff !important;
  --t-border: #D9DFE7 !important; --t-border-soft: #D9DFE7 !important;
  --t-radius: 3px!important;
}
html body .ic-tourism__section, html body .ic-tourism__popup-wrap .leaflet-popup-content-wrapper,
html body .leaflet-touch .leaflet-bar a, html body .leaflet-bar a { background: #ffffff !important; }
html body .ic-tourism__section { border: 1px solid #D9DFE7 !important; border-radius:3px !important; }
html body main .comune-panel .comune-section, html body main .comune-section, html body main .comune-panel .card,
html body main .comune-section .info-list > li, html body main .comune-section li.scuola-card, html body main .ic-acc,
html body main .comune-section > h2, html body main .comune-section > h3 { border-radius:3px !important; }
html body main#main { --cr-r-lg: 4px!important; --cr-r-md: 3px!important; --t-radius: 3px!important; }
html body main#main .comune-section, html body main#main .comune-panel .card, html body main#main .comune-section > h2,
html body main#main .ic-acc, html body main#main .comune-section li.scuola-card { border-radius:3px !important; }
/* intestazioni di sezione: niente fascia panna (--ic-paper-2), solo bianco e riga sotto */
html body main#main .ic-acc-head, html body main#main .comune-section > h2, html body main#main .comune-section > h3,
html body main#main .acc-head { background: #ffffff !important; border-radius:3px 3px 0 0 !important; box-shadow: none !important; }
/* liste di uffici/contatti: le card non devono sporgere dalla lista */
html body main#main .comune-section .info-list { padding-left: 0 !important; margin-left: 0 !important; width: 100% !important; }
html body main#main .comune-section .info-list > li { width: auto !important; max-width: 100% !important; box-sizing: border-box !important; margin-left: 0 !important; margin-right: 0 !important; }
@media (max-width: 860px) {
  html body main#main .comune-section { padding-left: 14px !important; padding-right: 14px !important; }
}
/* bordi residui color sabbia (#d3d9dd) -> grigio neutro */
html body main#main .ic-acc-head, html body main#main .comune-section > h2, html body main#main .comune-section > h3,
html body main#main .ic-acc-body, html body main#main .comune-section, html body main#main .acc-head { border-color: #D9DFE7 !important; }
html body main#main .comune-section > h2 { border-bottom: 1px solid #D9DFE7 !important; }
