/* ============================================================
   Hub /migliori-giochi/ — OneDayQuiz
   Stessa lingua visiva dell'hub /storie/ (plugin onedaystories),
   namespace odg-. Token locali su .odg-hub per non toccare il tema.
   ============================================================ */

.odg-hub {
	--odg-purple: #7a3ff2;
	--odg-purple-600: #6a2fe0;
	--odg-ink: #1b1830;
	--odg-body: #2b2840;
	--odg-muted: #6a6680;
	--odg-line: rgba(27, 24, 48, 0.1);
	--odg-gold: #e0a94a;
	--odg-radius-lg: 24px;
	--odg-radius-md: 16px;
	--odg-radius-sm: 12px;
	--odg-shadow-lg: 0 32px 64px -28px rgba(50, 22, 78, 0.55), 0 12px 28px -16px rgba(0, 0, 0, 0.28);
	--odg-shadow-md: 0 12px 30px -16px rgba(27, 24, 48, 0.28);
	--odg-font-display: 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
	--odg-font-serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
	--odg-font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 4.5rem);
	font-family: var(--odg-font-serif);
}

/* ---------- Intestazione editoriale ---------- */
.odg-hub__head { text-align: center; max-width: 680px; margin: 0 auto clamp(1.8rem, 4vw, 3rem); }
.odg-hub__eyebrow {
	font-family: var(--odg-font-sans);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--odg-purple);
	margin: 0 0 0.7rem;
}
.odg-hub__title {
	font-family: var(--odg-font-display);
	font-weight: 700;
	font-size: clamp(2rem, 5vw, 3.2rem);
	line-height: 1.05;
	letter-spacing: -0.018em;
	color: var(--odg-ink);
	margin: 0 0 0.9rem;
}
.odg-hub__lead {
	font-size: clamp(1.02rem, 1.4vw, 1.15rem);
	line-height: 1.65;
	color: var(--odg-muted);
	margin: 0;
}

/* ---------- Griglie ---------- */
.odg-hub__grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); }
.odg-hub__grid--hero    { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .odg-hub__grid--hero { grid-template-columns: 1fr; } }
.odg-hub__grid--posts   { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.odg-hub__grid--reviews { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ============================================================
   Hero cards scenografiche
   ============================================================ */
.odg-hubcard,
a.odg-hubcard,
a.odg-hubcard:visited {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(300px, 30vw, 380px);
	border-radius: var(--odg-radius-lg);
	overflow: hidden;
	isolation: isolate;
	text-decoration: none;
	color: #fff;
	box-shadow: var(--odg-shadow-lg);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.odg-hubcard:hover,
a.odg-hubcard:focus {
	transform: translateY(-5px);
	color: #fff;
	box-shadow: 0 40px 70px -30px rgba(50, 22, 78, 0.6), 0 14px 30px -16px rgba(0, 0, 0, 0.3);
}

.odg-hubcard__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-size: cover;
	background-position: center;
	transform: scale(1.001);
	transition: transform 0.5s ease;
}
a.odg-hubcard:hover .odg-hubcard__media,
a.odg-hubcard:focus .odg-hubcard__media { transform: scale(1.06); }

/* Gradienti segnaposto per riquadro (sostituibili con immagini via filtro
   odq_giochi_hub_card_images). Tinte differenziate ma coerenti col brand.
   Solo background-image, mai la scorciatoia background: quest'ultima
   azzererebbe il background-size:cover qui sopra e le immagini uscirebbero a
   dimensione naturale, ancorate in alto a sinistra. */
.odg-hubcard--giochi-da-tavolo .odg-hubcard__media { background-image: linear-gradient(150deg, #6a2fe0 0%, #3a1f7a 55%, #1b0f3a 100%); }
.odg-hubcard--aperto-bambini   .odg-hubcard__media { background-image: linear-gradient(150deg, #1f9d8f 0%, #1d6f8c 55%, #133a52 100%); }
.odg-hubcard--party-ruolo      .odg-hubcard__media { background-image: linear-gradient(150deg, #d6357a 0%, #9b2f8c 55%, #4a1a52 100%); }
.odg-hubcard--idee-regalo      .odg-hubcard__media { background-image: linear-gradient(150deg, #e0a94a 0%, #b9662f 55%, #5a2c1a 100%); }
.odg-hubcard--plain .odg-hubcard__media { background-image: linear-gradient(150deg, #5a2fc2 0%, #33206a 55%, #170b34 100%); }

.odg-hubcard__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(11, 6, 26, 0.92) 0%, rgba(11, 6, 26, 0.45) 38%, rgba(11, 6, 26, 0.05) 68%, rgba(11, 6, 26, 0.18) 100%);
}

.odg-hubcard__body { position: relative; z-index: 2; display: block; width: 100%; padding: 1.4rem 1.4rem 1.5rem; }
.odg-hubcard__title {
	display: block;
	font-family: var(--odg-font-display);
	font-weight: 700;
	font-size: clamp(1.4rem, 2.1vw, 1.7rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
	margin-bottom: 0.45rem;
}
.odg-hubcard__desc {
	display: block;
	font-family: var(--odg-font-serif);
	font-size: 0.95rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.88);
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
	margin-bottom: 0.9rem;
}
.odg-hubcard__go {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--odg-font-sans);
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #fff;
}

/* ============================================================
   Intro editoriale
   ============================================================ */
.odg-hub__intro {
	max-width: 780px;
	margin: clamp(2rem, 5vw, 3.2rem) auto clamp(1rem, 2vw, 1.5rem);
	text-align: center;
}
.odg-hub__intro p {
	font-family: var(--odg-font-serif);
	font-size: clamp(1rem, 1.35vw, 1.12rem);
	line-height: 1.75;
	color: var(--odg-body);
	margin: 0;
}

/* ============================================================
   Sezioni dinamiche (titolo + griglia)
   ============================================================ */
.odg-hub__section { margin-top: clamp(2.4rem, 6vw, 4rem); }
.odg-hub__section-head { max-width: 720px; margin: 0 auto clamp(1.4rem, 3vw, 2rem); text-align: center; }
.odg-hub__section-title {
	font-family: var(--odg-font-display);
	font-weight: 700;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	color: var(--odg-ink);
	margin: 0;
}
.odg-hub__section-lead {
	font-family: var(--odg-font-serif);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--odg-muted);
	margin: 0.6rem 0 0;
}

/* ---------- Post card ---------- */
.odg-postcard {
	background: #fff;
	border: 1px solid var(--odg-line);
	border-radius: var(--odg-radius-md);
	overflow: hidden;
	box-shadow: var(--odg-shadow-md);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.odg-postcard:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -24px rgba(27, 24, 48, 0.4); }
.odg-postcard__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.odg-postcard__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #ece9f6; }
.odg-postcard__img { width: 100%; height: 100%; padding: 0 !important; object-fit: cover; display: block; }
.odg-postcard__img--placeholder { background: linear-gradient(150deg, #efeaff 0%, #d9d0f5 100%); }
/* Risorse didattiche: le cover sono 3:2 e riempiono il box. Il CSS aggiuntivo del Customizer forza `contain` (!important)
   per le illustrazioni quadrate dei correlati: qui lo si scavalca, con specificità maggiore. */
body.category-risorse-didattiche .odg-postcard__img,
.odg-hub--risorse .odg-postcard__img { object-fit: cover !important; }
.odg-postcard__badge {
	position: absolute;
	top: 0.7rem;
	left: 0.7rem;
	font-family: var(--odg-font-sans);
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: rgba(27, 24, 48, 0.82);
	padding: 0.28rem 0.6rem;
	border-radius: 999px;
}
/* Risorse didattiche: la materia sta sopra il titolo, non sull'immagine (non copre la copertina). */
.odg-postcard__kicker {
	font-family: var(--odg-font-sans);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--odg-purple);
	line-height: 1;
}
.odg-hub__eyebrow-sep { margin: 0 0.35em; opacity: 0.6; }
.odg-postcard__body { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.9rem 1rem 1.1rem; }
.odg-postcard__title {
	font-family: var(--odg-font-display);
	font-weight: 700;
	font-size: 1.08rem;
	line-height: 1.25;
	color: var(--odg-ink);
}
.odg-postcard__date {
	font-family: var(--odg-font-sans);
	font-size: 0.78rem;
	color: var(--odg-muted);
	margin-top: auto;
}
/* "Aggiornato il …" è un segnale di freschezza: leggibile, non urlato. */
.odg-postcard__date--updated { color: var(--odg-body); font-weight: 600; }

/* ---------- Review card ---------- */
.odg-reviewcard {
	background: #fff;
	border: 1px solid var(--odg-line);
	border-radius: var(--odg-radius-md);
	overflow: hidden;
	box-shadow: var(--odg-shadow-md);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.odg-reviewcard:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -24px rgba(27, 24, 48, 0.4); }
.odg-reviewcard__link { display: block; text-decoration: none; color: inherit; }
.odg-reviewcard__media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #ece9f6; }
.odg-reviewcard__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.odg-reviewcard__img--placeholder { background: linear-gradient(150deg, #efeaff 0%, #d9d0f5 100%); }
.odg-reviewcard__voto {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	display: inline-flex;
	align-items: center;
	font-family: var(--odg-font-sans);
	font-weight: 800;
	font-size: 0.9rem;
	color: var(--odg-ink);
	background: var(--odg-gold);
	box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
	padding: 0.24rem 0.55rem;
	border-radius: 999px;
}
.odg-reviewcard__title {
	display: block;
	font-family: var(--odg-font-display);
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.2;
	color: var(--odg-ink);
	padding: 0.8rem 0.9rem 1rem;
	text-align: center;
}

/* ---------- CTA ---------- */
.odg-hub__cta { text-align: center; margin: clamp(1.6rem, 4vw, 2.4rem) 0 0; }
/* Selettore rinforzato + tutti gli stati link: il tema colora i link
   (anche :visited) di blu, quindi va battuto per specificità. */
.odg-hub a.odg-hub__cta-link,
.odg-hub a.odg-hub__cta-link:link,
.odg-hub a.odg-hub__cta-link:visited,
.odg-hub a.odg-hub__cta-link:hover,
.odg-hub a.odg-hub__cta-link:focus,
.odg-hub a.odg-hub__cta-link:active {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--odg-font-sans);
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #fff;
	background: var(--odg-purple);
	padding: 0.75rem 1.4rem;
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}
.odg-hub a.odg-hub__cta-link:hover,
.odg-hub a.odg-hub__cta-link:focus { background: var(--odg-purple-600); transform: translateY(-2px); }

@media (max-width: 480px) {
	.odg-hub__grid--posts,
	.odg-hub__grid--reviews { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Single post — tipografia editoriale coerente con hub/archivi.
   Scoped al titolo e al contenuto (.elementor-widget-theme-post-*),
   NON tocca chrome del template (TOC, "Continua a esplorare", ecc.).
   ============================================================ */
.single-post .elementor-widget-theme-post-title .elementor-heading-title {
	/* Solo font serif: il colore lo lascia il template (bianco su banner blu),
	   per non introdurre problemi di contrasto o flash al caricamento. */
	font-family: 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
	letter-spacing: -0.015em;
	line-height: 1.1;
}

/* Titoli nel CONTENUTO — nuovi articoli (Gutenberg, senza classe Elementor):
   font serif + colore + margini editoriali. */
.single-post .elementor-widget-theme-post-content h2:not(.elementor-heading-title),
.single-post .elementor-widget-theme-post-content h3:not(.elementor-heading-title),
.single-post .elementor-widget-theme-post-content h4:not(.elementor-heading-title) {
	font-family: 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
	color: #1b1830;
	letter-spacing: -0.01em;
	line-height: 1.18;
}
.single-post .elementor-widget-theme-post-content h2:not(.elementor-heading-title) {
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	margin: 2rem 0 0.8rem;
}
.single-post .elementor-widget-theme-post-content h3:not(.elementor-heading-title) {
	font-size: clamp(1.25rem, 2vw, 1.55rem);
	margin: 1.6rem 0 0.6rem;
}

/* Titoli nel contenuto — articoli VECCHI (Elementor): solo font+colore,
   nessun margine per non alterare il layout costruito in Elementor. */
.single-post .elementor-widget-theme-post-content .elementor-heading-title {
	font-family: 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
	color: #1b1830;
	letter-spacing: -0.01em;
}

/* Link testuali in viola — esclusi i bottoni (Amazon/prodotto/Gutenberg). */
.single-post .elementor-widget-theme-post-content a:not(.elementor-button):not(.wp-block-button__link):not(.odg-prodotto__btn):not(.odg-prodotto__rec),
.single-post .elementor-widget-theme-post-content a:not(.elementor-button):not(.wp-block-button__link):not(.odg-prodotto__btn):not(.odg-prodotto__rec):visited {
	color: #7a3ff2;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}
.single-post .elementor-widget-theme-post-content a:not(.elementor-button):not(.wp-block-button__link):not(.odg-prodotto__btn):not(.odg-prodotto__rec):hover,
.single-post .elementor-widget-theme-post-content a:not(.elementor-button):not(.wp-block-button__link):not(.odg-prodotto__btn):not(.odg-prodotto__rec):focus {
	color: #6a2fe0;
}

/* Citazioni e liste — solo nel contenuto Gutenberg (evita widget Elementor). */
.single-post .elementor-widget-theme-post-content > blockquote,
.single-post .elementor-widget-theme-post-content > .wp-block-quote {
	border-left: 4px solid #7a3ff2;
	margin: 1.6rem 0;
	padding: 0.4rem 0 0.4rem 1.2rem;
	font-style: italic;
	color: #2b2840;
}

/* ============================================================
   TOC custom — [odg_toc]
   ============================================================ */
.odg-toc {
	--odgt-purple: #7a3ff2;
	--odgt-ink: #1b1830;
	--odgt-muted: #6a6680;
	--odgt-line: rgba(27, 24, 48, 0.12);
	--odgt-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--odgt-serif: 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
	border: 1px solid var(--odgt-line);
	border-radius: 14px;
	background: #fff;
	padding: 1.1rem 1.2rem 1.2rem;
	margin: 0 0 1.4rem;
	font-family: var(--odgt-sans);
}
.odg-toc__title {
	font-family: var(--odgt-serif);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--odgt-ink);
	margin: 0 0 0.8rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--odgt-line);
}
.odg-toc__list { list-style: none; margin: 0; padding: 0; counter-reset: odgt; }
.odg-toc__item { margin: 0; line-height: 1.35; }
.odg-toc__item + .odg-toc__item { margin-top: 0.5rem; }
.odg-toc__item--h3 { padding-left: 1rem; }
.odg-toc a.odg-toc__link,
.odg-toc a.odg-toc__link:link,
.odg-toc a.odg-toc__link:visited {
	display: block;
	font-size: 0.92rem;
	color: var(--odgt-ink);
	text-decoration: none;
	transition: color 0.15s ease;
}
.odg-toc__item--h2 > a.odg-toc__link { font-weight: 600; }
.odg-toc__item--h3 > a.odg-toc__link { color: var(--odgt-muted); font-size: 0.88rem; }
.odg-toc a.odg-toc__link:hover,
.odg-toc a.odg-toc__link:focus { color: var(--odgt-purple); }

/* Offset per l'ancora (header sticky del sito) */
.single-post .elementor-widget-theme-post-content :is(h2, h3)[id] { scroll-margin-top: 90px; }

/* ============================================================
   Sidebar articolo — [odg_sidebar]
   Blocchi: correlati, consigliato, recensioni, CTA. Card compatte.
   ============================================================ */
.odg-side {
	--odgs-purple: #7a3ff2;
	--odgs-purple-600: #6a2fe0;
	--odgs-ink: #1b1830;
	--odgs-muted: #6a6680;
	--odgs-line: rgba(27, 24, 48, 0.12);
	--odgs-gold: #e0a94a;
	--odgs-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--odgs-serif: 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
	font-family: var(--odgs-sans);
}
.odg-side__block {
	border: 1px solid var(--odgs-line);
	border-radius: 14px;
	background: #fff;
	padding: 1.1rem 1.15rem 1.2rem;
	margin: 0 0 1.4rem;
}
.odg-side__title {
	font-family: var(--odgs-serif);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--odgs-ink);
	margin: 0 0 0.9rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--odgs-line);
	line-height: 1.2;
}
.odg-side__list { list-style: none; margin: 0; padding: 0; }
.odg-side__item + .odg-side__item { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--odgs-line); }
.odg-side a.odg-side__link,
.odg-side a.odg-side__link:link,
.odg-side a.odg-side__link:visited {
	display: flex;
	gap: 0.7rem;
	align-items: center;
	text-decoration: none;
	color: var(--odgs-ink);
}
.odg-side__thumb {
	position: relative;
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	overflow: hidden;
	background: #f2eefc;
}
/* padding:0 !important neutralizza il CSS per-post di Elementor che applica
   img{padding:36px} a tutte le immagini della pagina (schiacciava i thumb). */
.odg-side .odg-side__thumb img { width: 56px !important; height: 56px !important; padding: 0 !important; max-width: none !important; object-fit: cover; display: block; }
.odg-side__img--ph { display: block; width: 100%; height: 100%; background: linear-gradient(150deg, #efeaff, #d9d0f5); }
.odg-side__voto {
	position: absolute;
	bottom: 2px;
	right: 2px;
	font-family: var(--odgs-sans);
	font-weight: 800;
	font-size: 0.68rem;
	color: var(--odgs-ink);
	background: var(--odgs-gold);
	padding: 0.05rem 0.32rem;
	border-radius: 999px;
}
.odg-side__itemtitle {
	font-family: var(--odgs-serif);
	font-size: 0.95rem;
	line-height: 1.25;
	color: var(--odgs-ink);
}
.odg-side a.odg-side__link:hover .odg-side__itemtitle { color: var(--odgs-purple); }
.odg-side a.odg-side__more,
.odg-side a.odg-side__more:link,
.odg-side a.odg-side__more:visited {
	display: inline-block;
	margin-top: 1rem;
	font-family: var(--odgs-sans);
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--odgs-purple);
	text-decoration: none;
}
.odg-side a.odg-side__more:hover { text-decoration: underline; }

/* Box "Consigliato" nella sidebar: azzero il margine del box prodotto e lo
   rendo verticale/compatto. */
.odg-side__block .odg-prodotto { margin: 0; border: 0; box-shadow: none; padding: 0; flex-direction: column; align-items: stretch; gap: 0.7rem; }
.odg-side__block .odg-prodotto__media { width: 100%; }
.odg-side__block .odg-prodotto__nome { font-size: 1.1rem; }

/* CTA */
.odg-side__cta { background: linear-gradient(160deg, #f3eefe 0%, #ffffff 70%); }
.odg-side__title--cta { border-bottom: 0; padding-bottom: 0; margin-bottom: 0.5rem; }
.odg-side__ctatext { font-family: var(--odgs-sans); font-size: 0.88rem; line-height: 1.5; color: var(--odgs-muted); margin: 0 0 1rem; }
.odg-side a.odg-side__ctabtn,
.odg-side a.odg-side__ctabtn:link,
.odg-side a.odg-side__ctabtn:visited {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--odgs-sans);
	font-size: 0.82rem;
	font-weight: 700;
	color: #fff;
	background: var(--odgs-purple);
	padding: 0.6rem 1.1rem;
	border-radius: 999px;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}
.odg-side a.odg-side__ctabtn:hover,
.odg-side a.odg-side__ctabtn:focus { background: var(--odgs-purple-600); color: #fff; transform: translateY(-2px); }

/* ---------- "I più apprezzati" (box sticky, → Amazon) ---------- */
.odg-piu { margin: 0; }
.odg-piu__list { list-style: none; margin: 0; padding: 0; }
.odg-piu__item + .odg-piu__item { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--odgs-line); }
.odg-piu a.odg-piu__link,
.odg-piu a.odg-piu__link:link,
.odg-piu a.odg-piu__link:visited { display: flex; gap: 0.7rem; align-items: center; text-decoration: none; color: var(--odgs-ink); }
.odg-piu__thumb { position: relative; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: #f2eefc; }
.odg-piu .odg-piu__thumb img { width: 52px !important; height: 52px !important; padding: 0 !important; max-width: none !important; object-fit: cover; display: block; }
.odg-piu__thumb-ph { display: block; width: 100%; height: 100%; background: linear-gradient(150deg, #efeaff, #d9d0f5); }
.odg-piu__body { min-width: 0; }
.odg-piu__nome { display: block; font-family: var(--odgs-serif); font-weight: 700; font-size: 0.92rem; line-height: 1.2; color: var(--odgs-ink); }
.odg-piu__meta { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.2rem; }
.odg-piu__voto { font-family: var(--odgs-sans); font-weight: 800; font-size: 0.72rem; color: var(--odgs-ink); background: var(--odgs-gold); padding: 0.05rem 0.36rem; border-radius: 999px; }
.odg-piu__amz { font-family: var(--odgs-sans); font-size: 0.75rem; font-weight: 700; color: var(--odgs-purple); }
.odg-piu a.odg-piu__link:hover .odg-piu__nome { color: var(--odgs-purple); }

/* Sticky a livello di widget Elementor: il parent (.elementor-widget-wrap della
   colonna) è alto quanto il contenuto, quindi lo sticky segue tutto l'articolo. */
.elementor-widget.odg-pinned-widget,
.odg-pinned-widget { position: sticky !important; top: 1.5rem; align-self: flex-start; }

/* Template nativo (single-article.php): la sidebar .odq-article__side è stirata
   in altezza quanto il contenuto (align-items: stretch), quindi il box "I più
   apprezzati" — ultimo widget della colonna — resta fisso in alto scorrendo. */
.odq-article__side .odg-piu { position: sticky; top: calc(80px + 1.5rem); }
/* Articoli senza box prodotto (es. Enigmi celebri): la CTA è l'ultimo widget
   della colonna e resta fissa, così la sidebar non si svuota scorrendo. */
.odq-article__side .odg-side--pinned { position: sticky; top: calc(80px + 1.5rem); }
@media (max-width: 900px) {
	.odq-article__side .odg-side--pinned { position: static; top: auto; }
}
/* Risorse didattiche: «Altre risorse» resta fisso accanto alle tabelle lunghe.
   Tiene conto della admin bar (--odq-adminbar, da site-header.css; 0 da sloggati) e,
   se il box è più alto della finestra, scorre al suo interno invece di restare tagliato. */
@media (min-width: 901px) {
	.odq-article__side .odg-side--risorse {
		top: calc(80px + 1.5rem + var(--odq-adminbar, 0px));
		max-height: calc(100vh - 80px - 3rem - var(--odq-adminbar, 0px));
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

/* Stessa cosa nella sidebar dell'archivio recensioni. */
.odq-archive__side .odg-piu { position: sticky; top: calc(80px + 1.5rem); }
@media (max-width: 900px) {
	.odq-archive__side .odg-piu { position: static; top: auto; }
}
/* Spazio tra la barra di ricerca e i blocchi sottostanti. */
.odq-archive__side .odq-search { margin-bottom: 1.4rem; }

/* "Esplora le categorie": pill link, coerenti col design system.
   :link/:visited espliciti per battere il globale blu di kit.css `a:visited`. */
.odg-side__cats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.odg-side__cats a,
.odg-side__cats a:link,
.odg-side__cats a:visited {
	display: inline-block;
	padding: 6px 13px;
	border: 1px solid var(--odgs-line);
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--odgs-muted);
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.odg-side__cats a:hover,
.odg-side__cats a:focus {
	color: #fff;
	background: var(--odgs-purple);
	border-color: var(--odgs-purple);
}
@media (max-width: 900px) {
	.odq-article__side .odg-piu { position: static; top: auto; }
}

/* ============================================================
   Header editoriale archivio — stessa lingua visiva dell'hero hub
   (shortcode [odg_giochi_archivio_head])
   ============================================================ */
.odg-archhead {
	padding: clamp(2rem, 5vw, 3.6rem) 0 clamp(0.5rem, 2vw, 1.2rem);
}
.odg-archhead__inner { max-width: 720px; margin: 0 auto; text-align: center; }
.odg-archhead__crumb {
	font-family: var(--odg-font-sans);
	font-size: 0.8rem;
	color: var(--odg-muted);
	margin: 0 0 0.9rem;
}
.odg-archhead__crumb a,
.odg-archhead__crumb a:link,
.odg-archhead__crumb a:visited { color: var(--odg-muted); text-decoration: none; }
.odg-archhead__crumb a:hover,
.odg-archhead__crumb a:focus { color: var(--odg-purple); }
/* eyebrow: batte il colore link del tema (blu / :visited) */
.odg-archhead .odg-hub__eyebrow a,
.odg-archhead .odg-hub__eyebrow a:link,
.odg-archhead .odg-hub__eyebrow a:visited { color: var(--odg-purple); text-decoration: none; }
.odg-archhead .odg-hub__eyebrow a:hover,
.odg-archhead .odg-hub__eyebrow a:focus { color: var(--odg-purple-600); text-decoration: underline; }
.odg-archhead__title { margin-bottom: 0; }
/* Riga date: informativa, non deve competere col titolo. L'aggiornamento è il
   motivo per cui la riga esiste, quindi è l'unico pezzo con un po' di peso. */
.odg-archhead__meta {
	font-family: var(--odg-font-sans);
	font-size: 0.8rem;
	color: var(--odg-muted);
	margin: 0.9rem 0 0;
}
.odg-archhead__meta-sep { margin: 0 0.4em; opacity: 0.6; }
.odg-archhead__meta-updated { color: var(--odg-body); font-weight: 600; }

/* ---------- Barra di condivisione (header articolo) ---------- */
.odg-share {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.6rem 0.75rem;
	margin: 1.5rem 0 0;
}
.odg-share__label {
	font-family: var(--odg-font-sans);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--odg-muted);
}
.odg-share__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.odg-share__btn {
	--c: var(--odg-purple);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--odg-line);
	border-radius: 999px;
	background: #fff;
	color: var(--odg-muted);
	cursor: pointer;
	position: relative;
	transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.odg-share__btn:hover,
.odg-share__btn:focus-visible {
	color: #fff;
	background: var(--c);
	border-color: var(--c);
	transform: translateY(-2px);
	text-decoration: none;
	outline: none;
}
.odg-share__btn svg { display: block; }
/* Il pulsante copia è un <button>: batte lo stile globale magenta del tema
   (border/colore) con selettore elemento+classe. */
.odg-share button.odg-share__btn--copy {
	-webkit-appearance: none;
	appearance: none;
	border: 1px solid var(--odg-line);
	background: #fff;
	color: var(--odg-muted);
	box-shadow: none;
}
.odg-share button.odg-share__btn--copy:hover,
.odg-share button.odg-share__btn--copy:focus-visible {
	color: #fff;
	background: var(--odg-purple);
	border-color: var(--odg-purple);
}
.odg-share__btn--whatsapp { --c: #25d366; }
.odg-share__btn--facebook { --c: #1877f2; }
.odg-share__btn--x        { --c: #000; }
.odg-share__btn--telegram { --c: #229ed9; }
.odg-share__btn--email    { --c: var(--odg-purple); }
.odg-share__btn--copy     { --c: var(--odg-purple); }
/* Feedback "Copiato!" del pulsante copia link */
.odg-share__copied {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: var(--odg-ink);
	color: #fff;
	font-family: var(--odg-font-sans);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 3px 9px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}
.odg-share__btn--copy.is-copied .odg-share__copied {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Archivio categoria/blog — stessa griglia card dell'hub
   (shortcode [odg_giochi_archivio] nel template Elementor)
   ============================================================ */
.odg-hub--archivio { padding-top: clamp(1.5rem, 4vw, 3rem); }
.odg-hub__empty {
	text-align: center;
	font-family: var(--odg-font-serif);
	font-size: 1.05rem;
	color: var(--odg-muted);
	padding: 2rem 0;
	margin: 0;
}

/* ---------- Paginazione ---------- */
.odg-pagination { margin: clamp(2rem, 5vw, 3rem) 0 0; }
.odg-pagination .page-numbers {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	padding: 0;
	margin: 0;
}
.odg-pagination .page-numbers li { display: inline-flex; }
.odg-pagination a.page-numbers,
.odg-pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6rem;
	height: 2.6rem;
	padding: 0 0.6rem;
	border-radius: 999px;
	font-family: var(--odg-font-sans);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	border: 1px solid var(--odg-line);
	background: #fff;
	color: var(--odg-ink);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.odg-pagination a.page-numbers:hover,
.odg-pagination a.page-numbers:focus {
	background: var(--odg-purple);
	border-color: var(--odg-purple);
	color: #fff;
	transform: translateY(-2px);
}
.odg-pagination span.page-numbers.current {
	background: var(--odg-purple);
	border-color: var(--odg-purple);
	color: #fff;
}
.odg-pagination span.page-numbers.dots {
	border-color: transparent;
	background: transparent;
	color: var(--odg-muted);
}

/* ============================================================
   Blocco editoriale sotto la griglia dell'archivio categoria
   (campo ACF "hub_contenuto", shortcode [odg_giochi_archivio])
   ============================================================ */
.odg-hub__editorial {
	max-width: 780px;
	margin: clamp(2.5rem, 6vw, 4rem) auto 0;
	padding-top: clamp(1.8rem, 4vw, 2.6rem);
	border-top: 1px solid var(--odg-line);
	font-family: var(--odg-font-serif);
	font-size: 1.075rem;
	line-height: 1.75;
	color: var(--odg-ink);
}
.odg-hub__editorial > *:first-child { margin-top: 0; }
.odg-hub__editorial > *:last-child { margin-bottom: 0; }
.odg-hub__editorial h2 {
	font-family: var(--odg-font-display);
	font-size: clamp(1.5rem, 3vw, 1.9rem);
	line-height: 1.25;
	color: var(--odg-purple);
	margin: 2.4rem 0 0.8rem;
}
.odg-hub__editorial h3 {
	font-family: var(--odg-font-display);
	font-size: clamp(1.15rem, 2.2vw, 1.3rem);
	line-height: 1.3;
	color: var(--odg-ink);
	margin: 1.8rem 0 0.5rem;
}
.odg-hub__editorial p { margin: 0 0 1.1rem; }
.odg-hub__editorial ul,
.odg-hub__editorial ol { margin: 0 0 1.3rem; padding-left: 1.4rem; }
.odg-hub__editorial li { margin-bottom: 0.7rem; }
/* batte il colore link del tema (blu / :visited) */
.odg-hub__editorial a,
.odg-hub__editorial a:link,
.odg-hub__editorial a:visited {
	color: var(--odg-purple);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.odg-hub__editorial a:hover,
.odg-hub__editorial a:focus { color: var(--odg-purple-600); }

/* ============================================================
   Testo SEO/FAQ nel corpo della pagina hub /migliori-giochi/
   (blocchi Gutenberg dopo lo shortcode [migliori_giochi_hub]):
   stesso trattamento del blocco .odg-hub__editorial degli archivi
   categoria — colonna stretta centrata, serif, titoletti H2 viola,
   bordino di stacco sopra il primo blocco. Attivato dalla body class
   .odg-hub-page (basata sullo slug → portabile in produzione).
   ============================================================ */

/* I token sono scoped a .odg-hub (vedi sopra) e non arrivano ai blocchi
   Gutenberg che gli stanno accanto: li ripubblichiamo sulla body class, che
   esiste solo su questa pagina → niente leak sul resto del tema. */
.odg-hub-page {
	--odg-purple: #7a3ff2;
	--odg-purple-600: #6a2fe0;
	--odg-ink: #1b1830;
	--odg-line: rgba(27, 24, 48, 0.1);
	--odg-font-display: 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, 'Times New Roman', serif;
	--odg-font-serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
}
.odg-hub-page .odg-hub ~ * {
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
	font-family: var(--odg-font-serif);
	font-size: 1.075rem;
	line-height: 1.75;
	color: var(--odg-ink);
}
.odg-hub-page .odg-hub ~ h2 {
	font-family: var(--odg-font-display);
	font-size: clamp(1.5rem, 3vw, 1.9rem);
	line-height: 1.25;
	color: var(--odg-purple);
	margin: 2.4rem auto 0.8rem;
}
.odg-hub-page .odg-hub ~ h3 {
	font-family: var(--odg-font-display);
	font-size: clamp(1.15rem, 2.2vw, 1.3rem);
	line-height: 1.3;
	color: var(--odg-ink);
	margin: 1.8rem auto 0.5rem;
}
.odg-hub-page .odg-hub ~ p { margin: 0 auto 1.1rem; }
.odg-hub-page .odg-hub ~ ul,
.odg-hub-page .odg-hub ~ ol { margin: 0 auto 1.3rem; padding-left: 1.4rem; max-width: 780px; }
.odg-hub-page .odg-hub ~ ul li,
.odg-hub-page .odg-hub ~ ol li { margin-bottom: 0.7rem; }
/* batte il colore link del tema (blu / :visited) */
.odg-hub-page .odg-hub ~ * a,
.odg-hub-page .odg-hub ~ * a:link,
.odg-hub-page .odg-hub ~ * a:visited {
	color: var(--odg-purple);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.odg-hub-page .odg-hub ~ * a:hover,
.odg-hub-page .odg-hub ~ * a:focus { color: var(--odg-purple-600); }
/* Bordino separatore sopra il primo blocco dopo lo shortcode (selettori
   qualificati per elemento così vincono per ordine di sorgente sulle regole ~). */
.odg-hub-page .odg-hub + h2,
.odg-hub-page .odg-hub + h3,
.odg-hub-page .odg-hub + p {
	margin-top: clamp(2.5rem, 6vw, 4rem);
	padding-top: clamp(1.8rem, 4vw, 2.6rem);
	border-top: 1px solid var(--odg-line);
}

/* ---------- Stampa degli articoli ----------
   Le Risorse didattiche si stampano davvero (insegnanti, genitori). Il CSS di stampa del
   Customizer nasconde header, footer e sidebar; qui ciò che resta nella testata e in coda:
   - i pulsanti di condivisione, che il reset di Hello Elementor stampa con l'URL dopo
     ogni link e che si accavallavano sotto il titolo;
   - le briciole (il Customizer nasconde `.odq-breadcrumb`, ma qui la classe è un'altra);
   - l'URL dopo il link della categoria nell'occhiello;
   - le card «Altri articoli in …» / «Altre risorse in …», navigazione che su carta non serve;
   - il banner dei cookie (#cc-main), che si stampava su ogni pagina. */
@media print {
	.odg-share,
	.odg-archhead__crumb,
	.odg-hub--correlati,
	#cc-main { display: none !important; }
	.odg-hub__eyebrow a[href]::after { content: none !important; }
}

/* ==========================================================================
   Elenchi di esercizi (articoli «Esercizi di matematica», 7 ott. 2026)
   --------------------------------------------------------------------------
   Con il numero dell'elenco attaccato al testo («1. 16 + 4 =») numero d'ordine
   e numeri dell'esercizio si confondevano. Qui il numero d'ordine sta in un
   pallino colorato, staccato dal testo.
   Vale solo per gli elenchi con la classe `odq-esercizi` (blocco Elenco →
   Avanzate → Classi CSS aggiuntive): gli altri elenchi numerati degli articoli
   restano com'erano. `odq-esercizi--problemi` è la variante per i problemi:
   un riquadro per problema e la domanda (in <strong>) su una riga sua.
   ========================================================================== */
.odq-article__content ol.odq-esercizi {
	list-style: none;
	margin: 1.2rem 0 1.8rem;
	padding: 0;
	counter-reset: odq-esercizio;
}
.odq-article__content ol.odq-esercizi > li {
	counter-increment: odq-esercizio;
	position: relative;
	margin: 0;
	padding: 0.7rem 0 0.7rem 3rem;
	min-height: 2.9rem;
	line-height: 1.5;
	border-bottom: 1px dashed rgba(27, 24, 48, 0.14);
}
.odq-article__content ol.odq-esercizi > li:last-child { border-bottom: 0; }
.odq-article__content ol.odq-esercizi > li::before {
	content: counter(odq-esercizio);
	position: absolute;
	left: 0;
	top: 0.45rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--brand-purple, #7a3ff2);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.odq-article__content ol.odq-esercizi--problemi > li {
	margin: 0 0 0.8rem;
	padding: 1rem 1.2rem 1rem 3.9rem;
	border: 0;
	border-radius: 12px;
	background: rgba(122, 63, 242, 0.06);
	line-height: 1.6;
}
.odq-article__content ol.odq-esercizi--problemi > li::before { left: 1.1rem; top: 0.8rem; }
.odq-article__content ol.odq-esercizi--problemi > li strong {
	display: block;
	margin-top: 0.3rem;
}

/* In stampa gli sfondi non escono: senza queste righe il numero, bianco su
   viola, sparirebbe e i problemi perderebbero il riquadro. */
@media print {
	.odq-article__content ol.odq-esercizi > li::before {
		background: none;
		color: #000;
		border: 1.5px solid #000;
	}
	.odq-article__content ol.odq-esercizi--problemi > li {
		background: none;
		border: 1px solid #999;
		break-inside: avoid;
	}
}

/* ---------- Banda «Giochi Online Gratis» (hub) ---------- */
.odg-online {
	position: relative; overflow: hidden; isolation: isolate;
	width: 100vw; margin: clamp(3rem, 8vw, 5.5rem) calc(50% - 50vw);
	padding: clamp(3rem, 7vw, 5rem) 1.25rem;
	background: linear-gradient(135deg, #1a1442 0%, #2b1a6b 55%, #4a2491 100%);
	color: #fff;
}
.odg-online__deco {
	position: absolute; inset: 0; z-index: -1; opacity: 0.09; pointer-events: none;
	background-image:
		radial-gradient(circle at 12% 22%, #fff 0 5px, transparent 6px),
		radial-gradient(circle at 78% 14%, #fff 0 3px, transparent 4px),
		radial-gradient(circle at 90% 70%, #fff 0 6px, transparent 7px),
		radial-gradient(circle at 30% 85%, #fff 0 4px, transparent 5px),
		linear-gradient(45deg, transparent 46%, #fff 47% 53%, transparent 54%);
	background-size: 260px 260px, 340px 340px, 300px 300px, 220px 220px, 90px 90px;
}
.odg-online__inner { max-width: 1180px; margin: 0 auto; text-align: center; }
.odg-online__eyebrow {
	margin: 0 0 .6rem; font-family: var(--odg-font-sans); font-size: .8rem; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase; color: #ffd37a;
}
.odg-online__title {
	margin: 0 0 .7rem; font-family: var(--odg-font-display); font-weight: 700; color: #fff;
	font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15;
}
.odg-online__lead {
	max-width: 620px; margin: 0 auto clamp(1.6rem, 4vw, 2.4rem); font-family: var(--odg-font-serif);
	font-size: 1.1rem; line-height: 1.55; color: #e6e0ff;
}
.odg-online .odq-giochi { margin: 0; text-align: left; }
.odg-online .odq-giochi__grid { grid-template-columns: repeat(3, 1fr); }
.odg-online__cta { margin: clamp(1.6rem, 4vw, 2.4rem) 0 0; }
.odg-online__cta a {
	display: inline-block; padding: .8rem 1.6rem; border-radius: 999px; background: #ffd37a; color: #1a1442;
	font-family: var(--odg-font-sans); font-weight: 700; text-decoration: none; transition: transform .2s ease, background .2s ease;
}
.odg-online__cta a:hover { background: #fff; transform: translateY(-2px); }
.odg-online__cta a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 900px) { .odg-online .odq-giochi__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
	.odg-online .odq-giochi__grid {
		display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
		margin: 0 -1.25rem; padding: 0 1.25rem .8rem; scroll-padding: 0 1.25rem;
	}
	.odg-online .odg-postcard { flex: 0 0 78%; scroll-snap-align: start; }
}
/* 100vw include la scrollbar: niente scroll orizzontale di pagina per la banda a tutta larghezza */
body:has(.odg-online) { overflow-x: clip; }
.odg-hub__intro p + p { margin-top: 1rem; }
.odg-hub__intro a { color: var(--odg-purple-600); text-decoration: underline; text-underline-offset: 3px; }
.odg-hub__intro a:hover { color: var(--odg-purple); }

/* Hub-pagina (scuola, strumenti, schede, giochi di parole): aria fra titolo e sottotitolo (`.odg-archhead__title` ha margin-bottom 0). */
body.page .odg-archhead .odg-hub__title + .odg-hub__lead { margin-top: 1.1rem; }
