/**
 * Mobile nav — full screen emozionale (hamburger).
 */

/* —— Toggle cinematografico —— */
.psh-nav-toggle {
	display: none;
	align-items: center;
	gap: 0.65rem;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	cursor: pointer;
	padding: 0.5rem 0.25rem;
	margin-left: auto;
	color: inherit;
	z-index: 120;
	position: relative;
	transition: color 0.35s ease;
}

.psh-nav-toggle:focus {
	outline: none;
	box-shadow: none;
	background: transparent;
}

.psh-nav-toggle:focus-visible {
	outline: none;
	box-shadow: none;
	background: transparent;
}

.psh-nav-toggle::-moz-focus-inner {
	border: 0;
	padding: 0;
}

.psh-nav-toggle:focus-visible .psh-nav-toggle__box {
	outline: 1px solid color-mix(in srgb, var(--psh-button-color, var(--psh-primary-color, #111)) 45%, transparent);
	outline-offset: 6px;
	border-radius: 1px;
}

.psh-nav-toggle__box {
	display: block;
	width: 30px;
	height: 20px;
	position: relative;
	flex-shrink: 0;
}

.psh-nav-toggle__bar {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
	transition:
		transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.35s ease,
		top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
		bottom 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.psh-nav-toggle__bar:nth-child(1) {
	top: 0;
}

.psh-nav-toggle__bar:nth-child(2) {
	top: 9px;
}

.psh-nav-toggle__bar:nth-child(3) {
	bottom: 0;
}

.psh-nav-toggle__text {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 1em;
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	line-height: 1;
}

.psh-nav-toggle__label {
	display: block;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.psh-nav-toggle__label--close {
	transform: translateY(100%);
	opacity: 0;
}

body.psh-nav-open .psh-nav-toggle__bar:nth-child(1) {
	top: 9px;
	transform: rotate(45deg);
}

body.psh-nav-open .psh-nav-toggle__bar:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

body.psh-nav-open .psh-nav-toggle__bar:nth-child(3) {
	bottom: 9px;
	transform: rotate(-45deg);
}

body.psh-nav-open .psh-nav-toggle__label--open {
	transform: translateY(-100%);
	opacity: 0;
}

body.psh-nav-open .psh-nav-toggle__label--close {
	transform: translateY(-100%);
	opacity: 1;
}

body.psh-nav-open .psh-nav-toggle {
	color: var(--psh-text-color, #fff);
}

/* —— Desktop: nav nello slot header —— */
@media (min-width: 641px) {
	.psh-header-nav-slot {
		display: flex;
		flex: 1;
		justify-content: flex-end;
		align-items: center;
		min-width: 0;
	}

	.psh-header-nav-slot .psh-mobile-nav {
		display: flex;
		flex: 1;
		justify-content: flex-end;
		align-items: center;
		min-width: 0;
		position: static;
		inset: auto;
		width: auto;
		height: auto;
		max-width: none;
		max-height: none;
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
	}

	.psh-mobile-nav__veil,
	.psh-mobile-nav__grain,
	.psh-mobile-nav__glow,
	.psh-mobile-nav__line,
	.psh-mobile-nav__head,
	.psh-mobile-nav__close {
		display: none !important;
	}

	.psh-mobile-nav__inner {
		display: flex;
		flex: 1;
		justify-content: flex-end;
		align-items: center;
		min-width: 0;
		padding: 0;
	}

	.psh-primary-nav {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 1rem;
	}

	.psh-mobile-nav .psh-menu a {
		font-size: inherit;
		font-weight: 500;
		letter-spacing: 0.01em;
		padding: 0;
		opacity: 1;
		transform: none;
	}

	.psh-mobile-nav .psh-menu > li::before {
		display: none;
	}
}

/* —— Mobile: pannello full screen (100vh / 100dvh) —— */
@media (max-width: 640px) {
	.psh-site-header {
		z-index: 100;
	}

	.psh-header-nav-slot {
		display: none;
	}

	.psh-nav-toggle {
		display: inline-flex;
	}

	.psh-mobile-nav {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		max-width: none;
		max-height: none;
		margin: 0;
		padding: 0;
		box-sizing: border-box;
		/* Sopra chat (100050), GTranslate (999999) e lightbox */
		z-index: 2000000;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: stretch;
		visibility: hidden;
		pointer-events: none;
		opacity: 0;
		transition: visibility 0s linear 0.65s, opacity 0.5s ease;
	}

	body.psh-nav-open .psh-mobile-nav {
		visibility: visible;
		pointer-events: auto;
		opacity: 1;
		transition: visibility 0s, opacity 0.45s ease;
	}

	/* Hamburger header nascosto: chiusura con X nel pannello */
	body.psh-nav-open .psh-nav-toggle {
		visibility: hidden;
		pointer-events: none;
	}

	.psh-mobile-nav__close {
		display: none;
	}

	body.psh-nav-open .psh-mobile-nav__close {
		display: flex;
	}

	.psh-mobile-nav__close {
		position: fixed;
		top: max(0.85rem, env(safe-area-inset-top, 0px));
		right: max(1rem, env(safe-area-inset-right, 0px));
		z-index: 2000001;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		height: 2.75rem;
		margin: 0;
		padding: 0;
		appearance: none;
		-webkit-appearance: none;
		background: transparent;
		border: 0;
		box-shadow: none;
		outline: none;
		-webkit-tap-highlight-color: transparent;
		color: var(--psh-text-color, #fff);
		cursor: pointer;
		opacity: 0;
		transform: scale(0.85) rotate(-45deg);
		transition:
			opacity 0.35s ease 0.15s,
			transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
			color 0.3s ease;
	}

	body.psh-nav-open .psh-mobile-nav__close {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}

	.psh-mobile-nav__close::-moz-focus-inner {
		border: 0;
		padding: 0;
	}

	.psh-mobile-nav__close:focus,
	.psh-mobile-nav__close:focus-visible {
		outline: none;
		box-shadow: none;
		background: transparent;
	}

	.psh-mobile-nav__close:focus-visible {
		color: var(--psh-button-color, var(--psh-primary-color, #111));
	}

	.psh-mobile-nav__close-icon {
		position: relative;
		width: 1.35rem;
		height: 1.35rem;
	}

	.psh-mobile-nav__close-icon::before,
	.psh-mobile-nav__close-icon::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 100%;
		height: 2px;
		background: currentColor;
		border-radius: 1px;
	}

	.psh-mobile-nav__close-icon::before {
		transform: translate(-50%, -50%) rotate(45deg);
	}

	.psh-mobile-nav__close-icon::after {
		transform: translate(-50%, -50%) rotate(-45deg);
	}

	.psh-mobile-nav__close:hover,
	.psh-mobile-nav__close:focus-visible {
		color: var(--psh-button-color, var(--psh-primary-color, #111));
	}

	/* Float sotto il menu aperto (inline z-index dei plugin) */
	body.psh-nav-open .psh-floating-chat,
	body.psh-nav-open .gt_switcher_wrapper,
	body.psh-nav-open .gtranslate_wrapper,
	body.psh-nav-open #google_translate_element2 {
		z-index: 1 !important;
		pointer-events: none !important;
	}

	@media (max-height: 740px) {
		.psh-mobile-nav__inner {
			padding-top: calc(max(0.5rem, env(safe-area-inset-top, 0px)) + 2.75rem);
		}

		.psh-mobile-nav__head {
			margin-bottom: 0.65rem;
		}

		.psh-mobile-nav .psh-menu > li::before {
			padding-top: 0.35rem;
		}

		.psh-mobile-nav .psh-menu a {
			font-size: clamp(0.95rem, 4.2vw, 1.15rem);
			padding-bottom: 0.4rem;
		}

		.psh-mobile-nav .psh-header-social {
			margin-top: 0.65rem;
		}

		.psh-mobile-nav .psh-header-cta {
			margin-top: 0.5rem;
			padding: 0.45rem 0.85rem;
			font-size: 0.75rem;
		}
	}

	.psh-mobile-nav__veil {
		position: absolute;
		inset: 0;
		background:
			radial-gradient(ellipse 120% 80% at 80% 0%, color-mix(in srgb, var(--psh-button-color, var(--psh-primary-color, #111)) 18%, transparent), transparent 55%),
			radial-gradient(ellipse 90% 70% at 0% 100%, color-mix(in srgb, var(--psh-button-color, var(--psh-primary-color, #111)) 10%, transparent), transparent 50%),
			var(--psh-background-color, #0a0a0a);
		opacity: 0;
		transform: scale(1.04);
		transition:
			opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
			transform 1s cubic-bezier(0.22, 1, 0.36, 1);
	}

	body.psh-nav-open .psh-mobile-nav__veil {
		opacity: 1;
		transform: scale(1);
	}

	.psh-mobile-nav__grain {
		position: absolute;
		inset: 0;
		opacity: 0.14;
		pointer-events: none;
		background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
		background-size: 180px 180px;
		mix-blend-mode: overlay;
		animation: psh-mnav-grain 8s steps(6) infinite;
	}

	@keyframes psh-mnav-grain {
		0%,
		100% {
			transform: translate(0, 0);
		}
		50% {
			transform: translate(-2%, 1%);
		}
	}

	.psh-mobile-nav__glow {
		position: absolute;
		border-radius: 50%;
		filter: blur(80px);
		opacity: 0;
		transition: opacity 1.2s ease 0.15s, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
		pointer-events: none;
	}

	.psh-mobile-nav__glow--a {
		width: min(70vw, 320px);
		height: min(70vw, 320px);
		top: -12%;
		right: -18%;
		background: color-mix(in srgb, var(--psh-button-color, var(--psh-primary-color, #111)) 35%, transparent);
	}

	.psh-mobile-nav__glow--b {
		width: min(55vw, 240px);
		height: min(55vw, 240px);
		bottom: 8%;
		left: -12%;
		background: color-mix(in srgb, var(--psh-text-color, #fff) 8%, transparent);
	}

	body.psh-nav-open .psh-mobile-nav__glow {
		opacity: 1;
	}

	body.psh-nav-open .psh-mobile-nav__glow--a {
		transform: translate(-4%, 6%);
	}

	.psh-mobile-nav__line {
		position: absolute;
		top: 0;
		left: 0;
		width: 3px;
		height: 0;
		background: linear-gradient(
			180deg,
			var(--psh-button-color, var(--psh-primary-color, #111)),
			color-mix(in srgb, var(--psh-button-color, var(--psh-primary-color, #111)) 20%, transparent)
		);
		box-shadow: 0 0 24px color-mix(in srgb, var(--psh-button-color, var(--psh-primary-color, #111)) 50%, transparent);
		transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
	}

	body.psh-nav-open .psh-mobile-nav__line {
		height: 100%;
	}

	.psh-mobile-nav__inner {
		position: relative;
		z-index: 2;
		display: flex;
		flex-direction: column;
		flex: 1;
		justify-content: center;
		width: 100%;
		min-height: 0;
		max-height: 100dvh;
		padding:
			calc(max(0.75rem, env(safe-area-inset-top, 0px)) + 3.25rem)
			clamp(1.25rem, 5vw, 1.75rem)
			max(0.75rem, env(safe-area-inset-bottom, 0px));
		overflow: hidden;
	}

	.psh-mobile-nav__head {
		flex-shrink: 0;
		margin-bottom: 1rem;
		opacity: 0;
		transform: translateY(10px);
		transition:
			opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.12s,
			transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
	}

	body.psh-nav-open .psh-mobile-nav__head {
		opacity: 1;
		transform: translateY(0);
	}

	.psh-mobile-nav__brand {
		font-size: 0.6rem;
		font-weight: 600;
		letter-spacing: 0.18em;
		text-transform: uppercase;
		opacity: 0.5;
	}

	.psh-primary-nav {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		flex: 0 1 auto;
		min-height: 0;
		gap: 0;
		width: 100%;
		padding: 0;
	}

	.psh-mobile-nav .psh-menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		width: 100%;
		list-style: none;
		margin: 0;
		padding: 0;
		counter-reset: psh-mnav;
	}

	.psh-mobile-nav .psh-menu > li {
		counter-increment: psh-mnav;
		width: 100%;
		border-bottom: 1px solid color-mix(in srgb, var(--psh-text-color, #fff) 8%, transparent);
		opacity: 0;
		transform: translate3d(-12px, 0, 0);
		filter: blur(3px);
		transition:
			opacity 0.28s ease,
			transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
			filter 0.28s ease;
		transition-delay: 0.06s;
	}

	body.psh-nav-open .psh-mobile-nav .psh-menu > li.is-mnav-visible {
		opacity: 1;
		transform: translate3d(0, 0, 0);
		filter: blur(0);
	}

	.psh-mobile-nav .psh-menu > li::before {
		content: counter(psh-mnav, decimal-leading-zero);
		display: block;
		font-size: 0.55rem;
		font-weight: 600;
		letter-spacing: 0.14em;
		color: var(--psh-button-color, var(--psh-primary-color, #111));
		opacity: 0.65;
		margin-bottom: 0.05rem;
		padding-top: 0.5rem;
	}

	.psh-mobile-nav .psh-menu a {
		display: block;
		width: 100%;
		padding: 0.1rem 0 0.55rem;
		font-size: clamp(1.05rem, 4.8vw, 1.35rem);
		font-weight: 400;
		line-height: 1.15;
		letter-spacing: -0.02em;
		text-decoration: none;
		color: var(--psh-text-color, #fff);
		position: relative;
		transition: color 0.35s ease, padding-left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.psh-mobile-nav .psh-menu a::after {
		content: "";
		position: absolute;
		left: 0;
		bottom: 0.4rem;
		width: 0;
		height: 1px;
		background: var(--psh-button-color, var(--psh-primary-color, #111));
		transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.psh-mobile-nav .psh-menu a:hover,
	.psh-mobile-nav .psh-menu a:focus-visible {
		color: var(--psh-button-color, var(--psh-primary-color, #111));
		padding-left: 0.35rem;
	}

	.psh-mobile-nav .psh-menu a:hover::after,
	.psh-mobile-nav .psh-menu a:focus-visible::after,
	.psh-mobile-nav .psh-menu .current-menu-item > a::after,
	.psh-mobile-nav .psh-menu .current_page_item > a::after {
		width: 2.5rem;
	}

	.psh-mobile-nav .psh-menu .current-menu-item > a,
	.psh-mobile-nav .psh-menu .current_page_item > a {
		color: var(--psh-button-color, var(--psh-primary-color, #111));
	}

	.psh-mobile-nav .psh-header-social {
		flex-shrink: 0;
		margin-top: 1rem;
		opacity: 0;
		transform: translateY(8px);
		transition:
			opacity 0.28s ease 0.08s,
			transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
	}

	body.psh-nav-open .psh-mobile-nav .psh-header-social {
		opacity: 1;
		transform: translateY(0);
	}

	.psh-mobile-nav .psh-header-social .psh-social-icons {
		gap: 0.5rem;
	}

	.psh-mobile-nav .psh-header-social .psh-social-icons__link {
		width: 2.25rem;
		height: 2.25rem;
		border: 1px solid color-mix(in srgb, var(--psh-text-color, #fff) 14%, transparent);
		border-radius: 50%;
		transition:
			border-color 0.35s ease,
			transform 0.35s ease,
			box-shadow 0.35s ease;
	}

	.psh-mobile-nav .psh-header-social .psh-social-icons__link:hover,
	.psh-mobile-nav .psh-header-social .psh-social-icons__link:focus-visible {
		border-color: color-mix(in srgb, var(--psh-button-color, var(--psh-primary-color, #111)) 55%, transparent);
		transform: translateY(-2px);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	}

	.psh-mobile-nav .psh-header-cta {
		flex-shrink: 0;
		margin-top: 0.75rem;
		padding: 0.5rem 1rem;
		font-size: 0.8rem;
		opacity: 0;
		transform: translateY(8px);
		transition:
			opacity 0.28s ease 0.1s,
			transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
	}

	body.psh-nav-open .psh-mobile-nav .psh-header-cta {
		opacity: 1;
		transform: translateY(0);
	}

	body.psh-nav-open {
		overflow: hidden;
	}

	html.psh-nav-open {
		overflow: hidden;
	}

	body.psh-nav-open .psh-site-header {
		background: transparent;
		border-bottom-color: transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	.psh-mobile-nav,
	.psh-mobile-nav__veil,
	.psh-mobile-nav__glow,
	.psh-mobile-nav__line,
	.psh-mobile-nav__head,
	.psh-mobile-nav .psh-menu > li,
	.psh-mobile-nav .psh-header-social,
	.psh-mobile-nav .psh-header-cta,
	.psh-nav-toggle__bar,
	.psh-nav-toggle__label {
		transition: none !important;
		animation: none !important;
	}

	.psh-mobile-nav__grain {
		display: none;
	}

	@media (max-width: 640px) {
		.psh-mobile-nav .psh-menu > li {
			opacity: 1;
			transform: none;
			filter: none;
		}

		body.psh-nav-open .psh-mobile-nav__head,
		body.psh-nav-open .psh-mobile-nav .psh-header-social,
		body.psh-nav-open .psh-mobile-nav .psh-header-cta {
			opacity: 1;
			transform: none;
		}
	}
}
