/* =========================================================================
   FENG HUANG — Stile editoriale STANDARD per TUTTI gli articoli
   Aggancia il wrapper che Joomla genera attorno al contenuto:
     .com-content-article  -> singolo articolo
     .item-page            -> alias in alcune viste
     .com-content-category-blog__item -> item in blog/categoria
   Tema chiaro (carta di riso), coerente col template. Zero markup nel testo.
   ========================================================================= */

.fh-main .com-content-article,
.fh-main .item-page,
.fh-main .com-content-category-blog__item {
  --fha-measure: min(1500px, 92vw);          /* colonna di lettura */
  --fha-flow: 1.35rem;          /* ritmo verticale */
  max-width: var(--fha-measure);
  margin-inline: auto;
  color: var(--fh-ink);
  font-size: 1.075rem;
  line-height: 1.75;
}

/* Un articolo "speciale" (.sdw-article/.org-article) sfonda questa colonna:
   se dentro c'è uno di quei wrapper, annullo il vincolo di larghezza. */
.fh-main .com-content-article:has(.sdw-article),
.fh-main .com-content-article:has(.org-article) {
  max-width: none;
}

/* ---- Titolo articolo ---- */
.fh-main .com-content-article .page-header h1,
.fh-main .com-content-article .page-header h2,
.fh-main .item-page .page-header h1,
.fh-main .item-page .page-header h2 {
  font-family: var(--fh-font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.1;
  color: var(--fh-ink);
  margin: 0 0 1.1rem;
  position: relative;
  padding-bottom: .7rem;
}
.fh-main .com-content-article .page-header h1::after,
.fh-main .com-content-article .page-header h2::after,
.fh-main .item-page .page-header h1::after,
.fh-main .item-page .page-header h2::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 64px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--fh-fire), var(--fh-gold));
}

/* ---- Info intestazione (data/autore) ---- */
.fh-main .com-content-article .article-info,
.fh-main .item-page .article-info {
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fh-muted);
  margin: 0 0 2rem;
}
.fh-main .article-info dd { margin: 0; display: inline; }

/* ---- Flusso tipografico ---- */
.fh-main .com-content-article > *,
.fh-main .item-page > * { margin-block: 0; }
.fh-main .com-content-article > * + *,
.fh-main .item-page > * + * { margin-top: var(--fha-flow); }

.fh-main .com-content-article p,
.fh-main .item-page p { margin: 0 0 var(--fha-flow); }

/* Prima lettera capitale sul primo paragrafo del corpo */
.fh-main .com-content-article [itemprop="articleBody"] > p:first-of-type::first-letter,
.fh-main .item-page [itemprop="articleBody"] > p:first-of-type::first-letter {
  font-family: var(--fh-font-display);
  font-size: 3.2em;
  line-height: .8;
  float: left;
  margin: .05em .12em 0 0;
  color: var(--fh-fire);
}

/* ---- Sottotitoli interni ---- */
.fh-main .com-content-article h2,
.fh-main .com-content-article h3,
.fh-main .com-content-article h4,
.fh-main .item-page h2,
.fh-main .item-page h3,
.fh-main .item-page h4 {
  font-family: var(--fh-font-display);
  color: var(--fh-ink);
  line-height: 1.15;
  margin: 2.4rem 0 .9rem;
}
.fh-main .com-content-article h2, .fh-main .item-page h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.fh-main .com-content-article h3, .fh-main .item-page h3 { font-size: 1.35rem; color: var(--fh-fire-d); }
.fh-main .com-content-article h4, .fh-main .item-page h4 { font-size: 1.12rem; }

/* ---- Link nel corpo ---- */
.fh-main .com-content-article a,
.fh-main .item-page a {
  color: var(--fh-fire);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--fh-fire) 35%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s var(--fh-ease);
}
.fh-main .com-content-article a:hover,
.fh-main .item-page a:hover { text-decoration-color: var(--fh-fire); }

/* ---- Blockquote ---- */
.fh-main .com-content-article blockquote,
.fh-main .item-page blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.6rem;
  border-left: 3px solid var(--fh-fire);
  background: var(--fh-fire-t);
  border-radius: 0 var(--fh-radius) var(--fh-radius) 0;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--fh-ink);
}
.fh-main .com-content-article blockquote p:last-child,
.fh-main .item-page blockquote p:last-child { margin-bottom: 0; }

/* ---- Immagini ---- */
.fh-main .com-content-article img,
.fh-main .item-page img {
  height: auto;
  border-radius: var(--fh-radius);
  box-shadow: var(--fh-shadow);
}
.fh-main .com-content-article figure,
.fh-main .item-page figure { margin: 2rem 0; }
.fh-main .com-content-article figure img,
.fh-main .item-page figure img { width: 100%; }
.fh-main .com-content-article figcaption,
.fh-main .item-page figcaption {
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--fh-muted);
  text-align: center;
}

/* ---- Liste ---- */
.fh-main .com-content-article ul,
.fh-main .com-content-article ol,
.fh-main .item-page ul,
.fh-main .item-page ol { margin: 0 0 var(--fha-flow); padding-left: 1.4rem; }
.fh-main .com-content-article li,
.fh-main .item-page li { margin-bottom: .5rem; }
.fh-main .com-content-article ul li::marker,
.fh-main .item-page ul li::marker { color: var(--fh-gold); }
.fh-main .com-content-article ol li::marker,
.fh-main .item-page ol li::marker { color: var(--fh-fire); font-weight: 700; }

/* ---- Tabelle ---- */
.fh-main .com-content-article table,
.fh-main .item-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: .95rem;
  border: 1px solid var(--fh-line);
  border-radius: var(--fh-radius);
  overflow: hidden;
}
.fh-main .com-content-article th,
.fh-main .item-page th {
  background: var(--fh-ink);
  color: #fff;
  text-align: left;
  padding: .7rem .9rem;
  font-family: var(--fh-font-display);
  font-weight: 600;
}
.fh-main .com-content-article td,
.fh-main .item-page td { padding: .65rem .9rem; border-top: 1px solid var(--fh-line); }
.fh-main .com-content-article tbody tr:nth-child(even),
.fh-main .item-page tbody tr:nth-child(even) { background: color-mix(in srgb, var(--fh-ink) 3%, transparent); }

/* ---- HR ---- */
.fh-main .com-content-article hr,
.fh-main .item-page hr {
  border: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--fh-line), transparent);
  margin: 2.5rem 0;
}

/* ---- Codice inline / blocchi ---- */
.fh-main .com-content-article code,
.fh-main .item-page code {
  background: color-mix(in srgb, var(--fh-ink) 6%, transparent);
  padding: .1em .4em; border-radius: 5px; font-size: .9em;
}
.fh-main .com-content-article pre,
.fh-main .item-page pre {
  background: var(--fh-ink); color: #f3e8d8;
  padding: 1rem 1.2rem; border-radius: var(--fh-radius); overflow-x: auto;
}
.fh-main .com-content-article pre code,
.fh-main .item-page pre code { background: none; padding: 0; }

/* ---- Responsive ---- */
@media (max-width: 620px) {
  .fh-main .com-content-article,
  .fh-main .item-page { font-size: 1.02rem; }
  .fh-main .com-content-article [itemprop="articleBody"] > p:first-of-type::first-letter,
  .fh-main .item-page [itemprop="articleBody"] > p:first-of-type::first-letter { font-size: 2.6em; }
}
@media (prefers-reduced-motion: reduce) {
  .fh-main .com-content-article a,
  .fh-main .item-page a { transition: none; }
}
