/* Stile articoli kommit.it. Colori del brand: blu #105C87, arancione #ED6C05.
   Vale solo per gli articoli (body.single-post), non per pagine e podcast. */

/* Un solo titolo: il banner si nasconde SOLO se l'articolo ha gia' un H1 nel contenuto.
   Su 14 articoli l'H1 e' proprio il banner, e deve restare. */
body.single-post:has(.post-content h1) .breadcroumb-area { display: none !important; }
body.single-post .brea-title {
  color: #105C87 !important;
  font-size: 38px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em;
}

/* Titoli */
body.single-post .post-content :is(h1, h2, h3, h4, h5, h6) {
  color: #105C87 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em;
}
body.single-post .post-content :is(h1, h2, h3, h4, h5, h6) a { color: inherit !important; }
body.single-post .post-content h1 { font-size: 38px !important; font-weight: 700 !important; }
body.single-post .post-content h2 {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-top: 18px !important;
}
/* Filetto fatto di caratteri, cosi' segue l'allineamento del titolo */
body.single-post .post-content h2::after {
  content: "\2014\2014";
  display: block;
  color: #ED6C05;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  margin-top: 6px;
}

/* Testo */
body.single-post .post-content {
  --e-global-color-text: #374151;
}
body.single-post .post-content p,
body.single-post .post-content li {
  color: #374151 !important;
  font-size: 17px !important;
  line-height: 1.75 !important;
  text-align: left !important;
}
body.single-post .post-content p span[style*="font-size: 16px"],
body.single-post .post-content li span[style*="font-size: 16px"] {
  font-size: inherit !important;
}
body.single-post .post-content :is(p, li) span:is([style*="e-global-color-text"], [style*="122, 122, 122"], [style*="7a7a7a" i]) {
  color: #374151 !important;
}
body.single-post .post-content p strong,
body.single-post .post-content li strong {
  color: #105C87 !important;
  font-weight: 600 !important;
}

/* Le tabelle restano compatte */
body.single-post .post-content table :is(p, li) {
  font-size: inherit !important;
  line-height: 1.4 !important;
}

/* Link riconoscibili, bottoni esclusi */
body.single-post .post-content :is(p, li, td) a:not(.wp-block-button__link, .elementor-button) {
  color: #105C87 !important;
  text-decoration: underline;
  text-decoration-color: #ED6C05;
  text-underline-offset: 3px;
}

/* Immagini */
body.single-post .post-content img,
body.single-post .post-thumbnail img { border-radius: 10px; }

/* ---- 1.5.1: una sola gerarchia e un solo stile per tutti i blocchi ---- */

/* H3 sotto l'H2: prima era 32px leggero, piu' grande dell'H2 */
body.single-post .post-content h3 {
  font-size: 21px !important;
  font-weight: 600 !important;
  margin: 30px 0 10px !important;
}
body.single-post .post-content h4 {
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 24px 0 8px !important;
}

/* Tabelle: righe leggere, testo a sinistra, niente griglia nera */
body.single-post .post-content .wp-block-table {
  margin: 26px 0 !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
body.single-post .post-content .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  border: 0 !important;
}
body.single-post .post-content .wp-block-table thead { border: 0 !important; }
body.single-post .post-content .wp-block-table :is(th, td) {
  border: 0 !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 12px 14px !important;
  text-align: left !important;
  vertical-align: top;
  font-size: 15.5px !important;
  line-height: 1.5 !important;
  color: #374151 !important;
}
body.single-post .post-content .wp-block-table th {
  color: #105C87 !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #105C87 !important;
  background: transparent !important;
}
body.single-post .post-content .wp-block-table td strong { color: #105C87 !important; font-weight: 600 !important; }

/* Didascalie */
body.single-post .post-content :is(.wp-block-table, .wp-block-image) figcaption {
  font-size: 13.5px !important;
  font-weight: 400 !important;
  color: #6b7280 !important;
  margin-top: 8px !important;
}
body.single-post .post-content .wp-block-table figcaption { text-align: left !important; }

/* Riquadri colorati: angoli morbidi, nessun filetto laterale */
body.single-post .post-content .wp-block-group.has-background {
  border-radius: 12px;
  border-left: 0 !important;
  margin: 28px 0 !important;
}
body.single-post .post-content .wp-block-group.has-background > :first-child { margin-top: 0 !important; }
body.single-post .post-content .wp-block-group.has-background > :last-child { margin-bottom: 0 !important; }

/* Bottoni: stesso arancione del brand, stessa forma */
body.single-post .post-content .wp-block-buttons {
  margin: 26px 0 !important;
  gap: 10px;
}
body.single-post .post-content .wp-block-button__link {
  border-radius: 999px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
  text-decoration: none !important;
}
body.single-post .post-content .is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: #ED6C05 !important;
  border: 1.5px solid #ED6C05 !important;
  padding: 10.5px 22.5px !important;
}
/* Variante discreta, da usare a inizio e a meta' articolo */
body.single-post .post-content .km-cta-soft { margin: 20px 0 !important; }
body.single-post .post-content .km-cta-soft .wp-block-button__link {
  font-size: 14px !important;
  padding: 7px 16px !important;
}
body.single-post .post-content .km-cta-soft .is-style-outline .wp-block-button__link {
  padding: 5.5px 14.5px !important;
}

/* ---- 1.5.2: elenchi puntati ----
   Il tema (calfincore/assets/css/custom-widgets.css) toglie il puntino a OGNI ul.
   Lo rimettiamo solo agli elenchi nel testo dell'articolo: Gutenberg (.wp-block-list),
   testo incollato (.ul1) ed editor di testo Elementor (ul senza classe).
   Menu, widget, indici ed elenchi a icone di Elementor restano esclusi. */
body.single-post .post-content ul:is(.wp-block-list, .ul1, :not([class])):not(nav *, .widget *, .elementor-icon-list-items *, .diagnoseo-pro-toc *) {
  list-style: disc outside !important;
  padding-left: 1.4em !important;
}
body.single-post .post-content ul:is(.wp-block-list, .ul1, :not([class])):not(nav *, .widget *, .elementor-icon-list-items *, .diagnoseo-pro-toc *) > li::marker {
  color: #ED6C05;
}
/* Elenchi annidati "a vuoto" (li senza puntino che contiene un altro ul):
   niente doppio rientro, il puntino resta allineato agli altri */
body.single-post .post-content li[style*="list-style-type: none"] > ul {
  padding-left: 0 !important;
}

/* Sidebar */
body.single-post #secondary h4 { color: #105C87 !important; font-weight: 700 !important; }

@media (max-width: 767px) {
  body.single-post .brea-title,
  body.single-post .post-content h1 { font-size: 29px !important; }
  body.single-post .post-content h2 { font-size: 24px !important; }
  body.single-post .post-content h3 { font-size: 19px !important; }
  body.single-post .post-content .wp-block-table :is(th, td) { padding: 10px !important; font-size: 14.5px !important; }
}
