/* ==========================================================================
   Fondazione TCD - tema leggero (GRS Digital)
   Nessun framework: variabili CSS, layout con grid/flex, mobile first.
   ========================================================================== */

:root {
	--c-navy: #223146;
	--c-navy-2: #1a2738;
	--c-blue: #4a71a5;
	--c-red: #b20e10;
	--c-red-dark: #8e0a0c;
	--c-slate: #2c3d49;
	--c-grey: #fafafa;
	--c-ice: #f3f6fa;
	--c-line: #dde3ec;
	--c-text: #223146;
	--c-muted: #5a6472;

	--font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--wide: 1320px;
	--narrow: 820px;
	--gutter: clamp(18px, 4vw, 40px);
	--section-y: clamp(56px, 8vw, 112px);
	--radius: 12px;
	--radius-lg: 18px;
	--shadow: 0 10px 30px -12px rgba(34, 49, 70, .28);
	--shadow-lg: 0 24px 48px -20px rgba(34, 49, 70, .38);

	--fs-h1: clamp(2.1rem, 1.2rem + 3vw, 3.4rem);
	--fs-h1-home: clamp(2.3rem, 1.1rem + 4.2vw, 4.1rem);
	--fs-h2: clamp(1.75rem, 1.1rem + 2vw, 2.75rem);
	--fs-h3: clamp(1.15rem, 1rem + .5vw, 1.4rem);
	--fs-lead: clamp(1.05rem, .95rem + .45vw, 1.3rem);

	--header-h: 84px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.7;
	color: var(--c-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--c-red); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-red-dark); }
:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; font-family: var(--font); font-weight: 700; line-height: 1.18; color: inherit; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
h4 { font-size: 1.1rem; line-height: 1.35; }
p, ul, ol, figure, blockquote, table { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .35em; }
strong, b { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 2.5rem 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 12px; top: -100px; z-index: 1000; padding: 12px 18px;
	background: var(--c-navy); color: #fff; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); margin-inline: auto; }

/* --------------------------------------------------------------------------
   Pulsanti
   -------------------------------------------------------------------------- */
.btn,
.wp-block-button .wp-block-button__link,
:root .wp-element-button,
input[type="submit"],
button.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55em;
	min-height: 52px;
	padding: .8em 1.7em;
	border: 2px solid var(--c-red);
	border-radius: 999px;
	background: var(--c-red);
	color: #fff;
	font-family: var(--font);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn::after,
.wp-block-button .wp-block-button__link::after {
	content: "";
	width: .9em; height: .9em;
	flex: 0 0 auto;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .2s;
}
.btn:hover, .wp-block-button .wp-block-button__link:hover { background: var(--c-red-dark); border-color: var(--c-red-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:hover::after, .wp-block-button .wp-block-button__link:hover::after { transform: translateX(3px); }
.btn--outline,
.wp-block-button.is-style-ftcd-outline .wp-block-button__link { background: transparent; color: var(--c-blue); border-color: var(--c-blue); }
.btn--outline:hover,
.wp-block-button.is-style-ftcd-outline .wp-block-button__link:hover { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.btn--white,
.wp-block-button.is-style-ftcd-white .wp-block-button__link { background: transparent; color: #fff; border-color: #fff; }
.btn--white:hover,
.wp-block-button.is-style-ftcd-white .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--c-navy); }
.btn svg, .wp-block-button__link svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px 16px; margin: 1.6em 0 0; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-button { margin: 0; }
@media (max-width: 559px) {
	.wp-block-buttons { flex-direction: column; align-items: stretch; }
	.wp-block-buttons .wp-block-button__link { width: 100%; }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	height: var(--header-h);
	background: rgba(255, 255, 255, 0);
	transition: background-color .25s, box-shadow .25s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header.is-solid,
body:not(.has-hero-home) .site-header,
.site-header.is-open { background: #fff; box-shadow: 0 1px 0 var(--c-line), 0 8px 24px -18px rgba(34, 49, 70, .35); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.site-logo { display: inline-flex; flex: 0 0 auto; }
.site-logo img { width: auto; height: 54px; }
@media (min-width: 1100px) { .site-logo img { height: 62px; } }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a { text-decoration: none; }
.header-cta { min-height: 46px; padding: .6em 1.4em; font-size: .9rem; font-weight: 700; }
.header-cta::after { display: none; }

/* Desktop */
@media (min-width: 1100px) {
	.nav-toggle, .nav-mobile-extra { display: none !important; }
	.primary-nav > ul { display: flex; align-items: center; gap: 2px; }
	.primary-nav li { position: relative; margin: 0; }
	.primary-nav > ul > li > a,
	.primary-nav .submenu-toggle {
		display: inline-flex; align-items: center; gap: 6px;
		min-height: 44px; padding: 8px 14px;
		font-family: var(--font); font-size: .95rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
		color: var(--c-navy); background: none; border: 0; border-radius: 999px; cursor: pointer;
	}
	.primary-nav > ul > li.menu-item-has-children > a { padding-right: 4px; }
	.primary-nav .submenu-toggle { padding: 8px 10px 8px 2px; }
	.primary-nav > ul > li > a:hover,
	.primary-nav > ul > li.current-menu-item > a,
	.primary-nav > ul > li.current-menu-ancestor > a { color: var(--c-red); }
	.primary-nav .submenu-toggle svg { width: 12px; height: 12px; transition: transform .2s; }
	.primary-nav li.is-open > .submenu-toggle svg { transform: rotate(180deg); }
	.primary-nav .sub-menu {
		position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
		padding: 10px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
		opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
	}
	.primary-nav .sub-menu::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
	.primary-nav li:hover > .sub-menu,
	.primary-nav li:focus-within > .sub-menu,
	.primary-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
	.primary-nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--c-navy); font-weight: 500; font-size: .95rem; }
	.primary-nav .sub-menu a:hover, .primary-nav .sub-menu .current-menu-item > a { background: var(--c-ice); color: var(--c-red); }
	.header-cta { margin-left: 12px; }
}

/* Mobile e tablet */
@media (max-width: 1099px) {
	.nav-toggle {
		margin-left: auto; display: inline-flex; align-items: center; gap: 10px;
		min-height: 46px; padding: 6px 8px 6px 16px; border: 0; border-radius: 999px;
		background: var(--c-slate); color: #fff; font-family: var(--font); font-weight: 600; font-size: .85rem;
		letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
	}
	.nav-toggle__icon { position: relative; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
	.nav-toggle__icon span { position: absolute; left: 9px; width: 16px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .2s, top .25s; }
	.nav-toggle__icon span:nth-child(1) { top: 11px; }
	.nav-toggle__icon span:nth-child(2) { top: 16px; }
	.nav-toggle__icon span:nth-child(3) { top: 21px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) { top: 16px; transform: rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) { opacity: 0; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) { top: 16px; transform: rotate(-45deg); }
	.header-cta--desktop { display: none !important; }

	.primary-nav {
		position: fixed; inset: var(--header-h) 0 0; margin: 0; z-index: 99;
		padding: 18px var(--gutter) calc(32px + env(safe-area-inset-bottom));
		background: #fff; overflow-y: auto; overscroll-behavior: contain;
		opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
	}
	.admin-bar .primary-nav { top: calc(var(--header-h) + 46px); }
	.primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.primary-nav > ul > li { border-bottom: 1px solid var(--c-line); margin: 0; }
	.primary-nav li { display: flex; flex-wrap: wrap; align-items: center; margin: 0; }
	.primary-nav li > a { flex: 1 1 auto; padding: 16px 4px; font-size: 1.1rem; font-weight: 600; color: var(--c-navy); }
	.primary-nav .submenu-toggle {
		flex: 0 0 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
		border: 0; border-radius: 50%; background: var(--c-ice); color: var(--c-navy); cursor: pointer;
	}
	.primary-nav .submenu-toggle svg { width: 14px; height: 14px; transition: transform .2s; }
	.primary-nav li.is-open > .submenu-toggle svg { transform: rotate(180deg); }
	.primary-nav .sub-menu { flex: 1 1 100%; display: none; padding: 0 0 12px 12px; }
	.primary-nav li.is-open > .sub-menu { display: block; }
	.primary-nav .sub-menu a { display: block; padding: 10px 4px; font-size: 1rem; font-weight: 500; }
	.primary-nav .current-menu-item > a { color: var(--c-red); }
	.nav-mobile-extra { padding-top: 24px; display: grid; gap: 14px; }
	.nav-mobile-extra .btn { width: 100%; }
	.nav-mobile-extra p { margin: 0; font-size: .95rem; color: var(--c-muted); }
	body.nav-open { overflow: hidden; }
}
@media (max-width: 420px) { .nav-toggle__label { display: none; } .nav-toggle { padding-left: 8px; } }

/* --------------------------------------------------------------------------
   Struttura pagine
   -------------------------------------------------------------------------- */
.site-main { min-height: 50vh; }
.site-main:focus { outline: none; }
body:not(.has-hero-home) .site-main { padding-top: var(--header-h); }

/* Hero delle pagine interne (titolo automatico) */
.page-hero {
	position: relative;
	background: var(--c-navy);
	color: #fff;
	padding: clamp(48px, 7vw, 96px) 0 clamp(44px, 6vw, 84px);
	overflow: hidden;
}
.page-hero::after {
	content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(85, 125, 176, .35), rgba(85, 125, 176, 0));
	pointer-events: none;
}
.page-hero h1 { margin: 0; max-width: 22ch; }
.page-hero__lead { margin: .9rem 0 0; max-width: 60ch; font-size: var(--fs-lead); line-height: 1.55; color: rgba(255, 255, 255, .88); }
.page-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 1.1rem; font-size: .95rem; color: rgba(255, 255, 255, .82); }
.page-hero__meta a { color: #fff; }
.page-hero__meta svg { display: none; }
.eyebrow,
.is-style-ftcd-eyebrow {
	display: inline-block; margin: 0 0 .8rem; font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-red);
}
.page-hero .eyebrow { color: #9fbbe0; }
.breadcrumbs { margin: 0 0 1rem; font-size: .85rem; color: rgba(255, 255, 255, .75); }
.breadcrumbs a { color: rgba(255, 255, 255, .9); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; color: #fff; }

/* Contenuto testuale (pagine semplici, articoli) */
.entry-content { padding: clamp(40px, 6vw, 80px) 0; }
.prose { font-size: 1.05rem; }
.prose > * { max-width: var(--narrow); margin-inline: auto; }
.prose > .alignwide { max-width: var(--wide); }
.prose > .alignfull { max-width: none; }
.prose h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose a { font-weight: 500; }
.prose img { border-radius: var(--radius); }
.prose figure { margin-block: 2rem; }
.prose figcaption { margin-top: .6rem; font-size: .9rem; color: var(--c-muted); text-align: center; }
.prose blockquote { padding: 1.2rem 1.5rem; border-left: 4px solid var(--c-red); background: var(--c-ice); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   Sezioni (pagine a sezioni e homepage): stili del blocco Gruppo
   -------------------------------------------------------------------------- */
.sections > * { margin: 0; }
.sections > :not([class*="is-style-ftcd-"]):not(.alignfull) { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.is-style-ftcd-section,
.is-style-ftcd-navy,
.is-style-ftcd-blue,
.is-style-ftcd-light,
.is-style-ftcd-grey,
.is-style-ftcd-hero,
.is-style-ftcd-strip {
	position: relative;
	padding: var(--section-y) max(var(--gutter), calc((100% - var(--wide)) / 2));
}
.wp-block-group.is-style-ftcd-section { background: #fff; }
.is-style-ftcd-grey { background: var(--c-grey); }
.is-style-ftcd-light { background: var(--c-ice); }
.is-style-ftcd-navy,
.is-style-ftcd-hero { background: var(--c-navy); color: #fff; }
.is-style-ftcd-blue { background: var(--c-blue); color: #fff; }
.is-style-ftcd-strip { background: var(--c-navy); color: #fff; text-align: center; padding-block: clamp(44px, 6vw, 72px); }
.is-style-ftcd-hero { padding-block: clamp(48px, 7vw, 96px); overflow: hidden; }
.is-style-ftcd-hero::after {
	content: ""; position: absolute; right: -160px; top: -180px; width: 520px; height: 520px; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(85, 125, 176, .32), rgba(85, 125, 176, 0)); pointer-events: none;
}
.is-style-ftcd-hero > *, .is-style-ftcd-navy > * { position: relative; z-index: 1; }
.is-style-ftcd-hero h1 { font-size: var(--fs-h1); margin-bottom: .4em; }
.is-style-ftcd-navy a:not(.wp-block-button__link),
.is-style-ftcd-blue a:not(.wp-block-button__link),
.is-style-ftcd-hero a:not(.wp-block-button__link),
.is-style-ftcd-strip a:not(.wp-block-button__link) { color: #fff; font-weight: 600; }
.is-style-ftcd-navy .is-style-ftcd-eyebrow,
.is-style-ftcd-hero .is-style-ftcd-eyebrow { color: #9fbbe0; }
.is-style-ftcd-blue .is-style-ftcd-eyebrow { color: #fff; opacity: .9; }
.is-style-ftcd-hero ul { padding-left: 0; list-style: none; }
.is-style-ftcd-hero ul li { position: relative; padding-left: 32px; margin-bottom: .6em; }
.is-style-ftcd-hero ul li::before {
	content: ""; position: absolute; left: 0; top: .32em; width: 20px; height: 20px; border-radius: 50%;
	background: var(--c-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.is-style-ftcd-strip h2, .is-style-ftcd-strip h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
.is-style-ftcd-strip p:last-child { margin-bottom: 0; }
.wp-block-group.ftcd-pt-0 { padding-top: 0; }
.ftcd-mt { margin-top: clamp(48px, 7vw, 88px) !important; }

.has-text-align-center { text-align: center; }
.ftcd-lead, .is-style-ftcd-lead { font-size: var(--fs-lead); line-height: 1.6; }
.is-style-ftcd-lead { max-width: 62ch; }
.has-text-align-center.is-style-ftcd-lead { margin-inline: auto; }
.ftcd-section-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.ftcd-section-head > :last-child { margin-bottom: 0; }

/* Colonne */
.wp-block-columns { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; margin: 0; }
.wp-block-columns.are-vertically-aligned-top { align-items: start; }
@media (min-width: 782px) {
	.wp-block-columns { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
	.wp-block-columns:has(> .wp-block-column[style*="flex-basis"]) { display: flex; }
	.wp-block-columns:has(> .wp-block-column[style*="flex-basis"]) > .wp-block-column[style*="flex-basis"] { flex-grow: 0; flex-shrink: 0; }
	.wp-block-columns:has(> .wp-block-column[style*="flex-basis"]) > .wp-block-column:not([style*="flex-basis"]) { flex: 1 1 0; min-width: 0; }
}
.wp-block-column > :last-child { margin-bottom: 0; }
.wp-block-column.is-vertically-aligned-top { align-self: start; }
.wp-block-column.is-vertically-aligned-center { align-self: center; }

/* Immagini */
.wp-block-image { margin: 0 0 1.5rem; }
.wp-block-image img { border-radius: var(--radius-lg); width: 100%; }
.wp-block-image.is-style-ftcd-plain img { border-radius: 0; }
.wp-block-image.is-style-ftcd-shadow img { box-shadow: var(--shadow-lg); }
.wp-block-column > .wp-block-image:last-child { margin-bottom: 0; }

/* Card */
.is-style-ftcd-card,
.is-style-ftcd-card-red,
.is-style-ftcd-card-navy {
	height: 100%;
	padding: clamp(22px, 3vw, 34px);
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: 0 1px 0 var(--c-line), var(--shadow);
}
.is-style-ftcd-card-red { background: var(--c-red); color: #fff; box-shadow: var(--shadow); }
.is-style-ftcd-card-navy { background: var(--c-navy); color: #fff; }
.is-style-ftcd-card-red a, .is-style-ftcd-card-navy a { color: #fff; font-weight: 600; }
.is-style-ftcd-card > :last-child, .is-style-ftcd-card-red > :last-child, .is-style-ftcd-card-navy > :last-child { margin-bottom: 0; }
.is-style-ftcd-card h3, .is-style-ftcd-card-red h3, .is-style-ftcd-card-navy h3 { margin-bottom: .5em; }
.is-style-ftcd-card a { font-weight: 600; }
.is-style-ftcd-hero .is-style-ftcd-card, .is-style-ftcd-blue .is-style-ftcd-card { color: var(--c-text); }
.wp-block-columns:has(> .wp-block-column > .is-style-ftcd-card),
.wp-block-columns:has(> .wp-block-column > .is-style-ftcd-card-red) { align-items: stretch; }
.ftcd-big { display: block; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 700; line-height: 1.1; letter-spacing: .02em; }
.ftcd-code { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); font-weight: 700; color: var(--c-red); letter-spacing: .04em; line-height: 1.1; }
.is-style-ftcd-hero .ftcd-code, .is-style-ftcd-navy .ftcd-code { color: #fff; }

/* Griglie di card */
.ftcd-icon-card .wp-block-image { margin: 0 0 1rem; }
.ftcd-icon-card .wp-block-image img { width: 64px; height: 64px; object-fit: contain; border-radius: 0; }
.ftcd-grid-3, .ftcd-grid-2 { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: 1fr; }
.ftcd-grid-3 > *, .ftcd-grid-2 > * { margin: 0; }
@media (min-width: 640px) { .ftcd-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ftcd-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 782px) { .ftcd-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Statistiche */
.ftcd-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 1.6rem 0; }
.ftcd-stats p { margin: 0; font-size: .95rem; line-height: 1.35; min-width: 9ch; max-width: 18ch; }
.ftcd-stats strong { display: block; font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); line-height: 1.05; margin-bottom: .2rem; white-space: nowrap; }

/* Timeline (Obiettivi) */
.ftcd-timeline { position: relative; gap: 28px; margin-top: 1rem; }
.ftcd-timeline::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--c-line), var(--c-blue) 45%, var(--c-red)); }
.ftcd-timeline > .wp-block-column { position: relative; padding-left: 40px; }
.ftcd-timeline > .wp-block-column::before { content: ""; position: absolute; left: 0; top: 30px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--c-blue); box-shadow: 0 0 0 6px var(--c-ice); z-index: 1; }
.ftcd-timeline > .wp-block-column:last-child::before { border-color: var(--c-red); }
.ftcd-timeline .is-style-ftcd-card { height: 100%; padding: clamp(22px, 2.6vw, 32px); box-shadow: 0 1px 0 var(--c-line), var(--shadow); }
.ftcd-timeline .is-style-ftcd-card p { margin: 0; line-height: 1.65; color: var(--c-muted); }
.ftcd-timeline .is-style-ftcd-card p:first-child { margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--c-line); }
.ftcd-timeline .is-style-ftcd-card p:first-child strong { display: block; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.7rem); line-height: 1.15; font-weight: 700; color: var(--c-navy); letter-spacing: -.01em; }
.ftcd-timeline > .wp-block-column:last-child .is-style-ftcd-card p:first-child strong { color: var(--c-red); }
@media (max-width: 1023px) {
	.ftcd-timeline.wp-block-columns { flex-wrap: wrap !important; }
	.ftcd-timeline > .wp-block-column { flex-basis: 100% !important; }
}
@media (min-width: 1024px) {
	.ftcd-timeline { padding-top: 54px; gap: 24px; }
	.ftcd-timeline::before { left: 0; right: 0; top: 19px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--c-line), var(--c-blue) 45%, var(--c-red)); }
	.ftcd-timeline > .wp-block-column { padding-left: 0; }
	.ftcd-timeline > .wp-block-column::before { left: 28px; top: -45px; }
	.ftcd-timeline > .wp-block-column::after { content: ""; position: absolute; left: 37px; top: -21px; width: 2px; height: 21px; background: var(--c-line); }
}

/* Citazione */
.wp-block-quote.is-style-ftcd-quote {
	position: relative; margin: 0 auto; max-width: 880px; padding: clamp(28px, 4vw, 52px);
	background: #fff; color: var(--c-text); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 0;
}
.wp-block-quote.is-style-ftcd-quote::before {
	content: "\201C"; position: absolute; top: -28px; left: clamp(20px, 3vw, 40px); width: 64px; height: 64px; border-radius: 50%;
	background: var(--c-red); color: #fff; font-size: 3.4rem; line-height: 1.25; text-align: center; font-weight: 700;
}
.wp-block-quote.is-style-ftcd-quote p { font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); line-height: 1.65; }
.wp-block-quote.is-style-ftcd-quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: .95rem; color: var(--c-muted); }
.wp-block-quote.is-style-ftcd-quote cite strong { color: var(--c-text); }

/* --------------------------------------------------------------------------
   Homepage hero
   -------------------------------------------------------------------------- */
.home-hero {
	position: relative;
	display: flex; align-items: center;
	min-height: min(860px, 100svh);
	padding: calc(var(--header-h) + 48px) 0 clamp(64px, 9vw, 120px);
	background: var(--c-ice);
	overflow: hidden;
	isolation: isolate;
}
.home-hero__bg { position: absolute; inset: 0; z-index: -2; }
.home-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.home-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(90deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .78) 42%, rgba(255, 255, 255, 0) 72%);
}
@media (max-width: 899px) {
	.home-hero { align-items: flex-end; min-height: 88svh; }
	.home-hero::before { background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .86) 45%, rgba(255, 255, 255, .96) 100%); }
	.home-hero__bg img { object-position: 62% center; }
}
.home-hero__content { max-width: 720px; }
.home-hero h1 { font-size: var(--fs-h1-home); line-height: 1.06; margin-bottom: .35em; color: var(--c-navy); }
.home-hero h1 span { color: var(--c-red); }
.home-hero__lead { font-size: clamp(1.15rem, 1rem + .7vw, 1.55rem); font-weight: 500; margin: 0 0 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 16px; }
@media (max-width: 559px) { .hero-actions { flex-direction: column; width: 100%; } .hero-actions .btn { width: 100%; } }
.home-hero__scroll { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 28px; height: 44px; border: 2px solid rgba(34, 49, 70, .35); border-radius: 20px; }
.home-hero__scroll::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--c-navy); animation: ftcd-scroll 1.8s infinite; }
@keyframes ftcd-scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-width: 899px) { .home-hero__scroll { display: none; } }

/* --------------------------------------------------------------------------
   Team (carosello leggero)
   -------------------------------------------------------------------------- */
.team { position: relative; }
.team__track {
	display: grid; grid-auto-flow: column; grid-auto-columns: 82%;
	gap: clamp(16px, 2vw, 28px);
	margin: 0; padding: 12px 4px 28px; list-style: none;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--c-line) transparent;
}
@media (min-width: 560px) { .team__track { grid-auto-columns: calc((100% - 28px) / 2); } }
@media (min-width: 900px) { .team__track { grid-auto-columns: calc((100% - 2 * 28px) / 3); } }
@media (min-width: 1200px) { .team__track { grid-auto-columns: calc((100% - 3 * 28px) / 4); } }
.team__item { scroll-snap-align: start; margin: 0; }
.team-card {
	height: 100%; display: flex; flex-direction: column; margin: 0;
	background: #fff; border-radius: var(--radius-lg); overflow: hidden;
	box-shadow: 0 1px 0 var(--c-line), var(--shadow);
}
.team-card__img { aspect-ratio: 4 / 4.4; background: var(--c-ice); overflow: hidden; }
.team-card__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .5s; }
.team-card:hover .team-card__img img { transform: scale(1.04); }
.team-card__body { padding: 18px 20px 22px; text-align: center; }
.team-card__name { margin: 0 0 .35rem; font-size: 1.08rem; line-height: 1.3; }
.team-card__role { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--c-muted); }
.team-card__role p { margin: 0 0 .3rem; }
.team-card__role strong { display: block; color: var(--c-red); font-weight: 600; margin-bottom: .2rem; }
.team__nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: -8px; }
.team__btn {
	width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 12px; background: var(--c-navy); color: #fff; cursor: pointer; transition: background .2s, opacity .2s;
}
.team__btn:hover { background: var(--c-red); }
.team__btn[disabled] { opacity: .35; cursor: default; background: var(--c-navy); }
.team__btn svg { width: 20px; height: 20px; }
.team--static .team__nav { display: none; }

/* --------------------------------------------------------------------------
   Card news
   -------------------------------------------------------------------------- */
.post-grid { display: grid; gap: clamp(20px, 2.6vw, 32px); grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-grid > li { margin: 0; }
.post-card {
	position: relative; height: 100%; display: flex; flex-direction: column;
	background: #fff; border-radius: var(--radius-lg); overflow: hidden;
	box-shadow: 0 1px 0 var(--c-line), var(--shadow); transition: transform .25s, box-shadow .25s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--c-line), var(--shadow-lg); }
.post-card__img { aspect-ratio: 16 / 10; background: var(--c-ice); overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__img--empty { display: flex; align-items: center; justify-content: center; }
.post-card__img--empty img { width: 46%; height: auto; object-fit: contain; opacity: .5; }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }
.post-card__date { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 .6rem; font-size: .85rem; font-weight: 600; color: var(--c-blue); text-transform: uppercase; letter-spacing: .06em; }
.post-card__date svg { width: 16px; height: 16px; }
.post-card__title { margin: 0 0 .6rem; font-size: 1.12rem; line-height: 1.35; }
.post-card__title a { color: var(--c-navy); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card__title a:focus-visible { outline: none; }
.post-card:has(.post-card__title a:focus-visible) { outline: 3px solid var(--c-blue); outline-offset: 3px; }
.post-card__excerpt { margin: 0 0 1rem; font-size: .95rem; color: var(--c-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__more { margin-top: auto; font-size: .9rem; font-weight: 700; color: var(--c-red); text-transform: uppercase; letter-spacing: .05em; }
.section-cta { margin-top: clamp(28px, 4vw, 44px); text-align: center; }

/* Paginazione */
.pagination { margin-top: clamp(36px, 5vw, 56px); }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 46px; padding: 0 16px;
	border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-navy); text-decoration: none; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--c-navy); }

/* --------------------------------------------------------------------------
   Articolo
   -------------------------------------------------------------------------- */
.single-cover { margin: clamp(-64px, -5vw, -36px) auto 0; position: relative; z-index: 2; }
.single-cover img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.single-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin: 2rem auto 0; max-width: var(--narrow); }
.single-downloads .btn::after { display: none; }
.post-nav { display: grid; gap: 16px; margin: clamp(40px, 6vw, 64px) auto 0; max-width: var(--narrow); }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a {
	display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 22px;
	border: 1px solid var(--c-line); border-radius: var(--radius); text-decoration: none; color: var(--c-navy); transition: border-color .2s, background .2s;
}
.post-nav a:hover { border-color: var(--c-navy); background: var(--c-ice); }
.post-nav span { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-red); }
.post-nav strong { font-weight: 600; line-height: 1.4; }
.post-nav .next { text-align: right; }

/* GiveWP: contenitore del modulo */
.ftcd-donate-card { background: #fff; color: var(--c-text); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(10px, 2vw, 22px); }
.ftcd-donate-card iframe { width: 100% !important; }
.wp-block-shortcode { margin: 0; }

/* Newsletter (Brevo) e contatti: i form usano classi Bootstrap (.row, .col-md-*) senza Bootstrap, la griglia è qui */
.ftcd-form-card { background: #fff; color: var(--c-text); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(24px, 3.5vw, 40px); }
.ftcd-form-card .form-group { margin: 0 0 16px; }
.ftcd-form-card .form-group.contact-us { margin: 0; }
.ftcd-form-card a, .ftcd-form-card a.iubenda-white { color: var(--c-red); text-decoration: underline; }
.ftcd-form-card .row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; }
.ftcd-form-card .row > * { min-width: 0; padding: 0; width: auto; }
@media (min-width: 560px) {
	.ftcd-form-card .row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
	.ftcd-form-card .col-md-12, .ftcd-newsletter .col-md-4:first-child { grid-column: 1 / -1; }
	.ftcd-contact .row:has(select) { grid-template-columns: minmax(0, 1fr); }
}
.ftcd-form-card .wpcf7-form-control-wrap { display: block; }
.ftcd-form-card input[type="text"],
.ftcd-form-card input[type="email"],
.ftcd-form-card input[type="tel"],
.ftcd-form-card select,
.ftcd-form-card textarea {
	display: block; width: 100%; min-height: 56px; margin: 0; padding: 15px 18px; border: 1.5px solid #c9d3e0; border-radius: 12px;
	font: inherit; font-size: 1rem; line-height: 1.4; color: var(--c-text); background: #f7f9fc; box-shadow: none; appearance: none;
	transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.ftcd-form-card select {
	padding-right: 48px; cursor: pointer;
	background: #f7f9fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23223146' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 18px center / 16px no-repeat;
}
.ftcd-form-card textarea { min-height: 160px; resize: vertical; }
.ftcd-form-card ::placeholder { color: #66707e; opacity: 1; }
.ftcd-form-card input:hover, .ftcd-form-card select:hover, .ftcd-form-card textarea:hover { border-color: #a9b6c8; }
.ftcd-form-card input:focus, .ftcd-form-card select:focus, .ftcd-form-card textarea:focus { outline: none; background-color: #fff; border-color: var(--c-blue); box-shadow: 0 0 0 4px rgba(74, 113, 165, .18); }
.ftcd-form-card label { font-weight: 400; font-size: .92rem; line-height: 1.5; color: var(--c-muted); }
.ftcd-form-card p { margin-bottom: 1rem; }
.ftcd-form-card .form-check, .ftcd-newsletter .col-md-12:has(input[type="checkbox"]) { margin-top: 4px; }
.ftcd-form-card .wpcf7-list-item label, .ftcd-newsletter .col-md-12:has(input[type="checkbox"]) { display: flex; align-items: flex-start; gap: 10px; }
.ftcd-form-card input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--c-red); cursor: pointer; }
.ftcd-form-card input[type="submit"] { width: 100%; margin-top: 20px; min-height: 54px; }
@media (min-width: 560px) { .ftcd-form-card input[type="submit"] { width: auto; min-width: 220px; } }
.ftcd-form-card .mt-3, .ftcd-form-card .mt-4 { margin-top: 0; }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: .85rem; color: var(--c-red); }
.ftcd-form-card .wpcf7-not-valid { border-color: var(--c-red); background-color: #fff; }
.wpcf7-form > h2, .wpcf7-form > h3 { display: none; } /* il titolo è già nella sezione */
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: 12px 16px; border-radius: 10px; }
.ftcd-form-card .wpcf7-spinner { margin: 20px 0 0 12px; vertical-align: middle; }
.ftcd-newsletter .sib_loader { text-align: center; }
.ftcd-newsletter .sib_msg_disp:empty { display: none; }
/* GRS Forms dentro le card del tema */
.ftcd-form-card .grs-form__label { margin-bottom: 8px; font-size: .95rem; font-weight: 600; color: var(--c-navy); }
.ftcd-form-card .grs-form__consent { font-size: .92rem; color: var(--c-muted); }
.ftcd-form-card .grs-form__consent a { color: var(--c-red); }
.ftcd-form-card .grs-form__footer { margin-top: 24px; }
.ftcd-form-card .grs-form__submit { width: 100%; min-height: 54px; padding: 14px 32px; font-size: .95rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; transition: background-color .2s, transform .2s, box-shadow .2s; }
.ftcd-form-card .grs-form__submit:hover { filter: none; background: var(--c-red-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
@media (min-width: 560px) { .ftcd-form-card .grs-form__submit { width: auto; min-width: 220px; } }
.ftcd-form-card .grs-form__message--success { margin: 0; font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-navy-2); color: rgba(255, 255, 255, .85); font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-cta { background: var(--c-red); color: #fff; }
.footer-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-block: clamp(32px, 4vw, 44px); }
.footer-cta h2 { margin: 0; font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem); color: #fff; }
.footer-cta p { margin: .3rem 0 0; color: rgba(255, 255, 255, .9); }
.footer-cta .hero-actions { flex-direction: row; width: auto; }
@media (max-width: 559px) { .footer-cta .hero-actions { flex-direction: column; width: 100%; } }
.footer-main { display: grid; gap: 36px; padding-block: clamp(48px, 6vw, 72px); }
@media (min-width: 900px) { .footer-main { grid-template-columns: 1.1fr 1.4fr 1fr; gap: 48px; } }
.footer-logo img { width: 190px; height: auto; }
.footer-col h2 { margin: 0 0 1rem; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: #9fbbe0; }
.footer-col p { margin: 0 0 .7rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 .5rem; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-iban { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; letter-spacing: .02em; word-break: break-all; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-bottom__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 22px; font-size: .85rem; color: rgba(255, 255, 255, .7); }
.footer-bottom p { margin: 0; }
.footer-bottom__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.footer-bottom__links li { margin: 0; }
.footer-bottom a { color: rgba(255, 255, 255, .9); text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }
.grs-badge { display: inline-block; padding: 6px 14px; border-radius: 10px; background: var(--c-red); color: #fff !important; font-weight: 600; font-size: .8rem; }
.grs-badge:hover { background: var(--c-red-dark); text-decoration: none !important; }

/* Barra "Dona ora" su mobile */
.mobile-donate {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90;
	display: none; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--c-navy); color: #fff;
	box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45);
	transform: translateY(140%); transition: transform .3s ease;
}
.mobile-donate p { margin: 0; font-size: .9rem; font-weight: 500; line-height: 1.3; }
.mobile-donate .btn { min-height: 44px; padding: .5em 1.2em; font-size: .85rem; flex: 0 0 auto; }
.mobile-donate.is-visible { transform: none; }
@media (max-width: 899px) { .mobile-donate { display: flex; } body.has-mobile-donate .site-footer { padding-bottom: 84px; } }

/* Torna su */
.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 48px; height: 48px;
	display: none; align-items: center; justify-content: center; border: 0; border-radius: 12px;
	background: var(--c-navy); color: #fff; cursor: pointer; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s, background .2s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { background: var(--c-red); }
@media (min-width: 900px) { .to-top { display: inline-flex; } }

/* 404 e ricerca */
.empty-state { text-align: center; padding: clamp(56px, 8vw, 110px) 0; }
.empty-state .hero-actions { justify-content: center; margin-top: 1.5rem; }

/* Gallerie (FTCD Core) nel tema */
.ftcd-gallery-embed { max-width: var(--wide) !important; }

/* Stampa */
@media print {
	.site-header, .mobile-donate, .to-top, .footer-cta, .primary-nav { display: none !important; }
	body:not(.has-hero-home) .site-main { padding-top: 0; }
}
