*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root { --navy: #00305A; }

body {
	font-family: 'DM Sans', sans-serif;
	background: #fff;
	color: var(--navy);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.5rem;
	text-align: center;
}


.page-header {
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(0,48,90,0.12);
}

.page-header .eyebrow {
	font-family: 'Syne', sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: rgba(0,48,90,0.4);
	text-transform: uppercase;
	margin-bottom: 0.6rem;
	margin-top: 50px;
}

.sottotitolo {
	font-family: 'Syne', sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: rgba(0,48,90,0.4);
	text-transform: uppercase;
	margin-bottom: 0.6rem;
	margin-top: 10px;
}

.page-header h1 {
	font-family: 'Syne', sans-serif;
	font-size: 1.7rem;
	font-weight: 800;
	color: var(--navy);
	line-height: 1.2;
}


.field-error {
	display: block;
	color: #c0392b;
	font-size: 0.8rem;
	margin-top: 0.25rem;
	min-height: 1em;
}

.status {
	font-size: 0.95rem;
	font-weight: 500;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	display: inline-block;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	width: 100%;
}


.status.ok {
	color: #155724;
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
}

.status.fail {
	color: #721c24;
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
}

.logo-wrap {
	margin-top: 3rem;
	margin-bottom: 2.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
}

.logo-wrap img {
	width: 220px;
	max-width: 70vw;
	display: block;
}

.btn-group {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	width: 100%;
	max-width: 260px;
	margin-bottom: 3rem;
}

.btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.9rem 1.4rem;
	background: var(--navy);
	color: #fff;
	text-decoration: none;
	font-family: 'Syne', sans-serif;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	border: 2px solid var(--navy);
	transition: opacity 0.2s;
}

.btn:hover {
	opacity: 0.8;
}
.btn span {
	font-size: 1rem;
	opacity: 0.6;
}

.btn-2 {
	flex-grow: 1;
	text-align: center;
	display: inline-flex;
	justify-content: center;
	align-items: center;
}

.button-container {
	display: flex;
	justify-content: center;
	width: 100%;
	gap: 20px;
	margin-top: 40px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.sep {
	width: 2rem;
	height: 1px;
	background: rgba(0,48,90,0.18);
	margin-bottom: 2rem;
}

.contacts {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.65rem;
}

.contacts.index {
	align-items: start;
}

.contact-item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	font-size: 0.875rem;
	color: rgb(0,48,90);
	text-decoration: none;
	transition: color 0.2s;
	width: fit-content;
}

a.contact-item:hover {
	color: var(--navy);
}

.contact-item svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	stroke: var(--navy);
	opacity: 0.45;
}

nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	background: var(--navy);
	color: rgb(255, 255, 255);
	padding: 1.25rem 1.5rem;
	font-size: 0.78rem;
	line-height: 1.8;
}

nav .nav-link a, footer a {
	color: rgb(211, 211, 211);
	text-decoration: none;
	transition: 0.5s
}

nav .nav-link a:hover, footer a:hover {
	color: white;
	transition: 0.5s;
}

.nav-link {
	display: flex;
	gap: 15px;
}

.nav-logo {
	display: flex;
	justify-content: start;
	width: fit-content;
}

.nav-logo img {
	height: 35px;
	width: auto;
}


footer {
	background: var(--navy);
	color: rgba(255,255,255,0.55);
	text-align: center;
	padding: 1.25rem 1.5rem;
	font-size: 0.78rem;
	line-height: 1.8;
}

footer strong {
	color: rgba(255,255,255,0.9);
	font-weight: 500;
}



/* Section grouping */
.form-section {
	margin-bottom: 2.5rem;
}

.section-label {
	font-family: 'Syne', sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgb(0,48,90);
	margin-bottom: 1.1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(0,48,90,0.5);
}

/* Field grid */
.fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 1.25rem;
}

.fields.full {
	grid-template-columns: 1fr;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.field.span2 {
	grid-column: span 2;
}

label {
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: rgb(0,48,90);
	text-transform: uppercase;
}

input {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1.5px solid rgba(0,48,90,0.4);
	background: #fff;
	color: var(--navy);
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9rem;
	font-weight: 400;
	outline: none;
	transition: border-color 0.2s;
	border-radius: 0;
	-webkit-appearance: none;
}

input:focus {
	border-color: var(--navy);
}

input::placeholder {
	color: rgba(0,48,90,0.25);
	font-size: 0.85rem;
}

/* Submit button */
.submit-wrap {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0,48,90,0.12);
	display: flex;
	flex-direction: column;
	gap: 10px;
	justify-content: flex-end;
	align-items: end;
}

.btn-submit {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 2rem;
	background: var(--navy);
	color: #fff;
	font-family: 'Syne', sans-serif;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 2px solid var(--navy);
	cursor: pointer;
	transition: opacity 0.2s;
	text-decoration: none;
	width: fit-content;
}

.btn-submit:hover {
	opacity: 0.8;
}
.btn-submit .arrow {
	font-size: 1rem;
	opacity: 0.6;
}

/* Note */
.note {
	font-size: 0.75rem;
	color: rgba(0,48,90,0.4);
	margin-top: 1rem;
	text-align: right;
	line-height: 1.6;
}


@media (max-width: 560px) {
	.fields {
		grid-template-columns: 1fr;
	}
	.field.span2 {
		grid-column: span 1;
	}
	main {
		padding-top: 6rem;
	}
}


.privacy {
	text-transform: none;
	font-size: 0.85rem;
	font-weight: 400;
	letter-spacing: normal;
	color: var(--navy);
}

.privacy a {
	color: var(--navy);
	text-decoration: underline;
}

#privacy_consent {
	width: auto;
	margin-top: 0.2rem;
	flex-shrink: 0;
}

input[type="checkbox"] {
	width: 18px;
	height: 18px;
	padding: 0;
	border: 1.5px solid rgba(0,48,90,0.35);
	-webkit-appearance: checkbox;
	appearance: checkbox;
	accent-color: var(--navy);
	cursor: pointer;
	flex-shrink: 0;
	margin-top: 0.15rem;
}


.form-section p {
	font-size: 0.92rem;
	line-height: 1.75;
	color: rgba(0,48,90,0.85);
	margin-bottom: 0.9rem;
}

.page-wrap {
	width: 100%;
	max-width: 760px;
}


.form-section p:last-child { 
	margin-bottom: 0;
}

.form-section ul {
	list-style: none;
	margin: 0.9rem 0;
	padding-left: 0;
}

.form-section ul li {
	font-size: 0.92rem;
	line-height: 1.75;
	color: rgba(0,48,90,0.85);
	padding-left: 1.2rem;
	position: relative;
	margin-bottom: 0.4rem;
}

.form-section ul li::before {
	content: "—";
	position: absolute;
	left: 0;
	color: rgba(0,48,90,0.4);
}

.form-section ul ul {
	margin: 0.4rem 0 0.6rem 0;
}

  .form-section ul ul { margin: 0.4rem 0 0.6rem 0; }

.contact-card {
	background: rgba(0,48,90,0.04);
	border: 1.5px solid rgba(0,48,90,0.15);
	padding: 1.5rem 1.75rem;
}

.contact-card .row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.9rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid rgba(0,48,90,0.08);
}

.contact-card .row:last-child {
	border-bottom: none;
}

.contact-card .row .key {
	font-family: 'Syne', sans-serif;
	font-weight: 700;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(0,48,90,0.55);
}

.contact-card .row .val {
	text-align: right;
	color: var(--navy);
}

.contact-card .row .val a, a {
	color: var(--navy);
	text-decoration: underline;
}

@media (max-width: 560px) {
	main {
		padding-top: 6rem;
	}
	.contact-card .row {
		flex-direction: column;
		gap: 0.2rem;
	}
	.contact-card .row .val {
		text-align: left;
	}
}








.img-lettereonline {
	width: 100%;
}

.index-lettere-container {
	/* ora SOLO la foto, il blu/giallo non è più qui */
	background-image: url(/img/img_lettere_1.jpg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	width: 50%;
	height: 50vh;
	margin-bottom: -2rem;
	display: flex;
	justify-content: end;
	align-items: center;
	color: #fff;
	overflow: hidden;
	position: relative;
}

.oblique-box {
	position: absolute;
	top: 0;
	right: -10%;
	width: 65%;
	height: 100%;

	transform-origin: top left;
	transform: translateX(100%) skewX(-20deg);
	opacity: 0;

	animation: slideInBox 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	animation-delay: 0.15s;
}

.oblique-box::before {
	content: '';
	position: absolute;
	top: 0;
	right: -15%;   /* overshoot extra SOLO per lo sfondo */
	width: 130%;   /* più largo del box per coprire l'angolo obliquo */
	height: 100%;
	background-color: rgba(0, 102, 255, 0.6);
	border-left: 10px solid #ffcc00;
	box-sizing: border-box;
	z-index: 0;
}

.banner-content {
	position: relative; /* serve per stare sopra il ::before (z-index) */
	z-index: 1;
	height: 100%;
	padding: 2rem 4rem 2rem 4rem;
	box-sizing: border-box;
	transform: skewX(20deg);
	text-align: right;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
}

@keyframes slideInBox {
	from {
		transform: translateX(100%) skewX(-20deg);
		opacity: 0;
	}
	to {
		transform: translateX(0) skewX(-20deg);
		opacity: 1;
	}
}

.logo-cassa-index {
	width: 30%;
}

.index-lettere-title {
	text-align: right;
	line-height: 1.1;
	margin-top: 2rem;
	margin-bottom: auto;
}

.index-lettere-subtitle {
	text-align: right;
	line-height: 1.1;
}

.index-lettere-subtitle a {
	color: white;
	text-decoration: none;
	cursor: pointer;
}

@media (max-width: 990px) {
	.index-lettere-container {
		width: 100%;
	}
	
	.logo-cassa-index {
		width: 70%;
	}
	
	.index-lettere-title {
		font-size: 1.5rem;
	}

	.oblique-box {
		width: 80%;   /* torna alle dimensioni originali del box-contenuto */
		transform: translateX(100%) skewX(-10deg);
		animation: slideInBoxMobile 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
		animation-delay: 0.15s;
	}

	.oblique-box::before {
		right: -15%;
		width: 130%;
	}

	@keyframes slideInBoxMobile {
		from {
			transform: translateX(100%) skewX(-10deg);
			opacity: 0;
		}
		to {
			transform: translateX(0) skewX(-10deg);
			opacity: 1;
		}
	}

	.banner-content {
		transform: skewX(10deg);
		padding: 2rem 1rem 2rem 2rem;
	}

	.logo-wrap {
		justify-content: center;
	}

	.contacts.index {
		align-items: center;
	}

	.nav-logo img {
		width: 35px;
	}
}







	
/* MODALE CHIUSURA ESTIVA */

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.hidden {
	opacity: 0;
	visibility: hidden;
}

.modal {
	background: #ffffff;
	border-radius: 10px;
	padding: 2rem;
	max-width: 420px;
	width: calc(100% - 2.5rem);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
	transform: translateY(0);
	transition: transform 0.2s ease;
}

.modal-overlay.hidden .modal {
	transform: translateY(-16px);
}

.modal h2 {
	margin-top: 0;
}

.modal-close-btn {
	margin-top: 1rem;
	padding: 0.6rem 1.4rem;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	cursor: pointer;
}

.modal-close-btn:hover {
	background: #1d4ed8;
}

.modal-close-btn:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 2px;
}

.btn-modal-container {
	width: 100%;
	display: flex;
	justify-content: center;
}
