/* ==================================================
   Header principale
   ================================================== */

.site-header {
	position: absolute;
	z-index: 100;
	top: 0;
	left: 0;
	width: 100%;
	padding-block: 1.25rem;
	color: var(--color-white);
	transition:
		background-color var(--transition-base),
		transform var(--transition-base);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(0.75rem, 1.5vw, 2rem);
}

/* ==================================================
   Logo e identità
   ================================================== */

.site-header__brand {
	position: relative;
	z-index: 102;
	flex-shrink: 0;
}

.site-header__identity {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

.site-header__mark {
	display: grid;
	width: 2.75rem;
	height: 2.75rem;
	place-items: center;
	background: var(--color-accent);
	border-radius: 50%;
	font-size: 1.1rem;
}

.site-header__name {
	max-width: 11rem;
}

.custom-logo-link {
	display: block;
}

.custom-logo {
	display: block;
	width: clamp(9rem, 10vw, 11rem);
	height: auto;
	max-height: none;
}

/* ==================================================
   Posizione palestra
   ================================================== */

.site-header__location {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 0.8rem;
	padding-left: 1.25rem;
	border-left: 1px solid rgba(255, 255, 255, 0.35);
	color: var(--color-white);
}

.site-header__location-icon {
	display: block;
	width: 1.35rem;
	height: 1.35rem;
	flex: 0 0 1.35rem;
	fill: none;
	stroke: var(--color-accent);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.site-header__location-text {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 0.15rem;
	white-space: nowrap;
}

.site-header__location-label {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
}

.site-header__location-address {
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.3;
	transition: color var(--transition-fast);
}

.site-header__location:hover .site-header__location-address {
	color: var(--color-white);
}

/* ==================================================
   Cambio lingua
   ================================================== */

.site-header__language {
	display: flex;
	width: 3.25rem;
	height: 3.25rem;
	flex: 0 0 3.25rem;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 0.75rem;
	background: rgba(16, 16, 16, 0.25);
	color: var(--color-white);
	cursor: pointer;
	text-decoration: none;
	transition:
	background-color 0.25s ease,
	border-color 0.25s ease,
	color 0.25s ease,
	transform 0.25s ease;
	opacity: 1;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.site-header__language svg {
	display: block;
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.5;
}

.site-header__language span {
	font-size: 0.65rem;
	font-weight: 700;
}

.site-header__language:hover {
	border-color: var(--color-white);
	background: var(--color-white);
	color: var(--color-black, #101010);
	transform: translateY(-2px);
}

.site-header__language:active {
	transform: translateY(0);
}

.site-header__language:focus-visible {
	outline: 2px solid var(--color-white);
	outline-offset: 3px;
}

/* ==================================================
   CTA header
   ================================================== */

.site-header__cta {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	padding: 0.8rem 1.25rem;
	background: var(--color-accent);
	border-radius: 0.75rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-align: center;
	text-transform: uppercase;
	transition:
		color var(--transition-fast),
		background-color var(--transition-fast),
		transform var(--transition-fast);
}

.site-header__cta:hover {
	background: var(--color-light);
	color: var(--color-dark);
	transform: translateY(-2px);
}

/* ==================================================
   Tablet e mobile
   ================================================== */

@media (max-width: 1282px) {
	.site-header {
		position: absolute;
	}

	.custom-logo {
		width: 9rem;
	}

	.site-header__location {
		display: none;
	}

	.site-header__language {
		position: relative;
		z-index: 102;
		margin-left: auto;
	}

	.site-header__inner .menu-toggle {
		margin-left: 0;
	}
}

/* Barra amministrativa WordPress */

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

/* Smartphone piccoli */

@media (max-width: 420px) {
	.site-header__inner {
		gap: 0.6rem;
	}

	.custom-logo {
		width: 7.75rem;
	}

	.site-header__language {
		width: 3rem;
		height: 3rem;
		flex-basis: 3rem;
	}
}

@media (max-width: 1282px) {
	.menu-is-open .site-header {
		position: fixed;
		transform: none !important;
	}
}

.site-header__brand a:focus-visible,
.site-header__location:focus-visible,
.site-header__cta:focus-visible,
.site-header__language:focus-visible {
	border-radius: 0.5rem;
	outline: 3px solid var(--color-white);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px var(--color-dark);
}

@media (max-width: 1282px) {
	.site-header__brand {
		transition:
			opacity 200ms ease,
			visibility 200ms;
	}

	.menu-is-open .site-header__brand {
		opacity: 0;
		pointer-events: none;
		visibility: hidden;
	}
}
