/* ============================================================
   InfoComuni · Restyle mini-sito Comune — TEST Brindisi (2026-05-31)
   Layer additivo, attivo SOLO su body.restyle-2026 (nessun impatto
   sugli altri ~250 comuni). Obiettivi: leggibilità, accessibilità
   (contrasti AA/AAA, focus visibili, target ≥44px), palette raffinata,
   gerarchia tipografica chiara, profondità misurata. Universal design UX.
   ============================================================ */

body.restyle-2026 {
  /* Palette raffinata e coerente col brand (navy + oro), tarata sui contrasti */
  --rs-navy:      #0A2540;   /* fondo profondo */
  --rs-navy-2:    #0E3052;
  --rs-ink:       #16314F;   /* testo su chiaro — AA su paper */
  --rs-ink-2:     #51677F;   /* testo secondario */
  --rs-gold:      #5BC4FF;   /* oro caldo su scuro */
  --rs-gold-deep: #1A72B8;   /* oro scuro: testo/accenti su chiaro (AA) */
  --rs-paper:     #F3F9FF;   /* azzurro tenue */
  --rs-surface:   #FFFFFF;
  --rs-sand:      #EBF4FF;   /* superficie alternata — più leggero */
  --rs-line:      rgba(16,49,79,0.10);
  --rs-line-2:    rgba(16,49,79,0.16);
  --rs-shadow:    0 1px 2px rgba(10,37,64,.05), 0 12px 30px rgba(10,37,64,.07);
  --rs-shadow-lg: 0 2px 6px rgba(10,37,64,.06), 0 24px 60px rgba(10,37,64,.12);
  --rs-radius:    16px;
  --rs-radius-sm: 12px;
}

/* === Base leggibilità === */
body.restyle-2026 {
  background: var(--rs-paper) !important;
  color: var(--rs-ink) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.restyle-2026 p,
body.restyle-2026 li {
  line-height: 1.65;
  color: var(--rs-ink);
}
/* misura di lettura ottimale per i testi lunghi */
.restyle-2026 .comune-panel__lead,
.restyle-2026 .ic-tourism__lead,
.restyle-2026 .ic-tourism__section p {
  max-width: 68ch;
}

/* === Focus visibile coerente (WCAG 2.4.7) === */
.restyle-2026 a:focus-visible,
.restyle-2026 button:focus-visible,
.restyle-2026 [role="tab"]:focus-visible,
.restyle-2026 [tabindex]:focus-visible {
  outline: 3px solid var(--rs-gold-deep) !important;
  outline-offset: 3px !important;
  border-radius: 8px;
}

/* === Header mini-sito === */
.restyle-2026 .comune-header {
  background: linear-gradient(180deg, var(--rs-navy) 0%, var(--rs-navy-2) 100%) !important;
  border-bottom: 1px solid rgba(91,196,255,.22) !important;
  box-shadow: 0 8px 28px rgba(10,37,64,.18) !important;
}
.restyle-2026 .comune-header__comune-label { color: rgba(255,255,255,.62) !important; letter-spacing:.04em; }
.restyle-2026 .comune-header__comune-name { color: #fff !important; letter-spacing:-.01em; }
.restyle-2026 .comune-header__divider { background: rgba(91,196,255,.45) !important; }
.restyle-2026 .comune-header__nav a {
  color: rgba(255,255,255,.82) !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 12px !important;
  transition: color .15s ease, background .15s ease;
}
.restyle-2026 .comune-header__nav a:hover,
.restyle-2026 .comune-header__nav a:focus-visible {
  color: var(--rs-gold) !important;
  background: rgba(91,196,255,.12) !important;
}
.restyle-2026 .comune-header__back {
  border: 1.5px solid rgba(255,255,255,.30) !important;
  border-radius: 999px !important;
  color: #fff !important;
  padding: 8px 14px !important;
  min-height: 40px;
}
.restyle-2026 .comune-header__back:hover { background: rgba(255,255,255,.12) !important; }

/* === Hero ad alta leggibilità sopra la mappa === */
.restyle-2026 .comune-hero--map { isolation: isolate; }
.restyle-2026 .comune-hero__overlay {
  background:
    radial-gradient(120% 90% at 18% 12%, rgba(10,37,64,.40) 0%, rgba(10,37,64,.78) 60%, rgba(8,28,50,.92) 100%) !important;
}
.restyle-2026 .comune-hero__content { position: relative; z-index: 2; padding-top: 28px; padding-bottom: 36px; }
.restyle-2026 .comune-hero h1 {
  font-size: clamp(38px, 5vw, 64px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.02em !important;
  color: #fff !important;
  margin: 10px 0 8px !important;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.restyle-2026 .comune-hero__subtitle {
  color: rgba(255,255,255,.90) !important;
  font-size: clamp(16px, 1.6vw, 19px) !important;
  max-width: 60ch;
  line-height: 1.5 !important;
}
.restyle-2026 .breadcrumb,
.restyle-2026 .breadcrumb a { color: rgba(255,255,255,.82) !important; }
.restyle-2026 .breadcrumb a:hover { color: var(--rs-gold) !important; }

/* Badges hero */
.restyle-2026 .comune-hero__badge {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 6px 14px !important;
  backdrop-filter: blur(8px);
  font-weight: 600;
}
.restyle-2026 .comune-hero__badge--pro {
  background: linear-gradient(135deg, var(--rs-gold) 0%, #3A8FCC 100%) !important;
  border-color: transparent !important;
  color: #fff !important; -webkit-text-fill-color: #fff !important;
  box-shadow: 0 6px 18px rgba(91,196,255,.32);
}

/* Meta: schede in vetro */
.restyle-2026 .comune-hero__meta { gap: 14px !important; }
.restyle-2026 .comune-hero__meta-item {
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: var(--rs-radius-sm) !important;
  padding: 12px 16px !important;
  backdrop-filter: blur(10px);
}
.restyle-2026 .comune-hero__meta-label {
  color: rgba(255,255,255,.66) !important;
  text-transform: uppercase; letter-spacing:.08em; font-size: 11px !important; font-weight: 700;
}
.restyle-2026 .comune-hero__meta-value { color: #fff !important; font-weight: 600; }

/* Bottoni contatto hero — premium, target ampi */
.restyle-2026 .ms-hero-btn {
  border-radius: 999px !important;
  min-height: 48px !important;
  padding: 12px 20px !important;
  font-weight: 700 !important;
  border: 1.5px solid rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.10) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
  transition: transform .14s ease, background .18s ease, box-shadow .18s ease;
}
.restyle-2026 .ms-hero-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.18) !important; }
.restyle-2026 .ms-hero-btn.ms-btn-phone {
  background: linear-gradient(135deg, var(--rs-gold) 0%, #3A8FCC 100%) !important;
  color: #fff !important; -webkit-text-fill-color:#fff !important; border-color: transparent !important;
  box-shadow: 0 8px 22px rgba(91,196,255,.34);
}

/* === Tabs: pill chiare, attivo netto, touch ≥44px === */
.restyle-2026 .comune-tabs {
  background: var(--rs-surface) !important;
  border-bottom: 1px solid var(--rs-line) !important;
  box-shadow: 0 1px 0 var(--rs-line);
}
.restyle-2026 .comune-tabs__btn {
  color: var(--rs-ink-2) !important;
  font-weight: 600 !important;
  min-height: 48px !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: 10px 10px 0 0 !important;
  background: transparent !important;
  position: relative;
  transition: color .15s ease, background .15s ease;
}
.restyle-2026 .comune-tabs__btn:hover { color: var(--rs-navy) !important; background: var(--rs-sand) !important; }
.restyle-2026 .comune-tabs__btn[aria-selected="true"] {
  color: var(--rs-navy) !important;
  background: transparent !important;
}
.restyle-2026 .comune-tabs__btn[aria-selected="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--rs-gold) 0%, #3A8FCC 100%);
}

/* === Panels === */
.restyle-2026 .comune-panel__lead {
  font-size: clamp(16px, 1.5vw, 18px) !important;
  color: var(--rs-ink-2) !important;
  line-height: 1.6 !important;
}
.restyle-2026 .comune-panel h2 { color: var(--rs-navy) !important; letter-spacing:-.01em; }

/* === Overview cards: profondità soft, hover, contrasto === */
.restyle-2026 .overview-grid { gap: 18px !important; }
.restyle-2026 .overview-card {
  background: var(--rs-surface) !important;
  border: 1px solid var(--rs-line) !important;
  border-radius: var(--rs-radius) !important;
  box-shadow: var(--rs-shadow) !important;
  padding: 22px !important;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.restyle-2026 .overview-card:hover,
.restyle-2026 .overview-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--rs-shadow-lg) !important;
  border-color: rgba(91,196,255,.55) !important;
}
.restyle-2026 .overview-card__icon {
  width: 56px !important; height: 56px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--rs-sand) 0%, #F3F9FF 100%) !important;
  display: grid !important; place-items: center !important;
  margin-bottom: 14px !important;
}
.restyle-2026 .overview-card__icon .ic-stroke { stroke: var(--rs-navy) !important; }
.restyle-2026 .overview-card__icon .acc-cyan,
.restyle-2026 .overview-card__icon .acc-cyan-fill { stroke: var(--rs-gold-deep) !important; fill: var(--rs-gold-deep) !important; }
.restyle-2026 .overview-card__title {
  color: var(--rs-navy) !important; font-weight: 700 !important; font-size: 17px !important; letter-spacing:-.01em;
}
.restyle-2026 .overview-card__desc { color: var(--rs-ink-2) !important; line-height: 1.55 !important; }

/* === Blocco "Per il turista" === */
.restyle-2026 .ic-tourism {
  background: var(--rs-surface) !important;
  border: 1px solid var(--rs-line) !important;
  border-radius: var(--rs-radius) !important;
  box-shadow: var(--rs-shadow) !important;
}
.restyle-2026 .ic-tourism__title { color: var(--rs-navy) !important; letter-spacing:-.01em; }
.restyle-2026 .ic-tourism__lead { color: var(--rs-ink-2) !important; font-size: 17px !important; }
.restyle-2026 .ic-tourism__h3 {
  color: var(--rs-navy) !important;
  font-size: 15px !important; text-transform: uppercase; letter-spacing:.06em;
}
.restyle-2026 .ic-tourism__h3::before {
  content:""; display:inline-block; width:18px; height:2px; vertical-align:middle;
  margin-right:10px; background: var(--rs-gold-deep); border-radius:2px;
}
.restyle-2026 .ic-tourism__monuments li { border-left: 3px solid rgba(91,196,255,.55) !important; }
.restyle-2026 .ic-tourism__route-meta-pill {
  background: var(--rs-sand) !important; color: var(--rs-navy) !important;
  border-radius: 999px !important; font-weight: 600;
}
.restyle-2026 .ic-tourism__audio-btn,
.restyle-2026 .ic-tourism__nav-btn {
  border-radius: 999px !important; min-height: 46px !important; font-weight: 700 !important;
  background: linear-gradient(135deg, var(--rs-navy) 0%, var(--rs-navy-2) 100%) !important;
  color: #fff !important; border: 0 !important;
  box-shadow: 0 8px 20px rgba(10,37,64,.18);
  transition: transform .14s ease, box-shadow .18s ease;
}
.restyle-2026 .ic-tourism__audio-btn:hover,
.restyle-2026 .ic-tourism__nav-btn:hover { transform: translateY(-2px); }
.restyle-2026 .ic-tourism__map-wrap .ic-tourism__map { border-radius: var(--rs-radius-sm) !important; overflow: hidden; }
.restyle-2026 .ic-tourism__draft-badge {
  background: var(--rs-gold-deep) !important; color: #fff !important; border-radius: 6px !important;
}

/* === Overview card: testo sempre a piena larghezza (anti "una-parola-per-riga") === */
.restyle-2026 .overview-card__title,
.restyle-2026 .overview-card__desc { width: 100% !important; align-self: stretch !important; white-space: normal !important; }

/* === Pannelli: ritmo verticale === */
.restyle-2026 .comune-panels { padding-top: 8px !important; }
.restyle-2026 .comune-panel { padding-bottom: 8px !important; }

/* === Sezioni interne (Uffici, Numeri utili, Scuole, ...) === */
.restyle-2026 .comune-section { margin: 0 0 40px !important; }
.restyle-2026 .comune-section > h2 {
  color: var(--rs-navy) !important;
  font-size: clamp(20px, 2.2vw, 26px) !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
  margin: 0 0 18px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--rs-line) !important;
  position: relative !important;
  display: flex !important; align-items: center !important; gap: 10px !important;
}
.restyle-2026 .comune-section > h2::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 36px; height: 2px; background: var(--rs-gold-deep); border-radius: 2px;
}
.restyle-2026 .section-icon { color: var(--rs-gold-deep) !important; }

/* === Liste informative (uffici comunali, numeri utili) → schede a griglia === */
.restyle-2026 .info-list { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid !important; gap: 14px !important; }
@media (min-width: 720px) { .restyle-2026 .info-list { grid-template-columns: 1fr 1fr !important; } }
.restyle-2026 .info-list > li {
  background: var(--rs-surface) !important;
  border: 1px solid var(--rs-line) !important;
  border-radius: var(--rs-radius-sm) !important;
  box-shadow: var(--rs-shadow) !important;
  padding: 16px 18px !important;
  transition: box-shadow .2s ease, border-color .2s ease, transform .16s ease !important;
}
.restyle-2026 .info-list > li:hover {
  box-shadow: var(--rs-shadow-lg) !important; border-color: rgba(91,196,255,.5) !important; transform: translateY(-2px);
}
.restyle-2026 .item-title { color: var(--rs-navy) !important; font-weight: 700 !important; font-size: 16px !important; margin-bottom: 6px !important; letter-spacing: -.005em !important; }
.restyle-2026 .item-meta { color: var(--rs-ink-2) !important; font-size: 14px !important; line-height: 1.55 !important; }
.restyle-2026 .item-meta a { color: var(--rs-gold-deep) !important; font-weight: 600 !important; text-decoration: none !important; }
.restyle-2026 .item-meta a:hover { text-decoration: underline !important; text-underline-offset: 2px !important; }

/* === Card scuole (e affini) — coerenti con le overview card === */
.restyle-2026 .scuola-card {
  background: var(--rs-surface) !important;
  border: 1px solid var(--rs-line) !important;
  border-radius: var(--rs-radius) !important;
  box-shadow: var(--rs-shadow) !important;
  transition: box-shadow .2s ease, border-color .2s ease, transform .16s ease !important;
}
.restyle-2026 .scuola-card:hover {
  box-shadow: var(--rs-shadow-lg) !important; border-color: rgba(91,196,255,.5) !important; transform: translateY(-3px);
}
.restyle-2026 .scuola-card__title { color: var(--rs-navy) !important; font-weight: 800 !important; font-size: 1.05rem !important; text-transform: uppercase !important; letter-spacing: .04em !important; line-height: 1.15 !important; }
.restyle-2026 .scuola-card__tipo,
.restyle-2026 .scuola-card__meta,
.restyle-2026 .scuola-card__addr { color: var(--rs-ink-2) !important; }
.restyle-2026 .scuola-card__icon { color: var(--rs-gold-deep) !important; }
.restyle-2026 .scuole-grid { gap: 16px !important; }
.restyle-2026 .scuole-gruppo__titolo { color: var(--rs-navy) !important; font-weight: 700 !important; }
.restyle-2026 .scuole-gruppo__count { color: var(--rs-ink-2) !important; }

/* === Tag / badge raffinati (pill) === */
.restyle-2026 .tag,
.restyle-2026 .badge,
.restyle-2026 .acc-badge,
.restyle-2026 .scuola-card__badge {
  border-radius: 999px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
}
.restyle-2026 .scuola-card__badge--pub { background: rgba(16,49,79,.08) !important; color: var(--rs-navy) !important; }
.restyle-2026 .scuola-card__badge--priv { background: var(--rs-sand) !important; color: var(--rs-gold-deep) !important; }

/* === Link "indicazioni / portami" e link card === */
.restyle-2026 .portami-link,
.restyle-2026 .scuola-card__link {
  color: var(--rs-gold-deep) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.restyle-2026 .portami-link:hover,
.restyle-2026 .scuola-card__link:hover { text-decoration: underline !important; text-underline-offset: 2px !important; }

/* === Rispetto delle preferenze di movimento ridotto === */
@media (prefers-reduced-motion: reduce) {
  .restyle-2026 * { transition: none !important; }
  .restyle-2026 .overview-card:hover,
  .restyle-2026 .ms-hero-btn:hover,
  .restyle-2026 .ic-tourism__nav-btn:hover,
  .restyle-2026 .info-list > li:hover,
  .restyle-2026 .scuola-card:hover { transform: none !important; }
}
