/*
Theme Name: GeneratePress Child
Description: Child theme for GeneratePress with customizations
Author: DG Pro Audio
Template: generatepress
Version: 1.0.0
*/

/* =========================================
	 VARIABILI GLOBALI PRIORITARIE
	 ========================================= */
:root {
	--header-hero-nav-width-desktop: 895px;
	--header-hero-nav-padding-desktop: 12.5px;
	--header-hero-nav-width-mobile: 918px;
	--header-hero-nav-padding-mobile: 12.5px;
}
/* =========================================
	 HEADER, HERO, NAV: LARGHEZZA E PADDING PRIORITARI
	 ========================================= */
@media (min-width: 960px) {
	.site-header__inner,
	.hero-section .hero-content,
	.site-nav--primary > .container,
	.site-nav--categories .container {
		width: var(--header-hero-nav-width-desktop) !important;
		max-width: var(--header-hero-nav-width-desktop) !important;
		padding-left: var(--header-hero-nav-padding-desktop) !important;
		padding-right: var(--header-hero-nav-padding-desktop) !important;
		margin-left: auto !important;
		margin-right: auto !important;
		box-sizing: border-box !important;
	}
}
@media (max-width: 959px) {
	.site-header__inner,
	.hero-section .hero-content,
	.site-nav--primary > .container,
	.site-nav--categories .container {
		width: 100% !important;
		max-width: var(--header-hero-nav-width-mobile) !important;
		padding-left: var(--header-hero-nav-padding-mobile) !important;
		padding-right: var(--header-hero-nav-padding-mobile) !important;
		margin-left: auto !important;
		margin-right: auto !important;
		box-sizing: border-box !important;
	}
}
/* Fluid article container: legacy overrides removed; single-post spacing is managed by the master rule at end of file. */

/* Mobile-specific: remove grid gutters and force single-column layout for .layout--with-sidebar
	 This bypasses gap/clamp values that prevent the main article from expanding like the footer. */
@media (max-width: 959px) {
	.layout--with-sidebar {
		display: grid !important;
		grid-template-columns: 1fr !important;
		grid-auto-rows: auto !important;
		gap: 0 !important;
		row-gap: 0 !important;
		column-gap: 0 !important;
	}

	.layout__main {
		grid-column: 1 !important;
		width: 100% !important;
		min-width: 0 !important;
	}

	.home-sidebar {
		grid-column: 1 !important;
		width: 100% !important;
		margin-top: 0 !important;
		padding-left: clamp(0.75rem, 2vw, 1.2rem) !important;
		padding-right: clamp(0.75rem, 2vw, 1.2rem) !important;
	}
}

/* Immagini e media dentro gli articoli: responsivi */
.entry__content img,
.entry__content video,
.entry__content iframe,
.entry__content embed,
.entry-content img,
.entry-content video,
.entry-content iframe,
.entry-content embed {
	max-width: 100% !important;
	height: auto !important;
}

/* Fallback per layout con sidebar: handled by the single-post master rule at end of file. */

/* Import parent theme styles */
@import url("../generatepress/style.css");

.nav-links a,
.nav-previous a,
.nav-next a {
	color: #ff9f43 !important;
	transition: color 0.2s;
}

/* Regole per le product-card usate negli articoli: evita sovrapposizioni immagine/testo */
.gp-product-body { margin-left: 10.313px !important; margin-right: 0 !important; margin-top: -20px !important; width: 100% !important; max-width: 533px !important; min-width: 0 !important; display: flex !important; flex-direction: column !important; justify-content: space-between !important; height: auto !important; padding: 0 !important; margin-bottom: 28px !important; box-sizing: border-box !important; }
@media (max-width: 959px) {
	.gp-product-body { margin-left: 0 !important; margin-top: 0 !important; min-width: auto !important; margin-top: 8px !important; }
}

/* Pulsante nelle product-card: altezza 40px, centratura verticale */
.gp-product-body p > a { display: inline-flex !important; align-items: center !important; height: 40px !important; line-height: 40px !important; padding: 0 10px !important; font-size: 13px !important; }

.nav-links a:hover,
.nav-links a:focus,
.nav-previous a:hover,
.nav-previous a:focus,
.nav-next a:hover,
.nav-next a:focus {
	color: #fff !important;
}

/* Regola per la classe usata dal template: entry__content (double underscore) */
body.single article.entry .entry__content,
body.single .site-main article.entry .entry__content,
body.single.post-type-post article.entry .entry__content,
.entry__content {
	min-width: 0 !important; /* avoids forcing grid columns wider than available */
	overflow-wrap: break-word !important;
	word-wrap: break-word !important;
	box-sizing: border-box !important;
}

.post-navigation a:hover,
.post-navigation a:focus,
.post-navigation .nav-links > a:hover,
.post-navigation .nav-links > a:focus,
.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
	color: #fff !important;
}
/* Link globali arancioni, bianchi al hover */
a:not(.pill-link) {
	color: #ff9f43 !important;
	transition: color 0.2s;
}
a:not(.pill-link):hover,
a:not(.pill-link):focus {
	color: #fff !important;
}

/* Forza colore per navigazione articoli */
.post-navigation a,
.nav-links a,
.nav-previous a,
.nav-next a,
.post-navigation .nav-links a,
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	color: #ff9f43 !important;
	transition: color 0.2s;
}
.post-navigation a:hover,
.post-navigation a:focus,
.nav-links a:hover,
.nav-links a:focus,
.nav-previous a:hover,
.nav-previous a:focus,
.nav-next a:hover,
.nav-next a:focus,
.post-navigation .nav-links a:hover,
.post-navigation .nav-links a:focus,
.post-navigation .nav-previous a:hover,
.post-navigation .nav-previous a:focus,
.post-navigation .nav-next a:hover,
.post-navigation .nav-next a:focus {
	color: #fff !important;
}
/* Nascondi il titolo delle pagine, articoli e archivi ma lascia visibili i breadcrumbs, tranne in home */
.page-title,
.entry__title {
	display: none !important;
}
body.home .page-title,
body.home .entry__title {
	display: block !important;
}

/* Show the post title for single posts (override the global hiding) */
body.single .entry__title {
    display: block !important;
}

/* Uniform alignment for article titles across the theme: make titles block-level and left-aligned so they look consistent everywhere */
.entry__title,
.page-title,
.post-title,
.post-card__title,
.post-card-content .post-title,
.post-card .post-card__title,
.post-card-content h3.post-title,
.widget__list--related a,
.widget__list--related li {
    text-align: left;
    display: block;
    margin: 0;
    padding: 0;
}

/* Ensure title links behave like inline text and inherit color/typography so the appended month looks like the same line */
.post-title a,
.post-card__title a,
.entry__title a,
.page-title a,
.widget__list--related a {
    display: inline;
    color: inherit;
    text-decoration: none;
}

/* Styling for appended month/year in titles (generato lato server) */
/* Inherit all typographic properties so the appended month/year appears as part of the same title text */
.gp-title-month {
    display: inline;
    margin-left: 0.4rem; /* small spacing so it doesn't stick to the title */
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: none;
    white-space: nowrap; /* keep month/year together */
}



.site-ads-bar {
	background: transparent;
	color: inherit;
	border: none;
	width: 100%;
}

.site-ads-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(1rem, 3vw, 2.6rem);
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	background: transparent;
	border: none;
}

.site-ads-bar .widget {
	margin: 0;
	width: 100%;
	display: flex;
	justify-content: center;
}

.site-ads-bar .widget > * {
	max-width: 100%;
}

.site-ads-bar__placeholder {
	padding: 0.75rem 1.25rem;
	border: 1px dashed rgba(15, 23, 42, 0.25);
	border-radius: 10px;
	text-align: center;
	font-size: 0.9rem;
	color: var(--color-muted);
	background: rgba(255, 255, 255, 0.6);
}
/*
Theme Name: GeneratePress Child
Template: generatepress
Description: Child theme ottimizzato per DG Pro Audio.
Author: Bernygio
Version: 1.0.0
*/

/* Root tokens */
:root {
	--color-background: #000000;
	--color-surface: #1c1c1c;
	--color-primary: #ff9f43;
	--color-primary-accent: #ff8c00;
	--color-accent: #ff9f43;
	--color-text: #ffffff;
	--color-muted: #9ca3af;
	--color-border: rgba(255, 255, 255, 0.15);
	--radius-base: 4px;
	--radius-pill: 999px;
	--shadow-soft: 0 16px 40px -18px rgba(0, 0, 0, 0.8);
	--shadow-card: 0 30px 50px -35px rgba(0, 0, 0, 0.9);
	--transition-base: all 0.2s ease;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

code,
pre {
	font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	background-color: rgba(15, 23, 42, 0.08);
	border-radius: 10px;
}

code {
	padding: 0.2rem 0.4rem;
}


pre {
	padding: 1rem 1.2rem;
	overflow: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 1rem;
	line-height: 1.2;
	font-weight: 700;
	color: var(--color-text);
}

h1 {
	font-size: clamp(2rem, 4vw, 2.8rem);
}

h2 {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
}

h3 {
	font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

strong {
	font-weight: 600;
}

blockquote {
	border-left: 4px solid var(--color-primary);
	margin: 0 0 1.8rem;
	padding: 0.1rem 0 0.1rem 1.2rem;
	color: var(--color-primary-accent);
	font-style: italic;
}

button,
input,
select,
textarea {
	font: inherit;
}


.container {
	width: min(960px, 92%);
	margin: 0 auto;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 1rem;
	padding: 0.6rem 1rem;
	background: var(--color-primary);
	color: #fff;
	border-radius: var(--radius-pill);
	z-index: 9990;
}

.skip-link:focus {
	left: 1rem;
}

body {
	margin: 0;
	font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
	font-size: 16px;
	line-height: 1.7;
	background: var(--color-background);
	background-image: url('assets/images/behringer-x32-compact-digital-mixer-header.jpg');
	background-size: cover;
	background-attachment: fixed;
	background-position: center;
	background-repeat: no-repeat;
	color: var(--color-text);
	-webkit-font-smoothing: antialiased;
}

/* Fluid typography: scale the root font size smoothly with viewport width */
html {
	font-size: clamp(14px, 0.9vw + 0.6rem, 18px);
}

/* Article content: responsive sizing and readable measure */
.entry__content {
	font-size: clamp(1rem, 0.95rem + 0.4vw, 1.125rem) !important;
	line-height: 1.65 !important;
	max-width: 65ch !important; /* keeps measure optimal for reading */
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
}

/* Ensure article content fills the full `.layout__main` width while keeping article padding
   The `article.entry` element provides the 12.5px inner padding; this rule removes the
   measure limit so text stretches to the article edges. */
.layout__main .entry__content,
#main-content.layout__main .entry__content,
.layout__main > article.entry .entry__content {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
}

/* Ensure headings scale nicely when viewport changes (fallbacks if absent) */
.entry__title,
h1.entry__title,
article.entry h1 {
	font-size: clamp(1.6rem, 3.2vw, 2.6rem) !important;
	line-height: 1.12 !important;
}

/* Sidebar text slightly smaller for visual hierarchy */
.home-sidebar,
.widget-area,
.widget {
	font-size: clamp(0.9rem, 0.8rem + 0.2vw, 1rem) !important;
	line-height: 1.45 !important;
}


.site-ads-bar {
	background: transparent;
	color: inherit;
	border: none;
	width: 100%;
}

.site-ads-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(1rem, 3vw, 2.6rem);
	padding: clamp(0.85rem, 2.6vw, 1.35rem) 0;
	background: transparent;
	border: none;
}

.site-ads-bar .widget {
	margin: 0;
	width: 100%;
	display: flex;
	justify-content: center;
}

.site-ads-bar .widget > * {
	max-width: 100%;
}

.site-ads-bar__placeholder {
	padding: 0.75rem 1.25rem;
	border: 1px dashed rgba(15, 23, 42, 0.25);
	border-radius: 10px;
	text-align: center;
	font-size: 0.9rem;
	color: var(--color-muted);
	background: rgba(255, 255, 255, 0.6);
}

.site-nav {
	width: 100%;
}

.site-nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: clamp(0.85rem, 3vw, 2.4rem);
}

.site-nav .menu li {
	margin: 0;
}

.site-nav .menu a {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	text-decoration: none;
}

.site-nav--top {
	background: #081024;
	color: #f8fafc;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-nav--top .menu {
	gap: clamp(0.75rem, 2.6vw, 1.6rem);
	padding: 0.55rem 0;
}

.site-nav--top .menu a {
	color: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.site-nav--top .menu a:hover,
.site-nav--top .menu a:focus {
	color: var(--color-accent);
	text-decoration: none;
}

.site-nav--mid .menu a {
	color: rgba(12, 23, 58, 0.9);
}

.site-nav--mid .menu a:hover,
.site-nav--mid .menu a:focus {
	color: var(--color-primary);
}

.site-nav--pre-header,
.site-nav--top,
.site-nav--mid,
.site-nav--primary {
	background: transparent;
	border: none;
	box-shadow: none;
}

.site-nav--pre-header > .container,
.site-nav--top > .container,
.site-nav--mid > .container,
.site-nav--primary > .container {
	box-sizing: border-box;
}

.site-nav--pre-header > .container {
	background: #222222;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-muted);
}

/* Make main site containers match header inner width/margins/padding */
.site-nav--primary > .container,
.site-nav--categories .container,
.hero-section .hero-content,
.site-nav--top > .container,
.site-nav--mid > .container,
.site-nav--pre-header > .container {
	box-sizing: border-box;
}

/* Breakpoint intermedi rimossi - vedi FINAL OVERRIDE in fondo al file */

@media (min-width: 960px) {
	.site-nav--primary > .container,
	.site-nav--categories .container {
		display: flex;
		align-items: center;
		min-height: 90px;
	}
}

.site-nav--top > .container {
	background: #222222;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-text);
}

.site-nav--mid > .container {
	background: #222222;
	border-bottom: 1px solid var(--color-border);
	box-shadow: none;
	color: var(--color-text);
}

.site-nav--primary > .container {
	width: min(960px, 92%);
	margin: 0 auto;
	padding: 0 clamp(0.75rem, 2vw, 1.2rem);
	background: #000000;
	border-bottom: none;
	box-shadow: none;
	display: flex;
	align-items: center;
	min-height: 90px;
}

.site-nav--pre-header {
	color: rgba(248, 250, 252, 0.85);
}

.site-nav--pre-header .menu {
	justify-content: flex-end;
	gap: clamp(0.65rem, 2vw, 1.25rem);
	padding: 0.4rem 0;
}

.site-nav--pre-header .menu a {
	color: inherit;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.site-nav--pre-header .menu a:hover,
.site-nav--pre-header .menu a:focus {
	color: var(--color-accent);
}

.site-header {
	color: #222222;
	background-color: transparent;
    border-bottom: none;
    width: 100%;
}




.site-header__inner {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	justify-items: stretch;
	gap: clamp(0.45rem, 1.5vw, 0.9rem);
	min-height: 90px;
	padding: 0 clamp(0.75rem, 2vw, 1.2rem);
	background: #f5f5f5;
	border-bottom: 1px solid rgba(0,0,0,0.1);
	box-shadow: none;
	color: inherit;
	width: min(960px, 92%);
	margin: 0 auto;
}

/* Shared layout tokens note: single-post spacing is centralized in the master rule at end of file. */

.site-header__brand {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	align-items: center;
	justify-content: center;
	box-shadow: none;
	text-align: left;
	color: inherit;
	grid-column: 1;
	transform: none;
}


.site-wordmark__link {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.45rem;
	padding: 0.35rem 0.55rem;
	border-radius: 18px;
	background: none;
	border: none;
	color: inherit;
	text-decoration: none;
	transition: var(--transition-base);
}

.site-wordmark__link:hover,
.site-wordmark__link:focus {
	opacity: 0.85;
}

.site-wordmark__link:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 4px;
}

/* ------------------------------------------------------------------
   Mobile & Tablet: hide bottom-fixed modals / floating consent buttons
   - Requirement: nothing should appear below the footer on tablet & mobile
   - Targets both theme modals (gp-modal-overlay) and WPConsent elements
   (safe hide: JS still runs but elements are visually hidden and non-interactive)
   ------------------------------------------------------------------ */
@media (max-width: 959px) {
	/* Theme modals */
	.gp-modal-overlay,
	.gp-modal-overlay.is-visible,
	.gp-modal {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
	}

	/* WPConsent cookie banner & floating buttons */
	.wpconsent-banner-holder,
	.wpconsent-banner-holder .wpconsent-banner,
	.wpconsent-consent-floating-button,
	.wpconsent-consent-floating-button img,
	#wpconsent-consent-floating,
	#wpconsent-banner-holder,
	#wpconsent-preferences-modal {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
	}

	/* Also hide any top/bottom positioned floating CTA that may sit under footer */
	.wpconsent-install-floating-button,
	.wpconsent-consent-floating-button,
	.wpconsent-consent-floating-button img {
		display: none !important;
	}

	/* Hide plugin host container if present (shadow DOM child elements will be invisible as well) */
	#wpconsent-container {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
}

.site-wordmark__image {
	display: block;
	width: clamp(70px, 9vw, 96px);
	height: auto;
	margin-top: 0;
	max-width: 100%;
	filter: drop-shadow(0 10px 24px rgba(23, 52, 94, 0.32));
	opacity: 0.98;
	border-radius: 16px;
	background-color: transparent;
	transition: transform 0.2s ease;
}

.site-wordmark__link:hover .site-wordmark__image,
.site-wordmark__link:focus .site-wordmark__image {
	transform: translateY(-1px);
}

.site-header__tagline {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(12, 32, 58, 0.76);
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

.site-header__search {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	grid-column: 2;
	justify-self: end;
	margin-top: 0;
	padding-top: 7px; /* leggero padding superiore richiesto */
	position: relative;
	z-index: 40; /* assicurati che l'area di padding sia sopra il logo */
	pointer-events: auto;
}

/* Mobile: smaller header wordmark for small/medium screens */
@media (max-width: 959px) {
	.site-wordmark__image {
		height: 80px !important;
		max-height: 80px !important;
		width: auto !important;
		max-width: 160px !important;
		margin-top: -30px !important;
	}

	.site-header__brand {
		margin-top: 0 !important;
	}
}

.site-search__form {
	align-items: center;
}


.site-search__form {
	display: flex;
	align-items: center;
	gap: 0;
	padding: 0 10px !important; /* changed: ensure horizontal padding by default; overridden on desktop below */
	border-radius: 10px;
	border: 2px solid #333333;
	background: #1a1a1a;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	width: min(320px, 100%);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	/* Porta la barra di ricerca in primo piano rispetto al logo */
	position: relative;
	z-index: 30;
	margin-bottom: 0 !important; /* rimosso margine inferiore */
}

/* Restore original behavior on large screens */
@media (min-width: 960px) {
	.site-search__form { padding: 0 !important; }
}

/* Desktop: lock header layout and sizes to keep logo and search fixed while resizing */
@media (min-width: 960px) {
	.site-header__inner {
		display: grid !important;
		grid-template-columns: auto minmax(0, 1fr) !important;
		align-items: center !important;
		min-height: 90px !important;
		padding-top: 0 !important;
	}

	.site-wordmark__image {
		height: 110px !important;
		max-height: 110px !important;
		width: auto !important;
		max-width: none !important;
		margin-top: 0 !important;
	}

	.site-header__brand {
		margin-top: -15px !important;
	}

	.site-header__search {
		margin-top: 2px !important;
		align-self: center !important;
		position: relative;
		z-index: 40;
		transform: translateY(-10px) !important; /* sposta la barra della ricerca 10px verso l'alto */
	}

	.site-search__form {
		width: 320px !important;
		max-width: 320px !important;
		margin: 0 !important;
	}
}


/* Assicuriamo che il brand/logo resti sotto la barra di ricerca */
.site-header__brand,
.site-wordmark {
	position: relative;
	z-index: 10;
}

.site-search__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-primary);
	padding: 0 0.75rem 0 0.85rem;
	background: #1a1a1a;
	height: 100%;
	border: none;
	box-shadow: none;
	cursor: pointer;
	transition: color 0.2s ease, opacity 0.2s ease;
}
.site-search__icon:hover {
	opacity: 0.8;
}
.site-search__icon svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.site-search__input {
	border: none;
	background: #ffffff;
	color: #000000;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.65rem 1rem;
	font-size: 0.95rem;
	font-weight: 500;
	box-shadow: none;
	border-radius: 0;
	appearance: none;
	-webkit-appearance: none;
	caret-color: var(--color-primary);
}

.site-search__input:focus {
	outline: none;
	border: none;
	box-shadow: none;
	color: #000000;
}

.site-search__form:hover,
.site-search__form:focus-within {
	border-color: var(--color-primary);
	box-shadow: 0 6px 18px rgba(255, 159, 67, 0.35);
}

.site-search__form:focus-within .site-search__input {
	color: #000000;
	caret-color: var(--color-primary);
}


.site-search__input::placeholder {
	color: #999999;
}

.site-nav--primary {
	background: transparent !important;
	padding: 0 !important;
	color: var(--color-text);
}

.site-nav--primary .container {
	display: flex;
	justify-content: center;
	align-items: center;
}

.site-nav--primary .menu {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
	gap: 1rem !important;
	max-width: 960px;
	width: 100%;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
	flex-direction: row !important;
}

.site-nav--primary .menu li {
	margin: 0 !important;
	display: block !important;
}

.site-nav--primary .menu a {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	padding: 1rem !important;
	background: rgba(255, 255, 255, 0.08) !important;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	border-radius: 8px !important;
	color: #ffffff !important;
	font-weight: 600 !important;
	font-size: 0.9rem !important;
	text-decoration: none !important;
	transition: all 0.2s ease !important;
	min-height: 60px !important;
}

.site-nav--primary .menu a:hover,
.site-nav--primary .menu a:focus {
	background: rgba(255, 159, 67, 0.15) !important;
	border-color: var(--color-primary) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 12px rgba(255, 159, 67, 0.2) !important;
}

.site-nav--primary .menu .current-menu-item > a {
	background: rgba(255, 159, 67, 0.2) !important;
	border-color: var(--color-primary) !important;
}

/* Breakpoint per menu primary - unificato a 959px */
@media (max-width: 959px) {
	.site-nav--primary .menu {
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
		gap: 0.75rem;
	}
	
	.site-nav--primary .menu a {
		padding: 0.75rem;
		font-size: 0.85rem;
		min-height: 50px;
	}
}

@media (min-width: 960px) {
	.site-header__inner {
		height: 90px;
	}
}

/* MOBILE: Sotto 959px - Layout verticale centrato */
@media (max-width: 959px) {
	.site-nav--pre-header .menu {
		justify-content: center;
	}

	.site-nav--mid .menu {
		justify-content: center;
	}

	.site-header__inner {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		gap: 10px;
		padding: 10px;
		min-height: auto;
		width: 92% !important;
		max-width: 92% !important;
	}

	.site-header__brand {
		align-items: center;
		text-align: center;
		width: 100%;
		grid-column: 1;
		transform: none;
		height: 50px;
		padding-top: 30px;
	}

	.site-wordmark__link {
		justify-content: center;
	}

	.site-header__search {
		justify-content: center;
		width: 100%;
		grid-column: 1;
		justify-self: center;
		margin-top: 0;
	}

	.site-header__tagline {
		white-space: normal;
		max-width: min(24rem, 100%);
	}

	.site-search__form {
		width: 100%;
		max-width: min(28rem, 100%);
		padding: 0;
		gap: 0;
	}

	.site-search__icon {
		padding: 0 0.75rem 0 0.85rem;
	}

	.site-nav--pre-header .menu,
	.site-nav--mid .menu,
	.site-nav--primary .menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0.6rem;
		width: 100%;
	}

	.site-nav--pre-header .menu li,
	.site-nav--mid .menu li,
	.site-nav--primary .menu li {
		width: 100%;
		text-align: center;
	}

	.site-nav--pre-header .menu a,
	.site-nav--mid .menu a,
	.site-nav--primary .menu a {
		display: block;
		padding: 0.55rem 1rem;
		border-radius: var(--radius-pill);
		background: rgba(248, 250, 252, 0.1);
		font-size: 0.95rem;
	}

	body {
		font-size: 15px;
	}

	.site-wordmark__image {
		height: 120px;
		width: 120px;
		object-fit: contain;
	}

	.site-nav--pre-header > .container,
	.site-nav--top > .container,
	.site-nav--mid > .container,
	.site-nav--primary > .container {
		border-radius: 0;
		width: 92% !important;
		max-width: 92% !important;
		margin: 0 auto;
	}

	.site-ads-bar__inner {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}
}

/* Compact CTA-only variant */
.site-nav--primary .menu a {
	font-size: 0.9rem;
}

.layout {
	margin-block: clamp(1.4rem, 3.6vw, 2.4rem);
}

.layout__main {
	display: flex;
	flex-direction: column;
	gap: clamp(0.6rem, 1.6vw, 0.9rem);
	grid-column: 1;
}


.layout--with-sidebar {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.3rem, 1vw, 0.6rem);
	align-items: start;
}

.home-sidebar {
	background: var(--color-surface);
	padding: clamp(1rem, 1.8vw, 1.3rem);
	border-radius: var(--radius-base);
	box-shadow: var(--shadow-soft);
	display: flex;
	flex-direction: column;
	gap: 1rem;
	grid-column: 3;
	/* Rimosso lo spostamento di 140px: teniamo margin-top a 0 per tutte le pagine con sidebar */
	margin-top: 0 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-primary-accent);
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.widget ul li {
	margin: 0;
}

.widget__list--related li {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.widget ul a {
	color: var(--color-text);
	font-weight: 500;
}

.widget ul a:hover {
	color: var(--color-primary);
}

.widget__text {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.95rem;
}

.widget__meta {
	font-size: 0.85rem;
	color: var(--color-muted);
}


.post-grid {
	display: grid;
	gap: clamp(0.4rem, 1.2vw, 0.75rem);
	grid-template-columns: 1fr;
	align-items: stretch;
	grid-auto-rows: 1fr;
}


.post-card {
	position: relative;
	display: block;
	border-radius: clamp(20px, 3vw, 28px);
	overflow: hidden;
	border: 1px solid rgba(148, 163, 184, 0.18);
	background: none;
	box-shadow: 0 28px 52px -38px rgba(15, 23, 42, 0.58);
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
	color: var(--color-text);
	height: auto !important;
	min-height: 0 !important; /* Allow cards to grow on desktop */
	max-height: none !important;
}

.post-card:hover,
.post-card:focus-within {
	transform: translateY(-6px);
	box-shadow: 0 36px 62px -38px rgba(15, 23, 42, 0.62);
	border-color: rgba(86, 134, 201, 0.42);
	/* non impostare background pieno: lasciare visibile il pseudo-elemento con lo sfondo */
	background: transparent !important;
}

/* Forza l'altezza delle post-card sotto i 960px a 160px */
@media (max-width: 959px) {
	.post-card {
		min-height: 160px !important;
		height: 160px !important;
		overflow: hidden !important;
	}

	.post-card .post-card-content {
		/* Riduce l'offset superiore usato per lo spazio dell'immagine su dispositivi medi */
		padding: calc(56px + 0.5rem) clamp(0.6rem, 3vw, 1rem) clamp(0.6rem, 3vw, 1rem) !important;
		height: 100% !important;
	}

	.post-card .post-card__body {
		height: calc(100% - 0px) !important;
		overflow: hidden !important;
		display: flex !important;
		flex-direction: column !important;
		justify-content: flex-start !important;
		box-sizing: border-box !important;
	}

	.post-grid {
		/* Manteniamo gap ridotto su media width */
		gap: 0.9rem !important;
		grid-auto-rows: auto !important;
	}
}

/* Riduci l'altezza e il padding delle post-card su viewport stretti */
@media (max-width: 690px) {
	.post-card {
		min-height: 160px !important;
		border-radius: clamp(8px, 2.5vw, 12px) !important;
		box-shadow: 0 10px 18px -12px rgba(15, 23, 42, 0.38) !important;
	}

	.post-card .post-card-content {
		/* Riduce l'offset superiore usato per lo spazio dell'immagine */
		padding: calc(48px + 0.75rem) clamp(0.6rem, 3vw, 0.9rem) clamp(0.6rem, 3vw, 0.9rem) !important;
	}

	/* Se la griglia fa colonne singole sotto 690, impediamo lo stretch verticale delle card */
	.post-grid {
		gap: 0.8rem !important;
		grid-auto-rows: auto !important;
	}

	.post-grid > * {
		align-self: start !important;
	}
}

/* Nascondi immagini del logo dentro le card (se ci sono ancora) */
.post-card img[src*="logo"] {
	display: none !important;
}

/* Assicura che lo pseudo-elemento che mostra l'immagine sia in cima allo sfondo ma sotto il contenuto */
.post-card::before {
	z-index: 0;
}


.post-card__link {
	position: relative;
	z-index: 1;
	display: block;
	color: inherit;
	text-decoration: none;
	height: 100%;
	cursor: pointer;
	border-radius: inherit;
}

.post-card__thumb {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1;
	display: block;
}

.post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__body {
	/* Disabilitata la posizione assoluta per permettere al contenuto di posizionarsi con padding-top */
	position: relative !important;
	/* padding-top gestito separatamente per breakpoint (vedi sotto) */
	padding-right: 10px !important;
	padding-bottom: 0 !important;
	padding-left: 10px !important;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 0.7rem;
	background-color: #f5f5f5;
	z-index: 1;
	color: inherit;
}

/* Mantieni il padding-top originario solo su dispositivi stretti (<960px) */
@media (max-width: 959px) {
	.post-card__body {
		padding-top: 25px !important;
	}
}

.post-card__link:focus-visible {
	outline: 3px solid rgba(86, 134, 201, 0.65);
	outline-offset: 4px;
}

.post-card__link:hover .post-card__cta,
.post-card__link:focus .post-card__cta {
	color: var(--color-primary-accent);
	border-color: rgba(59, 130, 246, 0.6);
}

.post-card__meta {
	margin: 0;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.post-card__title {
	margin: 0;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	color: var(--color-text);
}
.post-card__link:hover .post-card__title,
.post-card__link:focus .post-card__title {
	color: var(--color-primary);
}


.post-card__excerpt {
	display: none !important;
}

.post-card__excerpt p {
	margin: 0 0 0.7rem;
}

.post-card__cta {
	align-self: flex-start;
	margin-top: auto;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--color-primary);
	border-bottom: 1px solid rgba(59, 130, 246, 0.3);
	padding-bottom: 0.08rem;
	transition: color 0.18s ease, border-color 0.18s ease;
}

.page-header {
	display: flex;
	flex-direction: column;
	gap: 0;
	background: #333 !important;
	padding: 1.2rem 2rem 0 2rem;
	border-radius: var(--radius-base);
	box-shadow: var(--shadow-soft);
}

.page-title {
	margin: 0;
	color: #fff;
}

.page-lead {
	color: var(--color-muted);
	font-size: 1.02rem;
}

.page-lead p {
	margin: 0 0 1rem;
}

.breadcrumbs {
	font-size: 0.85rem;
	color: #fff;
}

.breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.6rem;
}

.breadcrumbs li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.breadcrumbs li + li::before {
	content: '>';
	color: #fff;
	font-size: 0.9rem;
}

.breadcrumbs a {
	color: #fff;
}

.breadcrumbs a:hover {
	color: var(--color-primary);
}

.feature-panel {
	background: var(--color-surface);
	border-radius: var(--radius-base);
	padding: 2rem 2.2rem;
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.feature-panel__title {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.feature-panel__links {
	width: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.feature-panel__links li {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	color: var(--color-muted);
}

.pill-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.4rem 1.2rem;
	background: var(--color-primary);
	color: #fff !important;
	border-radius: var(--radius-pill);
	font-weight: 600;
	text-decoration: none;
	width: fit-content;
	box-shadow: 0 16px 32px -20px rgba(31, 63, 155, 0.65);
}


.pill-link:visited,
.pill-link:active,
.pill-link:focus,
.pill-link:hover {
	color: #fff !important;
}

.pill-link:hover,
.pill-link:focus {
	background: var(--color-primary-accent);
}

.notice {
	background: rgba(255, 255, 255, 0.78);
	border: 1px dashed var(--color-border);
	border-radius: var(--radius-base);
	padding: 1.6rem 1.8rem;
	color: var(--color-muted);
	box-shadow: var(--shadow-soft);
}

.notice p {
	margin: 0;
}

.entry {
	background: var(--color-surface);
	border-radius: var(--radius-base);
	padding: 2.4rem 2.6rem;
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.entry__header {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.entry__title {
	margin: 0;
	font-size: clamp(2.2rem, 4.5vw, 2.8rem);
}

.entry__meta {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.95rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.entry__content {
	font-size: 1.05rem;
	color: var(--color-text);
}

.entry__content > *:not(:first-child) {
	margin-top: 1.5rem;
}

.entry__content ul,
.entry__content ol {
	margin: 0 0 1.5rem 1.8rem;
}

.entry__content img {
	border-radius: 18px;
	box-shadow: var(--shadow-soft);
}

.entry__footer {
	margin-top: 1rem;
}

.post-navigation {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	border-top: 1px solid var(--color-border);
	padding-top: 1.5rem;
}


.post-navigation a {
	display: block;
	background: var(--color-surface);
	border-radius: var(--radius-base);
	padding: 1.1rem 1.4rem;
	box-shadow: var(--shadow-soft);
	text-decoration: none;
	color: #ff9f43 !important;
	transition: color 0.2s;
}

.post-navigation a:hover,
.post-navigation a:focus {
	color: #fff !important;
	box-shadow: 0 22px 45px -30px rgba(15, 23, 42, 0.6);
}

.post-navigation .nav-label {
	display: block;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	color: var(--color-muted);
	margin-bottom: 0.35rem;
}

.post-navigation .nav-title {
	color: #ff9f43 !important;
	font-weight: 600;
	font-size: 1.02rem;
	transition: color 0.2s;
}
.post-navigation a:hover .nav-title,
.post-navigation a:focus .nav-title {
	color: #fff !important;
}

.pagination {
	display: flex;
	justify-content: center;
}

.pagination ul {
	list-style: none;
	display: flex;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.pagination li {
	margin: 0;
}


.pagination a,
.pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	padding: 0.45rem 0.85rem;
	border-radius: var(--radius-pill);
	border: 1px solid transparent;
	background: var(--color-surface);
	box-shadow: var(--shadow-soft);
	color: #ff9f43 !important;
	font-weight: 600;
	font-size: 0.92rem;
	transition: color 0.2s;
}

.pagination a:hover,
.pagination a:focus {
	color: #fff !important;
	border-color: var(--color-primary);
}

.pagination .is-current a,
.pagination .is-current span,
.pagination .current {
	background: var(--color-primary);
	color: #fff;
	border-color: var(--color-primary);
	box-shadow: 0 20px 45px -30px rgba(31, 63, 155, 0.7);
}

.pagination--split {
	margin-top: 1rem;
}

.pagination--split ul {
	justify-content: flex-start;
}

.author-bio {
	background: var(--color-surface);
	border-radius: var(--radius-base);
	padding: 1.9rem 2.1rem;
	box-shadow: var(--shadow-soft);
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.author-bio__title {
	margin: 0;
	font-size: 1.4rem;
}

.author-bio__content {
	color: var(--color-muted);
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
}

th,
td {
	padding: 0.75rem 1rem;
	border: 1px solid var(--color-border);
}

th {
	background: rgba(31, 63, 155, 0.06);
	text-align: left;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	transition: var(--transition-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus {
	border-color: var(--color-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(31, 63, 155, 0.12);
}

.site-footer {
	background: linear-gradient(180deg, #0b1020 0%, #070814 100%);
	color: rgba(248, 250, 252, 0.78);
	padding: clamp(2rem, 3vw, 3rem) 0;
	margin-top: clamp(3rem, 6vw, 5rem);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__inner {
	display: grid;
	gap: clamp(0.85rem, 2.4vw, 1.4rem); /* reduced global footer gap */
	text-align: center;
	justify-items: center;
	grid-template-columns: minmax(220px, 1fr);
	align-items: start;
}

.site-footer__brand,
.site-footer__links,
.site-footer__newsletter {
	display: flex;
	flex-direction: column;
	gap: 0.45rem; /* reduced gap between brand/links/newsletter items */
	align-items: center;
	max-width: 420px;
}

.site-footer__meta {
	display: flex;
	flex-direction: column;
	gap: 0.4rem; /* tighter meta spacing */
	align-items: center;
	grid-column: 1 / -1;
	opacity: 0.92;
	font-size: 0.88rem;
}

@media (min-width: 960px) {
	.site-footer__meta {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		padding-top: 1rem;
		border-top: 1px dashed rgba(255,255,255,0.03);
		margin-top: 1rem;
	}

	/* Desktop grid layout: brand at left, links center, newsletter right */
	.site-footer__inner {
		grid-template-columns: 1fr minmax(220px, 360px) 1fr;
		/* Remove gaps on desktop as requested */
		gap: 0 !important;
		row-gap: 0 !important;
		column-gap: 0 !important;
		justify-items: stretch;
		text-align: left;
		align-items: start;
	}

	.site-footer__brand {
		align-items: flex-start;
		justify-self: start;
	}

	.site-footer__links {
		align-items: center;
		justify-self: center;
	}

	.site-footer__newsletter {
		/* Desktop: left-align newsletter content while keeping it justified to the right column */
		align-items: flex-start;
		justify-self: end;
		text-align: left;
	}

	.site-footer__meta {
		grid-column: 1 / -1;
	}
}

.site-footer__logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.site-footer__logo img,
.site-footer__logo svg {
	max-width: 140px;
	height: auto;
	border-radius: var(--radius-base);
}

/* Newsletter form sizing */
.site-footer__newsletter .site-footer__form {
	width: 100%;
	max-width: 380px;
}

.site-footer__motto {
	margin: 0;
	color: rgba(248, 250, 252, 0.9);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.35;
}

.site-footer__tagline,
.site-footer__description {
	margin: 0;
	color: rgba(203, 213, 225, 0.82);
	font-size: 0.9rem;
	line-height: 1.45;
}

.site-footer__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1rem;
	background: rgba(255, 255, 255, 0.06);
	color: #ffffff;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.site-footer__cta:hover,
.site-footer__cta:focus {
	background: rgba(255, 255, 255, 0.14);
	box-shadow: 0 4px 12px rgba(2, 6, 23, 0.4);
}

.site-footer__heading {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #ffffff;
}

.site-footer__links .site-footer__heading {
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	text-transform: none;
}

.site-footer__form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	width: 100%;
}

.site-footer__form-row {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	width: 100%;
}

.site-footer__input {
	width: 100%;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.65rem 0.95rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(15, 21, 40, 0.88);
	color: #ffffff;
	font-size: 0.92rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-footer__input::placeholder {
	color: rgba(148, 163, 184, 0.85);
}

.site-footer__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.2rem;
	border-radius: 999px;
	border: none;
	background: var(--color-primary, #1f3f9b);
	color: #ffffff;
	font-weight: 600;
	font-size: 0.92rem;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.site-footer__submit:hover,
.site-footer__submit:focus {
	background: var(--color-primary-strong, #2b4fc0);
	transform: translateY(-1px);
}

.site-footer__privacy {
	margin: 0;
	font-size: 0.82rem;
	color: rgba(148, 163, 184, 0.9);
}

.site-footer__privacy a {
	color: inherit;
	text-decoration: underline;
}

.site-footer__privacy a:hover,
.site-footer__privacy a:focus {
	color: #ffffff;
}

.site-footer__nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem 1.4rem;
	justify-content: center;
}

.menu--footer a {
	color: rgba(248, 250, 252, 0.9);
	font-size: 0.95rem;
	font-weight: 600;
	text-transform: none;
}

/* Large viewport layout adjustments */
@media (min-width: 960px) {
	.site-footer__inner {
		grid-template-columns: 1fr 1fr 1fr;
		text-align: left;
		justify-items: start;
	}

	.site-footer__brand {
		align-items: flex-start;
	}

	.site-footer__links {
		align-items: flex-start;
		padding-left: 1.25rem;
		border-left: 1px solid rgba(255,255,255,0.03);
	}

	.site-footer__nav .menu {
		flex-direction: column;
		gap: 0.6rem;
		justify-content: flex-start;
	}

	.site-footer__newsletter {
		align-items: flex-start;
		padding-left: 1.25rem;
		border-left: 1px solid rgba(255,255,255,0.03);
		padding-top: 0.2rem;
		padding-bottom: 0.2rem;
		background: rgba(255,255,255,0.01);
		border-radius: 8px;
	}

}

@media (min-width: 960px) {
	.site-footer__inner { max-width: 1200px; margin-inline: auto; }
}

.menu--footer a:hover,
.menu--footer a:focus {
	color: #ffffff;
}

.site-footer__copy,
.site-footer__legal {
	margin: 0;
	font-size: 0.84rem;
	color: rgba(203, 213, 225, 0.82);
}

.site-footer__legal a {
	color: inherit;
	text-decoration: underline;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus {
	color: #ffffff;
}

.site-footer__status {
	margin: 0;
	padding: 0.55rem 0.9rem;
	border-radius: 12px;
	font-size: 0.86rem;
	font-weight: 500;
}

.site-footer__status--success {
	background: rgba(34, 197, 94, 0.18);
	color: rgba(134, 239, 172, 0.95);
}

.site-footer__status--error {
	background: rgba(239, 68, 68, 0.18);
	color: rgba(252, 165, 165, 0.95);
}

@media (min-width: 960px) {
	.site-footer__inner {
		grid-template-columns: repeat(2, minmax(230px, 1fr));
	}

	.site-footer__form-row {
		flex-direction: row;
		align-items: stretch;
	}

	.site-footer__submit {
		flex-shrink: 0;
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

@media (min-width: 960px) {
	.site-footer__inner {
		/* Left slightly larger than center; right unchanged */
		grid-template-columns: minmax(340px, 1fr) minmax(250px, 1fr) minmax(50px, 200px);
		gap: clamp(1rem, 2vw, 1.6rem);
	}

	/* Allow left and center columns to use available width */
	.site-footer__brand,
	.site-footer__links {
		max-width: none;
		width: 100%;
	}

	/* Newsletter column expanded on the right; form fills the track */
	.site-footer__newsletter {
		max-width: none;
		width: 100%;
	}

	.site-footer__newsletter .site-footer__form {
		max-width: 100%;
		width: 100%;
	}

	/* Align columns per design: brand left, links center, newsletter right */
	.site-footer__brand { align-items: flex-start; justify-self: start; }
	.site-footer__links { align-items: center; justify-self: center; }
	.site-footer__newsletter { align-items: flex-start; justify-self: end; text-align: left; }

	/* Footer links column: stack vertically and align left on desktop */
	.site-footer__links .menu {
		flex-direction: column;
		gap: 0.6rem;
		justify-content: flex-start;
		align-items: flex-start;
	}

	/* Newsletter form: on larger viewports make the input & button inline */
	.site-footer__newsletter .site-footer__form .site-footer__form-row {
		display: flex;
		align-items: center;
		gap: 0.6rem;
	}
	.site-footer__newsletter .site-footer__input {
		flex: 1 1 auto;
		/* Lateral padding requested */
		padding-left: 5px !important;
		padding-right: 5px !important;
		box-sizing: border-box;
		/* Center input text on desktop */
		text-align: center !important;
	}
	.site-footer__newsletter .site-footer__input::placeholder {
		text-align: center !important;
	}

	/* Desktop: center the newsletter heading while keeping column alignment */
	.site-footer__newsletter .site-footer__heading {
		text-align: center;
		width: 100%;
		margin-inline: 0;
	}
}

/* MOBILE: Sotto 959px - Layout unificato */
@media (max-width: 959px) {
	.layout--with-sidebar {
		grid-template-columns: minmax(0, 1fr);
		gap: 0 !important;
	}

	.layout__main {
		grid-column: 1;
	}

	.home-sidebar {
		width: 100%;
			/* manteniamo padding verticale ma rimuoviamo quello laterale */
			padding-top: 4vw !important;
			padding-bottom: 4vw !important;
			padding-left: 0 !important;
			padding-right: 0 !important;

	.post-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Footer mobile */
	.site-footer__inner {
		grid-template-columns: 1fr;
		gap: 0 !important;
		text-align: center;
		justify-items: center;
		width: 92% !important;
		max-width: 92% !important;
			/* mantenere padding verticale, rimuovere quello laterale */
			padding-top: 4vw !important;
			padding-bottom: 4vw !important;
			padding-left: 0 !important;
			padding-right: 0 !important;
	}

	.site-footer__newsletter {
		justify-self: center;
		align-items: center;
		text-align: center;
	}

	.site-footer__newsletter .site-footer__form .site-footer__form-row {
		display: flex;
		gap: 0.5rem;
	}

	.site-footer__newsletter .site-footer__form { max-width: 320px; }

	.site-footer__nav .menu {
		display: block;
		list-style: disc outside;
		margin: 0;
		padding-left: 1.1rem;
	}

	.site-footer__nav .menu li {
		display: list-item;
		margin-bottom: 0.45rem;
	}

	.menu--footer a { display: inline-block; padding-left: 0; }

	.site-footer__meta {
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 1rem;
		width: 100%;
	}

	.site-footer__legal {
		text-align: center;
	}

	.site-footer { padding-top: 4vw; }

	body {
		width: 100%;
		margin: 0;
	}

	#page {
		width: 92%;
		margin: 0 auto;
		/* manteniamo padding verticale ma rimuoviamo quello laterale */
		padding-top: 4vw !important;
		padding-bottom: 4vw !important;
		padding-left: 0 !important;
		padding-right: 0 !important;

	/* Hide sidebar entirely on homepage/front-page in mobile layouts */
	}

	.home .home-sidebar,
	.front-page .home-sidebar,
	.home-sidebar[style*="flex: 0 0 320px"] {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Global fallback: hide any sidebar instance on mobile to guarantee removal of residual space */
	aside.home-sidebar,
	.home-sidebar {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		width: 0 !important;
		max-width: 0 !important;
		min-width: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		flex: 0 0 0 !important;
		position: static !important;
		top: auto !important;
	}
	}
}

@media (min-width: 960px) {
	.post-grid {
		gap: clamp(0.75rem, 1.8vw, 1.2rem);
	}
}

/* Breakpoint rimossi - gestiti dal FINAL OVERRIDE a 959px */

/* Mobile: single column, left-align items, and make newsletter full width */
/* Gestito dal FINAL OVERRIDE sotto 959px */
@media (max-width: 959px) {
	/* Center home page title on smartphone for better visual balance */
	body.home .page-title {
		text-align: center;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
	body.home .page-lead { text-align: center; }

	/* Mobile: use native list-style for footer links and left-aligned bullets */
	.site-footer__nav .menu {
		display: block;
		list-style: disc outside;
		margin: 0;
		padding-left: 1.1rem;
	}

	.site-footer__nav .menu li {
		display: list-item;
		margin-bottom: 0.45rem;
	}

	.menu--footer a {
		display: inline-block;
		padding-left: 0;
	}

	/* Center the P.IVA (site-footer__legal) on narrow screens */
	.site-footer__legal {
		text-align: center;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Modal & cookie consent styles */
.gp-modal-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.4); align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top) + 20px) env(safe-area-inset-right) calc(env(safe-area-inset-bottom) + 20px) env(safe-area-inset-left); box-sizing: border-box; overflow-y: auto; display:flex; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 300ms ease, visibility 300ms ease; }
.gp-modal-overlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.gp-modal-overlay, .gp-modal__content { pointer-events: auto; }
.gp-modal { display:flex; flex-direction:column; max-width: 900px; width:100%; margin:0 1rem; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); overflow:hidden; max-height: calc(100vh - 96px); opacity: 0; transform: translateY(-6px) scale(0.9); transform-origin: center center; transition: opacity 320ms cubic-bezier(.2,.9,.2,1), transform 320ms cubic-bezier(.2,.9,.2,1); will-change: transform, opacity; }
.gp-modal-overlay.is-visible .gp-modal { opacity: 1; transform: translateY(0) scale(1); }
.gp-modal__content { padding: 1.25rem; background: radial-gradient(circle at 18% 52%, rgba(226, 242, 255, 0.98) 0%, rgba(195, 221, 248, 0.78) 42%, rgba(175, 204, 236, 0.2) 68%, rgba(164, 191, 225, 0) 78%), linear-gradient(135deg, rgba(182, 201, 224, 0.95) 0%, rgba(152, 180, 212, 0.92) 100%); color: rgba(12,32,58,0.95); overflow-y:auto; }
.gp-modal__header { display:flex; justify-content:space-between; align-items:center; gap:0.5rem; }
.gp-modal__title { margin:0; font-size:1.35rem; }
.gp-modal__close { background:transparent; border:none; color:inherit; font-size:1.2rem; cursor:pointer; padding:6px; }
.gp-modal__body { margin-top:0.5rem; }
.gp-modal__actions { display:flex; gap:0.5rem; margin-top:1rem; justify-content:flex-end; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:0.5rem; padding: 10px 14px; font-weight:600; border-radius:6px; cursor:pointer; border:none; }
.btn--primary { background: var(--color-primary); color:#fff; }
.btn--secondary { background: #fff; color: var(--color-primary); border: 1px solid rgba(12,32,58,0.06); }
#cookie-banner, #privacy-policy-banner { width:100%; box-sizing:border-box; }
@media (max-width:959px) {
	.gp-modal-overlay { align-items:flex-start; }
	.gp-modal { width: calc(100% - 2rem); margin: 1rem auto; }
	.gp-modal__content { padding: 0.9rem; }
	.gp-modal__title { font-size:1.1rem; }
	.gp-modal__actions { flex-direction:column-reverse; }
	.btn { width:100%; }
	.cookie-switches { gap: 0.5rem; }
}
@media (min-width:960px) {
	.gp-modal { max-width:900px; }
	.gp-modal-overlay { padding-top: calc(env(safe-area-inset-top) + 48px); padding-bottom: calc(env(safe-area-inset-bottom) + 48px); }
	.gp-modal { max-height: calc(100vh - 96px); }
}

/* Hero Section */
.hero-section {
    padding: 0; /* horizontal pacing moved to inner container */
    padding-top: 6px; /* ulteriormente ridotto */
    padding-bottom: 6px; /* ulteriormente ridotto */
    margin-top: 6px;
    text-align: center;
    border: none;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    width: 100%;
}

/* Align inner content to site container and apply right padding */
.hero-section .hero-content {
    /* Match header boxed width and spacing (horizontal) */
    width: min(960px, 92%);
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 2vw, 1.2rem);
    box-sizing: border-box;

    /* Keep the dark stripe but boxed to the same width as the header */
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-soft);
}

/* Keep vertical breathing for hero by spacing the title inside the boxed stripe */
.hero-section .hero-content .hero-title {
    margin-top: 0.5rem; /* ridotto ulteriormente */
    margin-bottom: 0.5rem; /* ridotto ulteriormente */
}

/* Breakpoint hero rimossi - gestiti dal FINAL OVERRIDE a 959px */

.hero-title {
    font-size: clamp(1rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #ffffff;
    white-space: nowrap;
}

.hero-title .text-primary {
    display: block;
    color: var(--color-primary);
    white-space: nowrap;
}

.hero-subtitle {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    color: var(--color-muted);
    max-width: 700px;
    margin: 0 auto 6px; /* ridotto lo spazio sotto */
    white-space: nowrap;
}

/* Break subtitle into two lines below 435px at the intended point */
@media (max-width: 435px) {
    .hero-subtitle {
        white-space: normal; /* allow wrapping */
    }
    .hero-subtitle__break {
        display: block;
        margin-top: 0.25rem;
    }
}

/* Strong override: make hero closer to the menu */
.site-header + .hero-section,
.hero-section {
    margin-top: 0 !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    background-color: #ff9f43;
    color: #000;
}

.btn:hover {
    background-color: #e68a00;
    color: #000;
}

/* Sections General */
.categories-section,
.latest-posts-section,
.newsletter-section {
    padding: 40px 0;
    width: min(960px, 92%);
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Post Card Content */
.post-card-content {
    position: relative;
    z-index: 2;
    padding: calc(80px + 1.5rem) clamp(1rem, 3vw, 1.4rem) clamp(1rem, 3vw, 1.4rem) !important;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background-color: #f5f5f5;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.post-date {
    color: var(--color-muted);
    margin-left: 10px;
    font-weight: 400;
}

.post-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--color-primary);
}

.post-excerpt {
    display: none !important;
}

.read-more-link {
    display: none !important;
}

.read-more-link:hover {
    color: #ffffff;
}

.affiliate-card-list {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
	margin: 1.5rem 0 2.2rem 0;
}
/* Card grid */
.post-grid {
	display: grid;
	gap: 1.15rem;
	grid-template-columns: 1fr;
	justify-content: center;
	align-items: stretch;
	grid-auto-rows: 1fr;
}

.post-grid > * {
	justify-self: center;
}


.post-card {
	position: relative;
	display: flex;
	width: 100% !important;
	max-width: 640px;
	height: auto !important;
	min-height: 160px !important; /* valore base modificato */
	max-height: none !important;
	border-radius: clamp(10px, 1vw, 14px);
	overflow: hidden;
	color: rgba(12, 32, 58, 0.92);
	background-color: #333 !important; /* grigio scuro quando non in focus */
	box-shadow: 0 16px 32px -24px rgba(15, 23, 42, 0.45);
	transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.3s ease, color 0.3s ease;
	cursor: pointer;
	isolation: isolate;
}

/* Pseudo-elemento che mostra l'immagine solo nella parte superiore della card */
.post-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 80px !important;
	background-image: var(--card-bg-url, url('../images/audio-bg.jpg')) !important;
	background-size: contain !important;
	background-repeat: no-repeat !important;
	background-position: center top !important;
	z-index: 0;
}

/* Pseudo-elemento per il logo sopra l'immagine */
.post-card::after {
	content: "";
	position: absolute;
	top: 0%;
	left: 50%;
	transform: translateX(-50%);
	width: 80px !important;
	height: 80px !important;
	background-image: url('../images/logo.png') !important;
	background-size: contain !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	z-index: 3;
}

/* Rimuove la vecchia placeholder (non usata) */
.placeholder-img {
	display: none !important;
	background: none !important;
}

/* Forza override: elimina qualsiasi immagine/logo o background che coprano il pseudo-elemento */
.post-card * {
	background-image: none !important;
	background-color: transparent !important;
}

/* Nascondi immagini che contengono 'logo' o che sono impostate come post-card-img */
.post-card img[src*="logo" i],
.post-card img[src*="Logo" i],
.post-card .post-card-img {
	display: none !important;
}

/* Assicura che lo pseudo-elemento venga mostrato correttamente (sopra qualsiasi sfondo) */
.post-card::before {
	background-image: var(--card-bg-url, url('../images/audio-bg.jpg')) !important;
	background-size: cover !important;
	background-repeat: no-repeat !important;
	background-position: center top !important;
	z-index: 0;
}

/* Assicura che il contenuto sia sopra l'immagine */
.post-card .post-card__body {
	position: relative;
	z-index: 2;
	padding-top: 10px !important;
}

.post-card .post-card-content {
	position: relative;
	z-index: 2;
}

/* Rimuove qualsiasi sfondo grigio dietro immagini o logo nelle card */
.post-card .post-card-image-link,
.post-card .post-card-image-link img,
.post-card .post-card-img {
	background-color: transparent !important;
}


/* Assicura che il contenuto sia sopra l'immagine */
.post-card .post-card__body {
	position: relative;
	z-index: 2;
}

.post-card:hover,
.post-card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 18px 36px -20px rgba(15, 23, 42, 0.45);
}

.post-card__link {
	position: relative;
	z-index: 2;
	display: block;
	height: 100%;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.post-card__body {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: clamp(0.65rem, 2vw, 0.9rem);
	height: 100%;
	padding: 10px 5px 22.4px !important;
}

.post-card__title {
	margin: 0;

/* Affiliate Product Card Styles */
.affiliate-card {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: min(100%, 540px);
	max-width: 540px;
	min-height: 160px;
	border-radius: clamp(10px, 1vw, 14px);
	overflow: hidden;
	background: linear-gradient(90deg, #f7fafc 60%, #e0e7ef 100%);
	box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.18);
	margin: 1.2rem auto;
	transition: box-shadow 0.18s, transform 0.18s;
}
.affiliate-card:hover,
.affiliate-card:focus-within {
	box-shadow: 0 12px 32px -10px rgba(15, 23, 42, 0.22);
	transform: translateY(-2px) scale(1.012);
}
.affiliate-card__thumb {
	flex: 0 0 140px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.1rem 0.7rem 1.1rem 1.1rem;
}
.affiliate-card__thumb img {
	max-width: 110px;
	max-height: 110px;
	border-radius: 8px;
	box-shadow: 0 2px 8px -2px rgba(15,23,42,0.10);
}
.affiliate-card__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.5rem;
	padding: 1.1rem 1.2rem;
	flex: 1 1 auto;
}
.affiliate-card__title {
	font-size: 1.13rem;
	font-weight: 700;
	margin: 0 0 0.15em 0;
	color: #1a2a3a;
}
.affiliate-card__brand {
	font-size: 0.98rem;
	color: #3b4a5a;
	margin-bottom: 0.1em;
}
.affiliate-card__desc {
	font-size: 0.97rem;
	color: #2d3a4a;
	margin: 0.2em 0 0.5em 0;
}
.affiliate-card__price {
	font-size: 1.08rem;
	font-weight: 600;
	color: #0a7a2a;
	margin-bottom: 0.3em;
}
.affiliate-card__cta {
	display: inline-block;
	margin-top: 0.4em;
	padding: 0.5em 1.2em;
	background: #1a4aff;
	color: #fff !important;
	border-radius: 6px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	box-shadow: 0 2px 8px -2px rgba(26,74,255,0.10);
	transition: background 0.16s, box-shadow 0.16s;
}
.affiliate-card__cta:hover,
.affiliate-card__cta:focus {
	background: #0d2a8a;
	color: #fff;
	box-shadow: 0 4px 16px -4px rgba(26,74,255,0.16);
}
	font-size: clamp(1.15rem, 2.4vw, 1.45rem);
	line-height: 1.25;
	font-weight: 700;
	max-width: 100%;
	text-transform: none;
	word-break: break-word;
}

.post-excerpt {
	display: none !important;
}

.post-card__more {
	display: inline-flex;
	align-items: center;
	margin-left: 0.35rem;
	font-size: 0.85em;
	font-weight: 600;
	color: var(--color-primary);
	text-transform: uppercase;
}

.post-card__link:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(12, 32, 58, 0.2);
	border-radius: clamp(8px, 1vw, 12px);
}

/* RIMOSSO: breakpoint tablet intermedio (641-1024px) - gestito dal FINAL OVERRIDE a 959px */

@media (max-width: 959px) {
	/* Mobile: UNA colonna */
	.post-grid {
		grid-template-columns: 1fr;
		gap: 1.15rem;
	}

	.post-card {
		max-width: none;
		width: 100% !important;
		min-height: clamp(260px, 38vw, 320px);
	}

	/* Stack posts and sidebar vertically and center */
	.latest-posts-container {
		flex-direction: column !important;
		align-items: center;
		gap: 1.5rem;
	}

	.latest-posts-container .post-grid {
		width: 100%;
	}

	/* Sidebar becomes full-width block (960px) under posts */
	.latest-posts-container .home-sidebar {
		flex: none !important;
		width: 960px;
		max-width: 100%;
		margin: 0 auto;
	}

	/* Mobile: post-grid stacked */
	.post-grid {
		grid-template-columns: 1fr;
		width: 100%;
		gap: 1rem;
	}

	.post-card {
		min-height: clamp(220px, 52vw, 280px);
		width: 95% !important;
	}

	.latest-posts-container {
		flex-direction: column !important;
		align-items: center;
		gap: 1rem;
	}

	.latest-posts-container .post-grid {
		width: 100%;
	}

	.latest-posts-container .home-sidebar {
		width: 95%;
		max-width: 960px;
		margin: 0 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.post-card {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
		transform: none !important;
	}
}

/* Stili per rendere le card delle categorie uguali a quelle della home */
.post-card-content .post-title a {
	color: #fff !important;
	transition: color 0.3s ease;
}

.post-card-content .read-more-link {
	display: none !important;
}

.post-card:hover .post-card-content .post-cat {
	color: #000080 !important;
}

.post-card:hover {
	background-color: #c0c0c0 !important;
}

.post-card:hover .post-card-content .post-date,
.post-card:hover .post-card-content .post-excerpt {
	color: #000 !important;
}

.post-card:hover .post-card-content .post-title a {
	color: #000 !important;
}

.post-card .post-card-content .post-title a:hover {
	color: #007bff !important;
}

.post-date {
	white-space: nowrap;
}

/* — end */

/*  end */

/* 🔧 Improve zebra-striped table contrast in post content (scoped to entries) - Dark Mode */
.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	/* dark gray stripe for better visibility in dark theme */
	background-color: #333333 !important;
}
.entry-content .wp-block-table.is-style-stripes td,
.entry-content .wp-block-table.is-style-stripes th {
	/* light text for high contrast on dark stripes */
	color: #ffffff !important;
}

/* Handle tables that use inline dark backgrounds / white text (preserve white text, keep stripes subtle)
   - targets common inline styles: background-color:#000 / color:#fff */
.entry-content .wp-block-table[style*="background-color:#000"] .is-style-stripes tbody tr:nth-child(odd),
.entry-content .wp-block-table[style*="background-color:#000000"] .is-style-stripes tbody tr:nth-child(odd),
.entry-content .wp-block-table[style*="color:#fff"] .is-style-stripes tbody tr:nth-child(odd),
.entry-content .wp-block-table[style*="color:#ffffff"] .is-style-stripes tbody tr:nth-child(odd) {
	background-color: rgba(255,255,255,0.1) !important;
	color: #fff !important;
}

/* 🔧 Dark mode for custom spec blocks (like the provided HTML with alternating #f9f9f9 and #fff backgrounds) - Scoped to articles, more specific */
.entry-content div[style*="background-color: #f9f9f9"],
.entry-content div[style*="background-color:#f9f9f9"] {
	background-color: #333333 !important;
	color: #ffffff !important;
	border-color: #555 !important;
}
.entry-content div[style*="background-color: #fff"],
.entry-content div[style*="background-color:#fff"] {
	background-color: #1c1c1c !important;
	color: #ffffff !important;
	border-color: #555 !important;
}
.entry-content div[style*="background-color: #ffffff"],
.entry-content div[style*="background-color:#ffffff"] {
	background-color: #1c1c1c !important;
	color: #ffffff !important;
	border-color: #555 !important;
}

/* 🔧 Limit width to 533px and left-align tables, pro/contro blocks, and cards in articles */
.entry-content .wp-block-table,
.entry-content table {
	width: 100% !important;
	max-width: 533px !important;
	min-width: 0 !important;
	margin: 0 !important;
	text-align: left !important;
} 
@media (max-width: 959px) {
	.entry-content .wp-block-table,
	.entry-content table {
		width: calc(100% - 160px) !important;
		max-width: 533px !important;
		margin-left: 10.313px !important;
		margin-bottom: 16px !important;
	}
}
.entry-content div[style*="max-width: 533px"] {
	margin: 0 !important;
	min-width: 0 !important;
	max-width: 533px !important;
	width: 100% !important;
} 
@media (max-width: 959px) {
	.entry-content div[style*="max-width: 533px"] {
		width: calc(100% - 160px) !important;
		max-width: 533px !important;
		margin-left: 10.313px !important;
		margin-bottom: 16px !important;
	}
}
.entry-content .post-card {
	width: 100% !important;
	max-width: 533px !important;
	min-width: 0 !important;
	margin: 0 !important;
	margin-left: 10.313px !important;
	margin-right: 0 !important;
} 

/* 🔧 Zebra tables: dark mode stripes for all tables in articles */
.entry-content .zebra-table tr:nth-child(odd) {
	background-color: #333333;
	color: #ffffff;
}
.entry-content .zebra-table tr:nth-child(even) {
	background-color: #1c1c1c;
	color: #ffffff;
}
.entry-content .zebra-table td,
.entry-content .zebra-table th {
	border-color: #555;
}

/* Left-align post grids in articles */
.entry-content .post-grid {
	margin: 0 !important;
	text-align: left !important;
	justify-items: start !important;
	justify-content: start !important;
	width: 100% !important;
}

/* Left-align product affiliate cards in articles */
.entry-content .product-affiliate-container {
	margin: 0 !important;
	width: 100% !important;
	max-width: 533px !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
}
@media (max-width: 959px) {
	.entry-content .product-affiliate-container {
		width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box !important;
	}
}
.entry-content .product-affiliate {
	margin: 0 !important;
}
.entry-content article.product-affiliate {
	margin: 0 !important;
	margin-left: 10.313px !important;
	margin-right: 0 !important;
	text-align: left !important;
}
.entry-content div[style*="border: 1px solid #e0e0e0"] {
	margin: 0 !important;
	margin-left: 10.313px !important;
	margin-right: 0 !important;
	text-align: left !important;
}

/* --- CSS UNIFICATO: TABELLE E CARD (Coerenza Totale) --- */

/* 1. REGOLE CONDIVISE (Applicate sia alla Card che alle Tabelle)
   Assicura che larghezza, margini e comportamento siano identici. */
.product-affiliate-container {
    width: min(100%, 533px) !important;  /* Default 533px, si restringe con viewport */
    max-width: 533px !important;
    min-width: 0 !important;
    margin: 20px 0 !important;           /* 20px sopra/sotto, 0px a sinistra/destra */
    margin-left: 0 !important;
    padding: 0 !important;               /* Niente padding esterno */
    padding-left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    box-sizing: border-box !important;
    border: none !important;             /* Il bordo ce l'hanno i figli interni */
    background: transparent !important;
}

/* 2. STILE SPECIFICO: PRO E CONTRO */
.dgp-pro-cons-wrapper {
    gap: 15px !important; /* Spazio tra il box verde e il box rosso */
}

.dgp-col {
    width: 100% !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important; /* Stesso raggio della card */
	overflow: visible !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
    margin: 0 !important;
}

.dgp-header {
    padding: 10px !important;
    text-align: center !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
}

.dgp-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 15px !important;
}
.dgp-list li {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.4 !important;
}
.dgp-list li::before { content: none !important; } /* Rimuove pallini standard */

/* Icone SVG */
.dgp-icon-pro { fill: #4CAF50 !important; margin-right: 8px !important; flex-shrink: 0 !important; }
.dgp-icon-con { fill: #d32f2f !important; margin-right: 8px !important; flex-shrink: 0 !important; }


/* 3. STILE SPECIFICO: TABELLA ZEBRA */
.dgp-table-wrapper {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
}

.dgp-zebra-title {
    background-color: #333 !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 10px 15px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: left !important;
    border-bottom: 1px solid #444 !important;
}

.dgp-zebra-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.dgp-zebra-table tr:nth-child(odd) { background-color: #f9f9f9 !important; }
.dgp-zebra-table tr:nth-child(even) { background-color: #ffffff !important; }

.dgp-zebra-table td {
    padding: 10px 15px !important;
    font-size: 14px !important;
    color: #333 !important;
    border-bottom: 1px solid #eee !important;
    vertical-align: top !important;
}

/* Prima colonna (Etichette) in grassetto */
.dgp-zebra-table td:first-child {
    font-weight: 600 !important;
    color: #555 !important;
    width: 40% !important;
}

.dgp-zebra-table tr:last-child td { border-bottom: none !important; }

/* Adattamento per mobile - unificato a 959px */
@media (max-width: 959px) {
    .dgp-zebra-table td:first-child { width: 30% !important; }
}

/* Supporto legacy per dgp-pro-cons-container (vecchi articoli) */
.dgp-pro-cons-container {
    width: min(100%, 533px) !important;
    max-width: 533px !important;
    min-width: 0 !important;
    margin: 20px 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

/* Supporto legacy per dgp-zebra-container (vecchi articoli) */
.dgp-zebra-container {
    width: min(100%, 533px) !important;
    max-width: 533px !important;
    min-width: 0 !important;
    margin: 20px 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
}

/* ============================================
   SLIDER CATEGORIE CON CARD, ICONE E DESCRIZIONI
   ============================================ */
.site-nav--categories {
    /* Be transparent so background is visible at the sides */
    background: transparent !important;
    padding: 0 !important;
    border-bottom: none;
    width: 100%;
}

/* Apply the black background only to the boxed container so sides show the page background */
.site-nav--categories .container {
    width: min(960px, 92%);
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 2vw, 1.2rem);
    background-color: #000000;
    display: flex;
    align-items: center;
    min-height: 90px;
}

.category-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-slider__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
    flex: 1;
    scroll-snap-type: x mandatory;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.category-slider__track.dragging .category-card {
    pointer-events: none;
}

.category-slider__track::-webkit-scrollbar {
    display: none;
}

.category-slider__btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.9);
    color: #cccccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 16px;
    font-weight: bold;
}

.category-slider__btn--prev::before {
    content: '<';
}

.category-slider__btn--next::before {
    content: '>';
}

.category-slider__btn:hover {
    background: #ff9f43;
    transform: scale(1.1);
}

.category-slider__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 959px) {
    /* On mobile/touch screens hide the prev/next arrows — touch scrolling is preferred */
    .category-slider__btn {
        display: none;
    }
}

/* Card categoria */
.category-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.25rem 0.5rem;
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.2rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.category-card.is-active,
.category-card[aria-current="page"] {
	border-color: rgba(255, 255, 255, 0.55);
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff9f43, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before,
.category-card:focus::before {
    opacity: 1;
}

.category-card:hover,
.category-card:focus {
    background: linear-gradient(145deg, rgba(255, 159, 67, 0.2), rgba(255, 159, 67, 0.08));
    border-color: rgba(255, 159, 67, 0.6);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 12px 28px rgba(255, 159, 67, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    outline: none;
}

.category-card__icon {
    display: none;
}

.category-card__icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    width: 20px;
    height: 20px;
}

.category-card:hover .category-card__icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
    box-shadow: none;
}

.category-card:hover .category-card__icon svg {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.category-card__name {
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.category-card__desc {
    display: none;
}

/* Responsive - UNICO breakpoint a 959px */
@media (max-width: 959px) {
    .category-slider__btn {
        width: 32px;
        height: 32px;
    }
    
    .category-card {
        min-width: 100px;
        max-width: 120px;
        padding: 0.6rem 0.8rem;
        border-radius: 12px;
    }
    
    .category-card__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    
    .category-card__name {
        font-size: 0.75rem;
    }
    
    .category-card__desc {
        font-size: 0.65rem;
    }
}

/* ==========================================================================
   FINAL OVERRIDE: Unified Layout Alignment (Header, Navs, Hero, Footer, Main)
   Force exact match with header.site-header inner dimensions.
   ========================================================================== */

/* 1. Wrappers: Transparent and Full Width (to show site background) */
.site-nav--categories,
.site-nav--primary,
.site-footer,
.latest-posts-section,
.content-area,
.site-main,
.site-main.home-custom {
    background: transparent !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: visible !important;
}

/* Hero Section: Transparent with specific top spacing */
.hero-section {
    background: transparent !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important; /* reduced to be flush with header */
    padding: 11px 0 0 0 !important; /* increased by 5px */
    border: none !important;
    overflow: visible !important;
}

/* 2. Inner Containers: Match Header Dimensions */
/* These stay TRANSPARENT */
.layout.container {
    /* Base (Desktop) - Matches .site-header__inner EXACTLY */
    width: min(960px, 92%) !important;
    max-width: min(960px, 92%) !important;
    margin: 0 auto !important;
    padding: 0 clamp(0.75rem, 2vw, 1.2rem) !important;
    box-sizing: border-box !important;
    background: transparent !important;
    background-color: transparent !important;
    overflow: hidden !important;
}

/* Menu primary (sopra header) - TRASPARENTE */
.site-nav--primary > .container,
.site-nav-primary__inner {
    /* Base (Desktop) - Matches .site-header__inner EXACTLY */
    width: min(960px, 92%) !important;
    max-width: min(960px, 92%) !important;
    margin: 0 auto !important;
    padding: 0 clamp(0.75rem, 2vw, 1.2rem) !important;
    box-sizing: border-box !important;
    background: transparent !important;
    background-color: transparent !important;
    overflow: hidden !important;
}

/* These get DARK GRAY background */
.site-nav--categories > .container,
.hero-section .hero-content,
.hero-section .container.hero-content,
.site-footer__inner {
    /* Base (Desktop) - Matches .site-header__inner EXACTLY */
    width: min(960px, 92%) !important;
    max-width: min(960px, 92%) !important;
    margin: 0 auto !important;
    padding: 0 clamp(0.75rem, 2vw, 1.2rem) !important;
    box-sizing: border-box !important;
    
/* Override per forzare larghezza articolo identica all'header */
article.entry,
.entry-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-content .content-area {
    width: 100% !important;
    max-width: none !important;
}

.layout--with-sidebar .site-content .content-area {
    width: 100% !important;
    max-width: none !important;
}

.site-content .container {
    max-width: none !important;
}

/* Media query: allow article to shrink under 960px so sidebar has room */
@media (max-width: 960px) {
	article.entry,
	.entry-content {
		min-width: auto !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}
}
    
    /* Visuals: Dark gray background */
    background: #1c1c1c !important;
    background-color: #1c1c1c !important;
    
    /* Prevent overflow */
    overflow: hidden !important;
}

/* Latest posts section - transparent background, same alignment */
.latest-posts-section .section-header,
.latest-posts-section .latest-posts-container {
    width: min(960px, 92%) !important;
    max-width: min(960px, 92%) !important;
    margin: 0 auto !important;
    padding: 0 clamp(0.75rem, 2vw, 1.2rem) !important;
    box-sizing: border-box !important;
    background: transparent !important;
    overflow: visible !important;
}

/* Category slider must stay within its container */
.site-nav--categories .category-slider {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.site-nav--categories .category-slider__track {
    max-width: 100% !important;
}

/* Footer inner - restore vertical padding */
.site-footer__inner {
    padding-top: clamp(2rem, 3vw, 3rem) !important;
    padding-bottom: clamp(2rem, 3vw, 3rem) !important;
}

/* Layout main content - restore vertical spacing */
.layout.container {
    padding-top: clamp(1.4rem, 3.6vw, 2.4rem) !important;
    padding-bottom: clamp(1.4rem, 3.6vw, 2.4rem) !important;
    margin-top: clamp(0.5rem, 1vw, 1rem) !important;
    margin-bottom: clamp(0.5rem, 1vw, 1rem) !important;
}

/* Latest posts section - vertical spacing (reduced height) */
.latest-posts-section .section-header {
    padding-top: 8px !important; /* ridotto */
    padding-bottom: 2px !important; /* ridotto */
    margin-bottom: 0 !important; /* rimosso */
}
.latest-posts-section .section-header .section-title {
    margin-bottom: 0 !important;
}

/* Strong override: remove top spacing so list is flush under hero */
.latest-posts-section .latest-posts-container {
    padding-top: 0 !important;
    padding-bottom: clamp(1.4rem, 3.6vw, 2.4rem) !important;
    margin-top: 0 !important;
}

/* 3. Responsive: UNICO breakpoint a 959px */
/* Sopra 960px = Desktop fisso | Sotto 959px = Mobile proporzionale (zoom-like) */

/* Override per forzare stile desktop anche nei breakpoint intermedi (1023px, 768px, 600px) */
@media (min-width: 960px) {
    .site-header__inner,
    .site-nav--primary > .container,
    .site-nav-primary__inner,
    .site-nav--categories > .container,
    .hero-section .hero-content,
    .site-footer__inner,
    .layout.container,
    .latest-posts-section .section-header,
    .latest-posts-section .latest-posts-container,
    .site-nav--top > .container,
    .site-nav--mid > .container,
    .site-nav--pre-header > .container {
        width: min(960px, 92%) !important;
        max-width: min(960px, 92%) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Desktop: Post grid + Sidebar affiancati */
    .latest-posts-section .latest-posts-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 1.5rem !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
    }
    
    .latest-posts-section .latest-posts-container > .post-grid {
        flex: 1 1 65% !important;
        max-width: 65% !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
	.latest-posts-section .latest-posts-container > .home-sidebar {
		flex: 0 0 320px !important;
		width: 320px !important;
		max-width: 320px !important;
		position: sticky !important;
		top: 20px !important;
		background: var(--color-surface, #1c1c1c) !important;
		padding: 1rem !important;
		border-radius: 8px !important;
	}

	/* Desktop override for recent posts sidebar: keep box-sizing and clear right margin */
	.latest-posts-section .latest-posts-container > .home-sidebar,
	.latest-posts-section .latest-posts-container > .home-sidebar .widget,
	.latest-posts-section .latest-posts-container > .home-sidebar .widget * {
		margin-right: 0 !important;
		box-sizing: border-box !important;
	}
}

/* Desktop defaults: ensure sidebar padding and sticky behavior for both classes */
@media (min-width: 960px) {
	.home-sidebar {
		padding: 1rem !important;
		box-sizing: border-box !important;
	}

	.latest-posts-section .latest-posts-container > .home-sidebar {
		position: sticky !important;
		top: 20px !important;
	}
}

/* Global sticky for sidebars on desktop: apply to any sidebar instance */
@media (min-width: 960px) {
	.home-sidebar {
		position: sticky !important;
		top: 20px !important;
		z-index: 2 !important;
	}
}

/* Desktop layout: fixed sidebar column and main content column behavior */
@media (min-width: 960px) {
	.layout--with-sidebar {
		grid-template-columns: 1fr 320px !important;
	}

	.layout__main {
		grid-column: 1 !important;
		min-width: 0 !important; /* allow shrinking inside CSS grid */
		box-sizing: border-box !important;
	}

	/* Ensure article does not overflow the main column */
	.layout__main > article.entry {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box !important;
	}

	.layout--with-sidebar .layout__main {
		grid-column: 1 !important;
	}

	.home-sidebar {
		grid-column: 2 !important;
		width: 320px !important;
		max-width: 320px !important;
		flex: 0 0 320px !important;
	}
}

/* Final strong override: apply globally to any page that may still render different layout
   Keeps rules extremely specific and placed at the end to win cascade. Remove after verification. */
@media (min-width: 960px) {
	html body .layout.layout--with-sidebar.container,
	html body .layout--with-sidebar.container {
		grid-template-columns: 1fr 320px !important;
		-ms-grid-columns: 1fr 320px !important;
		overflow: visible !important;
		transform: none !important;
	}

	html body .layout__main,
	html body #main-content.layout__main {
		grid-column: 1 !important;
		min-width: 0 !important; /* ensure grid item can shrink */
		box-sizing: border-box !important;
	}

	html body aside.home-sidebar,
	html body aside[aria-label="Barra laterale principale"],
	html body [role="complementary"],
	html body .widget-area {
		grid-column: 2 !important;
		width: 320px !important;
		max-width: 320px !important;
		flex: 0 0 320px !important;
		position: sticky !important;
		top: 20px !important;
		z-index: 9999 !important;
		background: var(--color-surface, #1c1c1c) !important;
		background-image: none !important;
		box-sizing: border-box !important;
	}
}

/* Sotto 959px: layout proporzionale (zoom-like), stesso aspetto fino a 200px */
@media (max-width: 959px) {
    .site-header__inner,
    .site-nav--primary > .container,
    .site-nav-primary__inner,
    .site-nav--categories > .container,
    .hero-section .hero-content,
    .site-footer__inner,
    .layout.container,
    .latest-posts-section .section-header,
    .latest-posts-section .latest-posts-container,
    .site-nav--top > .container,
    .site-nav--mid > .container,
    .site-nav--pre-header > .container {
        /* 92% della viewport, sempre proporzionale */
        width: 92% !important;
        max-width: 92% !important;
        min-width: 200px !important;
        /* Padding proporzionale alla viewport */
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* POST GRID: FORZARE UNA COLONNA sotto 959px */
    .post-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

	/* (desktop layout rules moved to a proper min-width:960px block) */

	.home-sidebar {
		grid-column: 2 !important;
		width: 320px !important;
		max-width: 320px !important;
		flex: 0 0 320px !important;
	}
}

/* Forza la rimozione del padding verticale nelle card dei post e impedisce lo stretch verticale */
.latest-posts-section .latest-posts-container .post-card__body,
.post-grid .post-card__body,
.post-card .post-card__body {
    /* Forziamo il padding-top desiderato e disabilitiamo il posizionamento assoluto ereditato */
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    padding-top: 25px !important;
    padding-bottom: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    margin-right: 0 !important;
    height: auto !important; /* non riempie l'intera card */
    justify-content: flex-start !important; /* contenuto in alto */
    align-items: flex-start !important;
}

/* Assicuriamoci di sovrascrivere anche elementi con style inline */
.post-card__body[style],
.post-grid .post-card__body[style],
.latest-posts-section .post-card__body[style] {
    padding-top: 105px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    margin-right: 0 !important;
}

@media (min-width: 960px) {
    /* Selettore specifico per schermi grandi: permetti alle card di adattare l'altezza */
    body .post-grid .post-card,
    body .post-card {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
    }
}

/* Forziamo che il contenuto si adatti all'altezza senza overflow esterno */
@media (max-width: 959px) {
    body .post-card .post-card__body {
        height: 100% !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        box-sizing: border-box !important;
    }
}

/* Uniformare l'altezza delle post-card: se una si allunga, si allungano tutte (solo su mobile) */
@media (max-width: 959px) {
    .post-grid {
        grid-auto-rows: 1fr !important;
    }
}

/* Mobile (<=960px): rendere non trasparente SOLO il widget sidebar 'Articoli recenti' */
@media (max-width: 960px) {
    .latest-posts-section .latest-posts-container > .home-sidebar {
        background-color: var(--color-surface) !important;
        background-image: none !important;
        padding: 1rem !important;
        border-radius: 8px !important;
    }
}

.post-grid > * {
    align-self: stretch !important;
}

.post-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.post-card .post-card-content {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.post-card__body {
    flex: 1 1 auto !important;
}

/* Responsive (<=959px): match small-screen behavior (full width, no max-width, input accounts for 10px both sides) */
@media (max-width: 959px) {
    .site-header__search {
        padding-left: 10px !important;
        padding-right: 10px !important;
        justify-content: center !important;
        transform: translateX(0) translateY(-10px) !important;
    }

/* Mobile: reset lateral paddings/margins for article and related so content matches header/footer */
@media (max-width: 959px) {
  .layout.container {
    width: min(960px, 92%) !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  .site-header__inner,
  .site-footer__inner {
    width: min(960px, 92%) !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
	.layout__main {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		box-sizing: border-box !important;
	}

	.layout__main > article.entry,
	article.entry {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding: 12.5px !important;
		box-sizing: border-box !important;
	}
  .single-related-posts,
  .single-related-posts > .widget__list,
  .single-related-posts .widget__list--related {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
	.home-sidebar {
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		box-sizing: border-box !important;
	}
}

    .site-header__search .site-search__form { 
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important; /* remove internal padding so form spans full width */
        box-sizing: border-box !important;
    }

    .site-header__search .site-search__input {
        box-sizing: border-box !important;
        width: calc(100% - 20px) !important; /* account for 10px both sides */
        padding-left: 10px !important;
        padding-right: 10px !important;
        display: block !important;
        margin: 0 auto !important;
    }

    /* Layout: place sidebar below posts on narrow screens */
    .site-content {
        display: flex !important;
        flex-direction: column !important;
    }

    .content-area,
    .site-main {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
        order: 1 !important;
    }

	.home-sidebar {
		width: 100% !important;
		max-width: none !important;
		margin-top: 0 !important;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		/* Keep lateral padding controlled by layout variables to preserve spacing */
		box-sizing: border-box !important;
		float: none !important;
		order: 2 !important;
    }
}   

/* Forza sfondo non trasparente per tutte le sidebar (desktop + mobile) */
.home-sidebar {
	background: var(--color-surface, #1c1c1c) !important;
	background-image: none !important;
	color: var(--color-on-surface, #ffffff) !important;
}

/* Small screens: Search bar lateral padding 10px to keep it centered */
@media (max-width: 550px) {
    /* Ensure the search container has 10px side padding */
    .site-header__search {
        padding-left: 10px !important;
        padding-right: 10px !important;
        justify-content: center !important;
    }

    /* Make the form span the full width (no extra internal padding) */
    .site-header__search .site-search__form {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Apply explicit lateral padding to the input and keep it centered */
    .site-header__search .site-search__input {
        box-sizing: border-box !important;
        width: calc(100% - 20px) !important; /* account for 10px both sides */
        padding-left: 10px !important;
        padding-right: 10px !important;
        display: block !important;
        margin: 0 auto !important;
    }
}

/* DEBUG (temporary): force sidebar sticky and ensure ancestors allow sticky
	 - Remove after testing or if it breaks layout
*/
@media (min-width: 960px) {
	.layout--with-sidebar,
	.layout.container,
	.site-content,
	.latest-posts-section .latest-posts-container {
		overflow: visible !important;
		transform: none !important;
		-webkit-transform: none !important;
	}

	aside[class*="sidebar"],
	[role="complementary"],
	.widget-area {
		position: sticky !important;
		top: 20px !important;
		z-index: 9999 !important;
		background: var(--color-surface, #1c1c1c) !important;
		background-image: none !important;
		padding: 1rem !important;
		box-sizing: border-box !important;
	}
}

/* Ensure the search input always has 10px right padding */
.site-header__search .site-search__input {
    padding-right: 10px !important;
}

/* High-specificity fallback to override other styles */
header .site-header__search .site-search__input,
.site-header__search .site-search__form .site-search__input,
.site-header__search input[type="search"].site-search__input {
    padding: 0.65rem 10px 0.65rem 1rem !important; /* top right bottom left */
    padding-right: 10px !important;
}

@media (max-width: 540px) {
    .site-header__search .site-search__input {
        padding-right: 10px !important;
        padding-left: 0.2rem !important;
        width: calc(100% - 10px) !important;
    }
}

/* Strongest override: target both generic input and IDs that start with dgp-search- */
header .site-header__search input.site-search__input[id^="dgp-search-"],
header .site-header__search .site-search__form > input.site-search__input,
.site-header__search .site-search__form input.site-search__input {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    padding-left: 1rem !important;
    padding-right: 10px !important;
}

/* Shift the search bar 10px to the left on desktop only (>= 960px) */
@media (min-width: 960px) {
    header .site-header__search {
        transform: translateX(-10px) translateY(-10px) !important;
    }
}


/* -------------------------------
   Forzare padding laterale 0 su desktop (>= 960px)
   ------------------------------- */
@media (min-width: 960px) {
	.site-header__inner,
	.site-nav--primary > .container,
	.site-nav-primary__inner,
	.hero-section .hero-content,
	.site-footer__inner,
	.layout.container,
	.latest-posts-section .latest-posts-container,
	#page {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-inline: 0 !important;
    }

    /* On desktop, show related widget in sidebar and hide inline related (to avoid duplicate) */
	.home-sidebar .widget_related { display: block !important; }

/* -------------------------------
   CLEAN SINGLE POST LAYOUT (SCOPED)
   Purpose: rebuild single post layout from scratch and ensure consistent sidebar behavior
   ------------------------------- */
@media (min-width: 960px) {
    html body.single .layout.layout--with-sidebar.container,
    html body.single .layout--with-sidebar.container {
        display: grid !important;
        grid-template-columns: 1fr 320px !important;
        gap: clamp(0.75rem, 1.5vw, 1.5rem) !important;
        overflow: visible !important;
        transform: none !important;
    }

    html body.single .layout__main,
    html body.single #main-content.layout__main {
        grid-column: 1 !important;
        min-width: 0 !important; /* allow shrinking */
        width: auto !important;
        box-sizing: border-box !important;
    }

    html body.single aside.home-sidebar,
    html body.single aside[aria-label="Barra laterale principale"],
    html body.single [role="complementary"],
    html body.single .widget-area {
        grid-column: 2 !important;
        width: 320px !important;
        max-width: 320px !important;
        flex: 0 0 320px !important;
        position: sticky !important;
        top: 20px !important;
        z-index: 999 !important;
        background: var(--color-surface, #1c1c1c) !important;
        background-image: none !important;
        box-sizing: border-box !important;
    }

    html body.single .entry__content {
        min-width: 0 !important;
    }
}

@media (max-width: 959px) {
    /* mobile: stack content and sidebar */
    html body.single .layout.layout--with-sidebar.container,
    html body.single .layout--with-sidebar.container {
        display: block !important;
        width: 100% !important;
    }

    html body.single aside.home-sidebar,
    html body.single .widget-area {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        margin-top: 1rem !important;
    }
}
    .single-related-posts { display: none !important; }
}

/* On mobile/tablet, hide related widget in sidebar and show inline related posts */
@media (max-width: 959px) {
	.home-sidebar .widget_related { display: none !important; }
    .single-related-posts {
        display: block !important;
        margin-top: 1.25rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid rgba(0,0,0,0.06) !important;
        /* Align width with header inner; prefer computed layout width if available */
        width: var(--dgp-layout-width, 92%) !important;
        max-width: var(--dgp-layout-width, min(960px, 92%)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        /* Remove outer padding so edges line up with header inner */
        padding-left: 0 !important;
        padding-right: 0 !important;
        --dgp-single-related-inner-max: var(--dgp-layout-width, min(960px, 92%));
    }
    .single-related-posts > .widget__list,
    .single-related-posts .widget__list--related {
        max-width: var(--dgp-single-related-inner-max) !important;
        /* Shrink inner max-width by the article's lateral padding so the content aligns exactly */
        width: calc(var(--dgp-single-related-inner-max) - (var(--dgp-article-padding-left, 0px) + var(--dgp-article-padding-right, 0px))) !important;
        box-sizing: border-box !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: clamp(0.75rem, 2vw, 1.2rem) !important;
        padding-right: clamp(0.75rem, 2vw, 1.2rem) !important;
    }

    /* If the article sets --dgp-padding-left/right, use it to align the related list with the article content */
    article.entry + .single-related-posts > .widget__list,
    article.entry + .single-related-posts .widget__list--related {
        padding-left: calc(var(--dgp-article-padding-left, 0px) + clamp(0.75rem, 2vw, 1.2rem)) !important;
        padding-right: calc(var(--dgp-article-padding-right, 0px) + clamp(0.75rem, 2vw, 1.2rem)) !important;
    }
} 

/* High-specificity footer padding override: ensure lateral padding is exactly 12.5px
   Uses very specific selector and !important to override inline styles or other rules. */
html body .site-footer__inner.container,
html body .site-footer__inner.container[style],
html body .site-footer__inner.container[class] {
	padding-left: 12.5px !important;
	padding-right: 12.5px !important;
	box-sizing: border-box !important;
}

/* Strong override: enforce requested desktop grid for footer columns (high specificity to win cascade) */
@media (min-width: 960px) {
	html[data-dgp-bp="desktop"] .site-footer__inner,
	html body .site-footer__inner {
		grid-template-columns: minmax(340px, 1fr) minmax(250px, 1fr) minmax(50px, 200px) !important;
		gap: clamp(1rem, 2vw, 1.6rem) !important;
	}

	/* Desktop: make footer meta children equal width and align text */
	html body .site-footer__meta {
		display: flex !important;
		gap: 1rem !important;
		align-items: center !important;
		justify-content: space-between !important;
	}

	html body .site-footer__meta > .site-footer__copy,
	html body .site-footer__meta > .site-footer__legal {
		flex: 1 1 0 !important;
		min-width: 0 !important; /* allow shrinking */
	}

	html body .site-footer__meta > .site-footer__copy { text-align: left !important; }
	html body .site-footer__meta > .site-footer__legal { text-align: left !important; }
}

/* -------------------------------------------------------------
   SINGLE POST MASTER RULE (unified)
   Goal: full-width readable article, centered, with safe side spacing.
   ------------------------------------------------------------- */
body.single {
	--dgp-single-side-space: clamp(12px, 2.2vw, 24px);
}

body.single .layout.layout--with-sidebar.container,
body.single .layout--with-sidebar.container {
	box-sizing: border-box !important;
}

body.single .layout.layout--with-sidebar.container .layout__main,
body.single #main-content.layout__main {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box !important;
}

body.single article.entry {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box !important;
}

body.single article.entry .entry__header,
body.single article.entry .entry__content,
body.single article.entry .entry__footer {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: var(--dgp-single-side-space) !important;
	padding-right: var(--dgp-single-side-space) !important;
	box-sizing: border-box !important;
}

/* Prevent text blocks from touching the edges even when legacy rules force widths. */
body.single article.entry .entry__content > * {
	box-sizing: border-box !important;
	max-width: 100% !important;
}

/* Remove the extra blank gap before the first paragraph when imported HTML starts with article/header wrappers. */
body.single article.entry {
	gap: 0.35rem !important;
}

body.single article.entry .entry__header {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

body.single article.entry .entry__content,
body.single article.entry .entry__content > article,
body.single article.entry .entry__content > article > header {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.single article.entry .entry__content > :first-child,
body.single article.entry .entry__content > article > :first-child,
body.single article.entry .entry__content > article > header > :first-child {
	margin-top: 0 !important;
}

body.single article.entry .entry__content > article > header > p {
	margin: 0.35rem 0 0 !important;
}

body.single article.entry .entry__content > article > header > p:first-of-type {
	margin-top: 0 !important;
}

@media (max-width: 959px) {
	body.single {
		--dgp-single-side-space: clamp(10px, 3.6vw, 16px);
	}
}

/* Mobile listing results (search/category/tag/archive): avoid large top-offset that makes cards look empty */
@media (max-width: 959px) {
	:is(body.search, body.category, body.tag, body.archive, body.tax) .layout.layout--with-sidebar.container,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .layout--with-sidebar.container {
		display: block !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .layout__main,
	:is(body.search, body.category, body.tag, body.archive, body.tax) #main-content.layout__main {
		width: 100% !important;
		max-width: 100% !important;
		padding-top: 0 !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .page-header {
		margin: 0 !important;
		padding-top: 0 !important;
		padding-bottom: 8px !important;
		min-height: 0 !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .page-header .page-title {
		margin: 0 !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-grid::before,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-grid::after {
		display: none !important;
		content: none !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-grid {
		display: block !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-grid .post-card,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-card {
		min-height: 0 !important;
		height: auto !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-grid .post-card-content,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-card .post-card-content,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-card-content[style] {
		padding-top: calc(40px + 1.5rem) !important;
		padding-right: 4px !important;
		padding-bottom: 0 !important;
		padding-left: 4px !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-grid .post-card__body,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-card .post-card__body,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-card__body[style] {
		padding-top: 25px !important;
		padding-bottom: 9px !important;
		padding-left: 4px !important;
		padding-right: 4px !important;
		justify-content: flex-end !important;
		top: auto !important;
		transform: none !important;
	}

	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-card .post-title,
	:is(body.search, body.category, body.tag, body.archive, body.tax) .post-grid .post-title {
		margin-bottom: 0 !important;
	}
}

