/*
Theme Name: AssoTè Infusi
Description: Child theme di TP Scenico per il sito dell'Associazione Italiana Tè & Infusi.
Author: Arno Peck
Author URI: https://tempopresente.marketing/
Template: tp-scenico
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: assoteinfusi
*/

/* Gli stili di base restano nel parent; qui l'adattamento dei contenuti Jimdo. */
:where(h1, h2, h3, h4, h5, h6).wp-block-heading,
.entry__content :is(h1, h2, h3, h4, h5, h6),
.editor-styles-wrapper :is(h1, h2, h3, h4, h5, h6) {
	font-weight: 700;
}
.site-branding .custom-logo { width: auto; max-width: min(340px, 65vw); height: auto; }
.site-header .site-navigation__menu { column-gap: 1.25rem; row-gap: 0; }
.site-header .site-navigation__menu > .menu-item > a { font-size: 0.95rem; }
.site-header .site-navigation__menu a { line-height: 1.3; }
.entry__content > .assote-section,
.entry__content > .assote-cover { margin-block: 0; }
.assote-section { padding: clamp(2.5rem, 5vw, 5rem) max(1.25rem, var(--sc-gutter, 1.25rem)); }
.assote-section-inner { width: 100%; max-width: 76rem; margin-inline: auto; }
.assote-section-inner > :is(p, ul, ol) { max-width: 48rem; margin-inline: auto; }
.assote-section-inner > .wp-block-heading { max-width: 64rem; }
.assote-section-inner > :is(.assote-grid, .assote-media-columns, .assote-card) { max-width: 100%; }
.assote-section .wp-block-columns { margin-bottom: 0; }
.assote-section .wp-block-image { margin-block: 0; }
.assote-section .wp-block-image img { display: block; width: auto; height: auto; max-width: 100%; margin-inline: auto; border-radius: 0; }
.assote-grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.assote-grid.assote-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.assote-grid.assote-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.assote-grid > .assote-card { min-width: 0; width: 100%; max-width: 100%; margin: 0; }
.assote-card > * { max-width: 100%; }
.assote-card .wp-block-image { margin-bottom: 1.5rem; }
.assote-card .wp-block-image img { max-height: 25rem; object-fit: contain; }
.assote-list .assote-card + .assote-card { border-top: 1px solid currentColor; padding-top: 2rem; margin-top: 2rem; }
.assote-gallery .assote-card .wp-block-image img { width: 100%; }
.assote-bg-white { background: var(--sc-color-background, #fff); }
.assote-bg-shade2 { background: #cbcec5; color: #202720; }
.assote-bg-maincolor { background: var(--sc-color-accent, #6d8d79); color: #101d14; }
.assote-bg-secondarycolor { background: var(--sc-color-accent-2, #83aa8b); color: #101d14; }
.assote-bg-shade1 { background: #556c72; color: #fff; }
.assote-bg-black { background: #000; color: #fff; }
.assote-section :is(h1,h2,h3,h4,p,li,a:not(.wp-block-button__link)) { color: inherit; }
.assote-bg-shade1 .wp-block-button__link,
.assote-bg-maincolor .wp-block-button__link,
.assote-bg-secondarycolor .wp-block-button__link { background: #fff; color: #25392c; }
.assote-cover .assote-cover-content { width: 100%; max-width: 60rem; text-align: center; }
.assote-cover :is(h1,h2,h3,p) { text-shadow: 0 1px 14px rgb(0 0 0 / 30%); }
.assote-cover .wp-block-buttons { justify-content: center; }
.assote-cover .wp-block-button__link { background: #fff; color: #25392c; text-shadow: none; }
.assote-banner .wp-block-image img { max-height: 32rem; object-fit: contain; }
.assote-video-link { padding-block: 2rem; }
.site-footer.site-footer--style-surface { background: #253e30; color: #fff; }
.site-footer :is(a,p) { color: inherit; }
.site-footer__text { max-width: 54rem; margin-inline: auto; }
.assote-footer-credit { padding-top: 1.5rem; font-size: 0.9rem; text-align: center; }
@media (max-width: 759px) {
	.assote-grid.assote-grid-2, .assote-grid.assote-grid-3 { grid-template-columns: 1fr; }
	.assote-card .wp-block-image img { max-height: 22rem; }
	.entry__content > .assote-cover { min-height: 380px !important; }
	.site-header .site-navigation__menu > .menu-item > a { font-size: 1rem; }
}
.assote-media-columns .wp-block-image img { max-height: 42rem; object-fit: contain; }
.site-footer .widget_media_image { max-width: 180px; margin-inline: auto; }
.site-footer .widget_media_image img { display: block; max-width: 100%; height: auto; }

/* Il parent ingrandisce tutti i titoli della prima cover e la trasforma in grid.
   Qui la copertina mantiene le proporzioni e la gerarchia del sito originale. */
.home .entry__content > .wp-block-cover.assote-cover:first-child {
  display: flex;
  min-height: clamp(30rem, 70svh, 51rem) !important;
  padding: 4rem 1.5rem;
}
.home .entry__content > .wp-block-cover.assote-cover:first-child .wp-block-cover__inner-container {
  width: 100%;
  max-width: 64rem;
}
.home .entry__content > .wp-block-cover.assote-cover:first-child .assote-cover-content {
  width: 100%;
  max-width: 52rem;
}
.home .entry__content > .wp-block-cover.assote-cover:first-child h1.wp-block-heading {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.18;
  max-width: 46rem;
  margin: 0 auto 1.5rem;
}
.home .entry__content > .wp-block-cover.assote-cover:first-child h2.wp-block-heading {
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  line-height: 1.35;
  margin: 0 auto .5rem;
}
.home .entry__content > .wp-block-cover.assote-cover:first-child h3.wp-block-heading {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1.4;
  margin: 0 auto;
}
.assote-cover .wp-block-cover__image-background { z-index: 0; }
.assote-cover .wp-block-cover__background { z-index: 1; }
.assote-cover .wp-block-cover__inner-container { z-index: 2; }
.assote-section .wp-block-button__link,
.assote-cover .wp-block-button__link { border-radius: var(--sc-button-radius, 8px); }
.assote-bg-white .wp-block-button__link,
.assote-bg-shade2 .wp-block-button__link { background: #000; color: #fff; }
.assote-stats .assote-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.assote-stats > .assote-section-inner > .wp-block-heading { text-align: center; }
@media (max-width: 759px) {
  .assote-stats .assote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .assote-stats .assote-grid { grid-template-columns: 1fr; }
}

/* Navigazione: logo indipendente dalla larghezza delle voci. */
.site-header {
  --sc-header-ink: #fff;
  --sc-header-ink-muted: rgba(255, 255, 255, .8);
  --sc-header-ink-hover: rgba(255, 255, 255, .8);
  --sc-header-chip-border: rgba(255, 255, 255, .65);
}
.site-header .site-branding { flex-shrink: 0; }
.site-header .custom-logo-link { width: min(16rem, 52vw); }
.site-header .site-branding .custom-logo { width: 100%; max-width: 100%; height: auto; max-height: none; }
.site-header .site-navigation__menu > .menu-item > a { font-size: 1rem; }
.site-header .menu-toggle { border-radius: 0; }
.site-header .site-navigation__menu > .menu-item.menu-button > a { background: #fff; color: #25392c; }
.site-header a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
@media (min-width: 760px) {
  .site-header--layout-centered .site-header__inner { gap: .35rem; padding-block: .85rem .5rem; }
  .site-header .site-navigation__menu { gap: .35rem 1.25rem; }
  .site-header .site-navigation .sub-menu { max-height: 65vh; overflow-y: auto; text-align: left; }
  .site-header .site-navigation .sub-menu a { white-space: normal; border-radius: 0; }
}
@media (max-width: 759px) {
  .site-header--layout-centered .site-header__inner { justify-content: space-between; text-align: left; }
  .site-header .site-navigation.is-open { text-align: left; }
  .site-header .site-navigation.is-open .sub-menu { margin-block: .25rem .75rem; }
  .admin-bar .site-header .site-navigation.is-open { height: calc(100dvh - 100% - 46px); }
}

/* Revisione visiva: proporzioni Jimdo e testata con marchio su fondo bianco. */
.site-header { background: var(--sc-color-background); box-shadow: 0 1px 0 rgb(0 0 0 / 8%); }
.site-header .site-branding { color: var(--sc-color-text); }
.site-header .site-branding :is(.site-title,.site-branding__tagline) { color: inherit; }
.site-header .menu-toggle { color: var(--sc-color-text); border-color: currentColor; min-height: 44px; }
.site-header .site-navigation__menu > .menu-item.menu-button > a { border-radius: var(--sc-button-radius, 8px); }
@media (min-width: 760px) {
 .site-header--layout-centered .site-header__inner { max-width: none; width: 100%; padding: 0; gap: 0; }
 .site-header .site-branding { padding: 1rem 1.5rem; }
 .site-header .site-navigation { width: 100%; justify-content: center; background: var(--sc-color-accent); padding: .5rem 1.25rem; }
 .site-header .site-navigation__menu { justify-content: center; }
 .site-header .site-navigation__menu > .menu-item > a { min-height: 44px; display: inline-flex; align-items: center; }
}
.entry__content { overflow-wrap: anywhere; }
.assote-section-inner { max-width: 72.5rem; }
.assote-section-inner > :is(p,ul,ol) { max-width: 46.875rem; }
.entry__content .assote-section { padding-block: clamp(3rem, 6vw, 6rem); }
.entry__content .assote-section-inner > h2:first-child,
.entry__content .assote-cover-content > h2:first-child { font-size: clamp(2rem, 3.34vw, 3rem); line-height: 1.3; }
.entry__content .assote-card h2 { font-size: clamp(1.65rem, 2.5vw, 2.25rem); }
.entry__content .assote-cover { min-height: 100svh !important; padding: clamp(3rem, 7vw, 7rem) 1.5rem; }
.entry__content .assote-cover .assote-cover-content { max-width: 46.875rem; margin-inline: auto; }
.home .entry__content > .wp-block-cover.assote-cover:first-child { min-height: calc(100svh - 132px) !important; }
.home .entry__content > .wp-block-cover.assote-cover:first-child h1.wp-block-heading { font-size: clamp(2.5rem, 4.45vw, 4rem); line-height: 1.3; max-width: 46.875rem; }
.home .entry__content > .wp-block-cover.assote-cover:first-child h2.wp-block-heading { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
.home .entry__content > .wp-block-cover.assote-cover:first-child h3.wp-block-heading { font-size: clamp(1.125rem, 1.67vw, 1.5rem); }
.entry__content .assote-cover-light,
.entry__content .assote-cover-light :is(h1,h2,h3,p) { color: #202720; text-shadow: none; }
.entry__content .assote-section .wp-block-button__link,
.entry__content .assote-cover .wp-block-button__link { border-radius: var(--sc-button-radius, 8px); background: var(--review-button, #000); color: #fff; min-height: 44px; padding: .7rem 1.35rem; font-size: .95rem; line-height: 1.4; box-shadow: none; }
.entry__content :is(.assote-bg-shade1,.assote-bg-maincolor,.assote-bg-secondarycolor,.assote-cover:not(.assote-cover-light)) .wp-block-button__link { background: #fff; color: var(--review-button, #25392c); }
.entry__content .wp-block-button__link:hover { filter: brightness(.9); }
.entry__content .wp-block-button__link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.entry__content .assote-press { padding-top: 0; }
.assote-partners .assote-card .wp-block-image img { height: 8rem; width: 100%; object-fit: contain; }
.assote-partners .assote-card p { font-size: .95rem; }
.assote-learning .assote-media-columns { flex-direction: column-reverse; align-items: center !important; text-align: center; }
.assote-learning .assote-media-columns > .wp-block-column { flex-basis: auto !important; width: min(100%,46.875rem); }
.assote-learning .wp-block-image img { max-width: 28rem; width: 100%; }
.assote-learning .wp-block-buttons { justify-content: center; }
.site-footer .widget-area { gap: 2rem; }
@media (min-width: 1000px) {
 .entry__content .assote-register-cover { align-items: flex-end; }
 .entry__content .assote-register-cover .assote-cover-content { max-width: 72.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 4rem; text-align: left; }
 .assote-register-cover .assote-cover-content > h2:first-child { grid-row: span 2; align-self: center; margin: 0; }
 .assote-register-cover .wp-block-buttons { justify-content: flex-start; }
}
@media (max-width: 999px) and (min-width: 760px) {
 .site-header .site-navigation { flex-wrap: wrap; gap: .25rem; }
 .site-header .site-navigation__menu { column-gap: .85rem; }
 .site-header .site-navigation__menu > .menu-item > a { font-size: .9rem; }
}
@media (max-width: 759px) {
 .site-header .site-header__inner { padding-block: 1rem; }
 .site-header .site-navigation.is-open { background: #fff; }
 .site-header .site-navigation.is-open .site-navigation__menu a { color: #202720; min-height: 44px; padding-block: .65rem; }
 .site-header .site-navigation.is-open .menu-button > a { background: var(--sc-color-accent); color: #fff; }
 .entry__content .assote-section { padding: 3rem 1.25rem; }
 .entry__content .assote-cover,
 .home .entry__content > .wp-block-cover.assote-cover:first-child { min-height: max(30rem, 75svh) !important; padding: 3rem 1.25rem; }
 .home .entry__content > .wp-block-cover.assote-cover:first-child h1.wp-block-heading { font-size: clamp(2rem,8vw,3rem); }
 .entry__content .assote-cover-content :is(h2,h3) { line-height: 1.35; }
 .assote-media-columns { gap: 2rem; }
 .assote-stats .assote-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .wp-block-table { overflow-x: auto; }
 .site-footer { padding-inline: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
}
/* Usa i token del parent anche per le sue regole di contrasto ad alta priorità. */
:is(.assote-section,.assote-cover) { --sc-button-bg: var(--review-button, #000); --sc-button-ink: #fff; }
:is(.assote-bg-shade1,.assote-bg-maincolor,.assote-bg-secondarycolor,.assote-cover:not(.assote-cover-light)) { --sc-button-bg: #fff; --sc-button-ink: var(--review-button, #25392c); }
.entry__content .wp-block-cover.assote-cover-light,
.entry__content .wp-block-cover.assote-cover-light :is(h1,h2,h3,h4,p,li,a:not(.wp-block-button__link)) { color: #202720; text-shadow: none; }
.entry__content .assote-cover-light .wp-block-cover__inner-container { color: #202720; }

/* Le pagine a fasce gestiscono internamente la propria spaziatura. */
.page .site-main:has(.entry__content > .assote-section:first-child),
.page .site-main:has(.entry__content > .assote-cover:first-child) { padding-block: 0; }

/* Rispetta il rapporto scelto nel blocco Immagine, senza il limite delle card. */
.entry__content .assote-section .wp-block-image img[style*="aspect-ratio"] { max-height: none; }

/* Il testo segue la misura di base impostata nel Customizer. */
.entry__content { font-size: var(--sc-body-size, 1.125rem); line-height: 1.6; }
 .assote-bg-white, .assote-bg-shade2 { color: #323335; }
.assote-bg-maincolor, .assote-bg-secondarycolor { color: #fff; }

/* Ritorno alla categoria per gli articoli a sezioni. */
.academy-editorial.site-main { padding-block: 0; }
.editorial-return { padding-block: 2rem; }
.editorial-return a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; text-underline-offset: .2em; }

/* Revisione home: proporzioni compatte e allineamento di servizi e partner. */
.home .entry__content > .assote-cover:not(:first-child){min-height:clamp(26rem,56svh,38rem)!important;padding-block:clamp(3rem,5vw,5rem)}
.home .entry__content .assote-register-cover{align-items:center}
.home .assote-grid-3,.assote-partners .assote-partner-grid{align-items:stretch}
.home .assote-grid-3>.assote-card,.assote-partners .assote-card{display:flex;flex-direction:column;align-items:stretch}
.home .assote-grid-3>.assote-card>:is(h2,h3,p){width:100%;margin-inline:0;text-align:left}
.home .assote-grid-3>.assote-card>.wp-block-buttons{margin-top:auto;padding-top:.75rem;width:100%;justify-content:flex-start}
.assote-partners .assote-card>.wp-block-buttons{margin-top:auto;padding-top:.75rem;justify-content:center;width:100%}
.assote-partners .assote-partner-grid{gap:2rem;margin-top:2rem}
.assote-partners .assote-card{padding:1.25rem .75rem;border-top:1px solid #e1e7e2}
.assote-partners .assote-card>.wp-block-image{display:flex;align-items:center;justify-content:center;width:100%;height:9rem;margin:0 0 1.25rem}
.assote-partners .assote-card>.wp-block-image img{width:100%;height:100%!important;max-width:15rem;background:transparent;object-fit:contain!important;aspect-ratio:auto!important}
.assote-partners .assote-card>p{margin:0 0 1rem}
.home .entry__content>.assote-bg-secondarycolor{color:#203b2b}
.home .entry__content>.assote-bg-secondarycolor :is(h2,h3,p){color:inherit}
.assote-partners .assote-card p{line-height:1.5;text-align:center}
@media(max-width:759px){
 .home .entry__content>.assote-cover:not(:first-child){min-height:0!important;padding-block:3.5rem}
 .home .assote-grid-3{gap:2rem}
 .assote-partners .assote-partner-grid{gap:2rem 1.25rem}
 .assote-partners .assote-card>.wp-block-image{height:7rem}
 .assote-partners .assote-card{padding:1rem 0}
 .assote-partners .assote-card .wp-block-button__link{padding-inline:1rem}
}

/* Menu e sottomenu: dimensione uniforme e rollover leggibile. */
.site-header .site-navigation .site-navigation__menu a{font-size:1.125rem;line-height:1.4}
.site-header .site-navigation{--sc-navigation-submenu-hover-text:#fff;--sc-navigation-submenu-hover-background:#355742}
.site-header .site-navigation .site-navigation__menu .sub-menu a:is(:hover,:focus-visible){color:#fff;background:#355742}

/* Aree di attività: contenuti e gerarchia della sezione originale Jimdo. */
.home .entry__content>.assote-original-activities{color:#fff}
.assote-original-activities .assote-card h2{font-size:1.5rem;line-height:1.3}
.assote-original-activities .assote-card h3{font-size:1.2rem;line-height:1.4}
.assote-original-activities .assote-section-inner>h3{font-size:1.125rem;line-height:1.5;margin-bottom:2rem}

/* Collegamenti social dedicati al footer, gestibili nel menu Social. */
.site-header .social-footer-only { display: none; }

/* Footer: contrasto pieno anche per i testi secondari e gli stati interattivi. */
.site-footer :is(.site-footer__text, .site-footer__tagline, .site-footer__credit) { opacity: 1; font-size: 1rem; }
.site-footer .site-footer__menu a:is(:hover, :focus-visible) { color: #fff; text-decoration: underline; text-underline-offset: 0.25em; }
.site-footer .site-social__link { border-color: #b9cec1; }
.site-footer .site-social__link:is(:hover, :focus-visible) { background: #fff; color: #253e30; border-color: #fff; }
.site-footer a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* Raccolta editoriale automatica, con lo stesso impianto a due colonne. */
.entry__content > .assote-news { margin-block: 0; }
.assote-news [hidden] { display: none !important; }
.assote-news-filters { display: flex; flex-wrap: wrap; gap: .65rem; margin-block: 1.5rem; }
.assote-news-filters button { background: transparent; color: var(--sc-color-text, #25392c); border: 1px solid currentColor; border-radius: var(--sc-button-radius, 8px); padding: .6rem 1.1rem; min-height: 44px; font: inherit; font-weight: 700; cursor: pointer; }
.assote-news-filters button[aria-pressed="true"], .assote-news-filters button:hover { background: var(--sc-button-bg, #25392c); color: var(--sc-button-ink, #fff); border-color: var(--sc-button-bg, #25392c); }
.assote-news :is(button,a):focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.assote-news-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: clamp(2rem,5vw,5rem); }
.assote-news-item:nth-of-type(even) .assote-news-image { order: 2; }
.assote-news-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; height: auto; }
.assote-news-copy h2 { font-size: clamp(24px,3vw,36px); line-height: 1.3; margin-block: .5rem 1.25rem; }
.assote-news-copy h2 a { text-decoration: none; }
.assote-news-copy h2 a:hover { text-decoration: underline; }
.assote-news-copy > p { font-size: 1.125rem; line-height: 1.6; }
.assote-news-copy .assote-news-category { font-size: .95rem; font-weight: 700; }
.assote-news-count { margin-inline: 0 !important; }
.assote-news-row--text { grid-template-columns: 1fr; }
@media (max-width: 759px) {
 .assote-news-row { grid-template-columns: 1fr; }
 .assote-news-item:nth-of-type(even) .assote-news-image { order: 0; }
}

/* Informative: titoli, paragrafi e dati dello shortcode sulla stessa colonna. */
.assote-privacy > :is(h1,h2,p,.aac-public-details) { max-width: 48rem !important; margin-inline: auto !important; }

/* Galleria nativa: loghi interi, senza ritagli o ingrandimenti sproporzionati. */
.assote-logo-gallery.wp-block-gallery.has-nested-images figure.wp-block-image { flex-grow: 0; height: 7rem; }
.assote-logo-gallery.wp-block-gallery.has-nested-images figure.wp-block-image picture { display: block; width: 100%; height: 100%; min-height: 0; }
.assote-logo-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100%; height: 100%; object-fit: contain; }
.assote-partner-grid > .assote-card { min-width: 0; margin: 0; }
@media (max-width: 759px) {
 .assote-logo-gallery.wp-block-gallery.has-nested-images figure.wp-block-image { width: calc(50% - 1rem); height: 5rem; }
 .assote-partners .assote-partner-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Schede native: stessa struttura nell’editor e nella pagina pubblica. */
.assote-section-inner > .assote-home-cards { max-width: 100%; }
.assote-home-cards > .assote-card, .assote-editor-card { display: flex; flex-direction: column; align-items: stretch; }
.assote-home-cards > .assote-card > .wp-block-image, .assote-editor-card > .wp-block-image { width: 100%; }
.assote-home-cards > .assote-card > .wp-block-buttons, .assote-editor-card > .wp-block-buttons { margin-top: auto; padding-top: .75rem; }

/* Compensa la spaziatura scenografica del parent solo per queste schede. */
.entry__content > .wp-block-group.alignfull .wp-block-columns.assote-home-cards,
.editor-styles-wrapper .assote-home-cards { gap: clamp(1.5rem,3vw,3rem); align-items: stretch; }

.assote-section-inner > :is(.assote-logo-gallery, .assote-partner-grid) { max-width: 100%; width: 100%; }


/* Mantiene il fondo della testata anche quando ricompare durante lo scroll. */
.site-header.site-header--style-solid.is-scrolled { background: var(--sc-color-background); }

/* Le foto intere non devono mostrare fasce del colore di superficie del parent. */
.entry__content .wp-block-image img { background-color: transparent; }
