/* --- COMPONENTI: BOTTONI, FORM, ICONE, TABELLE --- */
/* Form */

form {
	margin: 0 0 2em 0;
}

form> :last-child {
	margin-bottom: 0;
}

form>.fields {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	-moz-flex-wrap: wrap;
	-webkit-flex-wrap: wrap;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	width: calc(100% + 3em);
	margin: -1.5em 0 2em -1.5em;
}

form>.fields>.field {
	-moz-flex-grow: 0;
	-webkit-flex-grow: 0;
	-ms-flex-grow: 0;
	flex-grow: 0;
	-moz-flex-shrink: 0;
	-webkit-flex-shrink: 0;
	-ms-flex-shrink: 0;
	flex-shrink: 0;
	padding: 1.5em 0 0 1.5em;
	width: calc(100% - 1.5em);
}

form>.fields>.field.half {
	width: calc(50% - 0.75em);
}

form>.fields>.field.third {
	width: calc(100%/3 - 0.5em);
}

form>.fields>.field.quarter {
	width: calc(25% - 0.375em);
}

@media screen and (max-width: 480px) {

	form>.fields {
		width: calc(100% + 3em);
		margin: -1.5em 0 2em -1.5em;
	}

	form>.fields>.field {
		padding: 1.5em 0 0 1.5em;
		width: calc(100% - 1.5em);
	}

	form>.fields>.field.half {
		width: calc(100% - 1.5em);
	}

	form>.fields>.field.third {
		width: calc(100% - 1.5em);
	}

	form>.fields>.field.quarter {
		width: calc(100% - 1.5em);
	}

}

label {
	color: #ffffff;
	display: block;
	font-family: Raleway, Helvetica, sans-serif;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.1em;
	margin: 0 0 0.7em 0;
	text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.025);
	border-radius: 5px;
	border: none;
	border: solid 2px rgba(255, 255, 255, 0.125);
	color: inherit;
	display: block;
	outline: 0;
	padding: 0 1em;
	text-decoration: none;
	width: 100%;
}

input[type="text"]:invalid,
input[type="password"]:invalid,
input[type="email"]:invalid,
input[type="tel"]:invalid,
select:invalid,
textarea:invalid {
	box-shadow: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
	border-color: #5b6ba6;
}

select {
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' preserveAspectRatio='none' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.2-0.2,0.5-0.4,0.9-0.4c0.3,0,0.6,0.1,0.9,0.4l3.3,3.3c0.2,0.2,0.4,0.5,0.4,0.9 c0,0.4-0.1,0.6-0.4,0.9L20.7,31.9c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4L4.3,17.3c-0.2-0.2-0.4-0.5-0.4-0.9 c0-0.4,0.1-0.6,0.4-0.9l3.3-3.3c0.2-0.2,0.5-0.4,0.9-0.4S9.1,12.1,9.4,12.3z' fill='rgba(255, 255, 255, 0.125)' /%3E%3C/svg%3E");
	background-size: 1.25rem;
	background-repeat: no-repeat;
	background-position: calc(100% - 1rem) center;
	height: 2.75em;
	padding-right: 2.75em;
	text-overflow: ellipsis;
}

select option {
	color: #ffffff;
	background: var(--BODY_COLOR);
}

select:focus::-ms-value {
	background-color: transparent;
}

select::-ms-expand {
	display: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
	height: 2.75em;
}

textarea {
	padding: 0.75em 1em;
}

input[type="checkbox"],
input[type="radio"] {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
	display: block;
	float: left;
	margin-right: -2em;
	opacity: 0;
	width: 1em;
	z-index: -1;
}

input[type="checkbox"]+label,
input[type="radio"]+label {
	text-decoration: none;
	color: #ffffff;
	cursor: pointer;
	display: inline-block;
	font-size: 1em;
	font-family: "Source Sans Pro", Helvetica, sans-serif;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 300;
	padding-left: 2.4em;
	padding-right: 0.75em;
	position: relative;
}

input[type="checkbox"]+label:before,
input[type="radio"]+label:before {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
	text-transform: none !important;
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
}

input[type="checkbox"]+label:before,
input[type="radio"]+label:before {
	background: rgba(255, 255, 255, 0.025);
	border-radius: 5px;
	border: solid 2px rgba(255, 255, 255, 0.125);
	content: '';
	display: inline-block;
	font-size: 0.8em;
	height: 2.0625em;
	left: 0;
	line-height: 2.0625em;
	position: absolute;
	text-align: center;
	top: 0;
	width: 2.0625em;
}

input[type="checkbox"]:checked+label:before,
input[type="radio"]:checked+label:before {
	background: #ffffff;
	border-color: #ffffff;
	content: '\f00c';
	color: var(--BODY_COLOR);
}

input[type="checkbox"]:focus+label:before,
input[type="radio"]:focus+label:before {
	border-color: var(--MENU_COLOR);
}

input[type="checkbox"]+label:before {
	border-radius: 5px;
}

input[type="radio"]+label:before {
	border-radius: 100%;
}

::-webkit-input-placeholder {
	color: rgba(255, 255, 255, 0.35) !important;
	opacity: 1.0;
}

:-moz-placeholder {
	color: rgba(255, 255, 255, 0.35) !important;
	opacity: 1.0;
}

::-moz-placeholder {
	color: rgba(255, 255, 255, 0.35) !important;
	opacity: 1.0;
}

:-ms-input-placeholder {
	color: rgba(255, 255, 255, 0.35) !important;
	opacity: 1.0;
}

/* Box */

.box {
	border-radius: 5px;
	border: solid 2px rgba(255, 255, 255, 0.125);
	margin-bottom: 2em;
	padding: 1.5em;
}

.box> :last-child,
.box> :last-child> :last-child,
.box> :last-child> :last-child> :last-child {
	margin-bottom: 0;
}

.box.alt {
	border: 0;
	border-radius: 0;
	padding: 0;
}

/* Icon */

.icon {
	text-decoration: none;
	border-bottom: none;
	position: relative;
}

.icon:before {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
	text-transform: none !important;
	font-family: 'Font Awesome 5 Free';
	font-weight: 400;
}

.icon>.label {
	display: none;
}

.icon:before {
	line-height: inherit;
}

.icon.solid:before {
	font-weight: 900;
}

.icon.brands:before {
	font-family: 'Font Awesome 5 Brands';
}

/* Image */

.image {
	border-radius: 5px;
	border: 0;
	display: inline-block;
	position: relative;
}

.image img {
	border-radius: 5px;
	display: block;
}

.image.left,
.image.right {
	max-width: 40%;
}

.image.left img,
.image.right img {
	width: 100%;
}

.image.left {
	float: left;
	padding: 0 1.5em 1em 0;
	top: 0.25em;
}

.image.right {
	float: right;
	padding: 0 0 1em 1.5em;
	top: 0.25em;
}

.image.fit {
	display: block;
	margin: 0 0 2em 0;
	width: 100%;
}

.image.fit img {
	width: 100%;
}

.image.main {
	display: block;
	margin: 0 0 3em 0;
	width: 100%;
}

.image.main img {
	width: 100%;
}

/* List */

ol {
	list-style: decimal;
	margin: 0 0 2em 0;
	padding-left: 1.25em;
}

ol li {
	padding-left: 0.25em;
}

ul {
	list-style: disc;
	margin: 0 0 2em 0;
	padding-left: 1em;
}

ul li {
	padding-left: 0.5em;
}

ul.alt {
	list-style: none;
	padding-left: 0;
}

ul.alt li {
	border-top: solid 1px rgba(255, 255, 255, 0.125);
	padding: 0.5em 0;
}

ul.alt li:first-child {
	border-top: 0;
	padding-top: 0;
}

dl {
	margin: 0 0 2em 0;
}

dl dt {
	display: block;
	font-weight: 600;
	margin: 0 0 1em 0;
}

dl dd {
	margin-left: 2em;
}

/* Actions */

ul.actions {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	cursor: default;
	list-style: none;
	margin-left: -1em;
	padding-left: 0;
}

ul.actions li {
	padding: 0 0 0 1em;
	vertical-align: middle;
}

ul.actions.special {
	-moz-justify-content: center;
	-webkit-justify-content: center;
	-ms-justify-content: center;
	justify-content: center;
	width: 100%;
	margin-left: 0;
}

ul.actions.special li:first-child {
	padding-left: 0;
}

ul.actions.stacked {
	-moz-flex-direction: column;
	-webkit-flex-direction: column;
	-ms-flex-direction: column;
	flex-direction: column;
	margin-left: 0;
}

ul.actions.stacked li {
	padding: 1.3em 0 0 0;
}

ul.actions.stacked li:first-child {
	padding-top: 0;
}

ul.actions.fit {
	width: calc(100% + 1em);
}

ul.actions.fit li {
	-moz-flex-grow: 1;
	-webkit-flex-grow: 1;
	-ms-flex-grow: 1;
	flex-grow: 1;
	-moz-flex-shrink: 1;
	-webkit-flex-shrink: 1;
	-ms-flex-shrink: 1;
	flex-shrink: 1;
	width: 100%;
}

ul.actions.fit li>* {
	width: 100%;
}

ul.actions.fit.stacked {
	width: 100%;
}

@media screen and (max-width: 480px) {

	ul.actions:not(.fixed) {
		-moz-flex-direction: column;
		-webkit-flex-direction: column;
		-ms-flex-direction: column;
		flex-direction: column;
		margin-left: 0;
		width: 100% !important;
	}

	ul.actions:not(.fixed) li {
		-moz-flex-grow: 1;
		-webkit-flex-grow: 1;
		-ms-flex-grow: 1;
		flex-grow: 1;
		-moz-flex-shrink: 1;
		-webkit-flex-shrink: 1;
		-ms-flex-shrink: 1;
		flex-shrink: 1;
		padding: 1em 0 0 0;
		text-align: center;
		width: 100%;
	}

	ul.actions:not(.fixed) li>* {
		width: 100%;
	}

	ul.actions:not(.fixed) li:first-child {
		padding-top: 0;
	}

	ul.actions:not(.fixed) li input[type="submit"],
	ul.actions:not(.fixed) li input[type="reset"],
	ul.actions:not(.fixed) li input[type="button"],
	ul.actions:not(.fixed) li button,
	ul.actions:not(.fixed) li .button {
		width: 100%;
	}

	ul.actions:not(.fixed) li input[type="submit"].icon:before,
	ul.actions:not(.fixed) li input[type="reset"].icon:before,
	ul.actions:not(.fixed) li input[type="button"].icon:before,
	ul.actions:not(.fixed) li button.icon:before,
	ul.actions:not(.fixed) li .button.icon:before {
		margin-left: -0.5rem;
	}

}

/* Icons */

ul.icons {
	cursor: default;
	list-style: none;
	padding-left: 0;
}

ul.icons li {
	display: inline-block;
	padding: 0 1em 0 0;
}

ul.icons li:last-child {
	padding-right: 0;
}

ul.icons li .icon:before {
	font-size: 1.25em;
}

/* Contact */

ul.contact {
	list-style: none;
	padding: 0;
}

ul.contact li {
	text-decoration: none;
	margin: 2.5em 0 0 0;
	padding: 0 0 0 3.25em;
	position: relative;
}

ul.contact li:before {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
	text-transform: none !important;
	font-family: 'Font Awesome 5 Free';
	font-weight: 400;
}

ul.contact li:before {
	border-radius: 100%;
	border: solid 2px rgba(255, 255, 255, 0.125);
	display: inline-block;
	font-size: 0.8em;
	height: 2.5em;
	left: 0;
	line-height: 2.35em;
	position: absolute;
	text-align: center;
	top: 0;
	width: 2.5em;
}

ul.contact li:first-child {
	margin-top: 0;
}

/* Classe universale per icone con immagini personalizzate */

ul.contact li.custom-icon {
    text-decoration: none;
    margin: 2.5em 0 0 0;
    padding: 0 0 0 3.25em;
    position: relative;
    min-height: 2.5em; /* Assicura che l'altezza minima sia quella del cerchio */
    display: flex;
    align-items: center;
}


ul.contact li.custom-icon:before {
    content: "";
    /* Usa la variabile --icon-url definita nell'HTML */
    background-image: var(--icon-url);
    background-size: cover; /* Ridotto leggermente per dare aria all'interno del cerchio */
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border-radius: 100%;
    border: solid 2px rgba(255, 255, 255, 0.125);
    display: inline-block;
    height: 2.5em;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Centra perfettamente */
}

.custom-social-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 3em 0 !important;
    width: 100% !important;
    
    /* SPAZIATURA DINAMICA: */
    /* Su mobile sarà minimo 20px, su desktop crescerà fino all'8% della larghezza schermo */
    gap: clamp(20px, 8vw, 200px) !important; 
}

/* Rimuoviamo i margini fissi dai LI per lasciare che sia il 'gap' a gestire tutto */
.custom-social-row li {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

/* Il cerchio */
.social-circle {
    display: block !important;
    width: 3.2em !important;  /* Leggermente più piccole per stare comode su mobile */
    height: 3.2em !important;
    border-radius: 50% !important;
    border: solid 2px rgba(255, 255, 255, 0.2) !important;
    background-size: 60% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    text-decoration: none !important;
}

.social-circle:hover {
    border-color: rgba(255, 255, 255, 1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-3px); /* Effetto salto in alto */
}

@media screen and (max-width: 736px) {

	ul.contact li {
		margin: 1.5em 0 0 0;
	}

}

/* Pagination */

ul.pagination {
	cursor: default;
	list-style: none;
	padding-left: 0;
}

ul.pagination li {
	display: inline-block;
	padding-left: 0;
	vertical-align: middle;
}

ul.pagination li>.page {
	-moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	-webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	-ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	border-bottom: 0;
	border-radius: 5px;
	display: inline-block;
	height: 1.5em;
	line-height: 1.5em;
	margin: 0 0.125em;
	min-width: 1.5em;
	padding: 0 0.5em;
	text-align: center;
}

ul.pagination li>.page:hover {
	background-color: rgba(255, 255, 255, 0.025);
}

ul.pagination li>.page.active {
	background-color: var(--MENU_COLOR);
}

ul.pagination li:first-child {
	padding-right: 0.75em;
}

ul.pagination li:last-child {
	padding-left: 0.75em;
}

@media screen and (max-width: 480px) {

	ul.pagination li:nth-child(n+2):nth-last-child(n+2) {
		display: none;
	}

	ul.pagination li .button {
		width: 100%;
	}

	ul.pagination li:first-child {
		width: calc(50% - 2px);
		text-align: left;
		padding-right: 0.325em;
	}

	ul.pagination li:last-child {
		width: calc(50% - 2px);
		text-align: right;
		padding-left: 0.325em;
	}

}

/* Table */

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

table {
	margin: 0 0 2em 0;
	width: 100%;
}

table tbody tr {
	border: solid 1px rgba(255, 255, 255, 0.125);
	border-left: 0;
	border-right: 0;
}

table tbody tr:nth-child(2n + 1) {
	background-color: rgba(255, 255, 255, 0.025);
}

table td {
	padding: 0.75em 0.75em;
}

table th {
	color: #ffffff;
	font-size: 0.9em;
	font-weight: 600;
	padding: 0 0.75em 0.75em 0.75em;
	text-align: left;
}

table thead {
	border-bottom: solid 2px rgba(255, 255, 255, 0.125);
}

table tfoot {
	border-top: solid 2px rgba(255, 255, 255, 0.125);
}

table.alt {
	border-collapse: separate;
}

table.alt tbody tr td {
	border: solid 1px rgba(255, 255, 255, 0.125);
	border-left-width: 0;
	border-top-width: 0;
}

table.alt tbody tr td:first-child {
	border-left-width: 1px;
}

table.alt tbody tr:first-child td {
	border-top-width: 1px;
}

table.alt thead {
	border-bottom: 0;
}

table.alt tfoot {
	border-top: 0;
}

/* Button */

input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
	-moz-transition: background-color 0.2s ease-in-out;
	-webkit-transition: background-color 0.2s ease-in-out;
	-ms-transition: background-color 0.2s ease-in-out;
	transition: background-color 0.2s ease-in-out;
	background-color: transparent;
	border-radius: 5px;
	border: 0;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.125);
	color: #ffffff !important;
	cursor: pointer;
	display: inline-block;
	font-family: Raleway, Helvetica, sans-serif;
	font-size: 0.8em;
	font-weight: 700;
	height: 3.75em;
	letter-spacing: 0.1em;
	line-height: 3.75em;
	padding: 0 2.25em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
	background-color: rgba(255, 255, 255, 0.025);
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
	background-color: rgba(255, 255, 255, 0.075);
}

input[type="submit"].icon:before,
input[type="reset"].icon:before,
input[type="button"].icon:before,
button.icon:before,
.button.icon:before {
	margin-right: 0.5em;
	color: rgba(255, 255, 255, 0.35);
}

input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary,
.button.primary {
	background-color: var(--MENU_COLOR);
	box-shadow: none;
}

input[type="submit"].primary:hover,
input[type="reset"].primary:hover,
input[type="button"].primary:hover,
button.primary:hover,
.button.primary:hover {
	background-color: #53639e;
}

input[type="submit"].primary:active,
input[type="reset"].primary:active,
input[type="button"].primary:active,
button.primary:active,
.button.primary:active {
	background-color: #45558d;
}

input[type="submit"].primary.icon:before,
input[type="reset"].primary.icon:before,
input[type="button"].primary.icon:before,
button.primary.icon:before,
.button.primary.icon:before {
	color: #7985b0;
}

input[type="submit"].fit,
input[type="reset"].fit,
input[type="button"].fit,
button.fit,
.button.fit {
	width: 100%;
}

input[type="submit"].small,
input[type="reset"].small,
input[type="button"].small,
button.small,
.button.small {
	font-size: 0.6em;
}

input[type="submit"].large,
input[type="reset"].large,
input[type="button"].large,
button.large,
.button.large {
	font-size: 1em;
}

input[type="submit"].disabled,
input[type="submit"]:disabled,
input[type="reset"].disabled,
input[type="reset"]:disabled,
input[type="button"].disabled,
input[type="button"]:disabled,
button.disabled,
button:disabled,
.button.disabled,
.button:disabled {
	opacity: 0.25;
}

@media screen and (max-width: 480px) {

	input[type="submit"],
	input[type="reset"],
	input[type="button"],
	button,
	.button {
		padding: 0;
	}

}

/* Features */

.features {
	display: -moz-flex;
	display: -webkit-flex;
	display: -ms-flex;
	display: flex;
	-moz-flex-wrap: wrap;
	-webkit-flex-wrap: wrap;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	margin: 0 0 2em 0;
}

.features article {
	padding: 1.75em 1.75em 0.1em 1.75em;
	background-color: var(--ARTICLE_COLOR);
	border-radius: 5px;
	margin: 1.5em 3em 1.5em 0;
	width: calc(50% - 11.5em);
}

.features article:nth-child(3n) {
	margin-right: 0;
}

.features article:nth-child(2n) {
	margin-right: 3em;
}

.features article .image {
	border-radius: 5px 5px 0 0;
	display: block;
	margin-bottom: 1.75em;
	margin-left: -1.75em;
	margin-top: -1.75em;
	position: relative;
	width: calc(100% + 3.5em);
}

.features article .image img {
	border-radius: 5px 5px 0 0;
	width: 100%;
}

@media screen and (max-width: 980px) {

	.features article {
		margin: 1em 2em 1em 0;
		width: calc(50% - 1em);
	}

	.features article:nth-child(2n) {
		margin-right: 0;
	}

	.features article:nth-child(3n) {
		margin-right: 2em;
	}

}

@media screen and (max-width: 736px) {

	.features article {
		padding: 1.5em 1.5em 0.1em 1.5em;
		margin: 0.875em 1.75em 0.875em 0;
		width: calc(50% - 0.875em - 1px);
	}

	.features article:nth-child(2n) {
		margin-right: 0;
	}

	.features article:nth-child(3n) {
		margin-right: 1.5em;
	}

	.features article .image {
		margin-bottom: 1.5em;
		margin-left: -1.5em;
		margin-top: -1.5em;
		width: calc(100% + 3em);
	}

}

@media screen and (max-width: 480px) {

	.features {
		display: block;
	}

	.features article {
		width: 100%;
		margin: 0 0 2em 0 !important;
	}

}

