/* ==========================================================================
   MRTM Racing — stile principale
   Colori: asfalto, rosso cordolo, gesso, granito, azzurro ghiacciaio.
   ========================================================================== */

:root {
	--asphalt: #1F2226;
	--asphalt-2: #2A2E33;
	--asphalt-3: #3B4047;
	--kerb: #D21F2C;
	--kerb-dark: #A8141F;
	--chalk: #F2F3F1;
	--white: #FFFFFF;
	--granite: #6B737C;
	--glacier: #9CC9D8;
	--signal: #FFE600; /* giallo del logo MRTM */

	/* Ruoli (cambiano in modalità scura) */
	--bg: var(--chalk);
	--surface: var(--white);
	--fg: var(--asphalt);
	--fg-soft: #4A5058;
	--line: #D5D8DB;
	--link: #B3151F;

	--display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
	--text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--step--1: clamp(0.83rem, 0.8rem + 0.1vw, 0.88rem);
	--step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
	--step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.42rem);
	--step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
	--step-3: clamp(2rem, 1.6rem + 1.8vw, 3rem);
	--step-4: clamp(2.6rem, 1.9rem + 3.2vw, 4.6rem);

	--gutter: clamp(16px, 4vw, 48px);
	--max: 1240px;
	--header-h: 72px;
	--radius: 3px;
	--ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #17191C;
		--surface: #212429;
		--fg: #ECEDEB;
		--fg-soft: #B4B9BF;
		--line: #353A40;
		--link: var(--glacier);
	}
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--text);
	font-size: var(--step-0);
	line-height: 1.6;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, video, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
	font-family: var(--display);
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.005em;
	margin: 0 0 0.5em;
	text-wrap: balance;
	overflow-wrap: anywhere;
	hyphens: auto;
}

p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--glacier); outline-offset: 2px; }

.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:focus {
	clip: auto; width: auto; height: auto;
	top: 8px; left: 8px; z-index: 1000;
	padding: 12px 18px;
	background: var(--white); color: var(--asphalt);
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.wrap--wide { width: min(100% - 2 * var(--gutter), 1480px); }

.section { padding-block: clamp(56px, 8vw, 112px); }

/* Cordolo: il motivo del circuito, usato con parsimonia */
.kerb {
	height: 12px;
	background: repeating-linear-gradient(115deg, var(--kerb) 0 44px, var(--white) 44px 88px);
}

/* --------------------------------------------------------------------------
   Pulsanti
   -------------------------------------------------------------------------- */

.btn,
.wp-block-button__link,
input[type="submit"],
button[type="submit"]:not(.search-form__btn) {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.8em 1.35em;
	border: 2px solid var(--kerb);
	border-radius: var(--radius);
	background: var(--kerb);
	color: var(--white);
	font-family: var(--text);
	font-size: var(--step-0);
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:not(.search-form__btn):hover { background: var(--kerb-dark); border-color: var(--kerb-dark); color: var(--white); }

.btn--ghost { background: transparent; color: var(--fg); border-color: currentColor; }
.btn--ghost:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--asphalt); }
.btn--light:hover { background: var(--chalk); border-color: var(--chalk); color: var(--asphalt); }

/* --------------------------------------------------------------------------
   Intestazione
   -------------------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--asphalt);
	color: var(--white);
	transition: background-color .3s, box-shadow .3s;
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }

.has-hero .site-header {
	position: fixed;
	inset-inline: 0;
	background: linear-gradient(to bottom, rgba(20, 22, 25, .7), rgba(20, 22, 25, 0));
}
.has-hero .site-header.is-scrolled,
.has-hero.nav-open .site-header { background: var(--asphalt); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: var(--header-h);
	width: min(100% - 2 * var(--gutter), 1480px);
	margin-inline: auto;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: inherit;
	text-decoration: none;
	flex-shrink: 0;
}
.brand__logo { width: auto; height: 48px; object-fit: contain; }
.brand__name { display: flex; flex-direction: column; line-height: 1; }
.brand__short { font-family: var(--display); font-weight: 900; font-size: 1.7rem; letter-spacing: .02em; }
.brand__long { font-size: .72rem; opacity: .75; letter-spacing: .02em; }

.main-nav { margin-left: auto; }
.main-nav .menu,
.main-nav .sub-menu { list-style: none; margin: 0; padding: 0; }

.main-nav__extra { display: none; }

.site-header__tools { display: flex; align-items: center; gap: 16px; }

.lang-switch { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lang-switch a {
	display: block;
	padding: 6px 7px;
	color: inherit;
	font-size: .8rem;
	font-weight: 600;
	text-decoration: none;
	opacity: .65;
}
.lang-switch a:hover,
.lang-switch a[aria-current] { opacity: 1; }
.lang-switch a[aria-current] { box-shadow: inset 0 -2px 0 var(--kerb); }

.btn--members { padding: .55em 1em; font-size: .9rem; }

.nav-toggle {
	display: none;
	width: 44px; height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 7px; width: 26px; margin: auto; }
.nav-toggle__bars span { height: 2px; background: currentColor; transition: transform .25s var(--ease); }
.nav-open .nav-toggle__bars span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-open .nav-toggle__bars span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Menu desktop */
@media (min-width: 1100px) {
	.main-nav .menu { display: flex; align-items: center; gap: 4px; }
	.main-nav .menu > li { position: relative; display: flex; align-items: center; }
	.main-nav .menu > li > a {
		display: block;
		padding: 10px 10px;
		color: var(--white);
		font-weight: 600;
		font-size: .98rem;
		text-decoration: none;
	}
	.main-nav .menu > li > a:hover,
	.main-nav .menu > li.current-menu-item > a,
	.main-nav .menu > li.current-menu-ancestor > a { box-shadow: inset 0 -3px 0 var(--kerb); }

	.submenu-toggle {
		width: 22px; height: 30px;
		margin-left: -6px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--white);
		opacity: .7;
		cursor: pointer;
	}
	.submenu-toggle svg { margin: auto; }

	.main-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 240px;
		padding: 8px 0;
		background: var(--asphalt);
		border-top: 3px solid var(--kerb);
		box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity .18s, transform .18s var(--ease), visibility .18s;
	}
	.main-nav li:hover > .sub-menu,
	.main-nav li:focus-within > .sub-menu,
	.main-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
	.main-nav .sub-menu a {
		display: block;
		padding: 9px 20px;
		color: #D9DCDF;
		text-decoration: none;
		font-size: .95rem;
	}
	.main-nav .sub-menu a:hover,
	.main-nav .sub-menu .current-menu-item > a { color: var(--white); background: var(--asphalt-2); }
}

/* Menu mobile */
@media (max-width: 1099px) {
	.nav-toggle { display: block; }
	.site-header__tools .lang-switch--header { display: none; }

	.main-nav {
		position: fixed;
		inset: var(--header-h) 0 0 0;
		z-index: 99;
		overflow-y: auto;
		padding: 16px var(--gutter) 48px;
		background: var(--asphalt);
		visibility: hidden;
		opacity: 0;
		transition: opacity .2s, visibility .2s;
	}
	.admin-bar .main-nav { top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 46px)); }
	.nav-open .main-nav { visibility: visible; opacity: 1; }
	.nav-open { overflow: hidden; }

	.main-nav .menu > li {
		display: grid;
		grid-template-columns: 1fr auto;
		border-bottom: 1px solid var(--asphalt-3);
	}
	.main-nav .menu > li > a {
		padding: 14px 0;
		color: var(--white);
		font-family: var(--display);
		font-weight: 800;
		font-size: 2rem;
		line-height: 1.05;
		text-decoration: none;
	}
	.submenu-toggle {
		width: 52px;
		border: 0;
		background: none;
		color: var(--white);
		cursor: pointer;
	}
	.submenu-toggle svg { width: 16px; height: 16px; margin: auto; transition: transform .2s; }
	.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.main-nav .sub-menu { grid-column: 1 / -1; display: none; padding: 0 0 14px; }
	.main-nav li.is-open > .sub-menu { display: block; }
	.main-nav .sub-menu a { display: block; padding: 8px 0; color: #C9CDD1; text-decoration: none; font-size: 1.05rem; }

	.main-nav__extra { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; color: var(--white); }
	.main-nav__extra .lang-switch a { font-size: 1rem; padding: 8px 10px; }
	.btn--members span { display: none; }
	.btn--members { padding: .55em; }
}

@media (max-width: 480px) {
	.brand__long { display: none; }
}

/* --------------------------------------------------------------------------
   Social
   -------------------------------------------------------------------------- */

.social { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.social a {
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	color: inherit;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	transition: background-color .15s, border-color .15s;
}
.social a:hover { background: var(--kerb); border-color: var(--kerb); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
	position: relative;
	display: grid;
	grid-template-columns: 1fr minmax(0, 340px);
	align-items: end;
	gap: 32px;
	min-height: 100svh;
	padding: calc(var(--header-h) + 48px) max(var(--gutter), calc((100% - 1480px) / 2)) clamp(36px, 6vw, 72px);
	color: var(--white);
	background: var(--asphalt);
	overflow: hidden;
	isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(20, 22, 25, .92) 0%, rgba(20, 22, 25, .35) 45%, rgba(20, 22, 25, .15) 70%),
		linear-gradient(to right, rgba(20, 22, 25, .55), rgba(20, 22, 25, 0) 60%);
}

.hero__kicker { margin: 0 0 14px; font-weight: 600; font-size: var(--step-0); color: var(--glacier); }

.hero__title {
	margin: 0;
	font-weight: 900;
	font-size: clamp(3.2rem, 1rem + 9.5vw, 10.5rem);
	line-height: .84;
	letter-spacing: -.005em;
	text-transform: uppercase;
}
.hero__title span { display: block; }

.hero__text { max-width: 46ch; margin: 22px 0 0; font-size: var(--step-1); line-height: 1.45; color: #E1E4E6; }

/* Torre dei tempi */
.tower {
	align-self: end;
	padding: 22px 24px 24px;
	background: rgba(24, 26, 30, .82);
	border-top: 6px solid var(--kerb);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.tower__label { margin: 0 0 8px; font-size: var(--step--1); font-weight: 600; color: var(--glacier); }
.tower__title { margin: 0 0 6px; font-size: var(--step-2); font-weight: 800; line-height: 1.02; }
.tower__title a { color: inherit; text-decoration: none; }
.tower__date { margin: 0 0 18px; color: #C9CDD1; font-size: var(--step--1); }

.countdown {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-bottom: 18px;
	border-block: 1px solid rgba(255, 255, 255, .14);
}
.countdown > div { padding: 10px 0 8px; text-align: center; }
.countdown > div + div { border-left: 1px solid rgba(255, 255, 255, .14); }
.countdown__n {
	display: block;
	font-family: var(--display);
	font-weight: 800;
	font-size: 2.6rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--signal);
}
.countdown__u { display: block; margin-top: 4px; font-size: .74rem; color: #A9AFB5; }

.tower__live { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-weight: 600; }
.tower__live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--kerb); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.tower__link { color: var(--white); font-weight: 600; }
.tower__link:hover { color: var(--glacier); }

.hero__pause {
	position: absolute;
	left: max(var(--gutter), calc((100% - 1480px) / 2));
	bottom: 14px;
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	background: rgba(0, 0, 0, .3);
	color: var(--white);
	cursor: pointer;
	opacity: .7;
}
.hero__pause:hover { opacity: 1; }
.hero__pause-on { display: none; }
.hero__pause[aria-pressed="true"] .hero__pause-on { display: block; }
.hero__pause[aria-pressed="true"] .hero__pause-off { display: none; }

/* Ingresso: un solo momento, come lo spegnersi dei semafori */
@media (prefers-reduced-motion: no-preference) {
	.hero__title span {
		clip-path: inset(0 100% 0 0);
		animation: wipe .9s var(--ease) forwards;
	}
	.hero__title span:nth-child(2) { animation-delay: .14s; }
	.hero__kicker, .hero__text { opacity: 0; animation: fade .6s ease-out .5s forwards; }
	.tower { opacity: 0; transform: translateY(24px); animation: rise .7s var(--ease) .65s forwards; }
}
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
	.hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(var(--header-h) + 30vh); }
	.tower { width: 100%; }
	.hero__pause { top: calc(var(--header-h) + 12px); bottom: auto; left: auto; right: var(--gutter); }
}

/* --------------------------------------------------------------------------
   Pit lane (collegamenti rapidi)
   -------------------------------------------------------------------------- */

.pitlane {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: var(--asphalt-2);
	color: var(--white);
}
.pitlane__item {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 16px;
	align-items: center;
	padding: 28px max(20px, 2.4vw);
	color: inherit;
	text-decoration: none;
	transition: background-color .15s;
}
.pitlane__item + .pitlane__item { border-left: 1px solid var(--asphalt-3); }
.pitlane__item .icon { grid-row: span 2; color: var(--kerb); }
.pitlane__title { font-family: var(--display); font-weight: 800; font-size: var(--step-2); line-height: 1; }
.pitlane__sub { font-size: var(--step--1); color: #A9AFB5; }
.pitlane__item:hover { background: var(--asphalt-3); }
.pitlane__item:hover .pitlane__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }

@media (max-width: 960px) {
	.pitlane { grid-template-columns: 1fr 1fr; }
	.pitlane__item:nth-child(3) { border-left: 0; }
	.pitlane__item:nth-child(n + 3) { border-top: 1px solid var(--asphalt-3); }
}
@media (max-width: 520px) {
	.pitlane { grid-template-columns: 1fr; }
	.pitlane__item + .pitlane__item { border-left: 0; border-top: 1px solid var(--asphalt-3); }
}

/* --------------------------------------------------------------------------
   Titoli di sezione
   -------------------------------------------------------------------------- */

.section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: clamp(24px, 4vw, 40px);
	flex-wrap: wrap;
}
.section__head > * { min-width: 0; }
.section__title { margin: 0; font-size: var(--step-4); font-weight: 900; text-transform: uppercase; line-height: .9; }
.section__more { font-weight: 600; }

/* --------------------------------------------------------------------------
   Prossime gare: foglio tempi
   -------------------------------------------------------------------------- */

.timesheet { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.timesheet__row {
	position: relative;
	display: grid;
	grid-template-columns: 96px 1fr auto;
	gap: 24px;
	align-items: center;
	padding: 20px 0;
	border-bottom: 1px solid var(--line);
}
.timesheet__row.is-live::before {
	content: "";
	position: absolute;
	left: -16px; top: 12px; bottom: 12px;
	width: 5px;
	background: var(--kerb);
}
.timesheet__date { display: flex; flex-direction: column; line-height: 1; }
.timesheet__day { font-family: var(--display); font-weight: 900; font-size: 3.2rem; font-variant-numeric: tabular-nums; }
.timesheet__month { font-weight: 600; color: var(--fg-soft); }
.timesheet__main h3 { margin: 0 0 4px; font-size: var(--step-2); }
.timesheet__main h3 a { color: inherit; text-decoration: none; }
.timesheet__main h3 a:hover { color: var(--link); }
.timesheet__main p { margin: 0; color: var(--fg-soft); }
.timesheet__main p.timesheet__tbc { display: inline-block; margin-top: 6px; padding: 1px 9px; border: 1.5px dashed var(--fg); border-radius: 99px; color: var(--fg); font-size: var(--step--1); font-weight: 700; }
.timesheet__cats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; list-style: none; margin: 0; padding: 0; }
.timesheet__cats li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: var(--step--1); white-space: nowrap; }
/* Colori delle categorie (plugin MRTM Calendario) */
.timesheet__row[style*="--cat"] .timesheet__day { color: var(--cat-ink, var(--cat)); }
.timesheet__row[style*="--cat"]:not(.is-live)::before { content: ""; position: absolute; left: -16px; top: 16px; bottom: 16px; width: 4px; border-radius: 2px; background: var(--cat-ink, var(--cat)); }
.timesheet__cats li[style*="--dot"] { display: inline-flex; align-items: center; gap: 6px; }
.timesheet__cats li[style*="--dot"]::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
@media (prefers-color-scheme: dark) { .timesheet__row[style*="--cat"] .timesheet__day { color: color-mix(in srgb, var(--cat) 60%, #fff); } }

@media (max-width: 680px) {
	.timesheet__row { grid-template-columns: 64px 1fr; gap: 16px; }
	.timesheet__day { font-size: 2.4rem; }
	.timesheet__cats { grid-column: 2; justify-content: flex-start; }
}

/* --------------------------------------------------------------------------
   La pista
   -------------------------------------------------------------------------- */

.track {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	background: var(--surface);
}
.track > * { min-width: 0; }
.track__media { min-height: 420px; background: var(--asphalt-2); }
.track__media img { width: 100%; height: 100%; object-fit: cover; }
.track__body { padding: clamp(40px, 6vw, 88px) clamp(20px, 5vw, 80px); }
.track__intro { max-width: 46ch; margin: 20px 0 28px; font-size: var(--step-1); color: var(--fg-soft); }

.specs {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	margin: 0 0 32px;
	border-top: 2px solid var(--fg);
}
.specs > div { padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.specs > div:nth-child(odd) { padding-right: 16px; }
.specs > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.specs dt { font-size: var(--step--1); color: var(--fg-soft); }
.specs dd { margin: 2px 0 0; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.specs dd small { margin-left: 4px; font-size: 1.1rem; font-weight: 600; color: var(--fg-soft); }
.track__links { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

@media (max-width: 960px) {
	.track { grid-template-columns: 1fr; }
	.track__media { min-height: 0; aspect-ratio: 16 / 9; max-width: 100%; }
}

/* --------------------------------------------------------------------------
   Evento in evidenza
   -------------------------------------------------------------------------- */

.feature {
	position: relative;
	padding-block: clamp(72px, 12vw, 160px);
	color: var(--white);
	background: var(--asphalt);
	overflow: hidden;
	isolation: isolate;
}
.feature__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.feature::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(20, 22, 25, .92) 30%, rgba(20, 22, 25, .4));
}
.feature__title { max-width: 14ch; font-size: clamp(2.6rem, 1.4rem + 5vw, 6rem); font-weight: 900; text-transform: uppercase; line-height: .88; }
.feature__days { display: flex; align-items: baseline; gap: 10px; margin: 0 0 28px; color: #D9DCDF; font-weight: 600; }
.feature__days span { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 2rem + 4vw, 5.5rem); line-height: .9; color: var(--signal); font-variant-numeric: tabular-nums; }
.feature__text { max-width: 52ch; margin: 20px 0 28px; font-size: var(--step-1); color: #D9DCDF; }

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

.news__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	grid-template-rows: repeat(3, auto);
	gap: 0 clamp(24px, 4vw, 56px);
}
.news__lead { grid-row: 1 / span 3; }
.news__lead .news__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.news__lead .news__body { padding-top: 20px; }
.news__lead .news__title { font-size: var(--step-3); }

.news__item {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 18px;
	align-items: start;
	padding-block: 18px;
	border-bottom: 1px solid var(--line);
}
.news__item:nth-child(2) { padding-top: 0; }
.news__item .news__img img { width: 120px; aspect-ratio: 1; object-fit: cover; }
.news__item:not(:has(.news__img)) { grid-template-columns: 1fr; }
.news__item .news__title { font-size: var(--step-1); font-family: var(--text); font-weight: 600; line-height: 1.25; }

.news__meta { margin: 0 0 6px; font-size: var(--step--1); color: var(--fg-soft); }
.news__title { margin: 0; }
.news__title a { color: inherit; text-decoration: none; }
.news__title a:hover { color: var(--link); text-decoration: underline; }
.news__excerpt { margin: 12px 0 0; color: var(--fg-soft); max-width: 60ch; }

@media (max-width: 860px) {
	.news__grid { grid-template-columns: 1fr; }
	.news__lead { grid-row: auto; margin-bottom: 24px; }
	.news__item:nth-child(2) { padding-top: 18px; }
}

/* --------------------------------------------------------------------------
   Vieni a Lostallo
   -------------------------------------------------------------------------- */

.visit { background: var(--surface); border-top: 1px solid var(--line); }
.visit__grid > *, .news__grid > *, .site-footer__inner > * { min-width: 0; }
.visit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.visit__text p { max-width: 50ch; margin: 20px 0; font-size: var(--step-1); color: var(--fg-soft); }
.visit address { font-style: normal; font-weight: 600; }
.visit__photo { margin: 28px 0 0; }
.visit__photo img { width: 100%; max-width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.visit__links { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.visit__links a {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--line);
	color: var(--fg);
	font-family: var(--display);
	font-weight: 800;
	font-size: var(--step-2);
	text-decoration: none;
}
.visit__links .icon { color: var(--kerb); flex-shrink: 0; }
.visit__links a:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }

@media (max-width: 860px) {
	.visit__grid { grid-template-columns: 1fr; }
}

/* Orari in homepage */
.hours { display: grid; gap: 0; max-width: 420px; margin: 24px 0 0; border-top: 2px solid var(--fg); }
.hours > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours dt { color: var(--fg-soft); }
.hours dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Pagine interne
   -------------------------------------------------------------------------- */

.page-head {
	position: relative;
	padding: clamp(48px, 9vw, 120px) 0 clamp(32px, 5vw, 56px);
	background: var(--asphalt);
	color: var(--white);
	overflow: hidden;
	isolation: isolate;
}
.page-head--image { padding-top: clamp(120px, 22vw, 300px); }
.page-head--default { padding-top: clamp(72px, 12vw, 160px); }
.page-head__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-head--image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(20, 22, 25, .9), rgba(20, 22, 25, .2));
}
.page-head__parent { margin: 0 0 10px; font-weight: 600; color: var(--glacier); }
.page-head__parent a { color: inherit; text-decoration: none; }
.page-head__parent a:hover { text-decoration: underline; }
.page-head__title { max-width: 20ch; margin: 0; font-size: var(--step-4); font-weight: 900; text-transform: uppercase; line-height: .9; }
.page-head .search-form { margin-top: 28px; max-width: 480px; }

/* Contenuto editoriale */
.entry-content { max-width: 74ch; }
.entry-content--wide { max-width: none; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 1.8em; font-size: var(--step-3); }
.entry-content h3 { margin-top: 1.5em; font-size: var(--step-2); }
.entry-content h4 { margin-top: 1.3em; font-size: var(--step-1); font-family: var(--text); font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .35em; }
.entry-content blockquote { margin-inline: 0; padding-left: 20px; border-left: 4px solid var(--kerb); font-size: var(--step-1); }
.entry-content img { border-radius: var(--radius); }
.entry-content figcaption { margin-top: 8px; font-size: var(--step--1); color: var(--fg-soft); }
.entry-content table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content thead th { border-bottom: 2px solid var(--fg); font-weight: 700; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .alignwide { max-width: min(1240px, 100vw - 2 * var(--gutter)); }
.entry-content .wp-block-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); }
.entry-content .wp-block-file__button { margin-left: auto; }
.entry-content iframe { max-width: 100%; }
.entry-content .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* Cronologia della storia del club */
.entry-content .mrtm-timeline { list-style: none; padding: 0; margin-block: 2em; border-left: 3px solid var(--kerb); }
.entry-content .mrtm-timeline li { position: relative; margin: 0; padding: 0 0 1.4em 28px; }
.entry-content .mrtm-timeline li::before { content: ""; position: absolute; left: -9px; top: .35em; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 3px solid var(--kerb); }
.entry-content .mrtm-timeline strong { display: block; font-family: var(--display); font-weight: 900; font-size: 2rem; line-height: 1; margin-bottom: 4px; font-variant-numeric: tabular-nums; }

/* Tabelle orari e alloggi */
.entry-content .mrtm-hours th { width: 45%; font-weight: 600; }
.entry-content .mrtm-directory { overflow-x: auto; }
.entry-content .mrtm-directory table { min-width: 640px; font-size: .95rem; }
.entry-content .mrtm-directory td:first-child { font-weight: 600; }
.entry-content .mrtm-directory a { white-space: nowrap; }

.subpages { margin-top: 56px; padding-top: 24px; border-top: 2px solid var(--fg); max-width: 74ch; }
.subpages__title { font-size: var(--step-2); }
.subpages ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; list-style: none; margin: 0; padding: 0; }
.subpages a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--fg); font-weight: 600; text-decoration: none; }
.subpages a:hover { color: var(--link); }

/* Elenco news */
.post-list { display: grid; gap: 0; border-top: 2px solid var(--fg); }
.post-row { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-row__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-row__img:empty { display: none; }
.post-row:not(:has(img)) { grid-template-columns: 1fr; }
.post-row__title { font-size: var(--step-2); margin-bottom: 8px; }
.post-row__title a { color: inherit; text-decoration: none; }
.post-row__title a:hover { color: var(--link); text-decoration: underline; }
.post-row p { color: var(--fg-soft); max-width: 64ch; margin: 0; }
@media (max-width: 640px) { .post-row { grid-template-columns: 1fr; gap: 14px; } }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 74ch; margin-top: 56px; padding-top: 24px; border-top: 2px solid var(--fg); }
.post-nav a { display: block; color: var(--fg); font-weight: 600; text-decoration: none; }
.post-nav span { display: block; margin-bottom: 4px; font-size: var(--step--1); font-weight: 400; color: var(--fg-soft); }
.post-nav__next { text-align: right; grid-column: 2; }

.empty { max-width: 60ch; }
.empty p { font-size: var(--step-1); }

/* Ricerca */
.search-form { display: flex; max-width: 520px; }
.search-form__input {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	border: 2px solid var(--line);
	border-right: 0;
	border-radius: var(--radius) 0 0 var(--radius);
	background: var(--surface);
	color: var(--fg);
	font: inherit;
}
.page-head .search-form__input { border-color: transparent; }
.search-form__btn {
	display: grid;
	place-items: center;
	width: 52px;
	border: 0;
	border-radius: 0 var(--radius) var(--radius) 0;
	background: var(--kerb);
	color: var(--white);
	cursor: pointer;
}

/* Commenti */
.comments { max-width: 74ch; margin-top: 56px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   Campi dei moduli (generici: commenti, ricerca, plugin)
   -------------------------------------------------------------------------- */

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"],
input[type="number"], input[type="date"], input[type="search"], select, textarea {
	font: inherit;
	color: var(--fg);
}

/* --------------------------------------------------------------------------
   Piè di pagina
   -------------------------------------------------------------------------- */

.site-footer { background: var(--asphalt); color: #C9CDD1; font-size: var(--step--1); }
.site-footer a { color: var(--white); }
.site-footer__inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	width: min(100% - 2 * var(--gutter), var(--max));
	margin-inline: auto;
	padding-block: 64px 48px;
}
.site-footer:has(.site-footer__col:nth-child(4)) .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.site-footer__name { margin: 0 0 6px; font-family: var(--display); font-weight: 900; font-size: var(--step-3); line-height: .95; color: var(--white); text-transform: uppercase; }
.site-footer__motto { max-width: 36ch; margin-bottom: 20px; font-style: italic; }
.site-footer h2 { margin-bottom: 14px; font-size: var(--step-1); color: var(--white); }
.site-footer address { font-style: normal; margin-bottom: 10px; }
.site-footer .menu { list-style: none; margin: 0; padding: 0; }
.site-footer .menu li + li { margin-top: 8px; }
.site-footer__bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	width: min(100% - 2 * var(--gutter), var(--max));
	margin-inline: auto;
	padding-block: 18px 28px;
	border-top: 1px solid var(--asphalt-3);
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom .lang-switch a { color: #C9CDD1; }

@media (max-width: 860px) {
	.site-footer__inner,
	.site-footer:has(.site-footer__col:nth-child(4)) .site-footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

/* --------------------------------------------------------------------------
   Movimento ridotto
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	html { scroll-behavior: auto; }
}

/* Stampa */
@media print {
	.site-header, .site-footer, .hero__media, .pitlane, .kerb { display: none; }
	.page-head { background: none; color: #000; padding: 0 0 16px; }
}
