/*
 * Hope Running Core 1.6.6 - Strato condiviso di coerenza visiva.
 * Caricato per ultimo, dopo gli stili delle singole pagine e del tema.
 * NON cambia homepage, footer, amministrazione o contenuti Elementor.
 * Si applica esclusivamente a pagine già convertite al Core.
 */

/* Stesso font in tutte le pagine Core che scelgono il carattere sans. */
body.hrdc-bodyfont-sans :is(.hope-ds,.hope-archive,.hr-projects-page,.hr-fabio-page,.hr-trail-showcase,.hci26,.hrg26) {
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif !important;
}
body.hrdc-bodyfont-sans :is(.hope-ds,.hope-archive,.hr-projects-page,.hr-fabio-page,.hr-trail-showcase,.hci26,.hrg26) :is(p,li,dt,dd,figcaption) {
  font-family: inherit !important;
}
/* Titoli coerenti, preservando l'opzione serif esplicita del Design Studio. */
body:not(.hrdc-heading-editorial).hrdc-bodyfont-sans :is(.hope-ds,.hope-archive,.hr-projects-page,.hr-fabio-page,.hr-trail-showcase,.hci26,.hrg26) :is(h1,h2,h3,h4,.hr-title,.hope-ds__title,.hope-ds__h2,.hope-ds__h3) {
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif !important;
}
body.hrdc-heading-editorial :is(.hope-ds,.hope-archive,.hr-projects-page,.hr-fabio-page,.hr-trail-showcase,.hci26,.hrg26) :is(h1,h2,h3,h4,.hr-title,.hope-ds__title,.hope-ds__h2,.hope-ds__h3) {
  font-family: Georgia,"Times New Roman",serif !important;
}

/* Spessore uniforme dei testi normali. I grassetti e i titoli restano distinti. */
body :is(.hope-ds,.hope-archive,.hr-projects-page,.hr-fabio-page,.hr-trail-showcase,.hci26,.hrg26) {
  font-weight: var(--hrdc-body-weight,500);
  color: var(--hrdc-ink,#29342f);
}
body .hope-archive :is(p,li),
body .hci26 :is(p,li),
body .hope-ds :is(.hope-ds__p,.hope-ds__prose p,.hope-ds__faq-answer p),
body.hrdc-legacy-on :is(.hr-projects-page,.hr-fabio-page,.hr-trail-showcase) :is(.hr-copy,.hr-copy p,.hr-body-copy,.hr-body-copy p) {
  font-weight: var(--hrdc-body-weight,500) !important;
  line-height: 1.76 !important;
}
/* Dimensione condivisa nelle sezioni narrative; etichette e didascalie conservano scala ridotta. */
body .hope-archive :is(.ha-section > .ha-wrap > p,.ha-columns > div > p),
body .hope-ds :is(.hope-ds__p,.hope-ds__prose p),
body.hrdc-legacy-on :is(.hr-projects-page,.hr-fabio-page,.hr-trail-showcase) :is(.hr-copy,.hr-copy p) {
  font-size: var(--hrdc-body,19px) !important;
}
body .hci26 :is(.hci26-intro-copy > p,.hci26-reading > p,.hci26-section-head > p),
body .hci26 .hci26-stage-body > p {
  font-size: var(--hrdc-body,19px) !important;
}
/* Testi introduttivi volutamente più marcati dei normali paragrafi. */
body .hope-archive .ha-lead { font-weight: 700 !important; }
body .hope-archive .ha-hero p { font-weight: 500 !important; }

/* Nelle schede strette evitare ampi spazi artificiali creati dalla giustificazione. */
body .hope-archive :is(.ha-year p,.ha-side p,.ha-step p),
body .hci26 :is(.hci26-stage-body p,.hci26-press-card p),
body :is(.hr-projects-page,.hr-fabio-page,.hr-trail-showcase) .hr-card p {
  text-align: left !important;
  hyphens: none !important;
}

/* Galleria storica: default senza ritagli di volti, mani, cartelli e giocattoli. */
body .hope-archive .ha-gallery .ha-photo img {
  display: block;
  width: 100%;
  height: var(--hrdc-gallery-height,420px) !important;
  max-height: none;
  aspect-ratio: auto;
  object-fit: var(--hrdc-gallery-fit,contain) !important;
  object-position: var(--hrdc-gallery-position,center) !important;
  background: #ecf0eb;
}
body .hope-archive .ha-photo figcaption {
  font-size: 15px;
  color: #33463a;
  font-weight: max(500,var(--hrdc-body-weight,500));
}

@media(max-width:650px) {
  /* Su smartphone nessun ritaglio forzato, mai. */
  body .hope-archive .ha-gallery .ha-photo img {
    width: 100%;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
  body .hope-archive .ha-section > .ha-wrap > p {
    text-align: left !important;
    hyphens: none !important;
  }
}

/* Anche la rendicontazione Hope Color eredita la palette centrale. */
body .hci26 {
  --hope-yellow: var(--hrdc-accent,#ffd600);
  --hope-green: var(--hrdc-green,#214b39);
  --hope-dark: var(--hrdc-dark,#111714);
  --hope-text: var(--hrdc-ink,#29342f);
  --hope-bg: var(--hrdc-surface,#f7f8f7);
}
/* Forme armonizzate delle sole sezioni informative, non del footer globale. */
body .hope-archive :is(.ha-year,.ha-photo,.ha-source,.ha-memory,.ha-side),
body .hci26 :is(.hci26-summary-card,.hci26-stage,.hci26-doc,.hci26-press-card) {
  border-radius: var(--hrdc-radius,18px);
}

/* Un Giocattolo in Dono 2026: le stesse scelte tipografiche del Core. */
body .hrg26 :is(p,li,address) {
  font-weight:var(--hrdc-body-weight,500) !important;
  line-height:1.76 !important;
}
body .hrg26 :is(.hrg-hero .hrg-subtitle,.hrg-lead,.hrg-story-grid > div > p,.hrg-community .hrg-inner > p,.hrg-history-grid > div > p,.hrg-footer-inner > p) {
  font-size:var(--hrdc-body,19px) !important;
}
body .hrg26 :is(.hrg-value,.hrg-info,.hrg-rule,.hrg-alert,.hrg-history-card,.hrg-ticket) p {
  text-align:left !important;
  hyphens:none !important;
}
