/* =====================================================================
   ic-theme-tokens.css  -  InfoComuni - Token system per tema chiaro/scuro
   Versione: 1.0  -  2026-04-19
   Scopo: centralizzare i colori in CSS custom properties e fornire un
   override coerente per body.theme-light / body.light.
   Caricare DOPO main.css e ic-overrides.css.
   ===================================================================== */

/* ---------- 1. Token defaults (DARK - coincide con lo stato attuale) -- */
:root,
body.theme-dark {
  /* Base */
  --ic-bg-app:            #0b1f35;
  --ic-fg-app:            #f1f5f9;
  --ic-fg-muted:          rgba(255,255,255,0.72);
  --ic-fg-subtle:         rgba(255,255,255,0.55);
  --ic-border-soft:       rgba(124,179,255,0.18);
  --ic-border-strong:     rgba(124,179,255,0.35);

  /* Topbar */
  --ic-topbar-bg:         rgba(9,34,58,0.92);
  --ic-topbar-fg:         #ffffff;
  --ic-topbar-link:       rgba(255,255,255,0.88);
  --ic-topbar-link-hover: #ffcc33;

  /* Hero */
  --ic-hero-bg:           linear-gradient(145deg,#09223a 0%,#0e2f4a 50%,#14466b 100%);
  --ic-hero-fg:           #ffffff;
  --ic-hero-sub:          rgba(255,255,255,0.85);

  /* Province pills (hero) */
  --ic-provpill-fg:       #ffffff;
  --ic-provpill-bg:       rgba(255,255,255,0.06);
  --ic-provpill-bd:       rgba(124,179,255,0.25);
  --ic-provdd-title:      #ffcc33;

  /* Search */
  --ic-search-bg:         rgba(0,0,0,0.35);
  --ic-search-fg:         #ffffff;
  --ic-search-ph:         rgba(255,255,255,0.55);
  --ic-search-bd:         rgba(255,255,255,0.12);

  /* Sezioni e card */
  --ic-section-title:     #ffffff;
  --ic-card-bg:           rgba(255,255,255,0.04);
  --ic-card-bd:           rgba(124,179,255,0.18);

  /* Cal - filtri categoria */
  --ic-tab-fg:            rgba(255,255,255,0.72);
  --ic-tab-bg:            rgba(255,255,255,0.04);
  --ic-tab-bd:            rgba(255,255,255,0.14);
  --ic-tab-fg-active:     #0e2f4a;
  --ic-tab-bg-active:     #ffcc33;

  /* Cal - pill provincia */
  --ic-pill-fg:           #cbd5e1;
  --ic-pill-bg:           rgba(255,255,255,0.04);
  --ic-pill-bd:           rgba(255,255,255,0.14);
  --ic-pill-fg-active:    #0e2f4a;
  --ic-pill-bg-active:    #ffcc33;

  /* Cal - griglia giorni */
  --ic-day-fg:            #e2e8f0;
  --ic-day-past:          rgba(226,232,240,0.45);
  --ic-day-other:         rgba(226,232,240,0.28);
  --ic-day-hover-bg:      rgba(255,255,255,0.06);
  --ic-dow-fg:            rgba(255,255,255,0.6);

  /* Cal - navigazione mese/anno */
  --ic-calnav-fg:         #ffffff;
  --ic-year-fg:           rgba(255,255,255,0.7);
  --ic-year-bg:           rgba(255,255,255,0.04);
  --ic-year-bd:           rgba(255,255,255,0.14);
  --ic-year-fg-active:    #0e2f4a;
  --ic-year-bg-active:    #ffcc33;

  /* Card evento */
  --ic-ev-card-bg:        rgba(255,255,255,0.04);
  --ic-ev-card-bd:        rgba(124,179,255,0.18);
  --ic-ev-title:          rgba(255,255,255,0.95);
  --ic-ev-desc:           rgba(255,255,255,0.82);
  --ic-ev-loc:            rgba(255,255,255,0.78);
  --ic-ev-prov-bg:        #1e3a5f;
  --ic-ev-prov-fg:        #ffffff;
  --ic-ev-daynum:         #ffcc33;
  --ic-ev-daymonth:       rgba(255,255,255,0.7);

  /* Pulsanti evento */
  --ic-btn-portami-fg:    #0e2f4a;
  --ic-btn-portami-bg:    #ffcc33;
  --ic-btn-portami-bd:    #ffcc33;
  --ic-btn-dettagli-fg:   #ffcc33;
  --ic-btn-dettagli-bg:   rgba(255,204,51,0.12);
  --ic-btn-dettagli-bd:   rgba(255,204,51,0.4);

  /* Mappa footer */
  --ic-mapfoot-bg:        rgba(255,255,255,0.04);
  --ic-mapfoot-bd:        rgba(124,179,255,0.2);
  --ic-mapfoot-fg:        rgba(255,255,255,0.85);
  --ic-mapfoot-disabled:  rgba(255,255,255,0.4);

  /* Pannello A11y */
  --ic-acc-bg:            #0e2f4a;
  --ic-acc-fg:            #ffffff;
  --ic-acc-bd:            rgba(124,179,255,0.25);
  --ic-acc-item-hover-bg: rgba(255,204,51,0.12);

  /* Meteo */
  --ic-meteo-bg:          rgba(255,255,255,0.04);
  --ic-meteo-bd:          rgba(124,179,255,0.18);
  --ic-meteo-fg:          #f1f5f9;
  --ic-meteo-title:       #ffffff;
  --ic-meteo-sub:         rgba(255,255,255,0.7);

  /* FAQ */
  --ic-faq-bg:            rgba(255,255,255,0.04);
  --ic-faq-bd:            rgba(124,179,255,0.18);
  --ic-faq-title:         #ffffff;
  --ic-faq-q-fg:          #ffffff;
  --ic-faq-a-fg:          rgba(255,255,255,0.85);
  --ic-faq-cat-fg:        rgba(255,255,255,0.72);
  --ic-faq-cat-bg:        rgba(255,255,255,0.04);
  --ic-faq-cat-bd:        rgba(255,255,255,0.14);
  --ic-faq-cat-fg-active: #0e2f4a;
  --ic-faq-cat-bg-active: #ffcc33;
}

/* ---------- 2. Light theme overrides ------------------------------- */
body.theme-light,
body.light {
  /* Base */
  --ic-bg-app:            #f6f8fb;
  --ic-fg-app:            #0e2f4a;
  --ic-fg-muted:          #334155;
  --ic-fg-subtle:         #64748b;
  --ic-border-soft:       #e2e8f0;
  --ic-border-strong:     #cbd5e1;

  /* Topbar */
  --ic-topbar-bg:         rgba(255,255,255,0.96);
  --ic-topbar-fg:         #0e2f4a;
  --ic-topbar-link:       #0e2f4a;
  --ic-topbar-link-hover: #b89100;

  /* Hero */
  --ic-hero-bg:           linear-gradient(145deg,#eef3f9 0%,#e3ecf5 50%,#d8e4f1 100%);
  --ic-hero-fg:           #0e2f4a;
  --ic-hero-sub:          #334155;

  /* Province pills (hero) */
  --ic-provpill-fg:       #0e2f4a;
  --ic-provpill-bg:       #ffffff;
  --ic-provpill-bd:       #cbd5e1;
  --ic-provdd-title:      #b78500;

  /* Search */
  --ic-search-bg:         #ffffff;
  --ic-search-fg:         #0e2f4a;
  --ic-search-ph:         #64748b;
  --ic-search-bd:         #cbd5e1;

  /* Sezioni e card */
  --ic-section-title:     #0e2f4a;
  --ic-card-bg:           #ffffff;
  --ic-card-bd:           #e2e8f0;

  /* Cal - filtri categoria */
  --ic-tab-fg:            #334155;
  --ic-tab-bg:            #ffffff;
  --ic-tab-bd:            #cbd5e1;
  --ic-tab-fg-active:     #0e2f4a;
  --ic-tab-bg-active:     #ffcc33;

  /* Cal - pill provincia */
  --ic-pill-fg:           #334155;
  --ic-pill-bg:           #ffffff;
  --ic-pill-bd:           #cbd5e1;
  --ic-pill-fg-active:    #0e2f4a;
  --ic-pill-bg-active:    #ffcc33;

  /* Cal - griglia giorni */
  --ic-day-fg:            #0e2f4a;
  --ic-day-past:          #94a3b8;
  --ic-day-other:         #cbd5e1;
  --ic-day-hover-bg:      #f1f5f9;
  --ic-dow-fg:            #64748b;

  /* Cal - navigazione mese/anno */
  --ic-calnav-fg:         #0e2f4a;
  --ic-year-fg:           #334155;
  --ic-year-bg:           #ffffff;
  --ic-year-bd:           #cbd5e1;
  --ic-year-fg-active:    #0e2f4a;
  --ic-year-bg-active:    #ffcc33;

  /* Card evento */
  --ic-ev-card-bg:        #ffffff;
  --ic-ev-card-bd:        #e2e8f0;
  --ic-ev-title:          #0e2f4a;
  --ic-ev-desc:           #334155;
  --ic-ev-loc:            #334155;
  --ic-ev-prov-bg:        #0e2f4a;
  --ic-ev-prov-fg:        #ffffff;
  --ic-ev-daynum:         #b78500;
  --ic-ev-daymonth:       #64748b;

  /* Pulsanti evento */
  --ic-btn-portami-fg:    #0e2f4a;
  --ic-btn-portami-bg:    #ffcc33;
  --ic-btn-portami-bd:    #e5b800;
  --ic-btn-dettagli-fg:   #0e2f4a;
  --ic-btn-dettagli-bg:   #fff4c2;
  --ic-btn-dettagli-bd:   #e5c84a;

  /* Mappa footer */
  --ic-mapfoot-bg:        #ffffff;
  --ic-mapfoot-bd:        #e2e8f0;
  --ic-mapfoot-fg:        #0e2f4a;
  --ic-mapfoot-disabled:  #94a3b8;

  /* Pannello A11y */
  --ic-acc-bg:            #ffffff;
  --ic-acc-fg:            #0e2f4a;
  --ic-acc-bd:            #cbd5e1;
  --ic-acc-item-hover-bg: #fff4c2;

  /* Meteo */
  --ic-meteo-bg:          #ffffff;
  --ic-meteo-bd:          #e2e8f0;
  --ic-meteo-fg:          #0e2f4a;
  --ic-meteo-title:       #0e2f4a;
  --ic-meteo-sub:         #475569;

  /* FAQ */
  --ic-faq-bg:            #ffffff;
  --ic-faq-bd:            #e2e8f0;
  --ic-faq-title:         #0e2f4a;
  --ic-faq-q-fg:          #0e2f4a;
  --ic-faq-a-fg:          #334155;
  --ic-faq-cat-fg:        #334155;
  --ic-faq-cat-bg:        #ffffff;
  --ic-faq-cat-bd:        #cbd5e1;
  --ic-faq-cat-fg-active: #0e2f4a;
  --ic-faq-cat-bg-active: #ffcc33;
}

/* ---------- 3. Mapping token -> selettori esistenti (tema chiaro) ---- */

/* Body di base */
body.theme-light,
body.light {
  background: var(--ic-bg-app) !important;
  color: var(--ic-fg-app) !important;
}

/* Topbar */
body.theme-light .site-header,
body.light    .site-header {
  background: var(--ic-topbar-bg) !important;
  color: var(--ic-topbar-fg) !important;
  border-bottom: 1px solid var(--ic-border-soft) !important;
  backdrop-filter: blur(8px);
}
body.theme-light .site-header__nav a,
body.light    .site-header__nav a,
body.theme-light .site-header__utils,
body.light    .site-header__utils,
body.theme-light .site-header__utils button,
body.light    .site-header__utils button {
  color: var(--ic-topbar-link) !important;
}
body.theme-light .site-header__nav a:hover,
body.light    .site-header__nav a:hover {
  color: var(--ic-topbar-link-hover) !important;
}
/* Swap logo: mostra dark su tema chiaro, nascondi light */
body.theme-light .site-header__logo--light,
body.light    .site-header__logo--light { display: none !important; }
body.theme-light .site-header__logo--dark,
body.light    .site-header__logo--dark  { display: inline-block !important; }

/* Hero */
body.theme-light .hero,
body.light    .hero {
  background-image: var(--ic-hero-bg) !important;
  color: var(--ic-hero-fg) !important;
}
body.theme-light .hero *,
body.light    .hero * {
  color: var(--ic-hero-fg);
}
body.theme-light .hero .hero-sub,
body.light    .hero .hero-sub,
body.theme-light .hero p,
body.light    .hero p {
  color: var(--ic-hero-sub) !important;
}
body.theme-light .hero--dark,
body.light    .hero--dark {
  background-image: var(--ic-hero-bg) !important;
}

/* Search bar */
body.theme-light .ic-search,
body.light    .ic-search,
body.theme-light .hero-search,
body.light    .hero-search {
  background: transparent !important;
}
body.theme-light .ic-search input,
body.light    .ic-search input,
body.theme-light #ic-search-input,
body.light    #ic-search-input,
body.theme-light .hero-search input,
body.light    .hero-search input {
  background: var(--ic-search-bg) !important;
  color: var(--ic-search-fg) !important;
  border: 1px solid var(--ic-search-bd) !important;
}
body.theme-light .ic-search input::placeholder,
body.light    .ic-search input::placeholder,
body.theme-light #ic-search-input::placeholder,
body.light    #ic-search-input::placeholder {
  color: var(--ic-search-ph) !important;
  opacity: 1;
}

/* Province pills nel hero (BARI/BAT/BRINDISI...) */
body.theme-light .prov-pill,
body.light    .prov-pill,
body.theme-light summary.prov-pill,
body.light    summary.prov-pill {
  color: var(--ic-provpill-fg) !important;
  background: var(--ic-provpill-bg) !important;
  border: 1px solid var(--ic-provpill-bd) !important;
}
body.theme-light .prov-pill small,
body.light    .prov-pill small,
body.theme-light .prov-pill svg,
body.light    .prov-pill svg {
  color: var(--ic-provpill-fg) !important;
  stroke: currentColor !important;
}
body.theme-light .prov-dd,
body.light    .prov-dd {
  background: #ffffff !important;
  border: 1px solid var(--ic-border-strong) !important;
  color: var(--ic-fg-app) !important;
}
body.theme-light .prov-dd *,
body.light    .prov-dd * {
  color: inherit !important;
}
body.theme-light .prov-dd-title,
body.light    .prov-dd-title {
  color: var(--ic-provdd-title) !important;
}

/* Section titles "Vivi la Puglia" ecc. */
body.theme-light .sec-title,
body.light    .sec-title,
body.theme-light .section-title,
body.light    .section-title,
body.theme-light h2,
body.light    h2 {
  color: var(--ic-section-title);
}

/* Calendar - tabs categoria (.cal-tab) */
body.theme-light .cal-tab,
body.light    .cal-tab {
  color: var(--ic-tab-fg) !important;
  background: var(--ic-tab-bg) !important;
  border-color: var(--ic-tab-bd) !important;
}
body.theme-light .cal-tab.active,
body.light    .cal-tab.active,
body.theme-light .cal-tab[aria-selected="true"],
body.light    .cal-tab[aria-selected="true"] {
  color: var(--ic-tab-fg-active) !important;
  background: var(--ic-tab-bg-active) !important;
  border-color: var(--ic-tab-bg-active) !important;
}

/* Calendar - pill provincia (.cal-prov-pill) */
body.theme-light .cal-prov-pill,
body.light    .cal-prov-pill {
  color: var(--ic-pill-fg) !important;
  background: var(--ic-pill-bg) !important;
  border: 1px solid var(--ic-pill-bd) !important;
}
body.theme-light .cal-prov-pill.is-active,
body.light    .cal-prov-pill.is-active,
body.theme-light .cal-prov-pill[aria-pressed="true"],
body.light    .cal-prov-pill[aria-pressed="true"] {
  color: var(--ic-pill-fg-active) !important;
  background: var(--ic-pill-bg-active) !important;
  border-color: var(--ic-pill-bg-active) !important;
}

/* Calendar - navigazione mese/anno */
body.theme-light .cal-nav,
body.light    .cal-nav {
  color: var(--ic-calnav-fg) !important;
}
body.theme-light .cal-nav button,
body.light    .cal-nav button {
  color: var(--ic-calnav-fg) !important;
  background: transparent !important;
}
body.theme-light .cal-year-btn,
body.light    .cal-year-btn {
  color: var(--ic-year-fg) !important;
  background: var(--ic-year-bg) !important;
  border: 1px solid var(--ic-year-bd) !important;
}
body.theme-light .cal-year-btn.active,
body.light    .cal-year-btn.active {
  color: var(--ic-year-fg-active) !important;
  background: var(--ic-year-bg-active) !important;
  border-color: var(--ic-year-bg-active) !important;
}

/* Calendar - griglia giorni */
body.theme-light .cal-day,
body.light    .cal-day,
body.theme-light .cal-day-num,
body.light    .cal-day-num {
  color: var(--ic-day-fg) !important;
}
body.theme-light .cal-day.past-day,
body.light    .cal-day.past-day,
body.theme-light .cal-day.past-day .cal-day-num,
body.light    .cal-day.past-day .cal-day-num {
  color: var(--ic-day-past) !important;
}
body.theme-light .cal-day.other-month,
body.light    .cal-day.other-month,
body.theme-light .cal-day.other-month .cal-day-num,
body.light    .cal-day.other-month .cal-day-num {
  color: var(--ic-day-other) !important;
}
body.theme-light .cal-day:hover,
body.light    .cal-day:hover {
  background: var(--ic-day-hover-bg) !important;
}
body.theme-light .cal-dow,
body.light    .cal-dow,
body.theme-light .cal-dows,
body.light    .cal-dows,
body.theme-light .cal-weekdays,
body.light    .cal-weekdays {
  color: var(--ic-dow-fg) !important;
}

/* Card evento */
body.theme-light .cal-ev,
body.light    .cal-ev,
body.theme-light .cal-ev-card,
body.light    .cal-ev-card {
  background: var(--ic-ev-card-bg) !important;
  border: 1px solid var(--ic-ev-card-bd) !important;
  color: var(--ic-ev-title) !important;
}
body.theme-light .cal-ev h4,
body.light    .cal-ev h4,
body.theme-light .cal-ev-body h4,
body.light    .cal-ev-body h4 {
  color: var(--ic-ev-title) !important;
}
body.theme-light .cal-ev-desc,
body.light    .cal-ev-desc {
  color: var(--ic-ev-desc) !important;
}
body.theme-light .cal-ev-loc,
body.light    .cal-ev-loc,
body.theme-light .cal-ev-loc *,
body.light    .cal-ev-loc * {
  color: var(--ic-ev-loc) !important;
}
body.theme-light .cal-ev-prov,
body.light    .cal-ev-prov {
  background: var(--ic-ev-prov-bg) !important;
  color: var(--ic-ev-prov-fg) !important;
}
body.theme-light .cal-ev-daynum,
body.light    .cal-ev-daynum {
  color: var(--ic-ev-daynum) !important;
}
body.theme-light .cal-ev-day,
body.light    .cal-ev-day,
body.theme-light .cal-ev-daymonth,
body.light    .cal-ev-daymonth {
  color: var(--ic-ev-daymonth) !important;
}

/* Bottoni evento */
body.theme-light .cal-ev-portami,
body.light    .cal-ev-portami {
  color: var(--ic-btn-portami-fg) !important;
  background: var(--ic-btn-portami-bg) !important;
  border: 1px solid var(--ic-btn-portami-bd) !important;
}
body.theme-light .cal-ev-dettagli,
body.light    .cal-ev-dettagli {
  color: var(--ic-btn-dettagli-fg) !important;
  background: var(--ic-btn-dettagli-bg) !important;
  border: 1px solid var(--ic-btn-dettagli-bd) !important;
}
body.theme-light .cal-ev-portami i,
body.light    .cal-ev-portami i,
body.theme-light .cal-ev-dettagli i,
body.light    .cal-ev-dettagli i {
  color: inherit !important;
}

/* Mappa footer - "Seleziona un evento" / "Portami" / "La mia posizione" */
body.theme-light .cal-map-footer,
body.light    .cal-map-footer {
  background: var(--ic-mapfoot-bg) !important;
  border-top: 1px solid var(--ic-mapfoot-bd) !important;
}
body.theme-light .cal-portami-btn,
body.light    .cal-portami-btn,
body.theme-light .cal-locate-btn,
body.light    .cal-locate-btn {
  color: var(--ic-mapfoot-fg) !important;
  background: transparent !important;
}
body.theme-light .cal-portami-btn[disabled],
body.light    .cal-portami-btn[disabled],
body.theme-light .cal-portami-btn:disabled,
body.light    .cal-portami-btn:disabled {
  color: var(--ic-mapfoot-disabled) !important;
  opacity: 1 !important;
}

/* Pannello A11y */
body.theme-light .acc-panel,
body.light    .acc-panel {
  background: var(--ic-acc-bg) !important;
  color: var(--ic-acc-fg) !important;
  border: 1px solid var(--ic-acc-bd) !important;
  box-shadow: 0 8px 24px rgba(15,26,48,0.12);
}
body.theme-light .acc-panel *,
body.light    .acc-panel * {
  color: inherit;
}
body.theme-light .acc-panel__title,
body.light    .acc-panel__title {
  color: var(--ic-acc-fg) !important;
}
body.theme-light .acc-panel__item,
body.light    .acc-panel__item {
  color: var(--ic-acc-fg) !important;
  background: transparent !important;
  border: 1px solid transparent;
}
body.theme-light .acc-panel__item:hover,
body.light    .acc-panel__item:hover {
  background: var(--ic-acc-item-hover-bg) !important;
}

/* Meteo widget */
body.theme-light .meteo,
body.light    .meteo,
body.theme-light .meteo-card,
body.light    .meteo-card,
body.theme-light .meteo-head,
body.light    .meteo-head {
  background: var(--ic-meteo-bg);
  border-color: var(--ic-meteo-bd);
  color: var(--ic-meteo-fg);
}
body.theme-light .meteo-head h2,
body.light    .meteo-head h2 {
  color: var(--ic-meteo-title) !important;
}
body.theme-light .meteo-sub,
body.light    .meteo-sub,
body.theme-light .meteo-source,
body.light    .meteo-source {
  color: var(--ic-meteo-sub) !important;
}

/* FAQ */
body.theme-light .faq,
body.light    .faq,
body.theme-light .faq-inner,
body.light    .faq-inner {
  background: var(--ic-faq-bg);
  color: var(--ic-faq-a-fg);
}
body.theme-light .faq h2,
body.light    .faq h2,
body.theme-light .faq-inner h2,
body.light    .faq-inner h2 {
  color: var(--ic-faq-title) !important;
}
body.theme-light .faq-item,
body.light    .faq-item {
  background: #ffffff !important;
  border: 1px solid var(--ic-faq-bd) !important;
  color: var(--ic-faq-a-fg) !important;
}
body.theme-light .faq-q,
body.light    .faq-q,
body.theme-light .faq-item > summary,
body.light    .faq-item > summary {
  color: var(--ic-faq-q-fg) !important;
}
body.theme-light .faq-a,
body.light    .faq-a {
  color: var(--ic-faq-a-fg) !important;
}
body.theme-light .faq-cat-btn,
body.light    .faq-cat-btn {
  color: var(--ic-faq-cat-fg) !important;
  background: var(--ic-faq-cat-bg) !important;
  border: 1px solid var(--ic-faq-cat-bd) !important;
}
body.theme-light .faq-cat-btn.active,
body.light    .faq-cat-btn.active {
  color: var(--ic-faq-cat-fg-active) !important;
  background: var(--ic-faq-cat-bg-active) !important;
  border-color: var(--ic-faq-cat-bg-active) !important;
}

/* ---------- 4. Safety net - correggi testi bianchi residui ---------- */
/* Intercetta regole rimaste che forzano bianco/grigio chiaro su sfondo
   bianco nelle aree identificate come card. Scope ristretto. */
body.theme-light .cal-ev,
body.light    .cal-ev,
body.theme-light .faq-item,
body.light    .faq-item,
body.theme-light .acc-panel,
body.light    .acc-panel {
  /* reset di color inherited indesiderato */
}
body.theme-light .cal-ev [style*="color:#fff"],
body.light    .cal-ev [style*="color:#fff"],
body.theme-light .cal-ev [style*="color:white"],
body.light    .cal-ev [style*="color:white"] {
  color: var(--ic-ev-title) !important;
}

/* ---------- 5. Nota manutenzione ------------------------------------ */
/* Quando si aggiungono nuovi componenti:
   1. definire il token in :root (dark)
   2. definirne l'override in body.theme-light
   3. applicare il token al selettore esistente con !important
   Non toccare i valori hardcoded in main.css; tutto resta riversibile
   rimuovendo il <link> a questo file. */

/* =============================================
   6. Fix transizioni CSS - tema chiaro
   =============================================*/
body.theme-light .cal-prov-pill,body.light .cal-prov-pill,
body.theme-light .cal-prov-pill.is-active,body.light .cal-prov-pill.is-active,
body.theme-light .cal-tab,body.light .cal-tab,
body.theme-light .cal-tab.active,body.light .cal-tab.active,
body.theme-light .cal-ev-dettagli,body.light .cal-ev-dettagli,
body.theme-light .cal-ev-portami,body.light .cal-ev-portami,
body.theme-light .cal-year-btn,body.light .cal-year-btn,
body.theme-light .cal-day,body.light .cal-day,
body.theme-light .faq-cat-btn,body.light .faq-cat-btn{transition:none !important;}

/* =============================================
   7. Hero dark preserved in light mode
   Il hero mantiene sfondo scuro anche in tema chiaro
   per preservare la leggibilita delle prov-pill bianche.
   =============================================*/
html.force-light body.theme-light .hero,
html.force-light body.theme-light .hero.hero--dark,
html.force-light body.theme-light .hero.hero--puglia-map,
body.theme-light .hero.hero--puglia-map,
body.light .hero.hero--puglia-map{background-image:linear-gradient(145deg,#09223a 0%,#0e2f4a 50%,#14466b 100%) !important;color:#fff !important;}
body.theme-light .hero.hero--puglia-map .hero-sub,
body.light .hero.hero--puglia-map .hero-sub,
body.theme-light .hero.hero--puglia-map p,
body.light .hero.hero--puglia-map p{color:rgba(255,255,255,0.85) !important;}

/* =============================================
   9. Header lang + Footer v2 - contrast fixes
   Header: selettore lingua navy su bianco.
   Footer: ripristinato scuro (era light gradient, rompeva
   tutti i testi bianchi/gialli ereditati dal dark theme).
   =============================================*/
html.force-light #ic-lang-dropdown > button,
body.theme-light #ic-lang-dropdown > button,
body.light #ic-lang-dropdown > button{
  color:#0e2f4a !important;
  background:#ffffff !important;
  border:1px solid #cbd5e1 !important;
}
html.force-light #ic-lang-dropdown > button:hover,
body.theme-light #ic-lang-dropdown > button:hover,
body.light #ic-lang-dropdown > button:hover{
  background:#f1f5f9 !important;
  border-color:#94a3b8 !important;
}
html.force-light #ic-lang-dropdown [role=menu],
body.theme-light #ic-lang-dropdown [role=menu]{
  background:#ffffff !important;
  color:#0e2f4a !important;
  border:1px solid #cbd5e1 !important;
}
html.force-light #ic-lang-dropdown [role=menu] *,
body.theme-light #ic-lang-dropdown [role=menu] *{
  color:#0e2f4a !important;
}
html.force-light #ic-lang-dropdown [role=menuitem]:hover,
body.theme-light #ic-lang-dropdown [role=menuitem]:hover{
  background:#fff4c2 !important;
}
html.force-light .site-footer-v2,
body.theme-light .site-footer-v2,
body.light .site-footer-v2{
  background:linear-gradient(180deg,#04101f 0%,#020812 100%) !important;
  background-image:linear-gradient(180deg,#04101f 0%,#020812 100%) !important;
  color:#e2e8f0 !important;
  border-top:1px solid rgba(124,179,255,0.18) !important;
}
html.force-light .site-footer-v2 *,
body.theme-light .site-footer-v2 *{
  color:inherit;
}
html.force-light .site-footer-v2 a:not(.brand-cta),
body.theme-light .site-footer-v2 a:not(.brand-cta){
  color:#e2e8f0 !important;
  text-decoration:none;
}
html.force-light .site-footer-v2 a:not(.brand-cta):hover,
body.theme-light .site-footer-v2 a:not(.brand-cta):hover{
  color:#ffffff !important;
  text-decoration:underline;
}
html.force-light .site-footer-v2 .contact-col-title,
body.theme-light .site-footer-v2 .contact-col-title,
html.force-light .site-footer-v2 .links-group-title,
body.theme-light .site-footer-v2 .links-group-title,
html.force-light .site-footer-v2 h1,
html.force-light .site-footer-v2 h2,
html.force-light .site-footer-v2 h3,
html.force-light .site-footer-v2 h4{
  color:#0b2340 !important;
  font-weight:700 !important;
}
html.force-light .site-footer-v2 .brand-cta,
body.theme-light .site-footer-v2 .brand-cta{
  color:#0b2340 !important;
  background:#c89b3c !important;
  border:1px solid #8a6518 !important;
  font-weight:700 !important;
}
html.force-light .site-footer-v2 .brand-cta:hover,
body.theme-light .site-footer-v2 .brand-cta:hover{
  background:#8a6518 !important;
  color:#ffffff !important;
}
html.force-light .site-footer-v2 .brand-cta:hover *,
body.theme-light .site-footer-v2 .brand-cta:hover *{
  color:#ffffff !important;
}
html.force-light .site-footer-v2 .brand-cta-text,
body.theme-light .site-footer-v2 .brand-cta-text{
  color:inherit !important;
}
html.force-light .site-footer-v2 .brand-cta-dot,
body.theme-light .site-footer-v2 .brand-cta-dot{
  background:#ffcc33 !important;
  box-shadow:0 0 0 3px rgba(255,204,51,0.25);
}
html.force-light .site-footer-v2 .footer-bottom,
body.theme-light .site-footer-v2 .footer-bottom,
html.force-light .site-footer-v2 small,
body.theme-light .site-footer-v2 small{
  color:#94a3b8 !important;
}

/* =============================================
   10. A11y finale - badge + order + back link
   =============================================*/
.comune-header__utils{display:flex;align-items:center;gap:8px;}
.comune-header__utils .comune-header__back{order:1;}
.comune-header__utils #ic-a11y-btn{order:2;}
.comune-header__back,
.comune-header__back:link,
.comune-header__back:visited,
.comune-header__back:hover,
.comune-header__back:focus,
.comune-header__back:active{
  color:#ffcc33 !important;
  background:rgba(255,204,51,0.12) !important;
  border:1px solid rgba(255,204,51,0.45) !important;
  font-weight:600 !important;
  text-decoration:none !important;
  padding:6px 12px !important;
  border-radius:999px !important;
}
.comune-header__back:hover,
.comune-header__back:focus{
  background:rgba(255,204,51,0.22) !important;
  color:#ffe57a !important;
  border-color:rgba(255,204,51,0.8) !important;
}
.comune-header__back span,
.comune-header__back i{
  color:inherit !important;
}
#ic-a11y-btn{
  position:relative !important;
}
#ic-a11y-btn::after{
  content:'';
  position:absolute;
  top:-2px;
  right:-2px;
  width:10px;
  height:10px;
  background:#ffcc33;
  border-radius:50%;
  border:2px solid #ffffff;
  box-shadow:0 0 0 1px rgba(0,0,0,0.08);
  pointer-events:none;
}
:root:not(.force-light) #ic-a11y-btn::after,
body.theme-dark #ic-a11y-btn::after{
  border-color:#09223a;
}

/* =============================================
   11. Polish - lang shadow + icon center + no dup
   =============================================*/
#ic-lang-dropdown > button{
  box-shadow:0 4px 14px -4px rgba(15,26,48,0.22),0 2px 6px -2px rgba(15,26,48,0.12) !important;
  transition:box-shadow 0.2s ease, transform 0.2s ease;
}
#ic-lang-dropdown > button:hover{
  box-shadow:0 6px 18px -4px rgba(15,26,48,0.28),0 3px 8px -2px rgba(15,26,48,0.16) !important;
  transform:translateY(-1px);
}
html.force-light #ic-lang-dropdown > button,
body.theme-light #ic-lang-dropdown > button{
  box-shadow:0 4px 14px -4px rgba(15,26,48,0.12),0 2px 6px -2px rgba(15,26,48,0.08) !important;
}
:root:not(.force-light) #ic-lang-dropdown > button{
  box-shadow:0 4px 14px -4px rgba(0,0,0,0.4),0 2px 6px -2px rgba(0,0,0,0.25) !important;
}
#ic-a11y-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
}
#ic-a11y-btn > svg{
  width:18px !important;
  height:18px !important;
  display:block;
  flex-shrink:0;
}
#a11y-close::after,
.a11y-close::after,
.a11y-header::after,
.a11y-header h3::after,
.a11y-panel .a11y-header button::after{
  content:none !important;
  display:none !important;
  background:transparent !important;
  border:0 !important;
}
#ic-a11y-panel.open ~ #ic-a11y-btn,
#ic-a11y-panel[aria-hidden="false"] ~ #ic-a11y-btn,
body.a11y-open #ic-a11y-btn{
  opacity:1;
  visibility:visible;
}

/* =============================================
   12. A11y specificity boost (id doubled)
   Per battere 'html.force-light #ic-a11y-btn' (spec 1,1,1)
   usiamo '#ic-a11y-btn#ic-a11y-btn' (spec 2,0,0).
   =============================================*/
#ic-a11y-btn#ic-a11y-btn{
  padding:0 !important;
  width:36px !important;
  min-width:36px !important;
  height:36px !important;
  min-height:36px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:0 !important;
  font-size:0 !important;
  border-radius:50% !important;
  position:relative !important;
  overflow:visible !important;
}
#ic-a11y-btn#ic-a11y-btn > svg{
  width:18px !important;
  height:18px !important;
  flex:0 0 auto !important;
  display:block !important;
  color:inherit !important;
}
#ic-a11y-btn#ic-a11y-btn::after{
  content:'' !important;
  position:absolute !important;
  top:-1px !important;
  right:-1px !important;
  width:9px !important;
  height:9px !important;
  background:#ffcc33 !important;
  border-radius:50% !important;
  border:2px solid var(--ic-topbar-bg,#09223a) !important;
  box-shadow:0 0 0 1px rgba(0,0,0,0.1) !important;
  pointer-events:none !important;
}
html.force-light #ic-a11y-btn#ic-a11y-btn::after,
body.theme-light #ic-a11y-btn#ic-a11y-btn::after{
  border-color:#ffffff !important;
}

/* =============================================
   13. Comune tabs readable (tab strip navy)
   La strip ha bg navy scuro; i tab inattivi erano
   navy scuro (1.2:1 invisibili). Forza testo chiaro.
   =============================================*/
html .comune-tabs__btn,
body .comune-tabs__btn,
html.force-light .comune-tabs__btn,
body.theme-light .comune-tabs__btn{
  color:rgba(255,255,255,0.82) !important;
  background:transparent !important;
  border:1px solid rgba(255,255,255,0.15) !important;
  font-weight:600 !important;
  padding:8px 14px !important;
  border-radius:8px !important;
  transition:background 0.18s, color 0.18s, border-color 0.18s !important;
}
html .comune-tabs__btn:hover,
body .comune-tabs__btn:hover,
html.force-light .comune-tabs__btn:hover,
body.theme-light .comune-tabs__btn:hover{
  color:#ffffff !important;
  background:rgba(255,204,51,0.12) !important;
  border-color:rgba(255,204,51,0.4) !important;
}
html .comune-tabs__btn[aria-selected="true"],
body .comune-tabs__btn[aria-selected="true"],
html.force-light .comune-tabs__btn[aria-selected="true"],
body.theme-light .comune-tabs__btn[aria-selected="true"],
html .comune-tabs__btn--home,
body .comune-tabs__btn--home{
  color:#0a1f3d !important;
  background:#ffcc33 !important;
  border-color:#ffcc33 !important;
  font-weight:700 !important;
}
html .comune-tabs__btn:focus-visible,
body .comune-tabs__btn:focus-visible{
  outline:2px solid #ffcc33 !important;
  outline-offset:2px !important;
}

/* =============================================
   14. Tabs override - exact selector priority
   Uso stessi selettori di ic-overrides ma caricati dopo.
   =============================================*/
:root.force-light .comune-tabs__btn,
:root .comune-tabs__btn,
.comune-tabs__btn.comune-tabs__btn{
  color:rgba(255,255,255,0.82) !important;
  background:transparent !important;
  border:1px solid rgba(255,255,255,0.18) !important;
  font-weight:600 !important;
  padding:8px 14px !important;
  border-radius:8px !important;
  transition:background 0.18s, color 0.18s, border-color 0.18s !important;
}
:root.force-light .comune-tabs__btn:hover,
:root .comune-tabs__btn:hover,
.comune-tabs__btn.comune-tabs__btn:hover{
  color:#ffffff !important;
  background:rgba(255,204,51,0.14) !important;
  border-color:rgba(255,204,51,0.5) !important;
}
:root.force-light .comune-tabs__btn[aria-selected="true"],
:root .comune-tabs__btn[aria-selected="true"],
.comune-tabs__btn.comune-tabs__btn[aria-selected="true"],
:root.force-light .comune-tabs__btn--home,
:root .comune-tabs__btn--home{
  color:#0a1f3d !important;
  background:#ffcc33 !important;
  border-color:#ffcc33 !important;
  font-weight:700 !important;
}

/* =============================================
   15. Polish v2 - breadcrumb + dedup a11y
   - Breadcrumb: niente piu link blu sottolineati
   - A11y: evita pulsanti duplicati visibili
   - Gap header utils
   =============================================*/
.breadcrumb,
nav.breadcrumb,
[aria-label='Percorso di navigazione']{
  color:rgba(255,255,255,0.7) !important;
  font-size:13px !important;
}
.breadcrumb a,
.breadcrumb a:link,
.breadcrumb a:visited,
nav.breadcrumb a,
nav.breadcrumb a:link,
nav.breadcrumb a:visited{
  color:#ffcc33 !important;
  text-decoration:none !important;
  font-weight:500 !important;
}
.breadcrumb a:hover,
.breadcrumb a:focus,
nav.breadcrumb a:hover,
nav.breadcrumb a:focus{
  color:#ffe57a !important;
  text-decoration:underline !important;
  text-decoration-color:rgba(255,204,51,0.6) !important;
}
.breadcrumb span:last-child,
nav.breadcrumb span:last-child{
  color:rgba(255,255,255,0.9) !important;
  font-weight:600 !important;
}
.comune-header__utils{
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
}
.comune-header__utils > *:not(.comune-header__back):not(#ic-a11y-btn){
  display:none !important;
}
#a11y-close,
.a11y-close{
  background:rgba(255,255,255,0.08) !important;
  border:1px solid rgba(255,255,255,0.2) !important;
  border-radius:50% !important;
  color:#ffffff !important;
  width:36px !important;
  height:36px !important;
  padding:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
#a11y-close::after,
.a11y-close::after,
#a11y-close::before,
.a11y-close::before{
  content:none !important;
  display:none !important;
  background:transparent !important;
  width:0 !important;
  height:0 !important;
}

/* =============================================
   16. Breadcrumb hero override - exact specificity
   Batte ':root.force-light .comune-hero .breadcrumb a'
   di ic-overrides.css (1,2,2 + important).
   =============================================*/
:root.force-light .comune-hero .breadcrumb a,
:root.force-light .comune-hero .breadcrumb a:link,
:root.force-light .comune-hero .breadcrumb a:visited,
:root .comune-hero .breadcrumb a,
.comune-hero--map .breadcrumb a,
.comune-hero .breadcrumb a{
  color:#ffd966 !important;
  text-decoration:none !important;
  font-weight:600 !important;
}
:root.force-light .comune-hero .breadcrumb a:hover,
:root.force-light .comune-hero .breadcrumb a:focus,
.comune-hero .breadcrumb a:hover,
.comune-hero .breadcrumb a:focus{
  color:#ffe89c !important;
  text-decoration:underline !important;
  text-decoration-color:rgba(255,204,51,0.6) !important;
}
:root.force-light .comune-hero .breadcrumb,
:root.force-light .comune-hero .breadcrumb span,
.comune-hero .breadcrumb,
.comune-hero .breadcrumb span{
  color:rgba(255,255,255,0.78) !important;
}
:root.force-light .comune-hero .breadcrumb span:last-child,
.comune-hero .breadcrumb span:last-child{
  color:#ffffff !important;
  font-weight:700 !important;
}

/* =============================================
   17. Dedupe ic-a11y-btn siblings
   accessibility-panel.js inietta un secondo ic-a11y-btn
   nelle pagine comune. CSS nasconde i duplicati.
   =============================================*/
#ic-a11y-btn ~ #ic-a11y-btn{display:none !important;}
[id='ic-a11y-btn'] ~ [id='ic-a11y-btn']{display:none !important;}
button#ic-a11y-btn ~ button#ic-a11y-btn{display:none !important;}
.comune-header__utils > #ic-a11y-btn:not(:first-of-type){display:none !important;}

/* =============================================
   18. Province pills (hero) - gradient navy + yellow accent
   Opzione C: profondita sobria, coerenza con hero.
   Delta luminanza ~20%, shadow soft, bordo giallo attenuato.
   =============================================*/
.prov-pill-wrap > summary.prov-pill,
html.force-dark .prov-pill-wrap > summary.prov-pill,
html:not(.force-light) .prov-pill-wrap > summary.prov-pill{
  background:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  background-image:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  border:1px solid rgba(255,204,51,0.35) !important;
  color:#ffffff !important;
  box-shadow:0 4px 16px -8px rgba(0,0,0,0.4),inset 0 1px 0 rgba(255,255,255,0.06) !important;
  transition:all .22s cubic-bezier(.2,.9,.2,1) !important;
  font-weight:600 !important;
  letter-spacing:0.02em !important;
}
.prov-pill-wrap > summary.prov-pill small,
html:not(.force-light) .prov-pill-wrap > summary.prov-pill small{
  color:#ffcc33 !important;
  font-weight:700 !important;
  margin-left:2px;
}
.prov-pill-wrap > summary.prov-pill:hover,
.prov-pill-wrap[open] > summary.prov-pill,
html:not(.force-light) .prov-pill-wrap > summary.prov-pill:hover,
html:not(.force-light) .prov-pill-wrap[open] > summary.prov-pill{
  background:linear-gradient(145deg,#1a5581 0%,#14466b 100%) !important;
  background-image:linear-gradient(145deg,#1a5581 0%,#14466b 100%) !important;
  border-color:#ffcc33 !important;
  transform:translateY(-1px);
  box-shadow:0 8px 22px -6px rgba(0,0,0,0.5),0 0 0 1px rgba(255,204,51,0.25),inset 0 1px 0 rgba(255,255,255,0.1) !important;
}
/* Light theme: gradient chiaro coerente con hero light */
html.force-light .prov-pill-wrap > summary.prov-pill,
body.theme-light .prov-pill-wrap > summary.prov-pill{
  background:linear-gradient(145deg,#ffffff 0%,#f1f5f9 100%) !important;
  background-image:linear-gradient(145deg,#ffffff 0%,#f1f5f9 100%) !important;
  border:1px solid rgba(184,145,0,0.4) !important;
  color:#0e2f4a !important;
  box-shadow:0 2px 10px -4px rgba(15,26,48,0.12),inset 0 1px 0 rgba(255,255,255,0.8) !important;
}
html.force-light .prov-pill-wrap > summary.prov-pill small,
body.theme-light .prov-pill-wrap > summary.prov-pill small{
  color:#b89100 !important;
  font-weight:700 !important;
}
html.force-light .prov-pill-wrap > summary.prov-pill:hover,
html.force-light .prov-pill-wrap[open] > summary.prov-pill{
  background:linear-gradient(145deg,#fff8dd 0%,#fff2b8 100%) !important;
  background-image:linear-gradient(145deg,#fff8dd 0%,#fff2b8 100%) !important;
  border-color:#b89100 !important;
  transform:translateY(-1px);
}

/* =============================================
   19. Prov pills spec boost (double class)
   Beats main.css '.prov-pill-wrap > summary.prov-pill'
   using repeated .prov-pill class = (0,2,1) specificity.
   =============================================*/
.prov-pill-wrap > summary.prov-pill.prov-pill{
  background:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  background-image:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  border:1px solid rgba(255,204,51,0.4) !important;
  border-color:rgba(255,204,51,0.4) !important;
  color:#ffffff !important;
  box-shadow:0 4px 16px -8px rgba(0,0,0,0.45),inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
.prov-pill-wrap > summary.prov-pill.prov-pill small{
  color:#ffcc33 !important;
  font-weight:700 !important;
}
.prov-pill-wrap > summary.prov-pill.prov-pill:hover,
.prov-pill-wrap[open] > summary.prov-pill.prov-pill{
  background:linear-gradient(145deg,#1a5581 0%,#14466b 100%) !important;
  background-image:linear-gradient(145deg,#1a5581 0%,#14466b 100%) !important;
  border-color:#ffcc33 !important;
  box-shadow:0 8px 22px -6px rgba(0,0,0,0.55),0 0 0 1px rgba(255,204,51,0.3),inset 0 1px 0 rgba(255,255,255,0.12) !important;
  transform:translateY(-1px);
}
/* Light mode con stessa specificita */
html.force-light .prov-pill-wrap > summary.prov-pill.prov-pill,
body.theme-light .prov-pill-wrap > summary.prov-pill.prov-pill{
  background:linear-gradient(145deg,#ffffff 0%,#f1f5f9 100%) !important;
  background-image:linear-gradient(145deg,#ffffff 0%,#f1f5f9 100%) !important;
  border:1px solid rgba(184,145,0,0.5) !important;
  border-color:rgba(184,145,0,0.5) !important;
  color:#0e2f4a !important;
  box-shadow:0 2px 12px -4px rgba(15,26,48,0.15),inset 0 1px 0 rgba(255,255,255,0.9) !important;
}
html.force-light .prov-pill-wrap > summary.prov-pill.prov-pill small,
body.theme-light .prov-pill-wrap > summary.prov-pill.prov-pill small{
  color:#b89100 !important;
}
html.force-light .prov-pill-wrap > summary.prov-pill.prov-pill:hover,
html.force-light .prov-pill-wrap[open] > summary.prov-pill.prov-pill,
body.theme-light .prov-pill-wrap > summary.prov-pill.prov-pill:hover{
  background:linear-gradient(145deg,#fff8dd 0%,#fff2b8 100%) !important;
  border-color:#b89100 !important;
  transform:translateY(-1px);
}

/* =============================================
   20. Search + dropdown coordinated with pills
   Stesso gradient navy + accent giallo delle pillole
   per continuita visiva nel hero.
   =============================================*/
.ic-search.ic-search input,
#ic-search-input#ic-search-input,
.hero-search.hero-search input{
  background:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  background-image:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  border:1.5px solid rgba(255,204,51,0.4) !important;
  color:#ffffff !important;
  box-shadow:0 4px 16px -8px rgba(0,0,0,0.5),inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
.ic-search.ic-search input:focus,
#ic-search-input#ic-search-input:focus,
.hero-search.hero-search input:focus{
  border-color:#ffcc33 !important;
  outline:none !important;
  box-shadow:0 6px 22px -6px rgba(0,0,0,0.6),0 0 0 3px rgba(255,204,51,0.18),inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
.ic-search.ic-search input::placeholder,
#ic-search-input#ic-search-input::placeholder{
  color:rgba(255,255,255,0.7) !important;
  opacity:1;
}
html.force-light .ic-search.ic-search input,
html.force-light #ic-search-input#ic-search-input,
body.theme-light .ic-search.ic-search input{
  background:linear-gradient(145deg,#ffffff 0%,#f1f5f9 100%) !important;
  background-image:linear-gradient(145deg,#ffffff 0%,#f1f5f9 100%) !important;
  border:1.5px solid rgba(184,145,0,0.45) !important;
  color:#0e2f4a !important;
  box-shadow:0 2px 12px -4px rgba(15,26,48,0.15),inset 0 1px 0 rgba(255,255,255,0.9) !important;
}
html.force-light .ic-search.ic-search input::placeholder,
body.theme-light .ic-search.ic-search input::placeholder{
  color:#64748b !important;
}
.prov-pill-wrap .prov-dd.prov-dd,
.prov-pill-wrap[open] .prov-dd.prov-dd{
  background:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  background-image:linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
  border:1px solid rgba(255,204,51,0.35) !important;
  color:#ffffff !important;
  box-shadow:0 12px 32px -8px rgba(0,0,0,0.55),inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
.prov-dd.prov-dd .prov-dd-title{
  color:#ffcc33 !important;
  border-bottom:1px solid rgba(255,204,51,0.2) !important;
  padding-bottom:8px;
  margin-bottom:8px;
  letter-spacing:0.04em;
}
.prov-dd.prov-dd .prov-dd-cap,
.prov-dd.prov-dd a{
  color:#ffffff !important;
  transition:background 0.15s, color 0.15s;
}
.prov-dd.prov-dd a:hover,
.prov-dd.prov-dd a:focus{
  background:rgba(255,204,51,0.15) !important;
  color:#ffcc33 !important;
}
.prov-dd.prov-dd .prov-dd-cap{
  background:#ffcc33 !important;
  color:#0a1f3d !important;
  font-weight:700 !important;
}
.prov-dd.prov-dd .prov-dd-cap:hover{
  background:#ffe066 !important;
  color:#0a1f3d !important;
}
html.force-light .prov-pill-wrap .prov-dd.prov-dd,
body.theme-light .prov-pill-wrap .prov-dd.prov-dd{
  background:linear-gradient(145deg,#ffffff 0%,#f8fafc 100%) !important;
  background-image:linear-gradient(145deg,#ffffff 0%,#f8fafc 100%) !important;
  border:1px solid rgba(184,145,0,0.4) !important;
  color:#0e2f4a !important;
  box-shadow:0 12px 32px -8px rgba(15,26,48,0.2),inset 0 1px 0 rgba(255,255,255,0.95) !important;
}
html.force-light .prov-dd.prov-dd a,
body.theme-light .prov-dd.prov-dd a{
  color:#0e2f4a !important;
}
html.force-light .prov-dd.prov-dd .prov-dd-title,
body.theme-light .prov-dd.prov-dd .prov-dd-title{
  color:#b89100 !important;
  border-bottom-color:rgba(184,145,0,0.25) !important;
}

/* =============================================
   21. Event cards - spacing + visited links fix
   - Fix :visited viola su PORTAMI e Dettagli
   - Ottimizzazione spaziature per densita info
   =============================================*/
.cal-ev-portami.cal-ev-portami,
.cal-ev-portami.cal-ev-portami:link,
.cal-ev-portami.cal-ev-portami:visited,
.cal-ev-portami.cal-ev-portami:hover,
.cal-ev-portami.cal-ev-portami:focus,
.cal-ev-portami.cal-ev-portami:active{
  color:#0e2f4a !important;
  background:#ffcc33 !important;
  border:1px solid #e5b800 !important;
  text-decoration:none !important;
}
.cal-ev-portami.cal-ev-portami:hover,
.cal-ev-portami.cal-ev-portami:focus{
  background:#ffe066 !important;
  border-color:#ffcc33 !important;
}
.cal-ev-dettagli.cal-ev-dettagli,
.cal-ev-dettagli.cal-ev-dettagli:link,
.cal-ev-dettagli.cal-ev-dettagli:visited,
.cal-ev-dettagli.cal-ev-dettagli:hover,
.cal-ev-dettagli.cal-ev-dettagli:focus,
.cal-ev-dettagli.cal-ev-dettagli:active{
  color:#ffcc33 !important;
  background:rgba(255,204,51,0.1) !important;
  border:1px solid rgba(255,204,51,0.4) !important;
  text-decoration:none !important;
}
.cal-ev-dettagli.cal-ev-dettagli:hover,
.cal-ev-dettagli.cal-ev-dettagli:focus{
  background:rgba(255,204,51,0.22) !important;
  border-color:#ffcc33 !important;
  color:#ffe066 !important;
}
html.force-light .cal-ev-dettagli.cal-ev-dettagli,
html.force-light .cal-ev-dettagli.cal-ev-dettagli:link,
html.force-light .cal-ev-dettagli.cal-ev-dettagli:visited,
html.force-light .cal-ev-dettagli.cal-ev-dettagli:hover,
body.theme-light .cal-ev-dettagli.cal-ev-dettagli,
body.theme-light .cal-ev-dettagli.cal-ev-dettagli:visited{
  color:#0e2f4a !important;
  background:#fff4c2 !important;
  border:1px solid #e5c84a !important;
}
.cal-ev.cal-ev{
  padding:14px 16px !important;
  gap:14px !important;
}
.cal-ev-body.cal-ev-body{
  padding:0 !important;
  gap:0 !important;
}
.cal-ev-body h4{
  margin:6px 0 4px 0 !important;
  line-height:1.25 !important;
  font-size:15px !important;
}
.cal-ev-desc{
  margin:2px 0 6px 0 !important;
  line-height:1.4 !important;
  font-size:12.5px !important;
}
.cal-ev-loc{
  margin:4px 0 8px 0 !important;
  font-size:12.5px !important;
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
}
.cal-ev-loc i{font-size:11px;}
.cal-ev-prov{
  margin-left:4px !important;
  padding:2px 7px !important;
  font-size:10.5px !important;
  letter-spacing:0.03em !important;
}
.cal-ev-tipo{
  margin-bottom:2px !important;
  padding:3px 9px !important;
  font-size:10.5px !important;
  letter-spacing:0.06em !important;
}
.cal-ev-portami,
.cal-ev-dettagli{
  margin-top:8px !important;
  padding:6px 12px !important;
  font-size:12px !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  border-radius:8px !important;
  font-weight:700 !important;
  letter-spacing:0.02em !important;
}
.cal-ev-portami + .cal-ev-dettagli{
  margin-left:6px !important;
}
.cal-ev-day{
  padding:0 12px 0 0 !important;
  min-width:48px !important;
  border-right:1px solid rgba(124,179,255,0.15) !important;
}
.cal-ev-daynum{
  font-size:24px !important;
  line-height:1 !important;
  font-weight:700 !important;
}
.cal-ev-daymonth{
  font-size:10.5px !important;
  letter-spacing:0.08em !important;
  margin-top:2px !important;
}

/* =============================================
   22. Mobile visibility safety net
   Garantisce che Prossimi Eventi + Mappa siano
   visibili su mobile e che le card si adattino.
   =============================================*/
@media (max-width: 1100px) {
  .cal-col-events, .cal-col-cal, .cal-col-map {
    display: flex !important;
    visibility: visible !important;
  }
  .cal-col-events { max-height: none !important; min-height: 320px !important; }
  .cal-col-map { min-height: 380px !important; }
}
@media (max-width: 700px) {
  .cal-col-events, .cal-col-cal, .cal-col-map {
    display: flex !important;
    visibility: visible !important;
    width: 100% !important;
  }
  .cal-col-events { max-height: none !important; min-height: 280px !important; }
  .cal-col-cal { min-height: 340px !important; }
  .cal-col-map { min-height: 320px !important; }
  .cal-ev.cal-ev {
    padding: 12px 12px !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }
  .cal-ev-day {
    min-width: 42px !important;
    padding: 0 10px 0 0 !important;
  }
  .cal-ev-daynum { font-size: 22px !important; }
  .cal-ev-body h4 { font-size: 14px !important; }
  .cal-ev-desc { font-size: 12px !important; }
  .cal-ev-portami, .cal-ev-dettagli {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
  }
  /* Force Leaflet map resize */
  .cal-col-map .leaflet-container,
  .cal-col-map > div {
    width: 100% !important;
    min-height: 280px !important;
  }
}
@media (max-width: 480px) {
  .cal-ev-day {
    min-width: 38px !important;
    padding: 0 8px 0 0 !important;
  }
  .cal-ev-daynum { font-size: 20px !important; }
  .cal-ev-body h4 { font-size: 13.5px !important; }
  .cal-ev.cal-ev { padding: 10px !important; gap: 8px !important; }
}

/* =============================================
   23. Mobile fix v2 - empty box fix
   Rimuove le min-height forzate della sezione 22
   che creavano box vuoti quando contenuto assente.
   Lascia solo max-height unset per evitare scroll.
   =============================================*/
@media (max-width: 1100px) {
  .cal-col-events { min-height: 0 !important; max-height: none !important; }
  .cal-col-cal { min-height: 0 !important; }
  .cal-col-map { min-height: 0 !important; }
}
@media (max-width: 700px) {
  .cal-col-events {
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  .cal-col-cal {
    min-height: 0 !important;
    height: auto !important;
  }
  .cal-col-map {
    min-height: 240px !important;
    height: auto !important;
  }
  .cal-col-map .leaflet-container {
    min-height: 240px !important;
  }
  .cal-trio {
    height: auto !important;
    grid-auto-rows: auto !important;
  }
}

/* =============================================
   24. CALTRIO mobile override
   ic-fixes.js forza grid-template-columns:360px 442px 442px
   con !important, che spinge events+map fuori viewport mobile.
   Uso doppia classe .cal-trio.cal-trio (spec 0,2,0) per battere.
   =============================================*/
@media (max-width: 1100px) {
  .cal-trio.cal-trio {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    height: auto !important;
  }
  .cal-col-events.cal-col-events { grid-column: 1 / -1 !important; order: 1 !important; max-height: none !important; min-height: 0 !important; }
  .cal-col-cal.cal-col-cal { order: 2 !important; min-height: 0 !important; }
  .cal-col-map.cal-col-map { order: 3 !important; min-height: 0 !important; }
}
@media (max-width: 700px) {
  .cal-trio.cal-trio {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    height: auto !important;
  }
  .cal-col-events.cal-col-events,
  .cal-col-cal.cal-col-cal,
  .cal-col-map.cal-col-map {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .cal-col-events.cal-col-events { order: 1 !important; }
  .cal-col-cal.cal-col-cal { order: 2 !important; }
  .cal-col-map.cal-col-map {
    order: 3 !important;
    min-height: 280px !important;
  }
  .cal-col-map.cal-col-map .leaflet-container,
  .cal-col-map.cal-col-map #calMap {
    width: 100% !important;
    min-height: 260px !important;
    height: 260px !important;
  }
}

/* =============================================
   25. Mobile map layout fix + Leaflet invalidate
   Spazio vuoto sopra DOVE + mappa Europa sono
   causati da container con min-height non sincronizzato
   con la Leaflet map interna.
   =============================================*/
@media (max-width: 700px) {
  .cal-col-map.cal-col-map {
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .cal-col-map.cal-col-map .cal-map-header {
    flex: 0 0 auto !important;
    padding: 10px 12px !important;
    margin: 0 !important;
  }
  .cal-col-map.cal-col-map #calMap,
  .cal-col-map.cal-col-map .leaflet-container {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 280px !important;
    min-height: 260px !important;
    max-height: 320px !important;
    margin: 0 !important;
  }
  .cal-col-map.cal-col-map .cal-map-footer {
    flex: 0 0 auto !important;
  }
}

/* =============================================
   26. Mobile search visibility + map size
   main.css nasconde #ic-search-bar > div:first-child;
   su mobile la dynamic search bar (second child)
   non si renderizza correttamente. Mostro l'input originale.
   =============================================*/
@media (max-width: 700px) {
  /* Ripristina search input fallback come visibile */
  #ic-search-bar > div:first-child {
    display: block !important;
    width: 100% !important;
  }
  #ic-search-bar > div:first-child input {
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 10px 16px 10px 44px !important;
    background: linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
    background-image: linear-gradient(145deg,#14466b 0%,#0e2f4a 100%) !important;
    border: 1.5px solid rgba(255,204,51,0.4) !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    display: block !important;
    outline: none;
  }
  #ic-search-bar > div:first-child input::placeholder {
    color: rgba(255,255,255,0.7) !important;
  }
  #ic-search-bar > div:first-child input:focus {
    border-color: #ffcc33 !important;
    box-shadow: 0 0 0 3px rgba(255,204,51,0.18) !important;
  }
  /* Il dynamic render (second child) nasconde se vuoto */
  #ic-search-bar > div:nth-child(2):empty { display: none !important; }
  #ic-search-bar { margin: 16px 0 !important; padding: 0 12px !important; }

  /* Fix altezza cal-col-map children */
  .cal-col-map.cal-col-map {
    height: auto !important;
    max-height: none !important;
  }
  .cal-col-map.cal-col-map > .cal-map-header {
    height: auto !important;
    min-height: 0 !important;
    max-height: 50px !important;
    flex: 0 0 auto !important;
  }
  .cal-col-map.cal-col-map > .cal-map-footer {
    height: auto !important;
    min-height: 0 !important;
    max-height: 60px !important;
    flex: 0 0 auto !important;
  }
  .cal-col-map.cal-col-map > #calMap,
  .cal-col-map.cal-col-map > .leaflet-container {
    flex: 0 0 280px !important;
    height: 280px !important;
    min-height: 260px !important;
    max-height: 280px !important;
  }
}

/* =============================================
   27. Mobile layout reorder + 2 events + expand
   Ordine mobile: Calendario -> Eventi (max 2) -> Mappa
   Toggle expand per vedere tutti gli eventi del mese.
   =============================================*/
@media (max-width: 700px) {
  /* Ordine mobile: cal -> events -> map */
  .cal-col-cal.cal-col-cal { order: 1 !important; }
  .cal-col-events.cal-col-events { order: 2 !important; }
  .cal-col-map.cal-col-map { order: 3 !important; }

  /* Nascondi eventi oltre i primi 2 quando NON espanso */
  .cal-col-events:not(.ic-expanded) .cal-evlist > .cal-ev:nth-child(n+3),
  .cal-col-events:not(.ic-expanded) > .cal-ev:nth-child(n+3) {
    display: none !important;
  }

  /* Container del toggle */
  .ic-events-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(145deg,#14466b 0%,#0e2f4a 100%);
    color: #ffcc33;
    border: 1px solid rgba(255,204,51,0.4);
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s;
  }
  .ic-events-toggle:hover {
    background: linear-gradient(145deg,#1a5581 0%,#14466b 100%);
    border-color: #ffcc33;
  }
  .ic-events-toggle .chev { transition: transform .2s; display: inline-block; }
  .cal-col-events.ic-expanded .ic-events-toggle .chev { transform: rotate(180deg); }
  /* Hide toggle on desktop */
}
@media (min-width: 701px) {
  .ic-events-toggle { display: none !important; }
}

/* =============================================
   28. Mobile 2-events fix selector
   Il container reale e .cal-events-scroll, non .cal-evlist.
   =============================================*/
@media (max-width: 700px) {
  .cal-col-events:not(.ic-expanded) .cal-events-scroll > .cal-ev:nth-child(n+3) {
    display: none !important;
  }
  .cal-col-events.ic-expanded .cal-events-scroll > .cal-ev {
    display: flex !important;
  }
  .cal-col-events .cal-events-scroll {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* =============================================
   29. Mobile preview events date-aware
   Mostra solo gli eventi con classe .ic-preview
   (calcolati dal JS come i piu vicini a oggi).
   =============================================*/
@media (max-width: 700px) {
  /* Hide all events when not expanded */
  .cal-col-events:not(.ic-expanded) .cal-events-scroll > .cal-ev {
    display: none !important;
  }
  /* Show only preview events */
  .cal-col-events:not(.ic-expanded) .cal-events-scroll > .cal-ev.ic-preview {
    display: flex !important;
  }
  /* Expanded: show all */
  .cal-col-events.ic-expanded .cal-events-scroll > .cal-ev {
    display: flex !important;
  }
  /* Preview highlight: border piu evidente giallo */
  .cal-col-events:not(.ic-expanded) .cal-ev.ic-preview {
    border: 1px solid rgba(255,204,51,0.35) !important;
    box-shadow: 0 4px 14px -6px rgba(255,204,51,0.25) !important;
  }
}

/* =============================================
   30. Mobile font maximize
   Font-size aumentato al massimo dove c'e spazio
   =============================================*/
@media (max-width: 700px) {
  /* Header col */
  .cal-col-events .cal-col-header,
  .cal-col-map .cal-map-header {
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
  }
  /* Provincia filters label */
  .cal-prov-filters { font-size: 13px !important; }
  .cal-prov-pill { font-size: 13px !important; padding: 5px 11px !important; }
  /* Event card */
  .cal-ev.cal-ev .cal-ev-body h4 { font-size: 16px !important; line-height: 1.28 !important; }
  .cal-ev-desc { font-size: 13.5px !important; line-height: 1.42 !important; }
  .cal-ev-loc { font-size: 13.5px !important; font-weight: 500 !important; }
  .cal-ev-tipo { font-size: 11.5px !important; padding: 4px 10px !important; letter-spacing: 0.06em !important; }
  .cal-ev-prov { font-size: 11px !important; padding: 3px 8px !important; font-weight: 700 !important; }
  .cal-ev-daynum { font-size: 26px !important; font-weight: 800 !important; }
  .cal-ev-daymonth { font-size: 12px !important; letter-spacing: 0.1em !important; font-weight: 700 !important; }
  /* Bottoni evento */
  .cal-ev-portami, .cal-ev-dettagli { font-size: 13px !important; padding: 7px 13px !important; font-weight: 700 !important; }
  /* Toggle button */
  .ic-events-toggle { font-size: 14px !important; padding: 13px 16px !important; }
  .ic-events-toggle .lbl { font-weight: 700 !important; }
  /* Calendar */
  .cal-day, .cal-day-num { font-size: 15px !important; font-weight: 700 !important; }
  .cal-dow, .cal-dows, .cal-weekdays { font-size: 12px !important; font-weight: 700 !important; letter-spacing: 0.06em !important; }
  /* Event legend */
  .cal-legend, .cal-dots-legend { font-size: 12px !important; line-height: 1.6 !important; }
  .cal-legend span, .cal-dots-legend span { font-weight: 500 !important; }
  /* Cal tabs category */
  .cal-tab { font-size: 12.5px !important; padding: 6px 11px !important; font-weight: 700 !important; letter-spacing: 0.04em !important; }
  /* Cal-top title */
  .cal-top-left h2 { font-size: 22px !important; font-weight: 800 !important; }
  /* Year toggle */
  .cal-year-btn { font-size: 13px !important; padding: 5px 11px !important; }
  /* Counter numbers */
  .cal-counter .cc-num { font-size: 20px !important; font-weight: 800 !important; }
  .cal-counter .cc-lbl { font-size: 11px !important; font-weight: 600 !important; letter-spacing: 0.08em !important; }
}

/* =============================================
   31. Mobile header + calendar final polish
   =============================================*/
@media (max-width: 700px) {
  .site-header__logo { height: 28px !important; width: auto !important; }
  .site-header { padding: 10px 14px !important; min-height: 52px !important; }
  .site-header__inner { gap: 10px !important; }
  #ic-lang-dropdown > button { font-size: 14px !important; padding: 6px 12px !important; height: 36px !important; min-height: 36px !important; font-weight: 600 !important; }
  .hero p, .hero .hero-sub, .hero-counters, .hero-content p {
    font-size: 13.5px !important; font-weight: 500 !important;
    letter-spacing: 0.02em !important; line-height: 1.5 !important;
  }
  .prov-pill-wrap > summary.prov-pill {
    padding: 10px 14px !important; font-size: 15px !important;
    font-weight: 700 !important; letter-spacing: 0.04em !important;
    min-height: 44px !important;
  }
  .prov-pill-wrap > summary.prov-pill small {
    font-size: 14px !important; font-weight: 800 !important;
  }
  .prov-pill-wrap > summary.prov-pill svg.prov-pill__chev {
    width: 16px !important; height: 16px !important;
  }
  .cal-nav, .cal-nav > * { font-size: 17px !important; font-weight: 700 !important; }
  .cal-nav-btn { width: 36px !important; height: 36px !important; min-width: 36px !important; }
  .cal-nav-btn i, .cal-nav-btn svg { font-size: 14px !important; width: 14px !important; height: 14px !important; }
  .cal-year-btn { font-size: 14px !important; padding: 7px 14px !important; font-weight: 700 !important; min-height: 36px !important; }
  .cal-dow, .cal-dows > *, .cal-weekdays > * { font-size: 13px !important; font-weight: 700 !important; letter-spacing: 0.08em !important; padding: 8px 0 !important; }
  .cal-day .cal-day-num { font-size: 17px !important; font-weight: 700 !important; letter-spacing: 0 !important; }
  .cal-day { min-height: 54px !important; padding: 6px 0 !important; }
  .cal-day.today .cal-day-num, .cal-day.is-today .cal-day-num {
    font-size: 18px !important; font-weight: 900 !important;
  }
  .cal-legend, .cal-dots-legend { font-size: 13px !important; line-height: 1.7 !important; padding: 10px 12px !important; }
  .cal-top-left h2, h2.sec-title {
    font-size: 24px !important; font-weight: 800 !important; letter-spacing: -0.01em !important;
  }
  #ic-search-bar > div:first-child input {
    min-height: 50px !important; height: 50px !important; font-size: 16px !important;
  }
}

/* =============================================
   32. Overview navigable map (sotto cards)
   =============================================*/
a.overview-card[href="#mappa"],
a.overview-card[data-tab="mappa"] { display: none !important; }
#ic-nav-map-wrapper { grid-column: 1 / -1 !important; margin-top: 20px; padding: 0; }
#ic-nav-map-wrapper .ic-nav-map-title { font-size: 18px; font-weight: 700; color: #ffcc33; margin: 0 0 12px 0; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
html.force-light #ic-nav-map-wrapper .ic-nav-map-title, body.theme-light #ic-nav-map-wrapper .ic-nav-map-title { color: #b78500; }
#ic-nav-map { width: 100%; height: 380px; border-radius: 14px; border: 1px solid rgba(255,204,51,0.4); box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5); overflow: hidden; background: #0e2f4a; }
@media (max-width: 700px) { #ic-nav-map { height: 320px; border-radius: 12px; } #ic-nav-map-wrapper .ic-nav-map-title { font-size: 16px; } }
.ic-navmap-attrib { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 6px; }

/* =============================================
   33. Overview flipbook inline + fullscreen
   =============================================*/
#ic-flipbook-wrapper {
  grid-column: 1 / -1 !important;
  margin-top: 20px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,204,51,0.3);
  border-radius: 16px;
}
#ic-flipbook-wrapper .ic-flip-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffcc33;
  margin: 0 0 6px 0;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
html.force-light #ic-flipbook-wrapper .ic-flip-title,
body.theme-light #ic-flipbook-wrapper .ic-flip-title { color: #b78500; }
#ic-flipbook-wrapper .ic-flip-lead {
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  margin: 0 0 14px 0;
  line-height: 1.5;
}
html.force-light #ic-flipbook-wrapper .ic-flip-lead,
body.theme-light #ic-flipbook-wrapper .ic-flip-lead { color: #334155; }
#ic-flipbook-wrapper iframe.ic-flip-frame {
  width: 100%;
  height: 520px;
  border: 0;
  border-radius: 10px;
  display: block;
  background: #0e2f4a;
}
@media (max-width: 700px) {
  #ic-flipbook-wrapper { padding: 14px; }
  #ic-flipbook-wrapper iframe.ic-flip-frame { height: 360px; }
  #ic-flipbook-wrapper .ic-flip-title { font-size: 16px; }
}
.ic-flip-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 16px;
  background: #ffcc33;
  color: #0a1f3d;
  border: 1px solid #e5b800;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .18s;
}
.ic-flip-fullscreen-btn:hover { background: #ffe066; transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(255,204,51,0.5); }
.ic-flip-fullscreen-btn svg { width: 16px; height: 16px; }
/* Fullscreen overlay */
#ic-flip-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10,31,61,0.96);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  padding: 60px 20px 20px 20px;
}
#ic-flip-modal.is-open { display: flex; }
#ic-flip-modal iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: #0e2f4a;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
#ic-flip-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffcc33;
  color: #0a1f3d;
  border: 2px solid #0a1f3d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  transition: all .18s;
  z-index: 100000;
}
#ic-flip-modal-close:hover { background: #ffe066; transform: scale(1.06); }
#ic-flip-modal-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 700px) {
  #ic-flip-modal { padding: 56px 8px 12px 8px; }
  #ic-flip-modal-close { top: 8px; right: 8px; width: 40px; height: 40px; font-size: 20px; }
}
