/* =====================================================================
   ic-sezioni-pro.css — leggibilita' e spazi delle sezioni del comune
   13/09/2026, prima applicazione: Brindisi.

   Richiesta: togliere i vuoti, migliorare leggibilita' e accessibilita' in
   tutte le sezioni, gli argomenti e le schede. Stessi componenti in tutte
   le schede, quindi le regole sono per componente, non per sezione:

   1. intestazione del pannello: via l'occhiello "Scheda comune" ripetuto
      in ogni scheda, meno aria prima del contenuto;
   2. sezione: una sola cornice (prima c'era un riquadro dentro il riquadro,
      che mangiava un quinto della larghezza);
   3. titolo di sezione: niente scatola con il puntino che sbordava;
   4. righe espandibili (Scuole, Strutture ricettive): prima due filetti e
      52px di vuoto per riga, etichette 12px maiuscole azzurre; ora righe
      da 56px, testo 16,5px scuro, contatore leggibile, icone allineate;
   5. schede informative: testo 15px con contrasto pieno, niente riga vuota
      sotto i telefoni, link sottolineati invece del filetto, etichette
      di categoria leggibili;
   6. schede patrimonio/lidi: non si allungano piu' per pareggiare la vicina.

   Specificita': gli stili del sito usano !important e stili inline con
   :not(#ic-zz). I :not(#ic-sez-z*) portano queste regole allo stesso
   livello; nessun id reale e' coinvolto.
   ===================================================================== */

/* 1. intestazione del pannello ---------------------------------------- */
html:root body .comune-panels > [id^="tab-"] > h2:not(#ic-sez-z1):not(#ic-sez-z2)::before{ content:none !important; display:none !important; }
html:root body .comune-panels .comune-panel__lead:not(#ic-sez-z1):not(#ic-sez-z2){ margin-bottom:28px !important; }

/* 2. sezione: una cornice sola ----------------------------------------- */
html:root body .comune-panels .comune-section:not(#ic-sez-z1):not(#ic-sez-z2){ padding:28px 28px 24px !important; margin-bottom:20px !important; }
html:root body .comune-panels .comune-section > .ic-acc-body:not(#ic-sez-z1):not(#ic-sez-z2){
  border:0 !important; padding:16px 0 0 !important;
  background:transparent !important; box-shadow:none !important;
}
@media (max-width:860px){
  html:root body .comune-panels .comune-section:not(#ic-sez-z1):not(#ic-sez-z2){ padding:20px 16px 16px !important; }
}

/* 3. titolo di sezione --------------------------------------------------- */
html:root body .comune-panels .comune-section > .ic-acc-head:not(#ic-sez-z1):not(#ic-sez-z2){
  border:0 !important; border-bottom:1px solid #DCE5EE !important; border-radius:0 !important;
  background:transparent !important; box-shadow:none !important;
  padding:0 0 14px !important; margin:0 !important; min-height:0 !important;
  gap:12px !important; align-items:center !important;
}
html:root body .comune-panels .comune-section > .ic-acc-head:not(#ic-sez-z1):not(#ic-sez-z2)::before{ content:none !important; display:none !important; }
html:root body .comune-panels .comune-section > .ic-acc-head .section-icon:not(#ic-sez-z1):not(#ic-sez-z2){
  margin:0 !important; flex:0 0 auto; display:inline-flex !important; align-items:center; color:#2A5CA6 !important;
}
html:root body .comune-panels .comune-section > .ic-acc-head > .scuole-gruppo__count:not(#ic-sez-z1):not(#ic-sez-z2){ margin-left:auto !important; }
html:root body .comune-panels .comune-section > .ic-acc-head:not(#ic-sez-z1):not(#ic-sez-z2) + *{ margin-top:16px !important; }

/* contatore: stesso aspetto nel titolo e nelle righe */
html:root body .comune-panels .scuole-gruppo__count:not(#ic-sez-z1):not(#ic-sez-z2){
  font:600 13px/1 "Titillium Web", system-ui, sans-serif !important;
  font-variant-numeric:tabular-nums; letter-spacing:0 !important;
  color:#1F3B5C !important; background:#EAF2F9 !important;
  padding:6px 10px !important; min-width:34px !important; border-radius:999px !important;
  display:inline-flex !important; justify-content:center; align-items:center;
}

/* 4. righe espandibili --------------------------------------------------- */
html:root body .comune-panels .ic-subacc:not(#ic-sez-z1):not(#ic-sez-z2){
  margin:0 !important; padding:0 !important;
  border-top:0 !important; border-bottom:1px solid #E3EAF1 !important;
}
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2){
  /* a destra 34px: la freccia del sito e' posizionata assoluta a 10px dal bordo */
  margin:0 !important; padding:12px 34px 12px 6px !important; min-height:56px !important;
  border:0 !important; border-radius:4px !important;
  display:flex !important; align-items:center !important; gap:12px !important;
  font-family:"Titillium Web", system-ui, sans-serif !important;
  font-size:16.5px !important; font-weight:600 !important; line-height:1.35 !important;
  letter-spacing:0 !important; text-transform:none !important; color:#10263F !important;
  cursor:pointer;
}
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) *{ letter-spacing:0; text-transform:none; }
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2):hover{ background:#F4F8FC !important; }
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2):focus-visible{ outline:3px solid #2D9BE0 !important; outline-offset:2px !important; }
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) > svg,
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) > .ic-ico,
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) > .ic-ico svg{
  width:20px !important; height:20px !important; flex:0 0 20px !important; color:#2A5CA6 !important;
  margin:0 !important;
}
/* alcune righe arrivano con due icone (es. "Istituto"): se ne tiene una */
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) > .ic-ico ~ svg,
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) > svg ~ .ic-ico,
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) > svg ~ svg,
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2) > .ic-ico ~ .ic-ico{ display:none !important; }
/* righe senza icona: il testo parte allineato alle altre */
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2):not(:has(> svg, > .ic-ico)){ padding-left:38px !important; }
html:root body .comune-panels .ic-subacc-head > .scuole-gruppo__count:not(#ic-sez-z1):not(#ic-sez-z2){ margin-left:auto !important; }
html:root body .comune-panels .ic-subacc-head:not(#ic-sez-z1):not(#ic-sez-z2)::after{ border-top-color:#2A5CA6 !important; opacity:1 !important; }
html:root body .comune-panels .ic-subacc.is-collapsed > .scuole-grid:not(#ic-sez-z1):not(#ic-sez-z2){ display:none !important; }
html:root body .comune-panels .ic-subacc:not(.is-collapsed) > .scuole-grid:not(#ic-sez-z1):not(#ic-sez-z2){ margin:8px 0 20px !important; }

/* 5. schede informative -------------------------------------------------- */
html:root body .comune-panels .info-list:not(#ic-sez-z1):not(#ic-sez-z2){ gap:12px !important; }
html:root body .comune-panels .info-list > li:not(#ic-sez-z1):not(#ic-sez-z2),
html:root body .comune-panels .scuola-card:not(#ic-sez-z1):not(#ic-sez-z2){
  border:1px solid #DDE7F0 !important; border-radius:4px !important;
}
html:root body .comune-panels .info-list > li:not(#ic-sez-z1):not(#ic-sez-z2){ padding:16px 18px !important; }
html:root body .comune-panels .info-list .item-title:not(#ic-sez-z1):not(#ic-sez-z2){ font-size:17px !important; line-height:1.3 !important; margin-bottom:8px !important; color:#0F1A30 !important; }
html:root body .comune-panels .info-list .item-meta:not(#ic-sez-z1):not(#ic-sez-z2),
html:root body .comune-panels .scuola-card .item-meta:not(#ic-sez-z1):not(#ic-sez-z2){
  font-size:15px !important; line-height:1.45 !important; color:#2E3F52 !important;
  margin-top:4px !important; align-items:flex-start !important; gap:8px !important;
}
html:root body .comune-panels .item-meta .ic-ico:not(#ic-sez-z1):not(#ic-sez-z2){ margin-top:2px !important; flex:0 0 auto; color:#3F5F80 !important; }
html:root body .comune-panels .info-list .item-meta a:not(#ic-sez-z1):not(#ic-sez-z2),
html:root body .comune-panels .scuola-card .item-meta a:not(#ic-sez-z1):not(#ic-sez-z2){
  min-height:0 !important; padding:2px 0 !important; margin:0 !important;
  border-bottom:0 !important; font-weight:600 !important; color:#1B4F8A !important;
  text-decoration:underline !important; text-decoration-color:rgba(27,79,138,.35) !important;
  text-decoration-thickness:1px !important; text-underline-offset:3px !important;
}
html:root body .comune-panels .info-list .item-meta a:not(#ic-sez-z1):not(#ic-sez-z2):hover,
html:root body .comune-panels .scuola-card .item-meta a:not(#ic-sez-z1):not(#ic-sez-z2):hover{ text-decoration-color:currentColor !important; }
html:root body .comune-panels .info-list .item-meta a:not(#ic-sez-z1):not(#ic-sez-z2):focus-visible,
html:root body .comune-panels .scuola-card .item-meta a:not(#ic-sez-z1):not(#ic-sez-z2):focus-visible{ outline:3px solid #2D9BE0 !important; outline-offset:2px !important; border-radius:2px; }
/* indirizzi web lunghi: una riga con i puntini, non spezzati a meta' parola */
html:root body .comune-panels .scuola-card .item-meta a[href^="http"]:not(#ic-sez-z1):not(#ic-sez-z2){
  display:block !important; min-width:0 !important; overflow:hidden !important;
  text-overflow:ellipsis !important; white-space:nowrap !important; overflow-wrap:normal !important;
}
html:root body .comune-panels .info-list .badge:not(#ic-sez-z1):not(#ic-sez-z2),
html:root body .comune-panels .scuola-card__badge:not(#ic-sez-z1):not(#ic-sez-z2){
  font-size:12px !important; line-height:1.2 !important; letter-spacing:.03em !important;
  padding:3px 8px !important; color:#23405F !important; background:#E8F0F7 !important;
  border-color:#CFDDEA !important;
}
html:root body .comune-panels .scuola-card__tipo:not(#ic-sez-z1):not(#ic-sez-z2){ color:#3E5670 !important; }

/* 6. schede patrimonio e lidi -------------------------------------------- */
html:root body .comune-panels .icb__grid:not(#ic-sez-z1):not(#ic-sez-z2){ align-items:start !important; }
/* le schede avevano height:100% della riga: con una trascrizione aperta tutte
   le vicine si allungavano e i pulsanti scendevano in fondo al vuoto */
html:root body .comune-panels .icb__grid > .icb__card:not(#ic-sez-z1):not(#ic-sez-z2){ height:auto !important; align-self:start !important; }

/* testo solo per lettori di schermo */
.ic-sr-only{
  position:absolute !important; width:1px !important; height:1px !important; padding:0 !important;
  margin:-1px !important; overflow:hidden !important; clip:rect(0 0 0 0) !important;
  white-space:nowrap !important; border:0 !important;
}
