/* Mario Dotti — barra della lingua, intestazione fissa, menu a scomparsa. */

:root {
	--md-turchese: #1CA0A5;
	--md-scuro: #0E3F45;
	--md-chiaro: #80EDE1;
	--md-bordo: #E2EEEE;
	--md-testa-altezza: 86px;
}

/* ------------------------------------------------- barra in alto */

.md-barra-alta {
	background: var(--md-scuro);
	font-family: "Inter", sans-serif;
}

.md-barra-alta-inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.md-lingue {
	display: flex;
	align-items: center;
	gap: 10px;
}

.md-lingue .md-lingua + .md-lingua::before {
	content: "";
	display: inline-block;
	width: 1px;
	height: 11px;
	margin-right: 10px;
	background: rgba(255, 255, 255, .3);
	vertical-align: -1px;
}

.md-lingua {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	color: rgba(255, 255, 255, .58);
	transition: color .2s ease;
}

.md-lingua:hover {
	color: #fff;
}

.md-lingua--attiva {
	color: var(--md-chiaro);
}

.md-recapiti {
	display: flex;
	gap: 22px;
}

.md-recapiti a {
	font-size: 13px;
	color: rgba(255, 255, 255, .72);
	text-decoration: none;
	transition: color .2s ease;
}

.md-recapiti a:hover {
	color: var(--md-chiaro);
}

/* --------------------------------------------------- intestazione */

.md-testa {
	position: sticky;
	top: 0;
	z-index: 120;
	background: #fff;
	border-bottom: 1px solid var(--md-bordo);
	transition: box-shadow .25s ease, background .25s ease;
}

.md-testa--scesa {
	box-shadow: 0 6px 24px rgba(14, 63, 69, .10);
	border-bottom-color: transparent;
}

.md-testa-inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 18px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	transition: padding .25s ease;
}

.md-testa--scesa .md-testa-inner {
	padding-top: 12px;
	padding-bottom: 12px;
}

.md-marchio {
	display: block;
	flex: 0 0 auto;
	text-decoration: none;
	line-height: 1.1;
	white-space: nowrap;
}

.md-marchio-nome {
	display: block;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 29px;
	font-weight: 600;
	color: var(--md-scuro);
	transition: color .2s ease, font-size .25s ease;
}

.md-marchio:hover .md-marchio-nome {
	color: var(--md-turchese);
}

.md-marchio-claim {
	display: block;
	margin-top: 6px;
	font-family: "Inter", sans-serif;
	font-size: 11px;
	letter-spacing: .17em;
	text-transform: uppercase;
	color: #7A9092;
}

.md-testa--scesa .md-marchio-nome {
	font-size: 25px;
}

/* ---------------------------------------------------------- menu */

.md-nav .md-menu {
	display: flex;
	align-items: center;
	gap: clamp(16px, 1.9vw, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.md-nav .md-menu > li {
	position: relative;
}

.md-nav .md-menu > li > a {
	display: block;
	padding: 6px 0;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: var(--md-scuro);
	text-decoration: none;
	white-space: nowrap;
	transition: color .2s ease;
}

/* la riga turchese che entra da sinistra */
.md-nav .md-menu > li:not(.md-voce-cta) > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--md-turchese);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .28s ease;
}

.md-nav .md-menu > li:not(.md-voce-cta):hover > a::after,
.md-nav .md-menu > li.current-menu-item:not(.md-voce-cta) > a::after {
	transform: scaleX(1);
}

.md-nav .md-menu > li:hover > a,
.md-nav .md-menu > li.current-menu-item > a {
	color: var(--md-turchese);
}

/* l'ultima voce (Contatti) è un bottone */
.md-nav .md-menu > li.md-voce-cta > a {
	padding: 12px 24px;
	border-radius: 4px;
	background: var(--md-turchese);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	transition: background .2s ease;
}

.md-nav .md-menu > li.md-voce-cta:hover > a,
.md-nav .md-menu > li.md-voce-cta.current-menu-item > a {
	background: var(--md-scuro);
	color: #fff;
}

/* sottomenu, se un giorno servissero */
.md-nav .md-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--md-bordo);
	box-shadow: 0 14px 30px rgba(14, 63, 69, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: all .2s ease;
}

.md-nav .md-menu > li:hover .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.md-nav .sub-menu a {
	display: block;
	padding: 9px 18px;
	font-family: "Inter", sans-serif;
	font-size: 14px;
	color: var(--md-scuro);
	text-decoration: none;
}

.md-nav .sub-menu a:hover {
	background: #F4FBFB;
	color: var(--md-turchese);
}

/* ----------------------------------------------------- hamburger */

.md-testa .md-hamburger {
	display: none;
	width: 46px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	gap: 6px;
}

/* il reset del tema colora i bottoni di rosa: qui no */
.md-testa .md-hamburger {
	border: 0;
	color: inherit;
}

.md-pannello .md-chiudi {
	border: 0;
	color: #fff;
}

.md-hamburger span {
	display: block;
	width: 26px;
	height: 2px;
	background: var(--md-scuro);
	transition: transform .3s ease, opacity .2s ease, width .3s ease;
}

.md-hamburger span:nth-child(2) {
	width: 20px;
}

body.md-pannello-aperto .md-hamburger span:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

body.md-pannello-aperto .md-hamburger span:nth-child(2) {
	opacity: 0;
}

body.md-pannello-aperto .md-hamburger span:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* -------------------------------------------- pannello a scomparsa */

.md-velo {
	position: fixed;
	inset: 0;
	z-index: 190;
	background: rgba(14, 63, 69, .55);
	opacity: 0;
	transition: opacity .3s ease;
}

body.md-pannello-aperto .md-velo {
	opacity: 1;
}

/* nascosti finché non si aprono (il nostro foglio arriva dopo il reset) */
.md-velo[hidden],
.md-pannello[hidden] {
	display: none;
}

.md-pannello {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 200;
	width: min(370px, 86vw);
	height: 100%;
	display: flex;
	flex-direction: column;
	background: linear-gradient(160deg, #0E3F45 0%, #1CA0A5 100%);
	transform: translateX(100%);
	transition: transform .32s cubic-bezier(.4, 0, .2, 1);
	overflow-y: auto;
	font-family: "Inter", sans-serif;
}

body.md-pannello-aperto {
	overflow: hidden;
}

body.md-pannello-aperto .md-pannello {
	transform: none;
}

.md-pannello-testa {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 26px 10px;
}

.md-pannello-nome {
	font-family: "Playfair Display", Georgia, serif;
	font-size: 22px;
	font-weight: 600;
	color: #fff;
}

.md-chiudi {
	width: 40px;
	height: 40px;
	border: 0;
	background: rgba(255, 255, 255, .12);
	border-radius: 50%;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease;
}

.md-chiudi:hover {
	background: rgba(255, 255, 255, .24);
}

.md-pannello-nav {
	padding: 14px 26px 0;
}

.md-pannello .md-menu-mobile {
	margin: 0;
	padding: 0;
	list-style: none;
}

.md-pannello .md-menu-mobile > li + li {
	border-top: 1px solid rgba(255, 255, 255, .14);
}

.md-pannello .md-menu-mobile a {
	display: block;
	padding: 15px 0;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 21px;
	color: #fff;
	text-decoration: none;
	transition: color .2s ease, padding-left .2s ease;
}

.md-pannello .md-menu-mobile a:hover,
.md-pannello .md-menu-mobile .current-menu-item > a {
	color: var(--md-chiaro);
	padding-left: 6px;
}

.md-pannello .md-menu-mobile .sub-menu {
	margin: 0 0 10px;
	padding: 0 0 0 14px;
	list-style: none;
}

.md-pannello .md-menu-mobile .sub-menu a {
	font-family: "Inter", sans-serif;
	font-size: 16px;
	padding: 9px 0;
}

.md-pannello-piede {
	margin-top: auto;
	padding: 26px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-top: 1px solid rgba(255, 255, 255, .14);
}

.md-pannello-lingue {
	display: flex;
	gap: 14px;
	margin-bottom: 8px;
}

.md-pannello-piede a {
	color: rgba(255, 255, 255, .82);
	font-size: 14px;
	text-decoration: none;
}

.md-pannello-piede a:hover {
	color: #fff;
}

.md-pannello-piede .md-lingua--attiva {
	color: var(--md-chiaro);
}

/* ------------------------------------------------------ larghezze */

@media (max-width: 1100px) {
	.md-testa .md-nav {
		display: none;
	}

	.md-testa .md-hamburger {
		display: flex;
	}
}

@media (max-width: 767px) {
	.md-recapiti {
		display: none;
	}

	.md-barra-alta-inner {
		justify-content: flex-start;
	}

	.md-testa-inner {
		padding: 14px 18px;
	}

	.md-marchio-nome {
		font-size: 24px;
	}

	.md-testa--scesa .md-marchio-nome {
		font-size: 22px;
	}

	.md-marchio-claim {
		font-size: 10px;
		letter-spacing: .13em;
	}
}

/* Le frecce dei corsi non devono finire sopra al pannello. */
.md-freccia {
	z-index: 40;
}

/* ------------------------------------------------- bottone nei testi
   I collegamenti scritti per esteso dentro i contenuti diventano bottoni
   con questa classe (vedi script/link-in-bottoni.php). */

p.md-azione {
	margin: 28px 0;
}

a.md-bottone {
	display: inline-block;
	background: var(--md-turchese);
	color: #fff;
	font-family: "Inter", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 15px 30px;
	border-radius: 4px;
	transition: background .2s ease;
}

a.md-bottone:hover {
	background: var(--md-scuro);
	color: #fff;
}
