/* ============================================================
   InfoComuni · Footer v3 (28-04-2026 h01:30)
   Pulito, in flusso normale, AGID-compliant, responsive.
   Nessun position fixed/sticky/absolute. Specificity controllata.
   ============================================================ */

.ic-footer-v3 {
  background-color: #0a1525 !important;
  background-image: linear-gradient(180deg, #0a1525 0%, #06101e 100%) !important;
  color: #e2e8f0 !important;
  border-top: 3px solid #ffcc33 !important;
  padding: 56px 0 0 !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  position: static !important;
  z-index: 1 !important;
  margin-top: 64px !important;
}

.ic-footer-v3 *,
.ic-footer-v3 *::before,
.ic-footer-v3 *::after { box-sizing: border-box; }

.ic-footer-v3__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Colonne === */
.ic-footer-v3__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}

/* Variante simmetrica (29-04 hero fix) === 4 colonne con divider verticale tra brand e contatti */
.ic-footer-v3--symmetric .ic-footer-v3__cols {
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 8px 0 36px;
  align-items: start;
}
.ic-footer-v3--symmetric .ic-footer-v3__col--contact {
  position: relative;
  padding-left: 48px;
}
.ic-footer-v3--symmetric .ic-footer-v3__col--contact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(255,255,255,0.12);
}

@media (max-width: 960px) {
  .ic-footer-v3__cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ic-footer-v3--symmetric .ic-footer-v3__cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ic-footer-v3--symmetric .ic-footer-v3__col--brand { grid-column: 1 / -1; }
  .ic-footer-v3--symmetric .ic-footer-v3__col--contact { padding-left: 0; }
  .ic-footer-v3--symmetric .ic-footer-v3__col--contact::before { display: none; }
}
@media (max-width: 560px) {
  .ic-footer-v3__cols { grid-template-columns: 1fr; gap: 28px; }
  .ic-footer-v3--symmetric .ic-footer-v3__cols { grid-template-columns: 1fr; gap: 28px; }
  .ic-footer-v3 { padding: 40px 0 0; margin-top: 40px; }
}

.ic-footer-v3__col {
  min-width: 0;
  background-color: transparent !important;
  background-image: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
}
.ic-footer-v3 section,
.ic-footer-v3 nav {
  background-color: transparent !important;
  background-image: none !important;
}
/* Forza i testi del footer a essere chiari */
.ic-footer-v3,
.ic-footer-v3 *:not(a):not(button):not(.ic-footer-v3__cta) {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

/* === Brand col === */
.ic-footer-v3__brand {
  display: inline-block;
  margin-bottom: 16px;
}
.ic-footer-v3__brand img {
  height: 48px;
  width: auto;
  max-width: 100%;
  display: block;
}
.ic-footer-v3__lead {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #c8d4dc;
}
.ic-footer-v3__lead strong { color: #ffcc33; font-weight: 600; }
.ic-footer-v3__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffcc33;
  color: #0b2340;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 999px;
  border: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ic-footer-v3__cta:hover,
.ic-footer-v3__cta:focus-visible {
  background: #ffd555;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 204, 51, 0.35);
  color: #0b2340;
  text-decoration: none;
}

/* === Titoli === */
.ic-footer-v3__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffcc33;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* === Liste link === */
.ic-footer-v3__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ic-footer-v3__list a {
  display: inline-block;
  color: #d4dde4; /* contrasto >= 7:1 su #0a1525 */
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.15s ease, padding-left 0.15s ease;
}
.ic-footer-v3__list a:hover,
.ic-footer-v3__list a:focus-visible {
  color: #ffcc33;
  padding-left: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* === Address === */
.ic-footer-v3__addr {
  font-style: normal;
  margin: 0 0 16px;
  color: #c8d4dc;
}
.ic-footer-v3__addr strong {
  color: #fff;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 2px;
}
.ic-footer-v3__addr a {
  color: #ffd66e;
  text-decoration: none;
}
.ic-footer-v3__addr a:hover { text-decoration: underline; }

/* === Social === */
.ic-footer-v3__social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ic-footer-v3__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d4dde4;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.ic-footer-v3__social a:hover,
.ic-footer-v3__social a:focus-visible {
  background: #ffcc33;
  color: #0b2340;
  transform: translateY(-2px);
}

/* === Bar inferiore === */
.ic-footer-v3__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #9caab7;
}
.ic-footer-v3__copy { margin: 0; }
.ic-footer-v3__copy strong { color: #ffcc33; }
.ic-footer-v3__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.ic-footer-v3__legal a {
  color: #c8d4dc;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}
.ic-footer-v3__legal a:hover,
.ic-footer-v3__legal a:focus-visible {
  color: #ffcc33;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .ic-footer-v3__bar { flex-direction: column; align-items: flex-start; padding: 16px 0; }
  .ic-footer-v3__legal { gap: 4px 14px; }
}

/* === Footer SEMPRE dark per branding consistency, anche in tema chiaro ===
   Le regole sotto sovrascrivono qualsiasi force-light per il footer */
html.force-light .ic-footer-v3,
html[data-theme="light"] .ic-footer-v3,
body.theme-light .ic-footer-v3 {
  background-color: #0a1525 !important;
  background-image: linear-gradient(180deg, #0a1525 0%, #06101e 100%) !important;
  color: #e2e8f0 !important;
  border-top: 3px solid #ffcc33 !important;
}
html.force-light .ic-footer-v3 *,
body.theme-light .ic-footer-v3 *,
html[data-theme="light"] .ic-footer-v3 * {
  color: inherit;
}
html.force-light .ic-footer-v3__lead,
body.theme-light .ic-footer-v3__lead,
html.force-light .ic-footer-v3__addr,
body.theme-light .ic-footer-v3__addr { color: #c8d4dc !important; }
html.force-light .ic-footer-v3__list a,
body.theme-light .ic-footer-v3__list a,
html.force-light .ic-footer-v3__legal a,
body.theme-light .ic-footer-v3__legal a { color: #d4dde4 !important; }
html.force-light .ic-footer-v3__list a:hover,
body.theme-light .ic-footer-v3__list a:hover,
html.force-light .ic-footer-v3__legal a:hover,
body.theme-light .ic-footer-v3__legal a:hover { color: #ffcc33 !important; }
html.force-light .ic-footer-v3__title,
body.theme-light .ic-footer-v3__title { color: #ffcc33 !important; border-bottom-color: rgba(255,255,255,0.08) !important; }
html.force-light .ic-footer-v3__bar,
body.theme-light .ic-footer-v3__bar { border-top-color: rgba(255,255,255,0.08) !important; color: #9caab7 !important; }
html.force-light .ic-footer-v3__social a,
body.theme-light .ic-footer-v3__social a { background: rgba(255,255,255,0.06) !important; color: #d4dde4 !important; }
html.force-light .ic-footer-v3__cta,
body.theme-light .ic-footer-v3__cta { background: #ffcc33 !important; color: #0b2340 !important; }
html.force-light .ic-footer-v3__addr a,
body.theme-light .ic-footer-v3__addr a { color: #ffd66e !important; }
html.force-light .ic-footer-v3__lead strong,
body.theme-light .ic-footer-v3__lead strong { color: #ffcc33 !important; }
html.force-light .ic-footer-v3__copy strong,
body.theme-light .ic-footer-v3__copy strong { color: #ffcc33 !important; }

/* === Logo footer: usa versione chiara === */
.ic-footer-v3__brand img {
  height: 56px !important;
  width: auto !important;
  max-width: 220px !important;
  filter: brightness(0) invert(1); /* Forza a bianco anche se è il logo blu */
}
@media (max-width: 560px) {
  .ic-footer-v3__brand img { height: 48px !important; }
}

/* ============================================================
   Footer simmetrico v3.1 (29-04-2026) — match screenshot target
   - chevron triangolare prima dei link
   - sottolineatura gold full-width sotto i titoli
   - dot bullet nel CTA "Attiva il tuo Comune"
   - social row centrata con divider orizzontali
   - bar con copyright sx + legal dx
   ============================================================ */

/* Titolo: sottolineatura gold sottile full-width (target screenshot) */
.ic-footer-v3--symmetric .ic-footer-v3__title {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  color: #ffcc33 !important;
  margin: 0 0 18px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid rgba(255, 204, 51, 0.28) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

/* Lista con chevron triangolare prima del link */
.ic-footer-v3__list--chevron { gap: 10px !important; }
.ic-footer-v3__list--chevron li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ic-footer-v3__list--chevron li::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent #ffcc33;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.ic-footer-v3__list--chevron li:hover::before,
.ic-footer-v3__list--chevron li:focus-within::before {
  transform: translateX(2px);
}
.ic-footer-v3__list--chevron a {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #e2e8f0 !important;
  padding: 0 !important;
}
.ic-footer-v3__list--chevron a:hover,
.ic-footer-v3__list--chevron a:focus-visible {
  padding-left: 0 !important;
  color: #ffcc33 !important;
}

/* Indirizzo formattato come target screenshot */
.ic-footer-v3--symmetric .ic-footer-v3__addr {
  line-height: 1.85 !important;
  font-size: 14px !important;
}
.ic-footer-v3--symmetric .ic-footer-v3__addr strong {
  color: #ffffff !important;
  font-size: 15px !important;
}
.ic-footer-v3--symmetric .ic-footer-v3__addr a {
  color: #ffcc33 !important;
  font-weight: 500 !important;
}

/* CTA "Attiva il tuo Comune": pill outline gold con dot sx
   NOTA specificity: html.force-light .ic-footer-v3__cta (0,2,1) batte
   .ic-footer-v3--symmetric .ic-footer-v3__cta (0,2,0). Per vincere uso
   tre selettori di classe → specificity (0,3,0). */
html .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__cta,
body .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__cta {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffcc33 !important;
  border: 1.5px solid #ffcc33 !important;
  padding: 12px 22px 12px 18px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  gap: 12px !important;
  margin-top: 4px;
}
html .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__cta:hover,
html .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__cta:focus-visible,
body .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__cta:hover,
body .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__cta:focus-visible {
  background: rgba(255, 204, 51, 0.12) !important;
  background-color: rgba(255, 204, 51, 0.12) !important;
  color: #ffcc33 !important;
  box-shadow: 0 4px 14px rgba(255, 204, 51, 0.18) !important;
  transform: translateY(-1px);
}
.ic-footer-v3__cta-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffcc33;
  flex: 0 0 auto;
}
.ic-footer-v3--symmetric .ic-footer-v3__cta svg {
  margin-left: 4px;
}

/* Lead più disteso con virgolette tipografiche */
.ic-footer-v3--symmetric .ic-footer-v3__lead {
  font-size: 14px !important;
  line-height: 1.75 !important;
  color: #c8d4dc !important;
  margin-bottom: 22px !important;
}
.ic-footer-v3--symmetric .ic-footer-v3__lead strong {
  color: #ffcc33 !important;
  font-weight: 600 !important;
}

/* Social row centrata con divider orizzontali sopra e sotto */
.ic-footer-v3__social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.ic-footer-v3__social-label {
  font-size: 15px;
  font-weight: 600;
  color: #d4dde4;
  letter-spacing: 0.01em;
}

/* Social icons circolari (target screenshot) — Sprint 2: <ul>/<li> per WCAG 1.3.1 */
.ic-footer-v3__social--circle {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ic-footer-v3__social--circle li {
  display: inline-flex;
  margin: 0;
}
.ic-footer-v3__social--circle a {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #e2e8f0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.ic-footer-v3__social--circle a:hover,
.ic-footer-v3__social--circle a:focus-visible {
  background: #ffcc33 !important;
  color: #0a1525 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 204, 51, 0.32);
}

/* Bar inferiore: copyright sx, legal dx, divider sopra */
.ic-footer-v3--symmetric .ic-footer-v3__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #9caab7;
}
.ic-footer-v3--symmetric .ic-footer-v3__copy {
  margin: 0 !important;
  color: #c8d4dc !important;
}
.ic-footer-v3--symmetric .ic-footer-v3__legal {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ic-footer-v3--symmetric .ic-footer-v3__legal a {
  color: #c8d4dc !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  text-decoration: none;
}
.ic-footer-v3--symmetric .ic-footer-v3__legal a:hover,
.ic-footer-v3--symmetric .ic-footer-v3__legal a:focus-visible {
  color: #ffcc33 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Logo footer più grande in variante simmetrica.
   Nota: il file logo è 460x72 (aspect 6.39:1). Il vecchio max-width: 220px
   con height: 56px stirava verticalmente il logo. Qui reset di max-width
   e width: auto per preservare l'aspect ratio nativo. */
html .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__brand img,
body .ic-footer-v3.ic-footer-v3--symmetric .ic-footer-v3__brand img {
  height: 48px !important;
  width: auto !important;
  max-width: 100% !important;
  margin-bottom: 22px !important;
  object-fit: contain !important;
}

/* Mobile bar: stack copyright sopra legal */
@media (max-width: 640px) {
  .ic-footer-v3--symmetric .ic-footer-v3__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ic-footer-v3--symmetric .ic-footer-v3__legal {
    gap: 16px;
    flex-wrap: wrap;
  }
  .ic-footer-v3__social-row { gap: 16px; padding: 18px 0; }
  .ic-footer-v3__social-label { width: 100%; text-align: center; }
}

/* === FIX BOTTONI ACCAVALLATI nella topbar (28-04 h01:35) ===
   Risolve overlap del label "Accessibilità" sopra altri pulsanti */
.ic-topbar, .ic-topbar-utilities, .topbar-actions,
.site-header__utils, .site-header__actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  position: relative;
  z-index: auto;
}
.ic-topbar > *, .site-header__utils > *, .topbar-actions > * {
  position: relative;
  flex-shrink: 0;
}
/* Tooltip "Accessibilità" che galleggia → portarlo in fondo o nasconderlo se overlap */
.a11y-label, [data-a11y-label], .ic-a11y-tooltip {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.ic-a11y-btn:hover .a11y-label,
.ic-a11y-btn:focus-visible .a11y-label,
[data-a11y-btn]:hover .a11y-label,
[data-a11y-btn]:focus-visible .a11y-label {
  opacity: 1;
}
/* Se esiste un pillone "Accessibilità" SEMPRE visibile, lo trasformo in micro-label */
button[aria-label*="ccessibili"]:not(:hover):not(:focus-visible),
[data-action*="a11y"]:not(:hover):not(:focus-visible),
[id*="a11y-btn"]:not(:hover):not(:focus-visible) {
  /* niente — solo i tooltip che galleggiano vengono nascosti */
}
/* Garantisce che TUTTI i pulsanti della topbar abbiano spazio reciproco */
header .site-header__utils button,
header .site-header__utils a,
header .site-header__actions button,
header .site-header__actions a {
  margin: 0 !important;
  position: relative;
  z-index: 1;
}
