/**
 * Header, footer e banner dei cookie.
 */

/* Header. */

.gm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--gm-header-h);
	padding: 0 var(--gm-pad-x);
	border-bottom: 1px solid var(--gm-line);
	background: var(--gm-header-bg);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	transition: box-shadow .28s;
}

.admin-bar .gm-header {
	top: 32px;
}

.gm-header.is-scrolled {
	box-shadow: var(--gm-shadow-header);
}

.gm-header__brand {
	display: block;
	flex: none;
	width: 236px;
}

.gm-header__logo {
	display: block;
	width: 100%;
	height: auto;
}

.gm-header__panel {
	display: flex;
	align-items: center;
	gap: 30px;
}

.gm-nav__list {
	display: flex;
	align-items: center;
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gm-nav__item {
	position: relative;
}

.gm-nav__heading {
	display: flex;
	align-items: center;
	gap: 4px;
}

.gm-nav__link {
	position: relative;
	display: block;
	padding: 9px 0;
	font-size: 15px;
	font-weight: 550;
	transition: color .2s;
}

.gm-nav__link:hover,
.gm-nav__link[aria-current],
.gm-nav__item.is-current > .gm-nav__heading > .gm-nav__link {
	color: var(--gm-brand);
}

.gm-nav__link[aria-current]::after,
.gm-nav__item.is-current > .gm-nav__heading > .gm-nav__link::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 3px;
	left: 0;
	height: 2px;
	background: currentColor;
}

.gm-submenu-toggle {
	display: inline-flex;
	padding: 6px;
	border: 0;
	background: none;
	cursor: pointer;
	transition: transform .18s;
}

.gm-nav__item.is-open .gm-submenu-toggle {
	transform: rotate(180deg);
}

.gm-submenu {
	position: absolute;
	top: calc(100% + 10px);
	left: -18px;
	min-width: 240px;
	margin: 0;
	padding: 10px;
	list-style: none;
	border: 1px solid var(--gm-line);
	border-radius: var(--gm-radius-card);
	background: var(--gm-white);
	box-shadow: var(--gm-shadow-menu);
}

.gm-submenu__link {
	display: block;
	padding: 8px 10px;
	border-radius: var(--gm-radius-button);
	font-size: 15px;
}

.gm-submenu__link:hover,
.gm-submenu__link[aria-current] {
	background: var(--gm-mist);
	color: var(--gm-brand);
}

.gm-header__cta {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 22px;
	border: 1px solid var(--gm-ink);
	border-radius: var(--gm-radius-button);
	font-size: 15px;
	font-weight: 550;
	transition: background-color .2s, color .2s;
}

.gm-header__cta:hover {
	background: var(--gm-ink);
	color: var(--gm-white);
}

/* Selettore delle lingue di GTranslate, con i colori del tema. Le regole di GTranslate
   arrivano dopo questo file: qui servono selettori più specifici. */

.gm-header__lang {
	position: relative;
	flex: none;
	margin-left: -14px;
}

.gm-header__lang .gt_float_switcher {
	display: block;
	overflow: visible;
	border-radius: var(--gm-radius-button);
	background: transparent;
	box-shadow: none;
	color: var(--gm-ink);
	font-family: var(--gm-font-body);
	font-size: 15px;
	line-height: 1.3;
}

.gm-header__lang .gt_float_switcher .gt-selected {
	border: 1px solid var(--gm-line);
	border-radius: var(--gm-radius-button);
	background: transparent;
}

.gm-header__lang .gt_float_switcher .gt-selected .gt-current-lang {
	display: flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 46px;
	padding: 10px 12px;
	color: var(--gm-ink);
	font-weight: 550;
}

.gm-header__lang .gt_float_switcher img {
	width: 22px;
	margin: 0;
	border-radius: 2px;
}

.gm-header__lang .gt_float_switcher .gt_options {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 220px;
	border: 1px solid var(--gm-line);
	border-radius: var(--gm-radius-card);
	background: var(--gm-white);
	box-shadow: var(--gm-shadow-menu);
}

.gm-header__lang .gt_float_switcher .gt_options a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	color: var(--gm-ink);
	font-size: 15px;
}

.gm-header__lang .gt_float_switcher .gt_options a:hover,
.gm-header__lang .gt_float_switcher .gt_options a:focus-visible {
	background: var(--gm-brand-soft);
	color: var(--gm-brand);
}

.gm-header__menu-toggle {
	display: none;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 8px 4px 8px 10px;
	border: 0;
	background: none;
	color: var(--gm-ink);
	font-size: 14px;
	font-weight: 550;
	cursor: pointer;
}

.gm-header__menu-toggle .gm-icon--close,
.gm-header.is-menu-open .gm-header__menu-toggle .gm-icon--menu {
	display: none;
}

.gm-header.is-menu-open .gm-header__menu-toggle .gm-icon--close {
	display: inline-block;
}

@media (max-width: 1100px) {
	.gm-header__brand {
		width: 210px;
	}

	.gm-header__panel,
	.gm-nav__list {
		gap: 18px;
	}
}

@media (max-width: 800px) {
	.gm-header__menu-toggle {
		display: inline-flex;
	}

	.gm-header__panel {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
		max-height: calc(100dvh - var(--gm-header-h));
		padding: 12px var(--gm-pad-x) 28px;
		overflow-y: auto;
		border-bottom: 1px solid var(--gm-line);
		background: var(--gm-white);
		box-shadow: var(--gm-shadow-menu);
	}

	.gm-header.is-menu-open .gm-header__panel {
		display: flex;
	}

	.gm-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.gm-nav__item + .gm-nav__item {
		border-top: 1px solid var(--gm-line);
	}

	.gm-nav__link {
		padding: 14px 0;
		font-size: 17px;
	}

	.gm-nav__link[aria-current]::after,
	.gm-nav__item.is-current > .gm-nav__heading > .gm-nav__link::after {
		display: none;
	}

	.gm-nav__heading {
		justify-content: space-between;
	}

	.gm-submenu {
		position: static;
		min-width: 0;
		margin: 0 0 12px;
		padding: 0 0 0 14px;
		border: 0;
		border-left: 2px solid var(--gm-brand);
		border-radius: 0;
		box-shadow: none;
	}

	.gm-header__cta {
		justify-content: center;
		align-self: flex-start;
	}

	.gm-header__lang {
		align-self: flex-start;
		margin-left: 0;
	}

	/* Nel pannello, che scorre, l'elenco delle lingue si apre sotto il selettore. */
	.gm-header__lang .gt_float_switcher .gt_options {
		position: static;
		margin-top: 6px;
		box-shadow: none;
	}
}

@media (max-width: 782px) {
	.admin-bar .gm-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .gm-header {
		top: 0;
	}
}

/* Footer. */

.gm-footer {
	padding: 65px var(--gm-pad-x) 26px;
	background: var(--gm-night);
	color: var(--gm-on-night);
	font-size: 14px;
	line-height: 1.8;
}

.gm-footer a {
	transition: color .2s;
}

.gm-footer a:hover {
	color: var(--gm-white);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gm-footer__top {
	display: grid;
	grid-template-columns: 1.4fr .6fr 1fr;
	gap: 80px;
	max-width: var(--gm-container);
	margin: 0 auto;
	padding-bottom: 48px;
}

.gm-footer__logo-link {
	display: inline-block;
	margin-bottom: 26px;
}

.gm-footer__logo {
	display: block;
	width: 230px;
	height: auto;
}

.gm-footer p {
	margin: 0 0 16px;
	color: var(--gm-on-night-soft);
}

.gm-footer__tagline {
	line-height: 1.9;
}

/* Paragrafo con l'aspetto di un titolo: deve vincere su .gm-footer p. */
.gm-footer .gm-footer__title {
	margin: 0 0 18px;
	color: var(--gm-white);
	font-family: var(--gm-font-body);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.5;
}

.gm-footer__links,
.gm-footer__legal {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gm-footer__links li + li {
	margin-top: 6px;
}

.gm-footer__mail a {
	display: block;
	width: fit-content;
	color: var(--gm-white);
}

.gm-footer__mail a + a {
	color: var(--gm-on-night);
}

.gm-footer__bottom {
	display: flex;
	justify-content: space-between;
	gap: 12px 24px;
	max-width: var(--gm-container);
	margin: 0 auto;
	padding-top: 22px;
	border-top: 1px solid var(--gm-on-night-line);
	font-size: 13px;
}

.gm-footer__bottom p {
	margin: 0;
}

.gm-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
}

.gm-footer__legal a {
	color: var(--gm-on-night-soft);
}

.gm-footer__bottom-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
}

.gm-footer__consent {
	padding: 0;
	border: 0;
	background: none;
	color: var(--gm-on-night-soft);
	font: inherit;
	cursor: pointer;
}

.gm-footer__consent:hover {
	color: var(--gm-white);
	text-decoration: underline;
}

@media (max-width: 1100px) {
	.gm-footer__top {
		gap: 36px;
	}
}

@media (max-width: 800px) {
	.gm-footer__top {
		grid-template-columns: 1fr 1fr;
		gap: 32px;
	}

	.gm-footer__brand {
		grid-column: 1 / -1;
	}

	.gm-footer__bottom {
		flex-direction: column;
	}
}

@media (max-width: 450px) {
	.gm-footer__top {
		grid-template-columns: 1fr;
	}
}

/* Su telefono e con il tocco ogni link del footer ha un'area alta almeno 44 px:
   gli elenchi diventano più ariosi, il testo resta com'è. */
@media (max-width: 800px), (pointer: coarse) {
	.gm-footer__links li + li {
		margin-top: 0;
	}

	.gm-footer__links a,
	.gm-footer__legal a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}

	.gm-footer__legal,
	.gm-footer__bottom-links {
		row-gap: 0;
	}

	.gm-footer__mail a {
		display: flex;
		align-items: center;
		min-height: 44px;
	}

	.gm-footer__consent {
		min-height: 44px;
	}
}

/* Banner dei cookie: riquadro in basso a destra, a tutta larghezza sul telefono. */

.gm-consent {
	position: fixed;
	right: 32px;
	bottom: 32px;
	z-index: 100;
	box-sizing: border-box;
	width: 420px;
	padding: 28px;
	border: 1px solid var(--gm-line);
	border-radius: var(--gm-radius-panel);
	background: var(--gm-white);
	box-shadow: 0 24px 70px rgb(22 59 72 / 18%);
	color: var(--gm-ink);
}

.gm-consent[hidden] {
	display: none;
}

.gm-consent .gm-consent__eyebrow {
	margin-bottom: 14px;
}

/* Paragrafo con l'aspetto dei titoli (base.css), per non spezzare la gerarchia della pagina. */
.gm-consent__title {
	margin: 0 0 12px;
	color: var(--gm-ink);
	font-family: var(--gm-font-heading);
	font-size: 24px;
	font-weight: 550;
	letter-spacing: -0.03em;
	line-height: 1.16;
}

.gm-consent__text {
	margin: 0 0 16px;
	color: var(--gm-muted);
	font-size: 15px;
	line-height: 1.65;
}

.gm-consent__policy {
	padding-bottom: 4px;
	border-bottom: 1px solid var(--gm-link-line);
	font-size: 14px;
	text-decoration: none;
}

.gm-consent__policy:hover {
	color: var(--gm-brand);
}

.gm-consent__actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 24px;
}

.gm-consent__button {
	justify-content: center;
	min-height: 46px;
	padding: 11px 20px;
}

@media (prefers-reduced-motion: no-preference) {
	.gm-consent:not([hidden]) {
		animation: gm-consent-in .4s var(--gm-ease);
	}

	@keyframes gm-consent-in {
		from {
			opacity: 0;
			transform: translateY(16px);
		}
	}
}

@media (max-width: 800px) {
	.gm-consent {
		right: 12px;
		bottom: 12px;
		left: 12px;
		width: auto;
		padding: 22px;
	}

	.gm-consent__title {
		font-size: 22px;
	}

	.gm-consent__text {
		margin-bottom: 14px;
		font-size: 14px;
		line-height: 1.6;
	}

	.gm-consent__actions {
		margin-top: 20px;
	}
}

/* Con il tocco: area alta 44 px intorno al link dell'informativa, senza spostare la linea sotto. */
@media (max-width: 800px), (pointer: coarse) {
	.gm-consent__policy {
		position: relative;
	}

	.gm-consent__policy::before {
		content: "";
		position: absolute;
		top: 50%;
		right: 0;
		left: 0;
		height: 44px;
		transform: translateY(-50%);
	}
}
