/*
 * Struttura del sito (solo front-end): sfondo, header fisso, footer.
 * Valori presi dal sito statico.
 */
body {
	margin: 0;
	background-color: #fff;
	background-image: url(../img/body-bg.png);
	background-position: right -126px;
	background-repeat: repeat-y;
	/* Larghezza della finestra, come "contain" nel sito statico: su pagine corte "contain" rimpiccioliva l'immagine. */
	background-size: 100% auto;
}

img {
	max-width: 100%;
	height: auto;
}

/* ---------- Header ---------- */
.site-header-wrapper {
	position: relative;
	height: 100px;
	z-index: 9999;
}

.site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	padding: 29px 0 0;
	transition: padding 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.site-header .trisense-container::after {
	content: "";
	display: table;
	clear: both;
}

.site-brand {
	float: left;
	margin-top: -18px;
}

.site-brand a {
	display: block;
}

.site-brand img {
	display: block;
	max-height: 72px;
	width: auto;
	transition: max-height 0.3s ease-in-out, margin 0.3s ease-in-out;
}

/* Selettore di lingua (bandierine), in alto a destra come nel sito statico. */
.language-switcher {
	float: right;
	margin-top: 4px;
}

.language-switcher ul {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.language-switcher li {
	margin: 0;
	padding: 0;
}

.language-switcher a {
	display: block;
	line-height: 0;
	border-radius: 50%;
	opacity: 0.6;
	transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.language-switcher a:hover,
.language-switcher a:focus-visible,
.language-switcher .current-lang a {
	opacity: 1;
}

.language-switcher .current-lang a {
	box-shadow: 0 0 0 2px #fff;
}

/* Bandiere tonde 24px: sovrascrive gli stili inline di Polylang (3:2). */
.language-switcher .pll-switcher-flag {
	display: block !important;
	width: 24px !important;
	height: 24px !important;
	aspect-ratio: 1 / 1 !important;
	border-radius: 50% !important;
	overflow: hidden;
}

.language-switcher img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

/* Header fisso dopo lo scroll: sfondo scuro semitrasparente e logo più piccolo. */
.is-sticky .site-header {
	position: fixed;
	padding: 10px 0;
	background-color: rgba(0, 0, 0, 0.37);
	box-shadow: 0 0 5px rgba(29, 29, 27, 0.15);
}

.is-sticky .site-brand img {
	max-height: 56px;
	margin-top: 12px;
}

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

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

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

/* Pagine che iniziano con l'Hero: l'header si sovrappone all'hero (come nel sito statico). */
.has-hero .site-header-wrapper,
.home .site-header-wrapper {
	height: 0;
}

/* Homepage: header senza logo né sfondo. */

.home .site-brand {
	visibility: hidden;
}

.home.is-sticky .site-header {
	background: none;
	box-shadow: none;
}

/* ---------- Contenuto ---------- */
.site-main {
	padding: 100px 0 0;
	min-height: 200px;
}

.site-main .entry-content {
	padding-top: 32px;
}

.has-hero .site-main,
.home .site-main {
	padding: 0;
}

/* Pagine composte a blocchi (homepage, dettaglio solutions): i blocchi 3sense sono a tutta
   larghezza, i blocchi nativi di WordPress stanno nel contenitore centrale. */
.site-main--blocks > :not(.trisense-fullwidth) {
	box-sizing: border-box;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 15px;
	padding-right: 15px;
}

@media (min-width: 768px) {
	.site-main--blocks > :not(.trisense-fullwidth) { width: 750px; }
}

@media (min-width: 992px) {
	.site-main--blocks > :not(.trisense-fullwidth) { width: 970px; }
}

@media (min-width: 1200px) {
	.site-main--blocks > :not(.trisense-fullwidth) { width: 1200px; }
}

/* Paragrafo vuoto lasciato dall'editor in fondo alla pagina. */
.site-main--blocks > p:empty {
	display: none;
}

/* ---------- Footer ---------- */
.site-footer {
	background-color: #008fbe;
	color: #fff;
	padding: 18px 0;
	font-size: 14px;
	line-height: 24px;
}

.site-footer a {
	color: #ecf0f1;
	text-decoration: none;
}

.site-footer a:hover {
	color: #42c37a;
}

.site-footer p {
	margin: 0;
}

.site-footer__top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.site-footer__copyright {
	width: 33.3333%;
	margin-top: 9px;
}

.site-footer__company {
	width: 66.6667%;
	margin-top: 9px;
	text-align: right;
}

.site-footer__company span {
	margin-left: 16px;
	white-space: nowrap;
}

.site-footer__company span:first-child {
	margin-left: 0;
}

.site-footer__bottom {
	padding-top: 10px;
}

@media screen and (max-width: 767px) {
	.site-footer {
		text-align: center;
	}

	.site-footer__copyright,
	.site-footer__company {
		width: 100%;
		text-align: center;
	}

	.site-footer__company span {
		margin: 0 4px;
		white-space: normal;
	}
}

@media screen and (max-width: 540px) {
	.site-footer__company {
		font-size: 10px;
	}
}
