/* =========================
V5-NAVY — CSS COMPLETO
(fix: niente scacchiera, gradient continuo senza “ripartenze”)
========================= */

/* Fallback (non essenziale, ma innocuo) */
@viewport {
	width: device-width;
	zoom: 1;
}

:root {
	/* Dominante BLU SCURO */
	--bg: #081427; /* navy profondo */
	--bg2: #0b1f3a; /* navy più “vivo” per gradienti */

	/* Superfici */
	--card: rgba(255, 255, 255, .06);
	--card2: rgba(255, 255, 255, .08);

	/* Testi */
	--text: rgba(255, 255, 255, .92);
	--muted: rgba(255, 255, 255, .72);

	/* UI */
	--border: rgba(255, 255, 255, .12);
	--shadow: 0 14px 40px rgba(0, 0, 0, .35);

	/* Accenti */
	--accent: #d4b04c; /* oro (CTA) */
	--accent-2: #2b71ff; /* blu acceso (hover/links) */
	--accent-3: #0fb37a; /* verde (tag) */

	/* Layout */
	--max: 1120px;
	--r2: 24px;
}

* {
	box-sizing: border-box;
}

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	min-height: 100%;
	background: var(--bg); /* base piatta: il gradient vero è su body::before */
}

body {
	margin: 0;
	min-width: 320px;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
	color: var(--text);
	line-height: 1.5;

	background: transparent;

	/* crea contesto per il layer di sfondo */
	position: relative;
	z-index: 0;
}

/* =========================
   SFONDO: GRADIENT UNICO FIXED
   (nessuna scacchiera, nessuna discontinuità)
   ========================= */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;

	background-repeat: no-repeat;
	background-size: cover;

	background: radial-gradient(1200px 600px at 10% 10%, rgba(43, 113, 255, .18), transparent 60%),
	radial-gradient(900px 500px at 85% 0%, rgba(212, 176, 76, .12), transparent 55%),
	radial-gradient(900px 500px at 90% 90%, rgba(15, 179, 122, .10), transparent 55%),
	linear-gradient(180deg, var(--bg2), var(--bg));
}


body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;

	background-image: url("/img/chess-pattern.png");
	background-repeat: repeat;

	/* pezzi MOLTO più radi */
	background-size: 420px 420px;

	/* posizione leggermente sfalsata */
	background-position: 40px 60px;

	/* trasparenza globale */
	opacity: 0.06;

	/* evita effetti strani sui colori */
	mix-blend-mode: normal;
}


/* Link */
a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Skip link accessibile */
.skip {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip:focus {
	left: 16px;
	top: 16px;
	width: auto;
	height: auto;
	padding: 10px 12px;
	background: #fff;
	color: #000;
	border-radius: 10px;
	z-index: 9999;
}

/* Container */
.container {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 18px;
}

/* =========================
   HEADER / NAV
   ========================= */
header {
	position: sticky;
	top: 0;
	z-index: 50;

	/* importante: non “tagliare” lo sfondo */
	background: rgba(8, 20, 39, .70);
	border-bottom: 1px solid var(--border);

	/* blur (con fallback stabile) */
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
	header {
		background: rgba(8, 20, 39, .86);
	}
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 0;
	flex: 1;
}

header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 220px;
}

.brand img {
	height: 60px;
	width: auto;
	display: block;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35));
}

.brand .title {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.brand .title strong {
	font-size: 14px;
	letter-spacing: .3px;
	text-transform: uppercase;
	white-space: nowrap;
}

.brand .title span {
	font-size: 12px;
	color: var(--muted);
}

.brand:hover {
	text-decoration: none;
}

nav {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

nav a {
	padding: 10px 12px;
	border-radius: 999px;
	border: 1px solid transparent;
	color: var(--muted);
	font-size: 14px;
	white-space: nowrap;
}

nav a:hover {
	border-color: var(--border);
	background: rgba(255, 255, 255, .05);
	color: var(--text);
	text-decoration: none;
}

nav a[aria-current="page"] {
	color: var(--text);
	border-color: rgba(43, 113, 255, .40);
	background: rgba(43, 113, 255, .14);
}

.menuBtn {
	display: none;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, .05);
	color: var(--text);
	cursor: pointer;
}

/* =========================
   HERO
   ========================= */
.hero {
	padding: 34px 0 18px;
}

.heroGrid {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 18px;
	align-items: stretch;
}

.heroCard {
	background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
	border: 1px solid var(--border);
	border-radius: var(--r2);
	box-shadow: var(--shadow);
	overflow: hidden;
	position: relative;
	padding: 22px;
}

.heroCard::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(700px 250px at 10% 10%, rgba(43, 113, 255, .22), transparent 60%),
	radial-gradient(700px 250px at 70% 0%, rgba(212, 176, 76, .14), transparent 55%);
	pointer-events: none;
}

.heroCard > * {
	position: relative;
}

.kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--muted);
	padding: 8px 10px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, .22);
	width: fit-content;
}

.dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 4px rgba(212, 176, 76, .18);
}

h1 {
	margin: 14px 0 8px;
	font-size: clamp(28px, 3.4vw, 42px);
	line-height: 1.15;
	letter-spacing: -0.5px;
}

.lead {
	margin: 0;
	color: var(--muted);
	font-size: 16px;
	max-width: 60ch;
}

.ctaRow {
	margin-top: 16px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

/* Bottoni */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, .05);
	color: var(--text);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}

.btn:hover {
	text-decoration: none;
	background: rgba(255, 255, 255, .08);
}

.btn:focus-visible {
	outline: 3px solid rgba(43, 113, 255, .60);
	outline-offset: 3px;
}

.btnPrimary {
	background: rgba(212, 176, 76, .18);
	border-color: rgba(212, 176, 76, .40);
}

.btnPrimary:hover {
	background: rgba(212, 176, 76, .25);
}

.btnGhost {
	background: rgba(0, 0, 0, .18);
}

/* Hero foto */
.heroPhoto {
	border-radius: var(--r2);
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	overflow: hidden;
	position: relative;
	background: rgba(255, 255, 255, .03);
	min-height: 320px;
}

.heroPhoto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: saturate(1.02) contrast(1.08);
}

.heroPhoto::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8, 20, 39, .30), rgba(8, 20, 39, .60));
	pointer-events: none;
}

.photoLabel {
	position: absolute;
	left: 14px;
	bottom: 14px;
	z-index: 1;
	font-size: 12px;
	color: rgba(255, 255, 255, .82);
	border: 1px solid rgba(255, 255, 255, .18);
	background: rgba(0, 0, 0, .22);
	padding: 8px 10px;
	border-radius: 999px;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* =========================
   CONTENUTI
   ========================= */
main {
	padding: 18px 0 48px;
	background: transparent; /* non interrompere gradient */
}

.sectionTitle {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin: 28px 0 12px;
}

.sectionTitle h2 {
	margin: 0;
	font-size: 20px;
	letter-spacing: -0.2px;
}

.sectionTitle a {
	font-size: 14px;
	color: var(--muted);
}

.sectionTitle a:hover {
	color: rgba(255, 255, 255, .9);
}

.grid3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.card {
	background: rgba(255, 255, 255, .05);
	border: 1px solid var(--border);
	border-radius: var(--r2);
	padding: 16px;
	box-shadow: var(--shadow);
}

.card h3 {
	margin: 0 0 6px;
	font-size: 16px;
}

.card p {
	margin: 0 0 10px;
	color: var(--muted);
	font-size: 14px;
}

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

.listItem {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px;
	border-radius: 16px;
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, .14);
}

.pill {
	min-width: 88px;
	text-align: center;
	border-radius: 999px;
	padding: 8px 10px;
	font-size: 12px;
	border: 1px solid var(--border);
	color: var(--muted);
	background: rgba(255, 255, 255, .04);
}

.pill.upcoming {
	border-color: rgba(15, 179, 122, .40);
	background: rgba(15, 179, 122, .14);
	color: rgba(255, 255, 255, .86);
}

.pill.past {
	border-color: rgba(43, 113, 255, .38);
	background: rgba(43, 113, 255, .14);
	color: rgba(255, 255, 255, .86);
}

.pill.ongoing {
	border-color: rgba(212, 176, 76, .40);
	background: rgba(212, 176, 76, .14);
	color: rgba(255, 255, 255, .86);
}

.meta strong {
	display: block;
	font-size: 14px;
}

.meta small {
	display: block;
	color: var(--muted);
	margin-top: 2px;
}

/* Callout */
.callout {
	margin-top: 18px;
	padding: 18px;
	border-radius: var(--r2);
	border: 1px solid rgba(43, 113, 255, .40);
	background: linear-gradient(180deg, rgba(43, 113, 255, .18), rgba(255, 255, 255, .04));
	box-shadow: var(--shadow);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}

.callout h3 {
	margin: 0 0 2px;
	font-size: 16px;
}

.callout p {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
}

/* =========================
   FOOTER (trasparente: non taglia il gradient)
   ========================= */
footer {
	border-top: 1px solid var(--border);
	padding: 22px 0;
	color: var(--muted);
	background: transparent;
}

.footerGrid {
	display: grid;
	grid-template-columns: 1.2fr .8fr .8fr;
	gap: 14px;
	align-items: start;
}

.footerGrid h4 {
	margin: 0 0 8px;
	color: var(--text);
	font-size: 14px;
}

.footerGrid a {
	color: var(--muted);
	font-size: 14px;
}

.footerGrid a:hover {
	color: rgba(255, 255, 255, .92);
	text-decoration: underline;
}

.socialRow {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.socialBtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, .05);
	color: var(--text);
	font-size: 14px;
}

.socialBtn:hover {
	text-decoration: none;
	background: rgba(43, 113, 255, .16);
	border-color: rgba(43, 113, 255, .30);
}

.tiny {
	margin-top: 14px;
	font-size: 12px;
	color: rgba(255, 255, 255, .55);
}

/* =========================
   RESPONSIVE (mobile reale)
   ========================= */
@media (max-width: 980px) {
	.heroGrid {
		grid-template-columns: 1fr;
	}

	.grid3 {
		grid-template-columns: 1fr;
	}

	.footerGrid {
		grid-template-columns: 1fr;
	}

	nav {
		display: none;
	}

	nav.open {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
		padding: 0 0 12px;
	}

	nav a {
		border-radius: 14px;
		font-size: 15px;
	}

	.menuBtn {
		display: inline-flex;
	}

	.heroPhoto {
		min-height: 220px;
	}

	.brand {
		min-width: unset;
	}

	/* testi più grandi su smartphone */
	body {
		font-size: 16px;
	}

	.brand .title strong {
		font-size: 15px;
	}

	.brand .title span {
		font-size: 13px;
	}

	.lead {
		font-size: 17px;
	}

	.pill {
		font-size: 13px;
	}

	.meta small {
		font-size: 14px;
	}

	.photoLabel {
		font-size: 13px;
	}

	.tiny {
		font-size: 13px;
	}

	/* header: una riga sola */
	header .container {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.topbar {
		display: flex;
		flex-wrap: nowrap; /* <-- niente a capo */
		align-items: center;
		gap: 10px;
		width: 100%;
	}

	/* brand: può restringersi */
	.brand {
		flex: 1 1 auto;
		min-width: 0; /* fondamentale: permette shrink */
		gap: 10px;
	}

	/* logo un filo più piccolo su mobile */
	.brand img {
		height: 46px;
		flex: 0 0 auto;
	}

	/* testo brand: consente wrap e non spinge il pulsante fuori */
	.brand .title {
		min-width: 0;

	}

	.brand .title strong {
		font-size: 13px;
		line-height: 1.1;
		display: -webkit-box;
		-webkit-line-clamp: 2; /* max 2 righe */
		-webkit-box-orient: vertical;
		overflow: hidden;
		white-space: nowrap;
	}

	.brand .title span {
		font-size: 12px;
		line-height: 1.2;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis; /* taglia elegante */
	}

	/* bottone menu: fisso a destra, non va a capo */
	.menuBtn {
		display: inline-flex;
		flex: 0 0 auto;
		white-space: nowrap;
		padding: 10px 12px;
		border-radius: 14px;
	}

	/* nav chiuso */
	nav {
		display: none;
	}

	/* nav aperto: scende sotto e sposta il contenuto */
	nav.open {
		display: flex;
		flex-direction: column;
		align-items: stretch;

		/* Nel flusso del documento per spingere il contenuto */
		position: relative;
		width: 100%;

		padding: 0px 10px;
		border: 0px solid var(--border);
		border-radius: 16px;
		background: rgba(8, 20, 39, .92);
		box-shadow: none;

		overflow: hidden;
		z-index: 999;

		/* Reset stili desktop che potrebbero interferire */
		justify-content: flex-start;

		/* Animazione */
		max-height: 0;
		margin-top: 0;
		opacity: 0;
		transition: all 0.3s ease-in-out;
	}

	nav.open.active {
		max-height: 500px; /* valore sufficiente per contenere il menu */
		padding: 10px;
		margin-top: 10px;
		margin-bottom: 15px;
		border-width: 1px;
		opacity: 1;
		box-shadow: var(--shadow);
	}

	nav.open a {
		width: 100%;
		white-space: normal;
		text-align: left;
	}

	header {
		position: sticky;
	}

	/* .container{ position: relative; }  <-- Rimosso o commentato perché con position static del nav non serve più per il menu assoluto */
	.topbar {
		position: relative;
	}

}


.mediaFull {
	width: 100%;
	margin: 0 0 15px;
}

.mediaHalfRight {
	width: 50%;
	float: right;
	margin: 0 0 15px 15px;
}

.mediaHalfLeft {
	width: 50%;
	float: left;
	margin: 0 15px 15px 0;
}
@media (max-width: 980px){
	.mediaHalfRight, .mediaHalfLeft {
		width: 100%;
		float: none;
		margin: 0 0 15px;
	}
}


.mediaHalfRight, .mediaHalfLeft, .mediaFull {
	border-radius: var(--r2);
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	overflow: hidden;
	position: relative;
	background: rgba(255, 255, 255, .03);
	/*min-height: 320px;*/
}
/*
.heroPhoto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: saturate(1.02) contrast(1.08);
}
*/
.mediaHalfRight::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8, 20, 39, .10), rgba(8, 20, 39, .60));
	pointer-events: none;
}

.eps_contact_form textarea, .eps_contact_form input[type=text] {
	width: 50%;
	border-radius: 5px;
	padding: 5px;
}
@media (max-width: 980px){
	.eps_contact_form textarea, .eps_contact_form input[type=text] {
		width: 100%;
	}
}

.eps_contact_form input[type=submit] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid rgba(212, 176, 76, .40);
	background: rgba(212, 176, 76, .18);
	color: var(--text);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.eps_contact_form input[type=submit]:hover {
	text-decoration: none;
	background: rgba(212, 176, 76, .25);
}

.eps_contact_form input[type=submit]:focus-visible {
	outline: 3px solid rgba(43, 113, 255, .60);
	outline-offset: 3px;
}