/*
 * ULMi — stili base: reset, tipografia, layout, header, footer, contenuti, compatibilità plugin.
 * Le regole sui contenuti usano :where() per restare a specificità minima
 * e lasciare la precedenza agli stili di Elementor, SportsPress ed Everest Forms.
 */

/* ============ Reset ============ */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--light-bg);
	color: var(--light-txt);
	font-family: var(--font);
	font-size: var(--fs-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.singular {
	background: var(--light-panel);
}

/*
 * Il Kit di Elementor applica il suo font a body, a e h1–h6 su tutto il sito.
 * Il guscio del tema e i contenuti non Elementor restano in Inter;
 * i contenuti costruiti con Elementor mantengono il loro font.
 */
html body:not(.ulmi-elementor),
html body:not(.ulmi-elementor) :is(h1, h2, h3, h4, h5, h6, a),
html body :is(.site-header, .site-footer, .entry-header, .page-header, .card, .pagination, .error-404),
html body :is(.site-header, .site-footer, .entry-header, .page-header, .card, .pagination, .error-404) :is(h1, h2, h3, h4, h5, h6, a, p, button) {
	font-family: var(--font);
}

:where(img, svg, video, canvas, iframe) {
	max-width: 100%;
}

:where(img, video) {
	height: auto;
}

:where(button, input, select, textarea) {
	font: inherit;
}

:where(a) {
	color: var(--link);
	text-underline-offset: 0.15em;
}

:where(a:hover) {
	color: var(--link-hover);
}

:focus-visible {
	outline: none;
	box-shadow: var(--focus);
	border-radius: 4px;
}

/* ============ Accessibilità ============ */

.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 {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 18px;
	clip: auto;
	background: #fff;
	color: var(--light-txt);
	font-weight: 700;
	border-radius: var(--r-sm);
	box-shadow: var(--focus);
}

.site-main:focus {
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ============ Pulsanti ============ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 9px 18px;
	border: 1px solid transparent;
	border-radius: var(--r-sm);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.005em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-red {
	background: var(--red);
	color: #fff;
}

.btn-red:hover {
	background: var(--red-dk);
	color: #fff;
}

.btn-outline {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.55);
	color: #fff;
}

.btn-outline:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

/* ============ Layout ============ */

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

.site-main {
	display: block;
	min-height: 50vh;
}

.site-main > .container {
	padding-block: clamp(32px, 5vw, 64px);
}

/* ============ Header ============ */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ink);
	color: var(--txt);
	border-bottom: 1px solid #000;
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.header-inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: calc(var(--wide) + 2 * var(--gutter));
	min-height: var(--header-h);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.site-logo {
	display: block;
	flex: none;
	line-height: 0;
}

.site-logo img {
	width: auto;
	height: 40px;
}

.site-nav {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 20px;
}

.primary-nav {
	margin-left: auto;
}

.primary-menu,
.primary-menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu a {
	display: block;
	color: inherit;
	text-decoration: none;
	text-transform: uppercase;
}

.header-actions {
	display: flex;
	flex: none;
	gap: 10px;
}

/* Pulsante di apertura dei sottomenu, creato da nav.js. */
.submenu-toggle {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--dim);
	cursor: pointer;
}

.submenu-toggle .icon {
	width: 16px;
	height: 16px;
	transition: transform 0.15s;
}

.is-open > .submenu-toggle .icon {
	transform: rotate(180deg);
}

.nav-toggle {
	display: none;
	position: relative;
	width: 44px;
	height: 44px;
	margin-left: auto;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--surf2);
	color: #fff;
	cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
	position: absolute;
	left: 12px;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle-bars {
	top: 20px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
	content: "";
	left: 0;
}

.nav-toggle-bars::before {
	top: -6px;
}

.nav-toggle-bars::after {
	top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
	transform: translateY(6px) rotate(45deg);
	background: #fff;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
	transform: translateY(-6px) rotate(-45deg);
	background: #fff;
}

/* --- Desktop --- */
@media (min-width: 1240px) {
	.primary-menu {
		display: flex;
		align-items: center;
		gap: 2px;
	}

	.primary-menu > li {
		position: relative;
		display: flex;
		align-items: center;
	}

	.primary-menu > li > a {
		position: relative;
		padding: 24px 8px;
		font-size: 0.78125rem;
		font-weight: 600;
		letter-spacing: 0.03em;
		white-space: nowrap;
		color: #D6D6DE;
	}

	.primary-menu > li > a::after {
		content: "";
		position: absolute;
		left: 8px;
		right: 8px;
		bottom: 16px;
		height: 2px;
		border-radius: 2px;
		background: var(--red);
		transform: scaleX(0);
		transition: transform 0.15s;
	}

	.primary-menu > li > a:hover,
	.primary-menu > .current-menu-item > a,
	.primary-menu > .current-menu-ancestor > a {
		color: #fff;
	}

	.primary-menu > li > a:hover::after,
	.primary-menu > .current-menu-item > a::after,
	.primary-menu > .current-menu-ancestor > a::after {
		transform: scaleX(1);
	}

	.primary-menu > .menu-item-has-children > a {
		padding-right: 2px;
	}

	.primary-menu > li > .submenu-toggle {
		margin-right: 4px;
	}

	/* Tendina */
	.primary-menu .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 10;
		min-width: 240px;
		padding: 8px;
		background: var(--surf);
		border: 1px solid var(--line);
		border-radius: 0 0 var(--r) var(--r);
		box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-4px);
		transition: opacity 0.15s, transform 0.15s, visibility 0s linear 0.15s;
	}

	.primary-menu > li:hover > .sub-menu,
	.primary-menu > li:focus-within > .sub-menu,
	.primary-menu > li.is-open > .sub-menu {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition-delay: 0s;
	}

	.primary-menu .sub-menu a {
		padding: 9px 12px;
		border-radius: 8px;
		font-size: 0.75rem;
		font-weight: 600;
		letter-spacing: 0.03em;
		line-height: 1.35;
		color: #C9C9D2;
	}

	.primary-menu .sub-menu a:hover,
	.primary-menu .sub-menu .current-menu-item > a {
		background: var(--surf2);
		color: #fff;
	}

	/* Terzo livello in tendina semplice: elenco rientrato. */
	.primary-menu .sub-menu .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 0 12px;
		border: 0;
		box-shadow: none;
		background: none;
		visibility: inherit;
		opacity: 1;
		transform: none;
	}

	.primary-menu .sub-menu .submenu-toggle {
		display: none;
	}

	/* Pannello a colonne: voci con tre livelli (es. "I nostri tornei"). */
	.primary-menu > li:has(> .sub-menu > li > .sub-menu) {
		position: static;
	}

	.primary-menu > li:has(> .sub-menu > li > .sub-menu) > .sub-menu {
		left: var(--gutter);
		right: var(--gutter);
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
		gap: 8px 24px;
		padding: 20px;
	}

	.primary-menu > li:has(> .sub-menu > li > .sub-menu) > .sub-menu > li > a {
		margin-bottom: 4px;
		border-bottom: 1px solid var(--line);
		border-radius: 0;
		color: var(--red-hi);
		font-size: 0.8125rem;
		font-weight: 700;
		letter-spacing: 0.06em;
	}

	.primary-menu > li:has(> .sub-menu > li > .sub-menu) > .sub-menu > li > a:hover {
		background: none;
		color: #fff;
	}

	.primary-menu > li:has(> .sub-menu > li > .sub-menu) .sub-menu .sub-menu {
		padding: 0;
	}

	.primary-menu > li:has(> .sub-menu > li > .sub-menu) .sub-menu .sub-menu a {
		font-weight: 500;
	}
}

/* --- Mobile e tablet --- */
@media (max-width: 1239.98px) {
	.nav-toggle {
		display: block;
	}

	.site-nav {
		position: fixed;
		top: var(--nav-top, var(--header-h));
		left: 0;
		right: 0;
		bottom: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--ink);
		border-top: 1px solid var(--line);
		padding: 8px var(--gutter) 32px;
	}

	.nav-open .site-nav {
		display: flex;
	}

	.primary-nav {
		margin-left: 0;
	}

	.primary-menu li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		border-bottom: 1px solid #1C1C22;
	}

	.primary-menu a {
		flex: 1;
		padding: 14px 0;
		font-size: 0.9375rem;
		font-weight: 600;
		letter-spacing: 0.03em;
		color: #E4E4EA;
	}

	.primary-menu .current-menu-item > a {
		color: var(--red-hi);
	}

	.submenu-toggle {
		width: 44px;
		height: 44px;
	}

	.primary-menu .sub-menu {
		display: none;
		flex-basis: 100%;
		padding-left: 14px;
		border-left: 2px solid var(--line);
		margin-bottom: 10px;
	}

	.primary-menu .is-open > .sub-menu {
		display: block;
	}

	.primary-menu .sub-menu li {
		border-bottom: 0;
	}

	.primary-menu .sub-menu a {
		padding: 10px 0;
		font-size: 0.8125rem;
		color: #C9C9D2;
	}

	.header-actions {
		padding-top: 24px;
	}

	.header-actions .btn {
		flex: 1;
		min-height: 48px;
	}

	.ulmi-nav-open {
		overflow: hidden;
	}
}

/* ============ Footer ============ */

.site-footer {
	background: var(--ink);
	color: var(--dim);
	font-size: 0.875rem;
}

.footer-inner {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: 40px;
	max-width: calc(var(--wide) + 2 * var(--gutter));
	margin-inline: auto;
	padding: 56px var(--gutter) 40px;
}

.footer-brand .site-logo img {
	height: 44px;
}

.footer-tagline {
	margin: 16px 0 20px;
	color: #C9C9D2;
	line-height: 1.6;
}

.social-links {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-links a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--surf);
	color: #fff;
	transition: background-color 0.15s, border-color 0.15s;
}

.social-links a:hover {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
}

.footer-title {
	margin: 0 0 14px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.footer-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-menu li + li {
	margin-top: 8px;
}

.footer-menu a,
.footer-legal a {
	color: #C9C9D2;
	text-decoration: none;
}

.footer-menu a:hover,
.footer-legal a:hover {
	color: #fff;
	text-decoration: underline;
}

.footer-bottom {
	max-width: calc(var(--wide) + 2 * var(--gutter));
	margin-inline: auto;
	padding: 20px var(--gutter) 28px;
	border-top: 1px solid var(--line);
	color: var(--dim);
	font-size: 0.8125rem;
}

.footer-bottom p {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin: 0;
}

.footer-legal {
	display: flex;
	gap: 20px;
}

@media (max-width: 960px) {
	.footer-inner {
		grid-template-columns: 1fr 1fr;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.footer-inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

/* ============ Intestazioni di pagina ============ */

.entry-header,
.page-header {
	margin-bottom: clamp(24px, 4vw, 40px);
}

.entry-title,
.page-title {
	margin: 0;
	font-size: var(--fs-h1);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
	overflow-wrap: break-word;
}

.entry-meta {
	margin: 12px 0 0;
	color: var(--light-dim);
	font-size: var(--fs-small);
}

.entry-meta a {
	color: inherit;
}

.archive-description {
	margin-top: 12px;
	color: var(--light-dim);
	max-width: var(--measure);
}

.entry--prose > .entry-header,
.entry--prose > .entry-thumb,
.entry--prose > .entry-content {
	max-width: var(--measure);
	margin-inline: auto;
}

.entry-thumb {
	margin-top: 0;
	margin-bottom: clamp(24px, 4vw, 40px);
}

.entry-thumb img {
	display: block;
	width: 100%;
	border-radius: var(--r);
}

/* ============ Contenuti (the_content) ============ */

:where(.entry-content) {
	overflow-wrap: break-word;
}

:where(.entry-content) > :first-child {
	margin-top: 0;
}

:where(.entry-content) :where(p, ul, ol, dl, blockquote, figure, table, pre) {
	margin-block: 0 1.25em;
}

:where(.entry-content) :where(h1, h2, h3, h4, h5, h6) {
	margin-block: 1.6em 0.6em;
	line-height: 1.25;
	color: var(--light-txt);
}

:where(.entry-content) h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
:where(.entry-content) h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
:where(.entry-content) h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
:where(.entry-content) h4 { font-size: var(--fs-h4); font-weight: 600; line-height: 1.35; }
:where(.entry-content) :where(h5, h6) { font-size: 1rem; font-weight: 700; }

:where(.entry-content) :where(ul, ol) {
	padding-left: 1.4em;
}

:where(.entry-content) li + li {
	margin-top: 0.35em;
}

:where(.entry-content) li::marker {
	color: var(--red);
}

:where(.entry-content) blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--red);
	font-size: 1.125em;
	font-weight: 500;
}

:where(.entry-content) blockquote cite {
	display: block;
	margin-top: 8px;
	color: var(--light-dim);
	font-size: var(--fs-small);
	font-style: normal;
}

:where(.entry-content) hr {
	margin: 2.5em 0;
	border: 0;
	border-top: 1px solid var(--light-line);
}

:where(.entry-content) :where(code, kbd, pre) {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

:where(.entry-content) pre {
	overflow-x: auto;
	padding: 16px;
	border-radius: var(--r-sm);
	background: var(--light-bg);
}

:where(.entry-content) img {
	border-radius: 8px;
}

:where(.entry-content) :where(figure, .wp-caption) {
	margin-inline: 0;
	max-width: 100%;
}

:where(.entry-content) :where(figcaption, .wp-caption-text, .wp-element-caption) {
	margin-top: 8px;
	color: var(--light-dim);
	font-size: var(--fs-small);
	line-height: 1.5;
}

:where(.entry-content) .alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

:where(.entry-content) .alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

:where(.entry-content) .aligncenter {
	display: block;
	margin-inline: auto;
}

@media (max-width: 560px) {
	:where(.entry-content) :where(.alignleft, .alignright) {
		float: none;
		margin-inline: 0;
	}
}

.entry--prose .entry-content .alignwide {
	width: min(var(--wide), 100vw - 2 * var(--gutter));
	max-width: none;
	margin-inline: calc(50% - min(var(--wide), 100vw - 2 * var(--gutter)) / 2);
}

.entry--prose .entry-content .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

/* Tabelle */
:where(.entry-content) table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

:where(.entry-content) :where(th, td) {
	padding: 10px 12px;
	border-bottom: 1px solid var(--light-line);
	text-align: left;
	vertical-align: top;
}

:where(.entry-content) th {
	font-weight: 700;
}

:where(.entry-content) .wp-block-table {
	overflow-x: auto;
}

/* Embed, iframe e mappe */
:where(.entry-content) :where(iframe, embed, object) {
	max-width: 100%;
	border: 0;
}

:where(.entry-content) iframe[src*="google.com/maps"],
:where(.entry-content) iframe[src*="maps.google"] {
	width: 100%;
	min-height: 320px;
	border-radius: var(--r);
}

.wp-has-aspect-ratio .wp-block-embed__wrapper,
.wp-embed-responsive .wp-block-embed__wrapper {
	position: relative;
}

/* Pulsanti nel contenuto */
:where(.entry-content) :where(.wp-block-button__link, .button, button:not([class]), input[type="submit"]) {
	display: inline-block;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--r-sm);
	background: var(--red);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

:where(.entry-content) :where(.wp-block-button__link, .button, button:not([class]), input[type="submit"]):hover {
	background: var(--red-dk);
	color: #fff;
}

.page-links {
	margin-top: 2em;
	font-weight: 600;
}

/* ============ Card e liste ============ */

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 24px;
}

.card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--light-line);
	border-radius: var(--r);
	background: var(--light-panel);
	transition: box-shadow 0.15s, transform 0.15s;
}

.card:hover {
	box-shadow: 0 12px 30px rgba(23, 23, 28, 0.1);
}

.card-media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--light-bg);
	overflow: hidden;
}

.card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	background: linear-gradient(150deg, var(--surf2), var(--ink) 70%);
}

.card-media .card-placeholder img {
	width: 38%;
	height: auto;
	object-fit: contain;
	opacity: 0.5;
}

.card-body {
	padding: 18px 20px 22px;
}

.card .entry-meta {
	position: relative;
	z-index: 1;
	margin: 0 0 8px;
	font-size: 0.8125rem;
}

.card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.card-title a {
	color: var(--light-txt);
	text-decoration: none;
}

.card-title a:hover {
	color: var(--red-dk);
}

.card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.card {
	position: relative;
}

.card-excerpt {
	margin: 8px 0 0;
	color: var(--light-dim);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.no-results {
	color: var(--light-dim);
}

.pagination {
	margin-top: 40px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--light-line);
	border-radius: var(--r-sm);
	background: var(--light-panel);
	color: var(--light-txt);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.pagination .page-numbers:hover {
	border-color: var(--light-txt);
}

.pagination .page-numbers.current {
	border-color: var(--red);
	background: var(--red);
	color: #fff;
}

.search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
	margin-top: 16px;
}

.search-form label {
	flex: 1;
}

.search-form .search-field {
	width: 100%;
}

.search-form .search-submit {
	padding: 0 20px;
	border: 0;
	border-radius: var(--r-sm);
	background: var(--red);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.search-form .search-submit:hover {
	background: var(--red-dk);
}

/* ============ 404 ============ */

.error-404 {
	max-width: var(--measure);
	margin-inline: auto;
	padding-block: 40px;
	text-align: center;
}

.error-code {
	margin: 0 0 8px;
	color: var(--red);
	font-size: clamp(4rem, 3rem + 5vw, 7rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
}

.error-404 .page-title {
	margin-bottom: 12px;
}

/* ============ Campi modulo (generici ed Everest Forms) ============ */

:where(.entry-content, .search-form) :where(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="file"], [type="hidden"]), select, textarea),
.everest-forms .evf-field-container :where(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="file"], [type="hidden"]), select, textarea) {
	width: 100%;
	min-height: 46px;
	padding: 11px 14px;
	border: 1px solid var(--light-line);
	border-radius: var(--r-sm);
	background: var(--light-panel);
	color: var(--light-txt);
	font-size: 1rem;
	line-height: 1.4;
	box-shadow: none;
}

.everest-forms .evf-field-container textarea {
	min-height: 120px;
}

:where(.entry-content, .search-form) :where(input, select, textarea):focus,
.everest-forms .evf-field-container :where(input, select, textarea):focus {
	outline: none;
	border-color: var(--red);
	box-shadow: 0 0 0 3px rgba(228, 25, 43, 0.18);
}

.everest-forms .evf-field-label {
	color: var(--light-txt);
	font-size: 0.875rem;
	font-weight: 600;
}

.everest-forms .evf-field-description {
	color: var(--light-dim);
	font-size: 0.8125rem;
}

.everest-forms :where(input[type="checkbox"], input[type="radio"]) {
	accent-color: var(--red);
}

/* Gli stili per form di Everest usano #evf-ID: servono gli !important, solo sul pulsante di invio. */
.everest-forms .evf-submit-container :where(button, input[type="submit"]),
.everest-forms button.everest-forms-submit-button {
	padding: 13px 26px !important;
	border: 0 !important;
	border-radius: var(--r-sm) !important;
	background: var(--red) !important;
	color: #fff !important;
	font-size: 1rem !important;
	font-weight: 700;
	cursor: pointer;
}

.everest-forms .evf-submit-container :where(button, input[type="submit"]):hover,
.everest-forms button.everest-forms-submit-button:hover {
	background: var(--red-dk) !important;
	color: #fff !important;
}

.everest-forms .everest-forms-notice {
	border-radius: var(--r-sm);
}

/* ============ SportsPress ============ */

/* Fascia sponsor del modulo Sponsors: senza sponsor resta un blocco grigio vuoto. */
.sp-footer-sponsors:not(:has(a, img)) {
	display: none;
}

.sp-template {
	margin-bottom: 2rem;
}

.sp-table-caption,
.sp-template .sp-table-caption {
	margin: 0;
	padding: 12px 16px;
	border-radius: var(--r-sm) var(--r-sm) 0 0;
	background: var(--ink);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sp-table-caption a {
	color: #fff;
}

.sp-table-wrapper,
.sp-scrollable-table-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sp-data-table,
.sp-template table.sp-data-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border: 1px solid var(--light-line);
	background: var(--light-panel);
	color: var(--light-txt);
	font-size: 0.875rem;
	line-height: 1.4;
}

.sp-data-table thead th,
.sp-template .sp-data-table thead th {
	padding: 10px 12px;
	border-bottom: 1px solid var(--light-line);
	background: var(--light-bg);
	color: var(--light-dim);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.sp-data-table tbody td,
.sp-template .sp-data-table tbody td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--light-line);
	background: transparent;
	color: var(--light-txt);
}

.sp-data-table:not(.sp-tournament-bracket) tbody tr:nth-child(even) td {
	background: #FAFAFB;
}

.sp-data-table:not(.sp-tournament-bracket) tbody tr:hover td {
	background: #F1F1F4;
}

.sp-data-table tbody td {
	vertical-align: middle;
}

/* Su schermi stretti la tabella scorre in orizzontale invece di spezzare i nomi. */
@media (max-width: 760px) {
	.sp-data-table:not(.sp-tournament-bracket, .sp-event-blocks, .sp-event-list) :is(th, td) {
		white-space: nowrap;
	}

	/*
	 * Liste di partite: ogni riga diventa una scheda, così il campionato resta visibile
	 * senza scorrere. Campionato in alto, partita e risultato al centro, data in fondo.
	 */
	.sp-event-list thead {
		display: none;
	}

	.sp-event-list,
	.sp-event-list tbody {
		display: block;
	}

	.sp-event-list tbody tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"league league"
			"event  time"
			"date   date";
		gap: 4px 12px;
		padding: 12px 14px;
		border-bottom: 1px solid var(--light-line);
	}

	.sp-event-list tbody tr:nth-child(even) {
		background: #FAFAFB;
	}

	.sp-event-list.sp-data-table tbody td {
		padding: 0;
		border: 0;
		background: transparent !important;
	}

	.sp-event-list .data-league {
		grid-area: league;
		color: var(--light-dim);
		font-size: 0.75rem;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	.sp-event-list .data-event {
		grid-area: event;
	}

	.sp-event-list .data-time {
		grid-area: time;
		align-self: center;
		font-variant-numeric: tabular-nums;
		white-space: nowrap;
	}

	.sp-event-list .data-date {
		grid-area: date;
		font-size: 0.8125rem;
	}

	.sp-event-list .data-date a {
		color: var(--light-dim);
		font-weight: 400;
	}

	.sp-event-list :is(.data-venue, .data-season, .data-article, .data-day):not([style*="none"]) {
		grid-column: 1 / -1;
		color: var(--light-dim);
		font-size: 0.8125rem;
	}

	.sp-event-list :is(.data-venue, .data-season, .data-article, .data-day)[style*="none"] {
		display: none;
	}
}

.sp-data-table a {
	color: var(--light-txt);
	font-weight: 600;
	text-decoration: none;
}

.sp-data-table a:hover {
	color: var(--red-dk);
	text-decoration: underline;
}

.sp-data-table .data-rank,
.sp-data-table .data-number {
	width: 1%;
	font-weight: 700;
	text-align: center;
}

.sp-data-table .data-pts,
.sp-data-table td.data-goals {
	font-weight: 800;
}

.sp-data-table .team-logo img,
.sp-data-table .player-photo img {
	vertical-align: middle;
	border-radius: 4px;
}

.sp-template .sp-view-all-link {
	margin-top: 8px;
	text-align: right;
	font-size: var(--fs-small);
	font-weight: 600;
}

.sp-template-details dl,
.sp-list-wrapper dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 0;
}

.sp-template-details dt {
	color: var(--light-dim);
	font-weight: 600;
}

.sp-template-details dd {
	margin: 0;
}

.sp-template-photo img,
.sp-template-logo img {
	border-radius: var(--r);
}

/* Risultato evento */
.sp-event-results .data-outcome,
.sp-event-results .data-goals {
	font-weight: 800;
}

.sp-tab-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.sp-tab-menu-item a {
	display: block;
	padding: 8px 14px;
	border: 1px solid var(--light-line);
	border-radius: 20px;
	color: var(--light-txt);
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
}

.sp-tab-menu-item-active a {
	border-color: var(--red);
	background: var(--red);
	color: #fff;
}

/* ============ Coming soon (prima dell'apertura pubblica) ============ */
.cs-page {
	min-height: 100vh;
	margin: 0;
	background: var(--ink);
	color: var(--txt);
}

.cs {
	display: flex;
	box-sizing: border-box;
	min-height: 100vh;
	max-width: 560px;
	margin: 0 auto;
	padding: 48px 16px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.cs .site-logo img {
	width: 180px;
	height: auto;
}

.cs-title {
	margin: 28px 0 8px;
	color: #fff;
	font-size: var(--fs-h1);
	line-height: 1.1;
}

.cs-lead {
	margin: 0 0 28px;
	color: var(--txt);
	font-size: var(--fs-body);
}

.cs-count {
	display: grid;
	width: 100%;
	max-width: 400px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.cs-count[hidden] {
	display: none;
}

.cs-unit {
	padding: 14px 4px 10px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--surf);
}

.cs-unit b {
	display: block;
	color: #fff;
	font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}

.cs-unit small {
	color: var(--dim);
	font-size: 0.75rem;
}

.cs-follow {
	margin: 36px 0 10px;
	color: var(--dim);
	font-size: var(--fs-small);
}

.cs-social {
	justify-content: center;
}

.cs-staff {
	margin: 32px 0 0;
	font-size: var(--fs-small);
}

.cs-staff a {
	color: var(--dim);
}

.cs-staff a:hover,
.cs-staff a:focus-visible {
	color: #fff;
}

/* Barra per chi ha fatto l'accesso: uguale nel sito e nel Club, in chiaro e in scuro. */
.cs-bar {
	padding: 6px 16px;
	background: #17171C;
	color: #F4F4F6;
	font-size: 0.8125rem;
	line-height: 1.4;
	text-align: center;
}
