/**
 * Giada Marciano — foglio di stile principale.
 *
 * Indice
 *  1.  Design token
 *  2.  Reset e base
 *  3.  Tipografia
 *  4.  Accessibilità (skip link, focus, screen-reader-text)
 *  5.  Layout e allineamenti
 *  6.  Header e navigazione
 *  7.  Bottoni
 *  8.  Badge
 *  9.  Card
 *  10. Citazioni
 *  11. Form
 *  12. Sezioni e pattern (hero, servizi, fiducia, corsi)
 *  13. Articoli, archivio, paginazione
 *  14. Commenti
 *  15. Footer
 *  16. Blocchi core WordPress
 *  17. Motion e reveal
 *  18. Responsive
 */

/* ------------------------------------------------------------------ *
 * 1. Design token
 * ------------------------------------------------------------------ */

:root {
	/*
	 * Brand.
	 * --color-brand e --color-accent-hover sono leggermente più scuri dei valori
	 * del design system (#B0663F / #66735A): agli hex originali il testo avorio
	 * sul bottone primario si fermava a 4.09:1 e il badge salvia a 4.01:1, sotto
	 * il minimo AA di 4.5:1 che il brief stesso pone come requisito. Lo scarto è
	 * di ~3% di luminosità, impercettibile a occhio. Per tornare esattamente ai
	 * valori del design basta rimettere #B0663F e #66735A qui e in theme.json,
	 * accettando il mancato rispetto di AA.
	 */
	--color-brand: #a55f3a;
	--color-brand-hover: #94502f;
	--color-brand-soft: #f0dccf;
	--color-accent: #7e8a6e;
	--color-accent-hover: #5e6a53;
	--color-accent-soft: #e3e7db;

	/* Neutri caldi — mai grigi freddi */
	--color-bg: #fbf7f2;
	--color-surface: #ffffff;
	--color-surface-alt: #f4ede4;
	--color-border: #e4d9cc;
	--color-text: #2e2a26;
	--color-text-muted: #6b6259;
	--color-text-inverse: #fbf7f2;

	/* Semantici */
	--color-success: #5e7b54;
	--color-error: #a8452f;
	--color-info: #7e8a6e;

	/* Tipografia */
	--font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--text-display: clamp(2.25rem, 5vw, 3.5rem);
	--text-display-lh: 1.1;
	--text-h1: clamp(1.875rem, 4vw, 2.5rem);
	--text-h1-lh: 1.15;
	--text-h2: clamp(1.5rem, 3vw, 1.875rem);
	--text-h2-lh: 1.2;
	--text-h3: clamp(1.25rem, 2vw, 1.4375rem);
	--text-h3-lh: 1.3;
	--text-body-lg: 1.1875rem;
	--text-body-lg-lh: 1.6;
	--text-body: 1rem;
	--text-body-lh: 1.6;
	--text-small: 0.875rem;
	--text-small-lh: 1.5;

	--weight-heading: 500;
	--weight-heading-strong: 600;
	--weight-body: 400;
	--weight-body-strong: 600;

	--measure-text: 68ch;

	/* Spaziatura — scala a step di 4px */
	--space-xs: 4px;
	--space-sm: 8px;
	--space-md: 16px;
	--space-lg: 24px;
	--space-xl: 40px;
	--space-2xl: 64px;
	--space-3xl: 96px;

	--section-padding: var(--space-3xl);
	--content-width-text: 680px;
	--content-width-wide: 1140px;
	--gutter: clamp(20px, 5vw, 32px);

	/* Raggi */
	--radius-sm: 8px;
	--radius-md: 14px;
	--radius-lg: 24px;
	--radius-full: 999px;
	--border-width: 1px;

	/* Ombre — calde, mai nero puro */
	--shadow-sm: 0 1px 3px rgba(46, 42, 38, 0.06);
	--shadow-md: 0 6px 20px rgba(46, 42, 38, 0.08);
	--shadow-lg: 0 16px 40px rgba(46, 42, 38, 0.1);

	/* Motion */
	--motion-fast: 150ms;
	--motion-base: 250ms;
	--motion-slow: 400ms;
	--easing: cubic-bezier(0.4, 0, 0.2, 1);

	/* Altezza header, usata per l'offset dello scroll con ancore */
	--header-height: 76px;
}

/* ------------------------------------------------------------------ *
 * 2. Reset e base
 * ------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-height) + var(--space-md));
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--text-body);
	font-weight: var(--weight-body);
	line-height: var(--text-body-lh);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

img,
svg,
video,
iframe,
embed,
object {
	max-width: 100%;
	height: auto;
}

img {
	display: block;
}

figure,
blockquote {
	margin: 0;
}

hr {
	border: 0;
	border-top: var(--border-width) solid var(--color-border);
	margin: var(--space-xl) auto;
}

table {
	border-collapse: collapse;
	width: 100%;
}

th,
td {
	border: var(--border-width) solid var(--color-border);
	padding: var(--space-sm) var(--space-md);
	text-align: left;
}

th {
	background: var(--color-surface-alt);
	font-weight: var(--weight-body-strong);
}

code,
kbd,
pre,
samp {
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
	font-size: 0.9em;
}

code {
	background: var(--color-surface-alt);
	border-radius: var(--radius-sm);
	padding: 0.15em 0.4em;
}

pre {
	background: var(--color-surface-alt);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
	overflow-x: auto;
}

/* ------------------------------------------------------------------ *
 * 3. Tipografia
 * ------------------------------------------------------------------ */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: var(--weight-heading);
	color: var(--color-text);
	margin: 0 0 var(--space-md);
	text-wrap: balance;
}

h1 {
	font-size: var(--text-h1);
	line-height: var(--text-h1-lh);
}

h2 {
	font-size: var(--text-h2);
	line-height: var(--text-h2-lh);
}

h3 {
	font-size: var(--text-h3);
	line-height: var(--text-h3-lh);
}

h4 {
	font-size: var(--text-body-lg);
	line-height: 1.4;
	font-weight: var(--weight-heading-strong);
}

h5,
h6 {
	font-size: var(--text-body);
	line-height: 1.4;
	font-weight: var(--weight-heading-strong);
}

p {
	margin: 0 0 var(--space-md);
}

ul,
ol {
	margin: 0 0 var(--space-md);
	padding-left: 1.4em;
}

li + li {
	margin-top: var(--space-xs);
}

strong,
b {
	font-weight: var(--weight-body-strong);
}

small {
	font-size: var(--text-small);
	line-height: var(--text-small-lh);
}

a {
	color: var(--color-brand);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--motion-fast) var(--easing);
}

a:hover {
	color: var(--color-brand-hover);
}

/*
 * Sui fondi beige e salvia il terracotta chiaro scende sotto AA (4.21:1 e
 * 3.89:1): lì i link usano la variante scura, che risale a 5.24:1 e 4.85:1.
 */
:where(.gm-section--alt, .gm-section--accent, .gm-footer, .is-style-gm-section-alt, .is-style-gm-section-accent, blockquote, .wp-block-quote) a {
	color: var(--color-brand-hover);
}

.gm-lead {
	font-size: var(--text-body-lg);
	line-height: var(--text-body-lg-lh);
	color: var(--color-text-muted);
}

.gm-meta {
	font-size: var(--text-small);
	line-height: var(--text-small-lh);
	color: var(--color-text-muted);
}

.gm-eyebrow {
	font-size: var(--text-small);
	font-weight: var(--weight-body-strong);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-accent-hover);
	margin: 0 0 var(--space-sm);
}

/* ------------------------------------------------------------------ *
 * 4. Accessibilità
 * ------------------------------------------------------------------ */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.screen-reader-text:focus {
	background: var(--color-surface);
	clip-path: none;
	color: var(--color-brand-hover);
	display: block;
	font-size: var(--text-small);
	font-weight: var(--weight-body-strong);
	height: auto;
	left: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	top: var(--space-md);
	width: auto;
	z-index: 100000;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
}

/* Focus sempre visibile — outline salvia 2px, offset 2px */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------------ *
 * 5. Layout e allineamenti
 * ------------------------------------------------------------------ */

.gm-container {
	max-width: calc(var(--content-width-wide) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.gm-container--text {
	max-width: calc(var(--content-width-text) + var(--gutter) * 2);
}

.gm-main {
	display: block;
	min-height: 40vh;
}

.gm-section {
	padding-block: var(--section-padding);
}

.gm-section--tight {
	padding-block: var(--space-2xl);
}

.gm-section--alt {
	background: var(--color-surface-alt);
}

.gm-section--accent {
	background: var(--color-accent-soft);
}

/*
 * Allineamenti del contenuto generato dall'editor.
 * La max-width comprende i gutter, così un blocco allineato normale cade sulla
 * stessa colonna di .gm-container--text (titolo pagina, meta articolo).
 */
.gm-entry-content > * {
	max-width: calc(var(--content-width-text) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.gm-entry-content > .alignwide {
	max-width: calc(var(--content-width-wide) + var(--gutter) * 2);
}

.gm-entry-content > .alignfull {
	max-width: none;
}

.gm-entry-content > .alignfull:where(.wp-block-cover, .wp-block-image, .wp-block-gallery) {
	padding-inline: 0;
}

.gm-entry-content > * + * {
	margin-block-start: var(--space-lg);
}

.gm-entry-content > h2 {
	margin-block-start: var(--space-2xl);
}

.gm-entry-content > h3 {
	margin-block-start: var(--space-xl);
}

.gm-entry-content > :first-child {
	margin-block-start: 0;
}

.alignleft {
	float: left;
	margin: 0 var(--space-lg) var(--space-md) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--space-md) var(--space-lg);
}

.aligncenter {
	margin-inline: auto;
}

.gm-grid {
	display: grid;
	gap: var(--space-lg);
}

.gm-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gm-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ------------------------------------------------------------------ *
 * 6. Header e navigazione
 * ------------------------------------------------------------------ */

.gm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--color-surface);
	box-shadow: var(--shadow-sm);
	transition:
		background var(--motion-base) var(--easing),
		box-shadow var(--motion-base) var(--easing);
}

/* In home la navbar parte trasparente sopra l'hero, poi diventa solida. */
.gm-header--overlay:not(.is-scrolled) {
	background: transparent;
	box-shadow: none;
}

.gm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-lg);
	max-width: calc(var(--content-width-wide) + var(--gutter) * 2);
	margin-inline: auto;
	padding: var(--space-md) var(--gutter);
	min-height: var(--header-height);
}

/* Logotipo */
.gm-branding {
	display: flex;
	align-items: center;
	min-width: 0;
}

.gm-branding .custom-logo-link {
	display: block;
	line-height: 0;
}

.gm-branding .custom-logo {
	width: auto;
	max-height: 56px;
}

.gm-logotype {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	line-height: 1;
	text-decoration: none;
	color: inherit;
}

.gm-logotype:hover {
	color: inherit;
}

.gm-logotype__name {
	font-family: var(--font-heading);
	font-weight: var(--weight-heading);
	font-size: 1.375rem;
	letter-spacing: 0.005em;
	color: var(--color-text);
	white-space: nowrap;
}

.gm-logotype__role {
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 0.5625rem;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--color-brand);
	padding-left: 0.17em;
}

.gm-logotype--footer .gm-logotype__name {
	font-size: 1.625rem;
}

.gm-logotype--footer .gm-logotype__role {
	font-size: 0.6875rem;
}

/* Navigazione */
.gm-nav {
	display: flex;
	align-items: center;
}

.gm-nav__list {
	display: flex;
	align-items: center;
	gap: var(--space-lg);
	list-style: none;
	margin: 0;
	padding: 0;
}

.gm-nav__list li {
	margin: 0;
	position: relative;
}

.gm-nav__list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--color-text);
	font-size: 0.9375rem;
	text-decoration: none;
	transition: color var(--motion-fast) var(--easing);
}

.gm-nav__list a:hover {
	color: var(--color-brand);
}

.gm-nav__list .current-menu-item > a,
.gm-nav__list .current-menu-ancestor > a,
.gm-nav__list .current_page_item > a {
	color: var(--color-brand);
	font-weight: var(--weight-body-strong);
}

/* Sottomenu (secondo livello) */
.gm-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: var(--space-sm);
	background: var(--color-surface);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition:
		opacity var(--motion-fast) var(--easing),
		transform var(--motion-fast) var(--easing),
		visibility var(--motion-fast) var(--easing);
}

.gm-nav__list li:hover > .sub-menu,
.gm-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.gm-nav__list .sub-menu a {
	width: 100%;
	padding-inline: var(--space-sm);
	border-radius: var(--radius-sm);
}

.gm-nav__list .sub-menu a:hover {
	background: var(--color-surface-alt);
}

/*
 * Voce di menu evidenziata come bottone primario.
 * Si attiva aggiungendo la classe CSS "gm-cta" alla voce di menu
 * in Aspetto → Menu (Opzioni schermata → Classi CSS).
 */
.gm-nav__list .gm-cta > a {
	background: var(--color-brand);
	color: var(--color-text-inverse);
	font-weight: var(--weight-body-strong);
	border-radius: var(--radius-md);
	padding: 0 22px;
	min-height: 44px;
	box-shadow: none;
	transition:
		background var(--motion-fast) var(--easing),
		box-shadow var(--motion-fast) var(--easing);
}

.gm-nav__list .gm-cta > a:hover {
	background: var(--color-brand-hover);
	color: var(--color-text-inverse);
	box-shadow: var(--shadow-md);
}

.gm-nav__list .gm-cta > a:active {
	box-shadow: none;
}

/* Hamburger */
.gm-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: var(--radius-sm);
	color: var(--color-text);
	cursor: pointer;
}

.gm-nav-toggle__bars,
.gm-nav-toggle__bars::before,
.gm-nav-toggle__bars::after {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform var(--motion-base) var(--easing), opacity var(--motion-fast) var(--easing);
}

.gm-nav-toggle__bars::before,
.gm-nav-toggle__bars::after {
	content: '';
	position: absolute;
}

.gm-nav-toggle__bars::before {
	transform: translateY(-7px);
}

.gm-nav-toggle__bars::after {
	transform: translateY(7px);
}

.gm-nav-toggle[aria-expanded='true'] .gm-nav-toggle__bars {
	background: transparent;
}

.gm-nav-toggle[aria-expanded='true'] .gm-nav-toggle__bars::before {
	transform: rotate(45deg);
}

.gm-nav-toggle[aria-expanded='true'] .gm-nav-toggle__bars::after {
	transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ *
 * 7. Bottoni
 * ------------------------------------------------------------------ */

.gm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	height: 44px;
	padding: 0 22px;
	font-family: var(--font-body);
	font-size: var(--text-body);
	font-weight: var(--weight-body-strong);
	line-height: 1;
	text-align: center;
	text-decoration: none;
	border: var(--border-width) solid transparent;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition:
		background var(--motion-fast) var(--easing),
		box-shadow var(--motion-fast) var(--easing),
		color var(--motion-fast) var(--easing);
}

.gm-btn--sm {
	height: 36px;
	padding: 0 16px;
	font-size: var(--text-small);
}

.gm-btn--lg {
	height: 52px;
	padding: 0 28px;
	font-size: 1.0625rem;
}

.gm-btn--primary {
	background: var(--color-brand);
	color: var(--color-text-inverse);
}

.gm-btn--primary:hover {
	background: var(--color-brand-hover);
	color: var(--color-text-inverse);
	box-shadow: var(--shadow-md);
}

.gm-btn--primary:active {
	background: var(--color-brand-hover);
	box-shadow: none;
}

.gm-btn--secondary {
	background: var(--color-accent-soft);
	color: var(--color-text);
	border-color: var(--color-border);
}

.gm-btn--secondary:hover {
	background: #dce3d2;
	color: var(--color-text);
	box-shadow: var(--shadow-md);
}

.gm-btn--secondary:active {
	box-shadow: none;
}

.gm-btn--ghost {
	height: auto;
	padding: 0;
	background: transparent;
	color: var(--color-brand);
	border-color: transparent;
}

.gm-btn--ghost:hover {
	color: var(--color-brand-hover);
	text-decoration: underline;
}

.gm-btn[disabled],
.gm-btn[aria-disabled='true'] {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

.gm-btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-md);
}

/* ------------------------------------------------------------------ *
 * 8. Badge
 * ------------------------------------------------------------------ */

.gm-badge {
	display: inline-flex;
	align-items: center;
	border-radius: var(--radius-full);
	padding: 4px 12px;
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: var(--weight-body-strong);
	line-height: var(--text-small-lh);
	background: var(--color-brand-soft);
	color: var(--color-brand-hover);
	text-decoration: none;
}

a.gm-badge:hover {
	background: var(--color-brand);
	color: var(--color-text-inverse);
}

.gm-badge--accent {
	background: var(--color-accent-soft);
	color: var(--color-accent-hover);
}

a.gm-badge--accent:hover {
	background: var(--color-accent);
	color: var(--color-text-inverse);
}

.gm-badge-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	list-style: none;
	margin: 0;
	padding: 0;
}

.gm-badge-list li {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * 9. Card
 * ------------------------------------------------------------------ */

.gm-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	background: var(--color-surface);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: var(--space-lg);
	transition: box-shadow var(--motion-base) var(--easing);
}

.gm-card:hover {
	box-shadow: var(--shadow-md);
}

.gm-card:focus-within {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

.gm-card__media {
	display: block;
	margin: 0 0 var(--space-md);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: linear-gradient(135deg, var(--color-accent-soft), var(--color-brand-soft));
	aspect-ratio: 16 / 9;
}

.gm-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--motion-base) var(--easing);
}

.gm-card:hover .gm-card__media img {
	transform: scale(1.03);
}

.gm-card__title {
	font-family: var(--font-heading);
	font-weight: var(--weight-heading);
	font-size: var(--text-h3);
	line-height: var(--text-h3-lh);
	margin: 0;
	transition: color var(--motion-fast) var(--easing);
}

.gm-card__title a {
	color: var(--color-text);
	text-decoration: none;
}

/*
 * Un solo link "vero" per card (il titolo), esteso a tutta la superficie
 * con ::after — così gli screen reader non leggono link duplicati.
 */
.gm-card__title a::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.gm-card:hover .gm-card__title a {
	color: var(--color-brand);
}

.gm-card__excerpt {
	margin: 0;
	color: var(--color-text-muted);
	font-size: var(--text-body);
	line-height: var(--text-body-lh);
}

.gm-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm);
	font-size: var(--text-small);
	color: var(--color-text-muted);
}

.gm-card__footer {
	margin-top: auto;
	padding-top: var(--space-sm);
}

/*
 * Card composte nell'editor (block pattern): il titolo è un normale blocco
 * Titolo dentro un Gruppo con classe `gm-card`, non un .gm-card__title.
 */
.gm-card > :where(h2, h3, h4) {
	font-family: var(--font-heading);
	font-weight: var(--weight-heading);
	font-size: var(--text-h3);
	line-height: var(--text-h3-lh);
	margin: 0;
	transition: color var(--motion-fast) var(--easing);
}

.gm-card:hover > :where(h2, h3, h4) {
	color: var(--color-brand);
}

.gm-card > p {
	margin: 0;
	color: var(--color-text-muted);
	font-size: var(--text-body);
	line-height: var(--text-body-lh);
}

.gm-card > p.gm-badge {
	color: var(--color-brand-hover);
	font-size: var(--text-small);
	align-self: flex-start;
}

.gm-card > p.gm-badge--accent {
	color: var(--color-accent-hover);
}

.gm-card > .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--space-sm);
}

/* Il link nel footer della card deve restare cliccabile sopra ::after. */
.gm-card__footer a {
	position: relative;
	z-index: 1;
}

/* ------------------------------------------------------------------ *
 * 10. Citazioni
 * ------------------------------------------------------------------ */

blockquote,
.wp-block-quote,
.gm-blockquote {
	font-family: var(--font-heading);
	font-style: italic;
	font-weight: 400;
	font-size: var(--text-h3);
	line-height: 1.4;
	color: var(--color-text);
	background: var(--color-surface-alt);
	border-left: 3px solid var(--color-accent);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	padding: var(--space-lg) max(var(--gutter), var(--space-lg));
}

blockquote p:last-child,
.wp-block-quote p:last-child,
.gm-blockquote p:last-child {
	margin-bottom: 0;
}

blockquote cite,
.wp-block-quote cite,
.gm-blockquote cite {
	display: block;
	margin-top: var(--space-sm);
	font-family: var(--font-body);
	font-style: normal;
	font-size: var(--text-small);
	color: var(--color-text-muted);
}

.wp-block-pullquote {
	background: var(--color-surface-alt);
	border-top: 3px solid var(--color-accent);
	border-bottom: 3px solid var(--color-accent);
	padding: var(--space-xl) var(--space-lg);
	font-family: var(--font-heading);
	font-style: italic;
}

/* ------------------------------------------------------------------ *
 * 11. Form
 * ------------------------------------------------------------------ */

.gm-field {
	margin-bottom: var(--space-md);
}

.gm-field__label,
label {
	display: block;
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: var(--weight-body-strong);
	color: var(--color-text);
	margin-bottom: 6px;
}

.gm-field__required {
	color: var(--color-brand);
	margin-left: 2px;
}

input[type='text'],
input[type='email'],
input[type='url'],
input[type='tel'],
input[type='number'],
input[type='search'],
input[type='date'],
input[type='password'],
select,
textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 14px;
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: var(--text-body-lh);
	color: var(--color-text);
	background: var(--color-surface);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-sm);
	transition: border-color var(--motion-fast) var(--easing);
}

textarea {
	min-height: 140px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--color-brand);
}

input[aria-invalid='true'],
textarea[aria-invalid='true'],
select[aria-invalid='true'] {
	border-color: var(--color-error);
}

input[disabled],
textarea[disabled],
select[disabled] {
	background: var(--color-surface-alt);
	color: var(--color-text-muted);
	cursor: not-allowed;
}

::placeholder {
	color: var(--color-text-muted);
	opacity: 0.75;
}

.gm-field__error {
	margin: 6px 0 0;
	color: var(--color-error);
	font-size: var(--text-small);
	line-height: var(--text-small-lh);
}

.gm-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: var(--weight-body);
	line-height: var(--text-small-lh);
	color: var(--color-text);
	margin-bottom: 0;
}

.gm-check input[type='checkbox'] {
	width: 18px;
	height: 18px;
	min-height: 0;
	margin: 2px 0 0;
	flex-shrink: 0;
	accent-color: var(--color-brand);
}

/* Form contatti */
.gm-form {
	font-family: var(--font-body);
}

.gm-form__consent {
	margin-bottom: var(--space-lg);
}

.gm-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.gm-notice {
	border-radius: var(--radius-md);
	padding: var(--space-lg);
	margin-bottom: var(--space-lg);
	background: var(--color-surface-alt);
	border: var(--border-width) solid var(--color-border);
	color: var(--color-text);
}

.gm-notice p:last-child {
	margin-bottom: 0;
}

.gm-notice--success {
	border-color: var(--color-success);
}

.gm-notice--error {
	border-color: var(--color-error);
	color: var(--color-text);
}

.gm-notice--error ul {
	margin: var(--space-sm) 0 0;
}

.gm-privacy-note {
	font-size: var(--text-small);
	color: var(--color-text-muted);
	margin-top: var(--space-md);
}

/* Ricerca */
.gm-search-form {
	display: flex;
	gap: var(--space-sm);
	align-items: flex-start;
}

.gm-search-form label {
	flex: 1;
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * 12. Sezioni e pattern
 * ------------------------------------------------------------------ */

.gm-page-header {
	padding-block: var(--space-2xl) var(--space-xl);
}

.gm-page-header__title {
	margin-bottom: var(--space-sm);
}

.gm-page-header--accent {
	background: var(--color-accent-soft);
	padding-block: var(--space-2xl);
	margin-bottom: var(--space-2xl);
}

.gm-featured-media {
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: var(--space-xl);
}

.gm-featured-media img {
	width: 100%;
}

/* Blocco fiducia (nome, titolo, n. Albo) */
.gm-trust {
	display: grid;
	grid-template-columns: 0.7fr 1.3fr;
	gap: var(--space-xl);
	align-items: center;
}

.gm-trust__media {
	border-radius: var(--radius-full);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, var(--color-brand-soft), var(--color-accent-soft));
}

.gm-trust__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gm-albo {
	font-size: var(--text-small);
	color: var(--color-text-muted);
	line-height: var(--text-small-lh);
}

/* ------------------------------------------------------------------ *
 * 13. Articoli, archivio, paginazione
 * ------------------------------------------------------------------ */

.gm-entry-header {
	padding-block: var(--space-2xl) var(--space-xl);
}

.gm-entry-header__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm) var(--space-md);
	margin-bottom: var(--space-md);
	font-size: var(--text-small);
	color: var(--color-text-muted);
}

.gm-entry-title {
	font-size: var(--text-h1);
	line-height: var(--text-h1-lh);
	margin-bottom: var(--space-md);
}

/*
 * I 680px del brief corrispondono a ~68 caratteri per riga alla dimensione del
 * corpo articolo: la misura di lettura è già rispettata dalla colonna, senza
 * una max-width separata sui paragrafi che li disallineerebbe dai titoli.
 */
.gm-entry-content {
	font-size: var(--text-body-lg);
	line-height: var(--text-body-lg-lh);
	padding-bottom: var(--space-2xl);
}

/*
 * Se la pagina si chiude con una fascia a larghezza piena (tipico della home
 * composta con i pattern), il respiro finale lo dà già la fascia: senza questo
 * resterebbe una striscia avorio tra la sezione colorata e il footer.
 */
.gm-entry-content:has(> :last-child.alignfull) {
	padding-bottom: 0;
}

.gm-entry-footer {
	padding-block: var(--space-lg);
	border-top: var(--border-width) solid var(--color-border);
	margin-bottom: var(--space-2xl);
}

.gm-post-nav {
	display: grid;
	gap: var(--space-md);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: var(--space-3xl);
}

.gm-post-nav a {
	display: block;
	padding: var(--space-lg);
	background: var(--color-surface);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-md);
	text-decoration: none;
	color: var(--color-text);
	transition: box-shadow var(--motion-base) var(--easing);
}

.gm-post-nav a:hover {
	box-shadow: var(--shadow-md);
	color: var(--color-brand);
}

.gm-post-nav__label {
	display: block;
	font-size: var(--text-small);
	color: var(--color-text-muted);
	margin-bottom: var(--space-xs);
}

.gm-post-nav__next {
	text-align: right;
}

.gm-pagination {
	margin-block: var(--space-2xl);
}

.gm-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-sm);
}

.gm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 var(--space-md);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	color: var(--color-text);
	text-decoration: none;
	transition:
		background var(--motion-fast) var(--easing),
		color var(--motion-fast) var(--easing);
}

.gm-pagination .page-numbers:hover {
	background: var(--color-surface-alt);
	color: var(--color-brand);
}

.gm-pagination .page-numbers.current {
	background: var(--color-brand);
	border-color: var(--color-brand);
	color: var(--color-text-inverse);
	font-weight: var(--weight-body-strong);
}

.gm-pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
}

.gm-no-results {
	padding-block: var(--space-2xl) var(--space-3xl);
}

/* Errore 404 */
.gm-404 {
	padding-block: var(--space-3xl);
	text-align: center;
}

.gm-404__code {
	font-family: var(--font-heading);
	font-size: var(--text-display);
	line-height: 1;
	color: var(--color-brand-soft);
	margin: 0 0 var(--space-md);
}

.gm-404 .gm-search-form {
	max-width: 420px;
	margin: var(--space-xl) auto 0;
}

/* ------------------------------------------------------------------ *
 * 14. Commenti
 * ------------------------------------------------------------------ */

.gm-comments {
	padding-block: var(--space-2xl);
	border-top: var(--border-width) solid var(--color-border);
}

.gm-comments .comment-list {
	list-style: none;
	margin: 0 0 var(--space-2xl);
	padding: 0;
}

.gm-comments .comment-list ol.children {
	list-style: none;
	margin: var(--space-md) 0 0;
	padding-left: var(--space-lg);
	border-left: var(--border-width) solid var(--color-border);
}

.gm-comments .comment-body {
	background: var(--color-surface);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
	margin-bottom: var(--space-md);
}

.gm-comments .comment-meta {
	font-size: var(--text-small);
	color: var(--color-text-muted);
	margin-bottom: var(--space-sm);
}

.gm-comments .comment-author .avatar {
	border-radius: var(--radius-full);
	margin-right: var(--space-sm);
	vertical-align: middle;
	display: inline-block;
}

.gm-comments .comment-respond {
	background: var(--color-surface-alt);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
}

.gm-comments .form-submit .submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px;
	background: var(--color-brand);
	color: var(--color-text-inverse);
	font-family: var(--font-body);
	font-weight: var(--weight-body-strong);
	border: 0;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: background var(--motion-fast) var(--easing);
}

.gm-comments .form-submit .submit:hover {
	background: var(--color-brand-hover);
}

/* ------------------------------------------------------------------ *
 * 15. Footer
 * ------------------------------------------------------------------ */

/*
 * Il margine superiore stacca il footer dall'ultima sezione della pagina:
 * senza, il beige del footer sembrava la continuazione del contenuto. È un
 * margine e non padding perché deve collassare con i margini dell'ultimo
 * blocco di `.gm-entry-content`, non sommarcisi.
 */
.gm-footer {
	margin-block-start: var(--space-2xl);
	background: var(--color-surface-alt);
	color: var(--color-text);
	padding-block: var(--space-2xl) var(--space-xl);
}

.gm-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-xl);
}

.gm-footer__col {
	font-size: var(--text-small);
	line-height: var(--text-small-lh);
	color: var(--color-text-muted);
	min-width: 200px;
}

.gm-footer__col .widget {
	margin-bottom: var(--space-md);
}

.gm-footer__col .widget:last-child {
	margin-bottom: 0;
}

.gm-footer__col .widget-title,
.gm-footer__col .wp-block-heading {
	font-size: var(--text-body);
	color: var(--color-text);
	margin-bottom: var(--space-sm);
}

.gm-footer__brand .gm-logotype {
	margin-bottom: var(--space-md);
}

.gm-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gm-footer__menu li {
	margin: 0;
}

.gm-footer__menu a,
.gm-footer__col a {
	color: var(--color-text-muted);
	text-decoration: none;
}

.gm-footer__menu a:hover,
.gm-footer__col a:hover {
	color: var(--color-brand);
	text-decoration: underline;
}

.gm-footer__bottom {
	margin-top: var(--space-xl);
	padding-top: var(--space-md);
	border-top: var(--border-width) solid var(--color-border);
	font-size: var(--text-small);
	color: var(--color-text-muted);
}

/* ------------------------------------------------------------------ *
 * 16. Blocchi core WordPress
 * ------------------------------------------------------------------ */

/* Bottoni core: lo stile predefinito è il primario del design. */
.wp-block-button__link {
	font-family: var(--font-body);
	font-weight: var(--weight-body-strong);
	font-size: var(--text-body);
	line-height: 1;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 22px;
	background-color: var(--color-brand);
	color: var(--color-text-inverse);
	border-radius: var(--radius-md);
	border: var(--border-width) solid transparent;
	text-decoration: none;
	transition:
		background-color var(--motion-fast) var(--easing),
		box-shadow var(--motion-fast) var(--easing),
		color var(--motion-fast) var(--easing);
}

.wp-block-button__link:hover {
	background-color: var(--color-brand-hover);
	color: var(--color-text-inverse);
	box-shadow: var(--shadow-md);
}

.wp-block-button__link:active {
	box-shadow: none;
}

.wp-block-button.gm-btn-lg .wp-block-button__link,
.wp-block-button.is-style-lg .wp-block-button__link {
	min-height: 52px;
	padding: 0 28px;
	font-size: 1.0625rem;
}

/* Stile blocco: Secondaria */
.wp-block-button.is-style-gm-secondary .wp-block-button__link {
	background-color: var(--color-accent-soft);
	color: var(--color-text);
	border-color: var(--color-border);
}

.wp-block-button.is-style-gm-secondary .wp-block-button__link:hover {
	background-color: #dce3d2;
	color: var(--color-text);
}

/* Stile blocco: Ghost */
.wp-block-button.is-style-gm-ghost .wp-block-button__link {
	background-color: transparent;
	color: var(--color-brand);
	padding-inline: 0;
	min-height: 0;
	box-shadow: none;
}

.wp-block-button.is-style-gm-ghost .wp-block-button__link:hover {
	color: var(--color-brand-hover);
	text-decoration: underline;
	box-shadow: none;
}

.wp-block-buttons {
	gap: var(--space-md);
}

/* Immagini e copertine */
.wp-block-image img,
.wp-block-post-featured-image img {
	border-radius: var(--radius-lg);
}

.wp-block-image.is-style-rounded img,
.wp-block-image .is-style-rounded img {
	border-radius: var(--radius-full);
}

.wp-block-image figcaption,
figcaption {
	font-size: var(--text-small);
	color: var(--color-text-muted);
	text-align: center;
	margin-top: var(--space-sm);
}

.wp-block-cover {
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.gm-entry-content > .alignfull.wp-block-cover {
	border-radius: 0;
}

/* Media & testo — usato dall'hero e dal blocco fiducia */
.wp-block-media-text {
	gap: var(--space-xl);
}

.wp-block-media-text .wp-block-media-text__media img {
	border-radius: var(--radius-lg);
}

/*
 * Slot immagine ancora vuoto: invece di uno spazio bianco mostra il segnaposto
 * a due tinte del design system, così l'hero regge anche prima che la foto
 * venga caricata dalla libreria media.
 */
.wp-block-media-text__media:empty {
	min-height: 320px;
	border-radius: var(--radius-lg);
	background: linear-gradient(135deg, var(--color-brand-soft), var(--color-accent-soft));
}

.wp-block-media-text.is-style-gm-round .wp-block-media-text__media:empty {
	aspect-ratio: 1 / 1;
	min-height: 0;
	border-radius: var(--radius-full);
}

.wp-block-media-text.is-style-gm-round .wp-block-media-text__media img {
	border-radius: var(--radius-full);
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* Gruppi con sfondo: padding e raggio coerenti */
.wp-block-group.has-background {
	padding: var(--space-xl);
	border-radius: var(--radius-lg);
}

.gm-entry-content > .alignfull.wp-block-group.has-background {
	border-radius: 0;
	padding-block: var(--section-padding);
	padding-inline: var(--gutter);
}

/* Sezione a fondo salvia — usata per i percorsi di mindfulness */
.wp-block-group.is-style-gm-section-accent {
	background: var(--color-accent-soft);
}

.wp-block-group.is-style-gm-section-alt {
	background: var(--color-surface-alt);
}

/* Colonne */
.wp-block-columns {
	gap: var(--space-lg);
}

/* Separatore */
.wp-block-separator {
	border-top: var(--border-width) solid var(--color-border);
	border-bottom: 0;
	opacity: 1;
	max-width: 120px;
}

.wp-block-separator.is-style-wide {
	max-width: none;
}

/* Liste e tabelle nei contenuti */
.wp-block-table td,
.wp-block-table th {
	border-color: var(--color-border);
}

/* Preformattato / codice */
.wp-block-code {
	background: var(--color-surface-alt);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
}

/*
 * Blocco "Ultimi articoli": in griglia prende l'aspetto delle card del design,
 * così la home resta aggiornata da sola senza query custom.
 */
.wp-block-latest-posts__list {
	list-style: none;
	padding-left: 0;
}

ul.wp-block-latest-posts.is-grid {
	display: grid;
	grid-template-columns: repeat(var(--gm-latest-columns, 3), minmax(0, 1fr));
	gap: var(--space-lg);
	margin: 0;
}

ul.wp-block-latest-posts.columns-2 {
	--gm-latest-columns: 2;
}

ul.wp-block-latest-posts.columns-4 {
	--gm-latest-columns: 4;
}

ul.wp-block-latest-posts.is-grid li {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	margin: 0;
	/*
	 * Core imposta `width: calc(33.33% - .83em)` su `.columns-3 li` per il suo
	 * layout flex: dentro una griglia quella percentuale si calcola sul singolo
	 * track e le card diventano strettissime. Qui la larghezza la decide il grid.
	 */
	width: auto;
	max-width: none;
	padding: var(--space-lg);
	background: var(--color-surface);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	transition: box-shadow var(--motion-base) var(--easing);
}

ul.wp-block-latest-posts.is-grid li:hover {
	box-shadow: var(--shadow-md);
}

.wp-block-latest-posts__featured-image {
	margin-bottom: var(--space-sm);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.wp-block-latest-posts__featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform var(--motion-base) var(--easing);
}

ul.wp-block-latest-posts.is-grid li:hover .wp-block-latest-posts__featured-image img {
	transform: scale(1.03);
}

.wp-block-latest-posts__post-title {
	font-family: var(--font-heading);
	font-weight: var(--weight-heading);
	font-size: var(--text-h3);
	line-height: var(--text-h3-lh);
	color: var(--color-text);
	text-decoration: none;
}

ul.wp-block-latest-posts.is-grid li:hover .wp-block-latest-posts__post-title {
	color: var(--color-brand);
}

.wp-block-latest-posts__post-date {
	font-size: var(--text-small);
	color: var(--color-text-muted);
}

.wp-block-latest-posts__post-excerpt {
	font-size: var(--text-body);
	line-height: var(--text-body-lh);
	color: var(--color-text-muted);
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * 17. Motion e reveal
 * ------------------------------------------------------------------ */

.gm-reveal.is-armed {
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity var(--motion-slow) var(--easing),
		transform var(--motion-slow) var(--easing);
	will-change: opacity, transform;
}

.gm-reveal.is-armed.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.gm-reveal.is-armed {
		opacity: 1;
		transform: none;
	}
}

/* ------------------------------------------------------------------ *
 * 18. Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.gm-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gm-trust {
		grid-template-columns: 0.9fr 1.1fr;
		gap: var(--space-lg);
	}

	ul.wp-block-latest-posts.is-grid {
		--gm-latest-columns: 2;
	}
}

@media (max-width: 900px) {
	.gm-nav-toggle {
		display: inline-flex;
		position: relative;
	}

	.gm-nav {
		position: fixed;
		inset: var(--header-height) 0 0;
		display: block;
		background: var(--color-bg);
		padding: var(--space-xl) var(--gutter) var(--space-3xl);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition:
			opacity var(--motion-base) var(--easing),
			transform var(--motion-base) var(--easing),
			visibility var(--motion-base) var(--easing);
	}

	.gm-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.gm-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-sm);
	}

	.gm-nav__list a {
		font-size: 1.125rem;
		padding-block: var(--space-sm);
		border-bottom: var(--border-width) solid var(--color-border);
		width: 100%;
	}

	.gm-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		border: 0;
		box-shadow: none;
		background: transparent;
		padding: 0 0 0 var(--space-md);
	}

	.gm-nav__list .gm-cta {
		margin-top: var(--space-md);
	}

	.gm-nav__list .gm-cta > a {
		justify-content: center;
		border-bottom: 0;
		font-size: var(--text-body);
	}

	/* Quando il menu mobile è aperto la navbar è sempre solida. */
	body.gm-nav-open .gm-header--overlay {
		background: var(--color-surface);
	}

	body.gm-nav-open {
		overflow: hidden;
	}
}

@media (max-width: 782px) {
	:root {
		--section-padding: var(--space-2xl);
	}

	.gm-grid--3,
	.gm-grid--2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.gm-trust {
		grid-template-columns: minmax(0, 1fr);
		text-align: left;
	}

	.gm-trust__media {
		max-width: 220px;
	}

	.gm-post-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	ul.wp-block-latest-posts.is-grid {
		--gm-latest-columns: 1;
	}

	.gm-post-nav__next {
		text-align: left;
	}

	.gm-entry-content {
		font-size: var(--text-body);
	}

	.gm-footer {
		margin-block-start: var(--space-xl);
	}

	.gm-footer__inner {
		flex-direction: column;
		gap: var(--space-lg);
	}

	.alignleft,
	.alignright {
		float: none;
		margin-inline: auto;
	}
}
