/* =====================================================
   MPX – CHANGE HEADER ON SCROLL
   Dual headers • SEO safe • Elementor
===================================================== */

.mpx-no-trans {
	transition: none !important;
}

/* Primary Header */
.mpx-header-primary.mpx-is-sticky {
	position: fixed;
	top: var(--mpx-admin-offset);
	left: 0;
	right: 0;
	z-index: 10000;
	/* Primary above secondary */

	transform: translateY(-110%);
	transition: transform var(--mpx-anim-ms) ease;
	will-change: transform;
}

.mpx-header-primary.mpx-is-sticky.mpx-show {
	transform: translateY(0);
}

/* Secondary Header */
.mpx-header-secondary.mpx-is-sticky {
	position: fixed;
	top: var(--mpx-admin-offset);
	left: 0;
	right: 0;
	z-index: 9999;
	/* Secondary below primary */

	transform: translateY(-110%);
	transition: transform var(--mpx-anim-ms) ease;
	will-change: transform;
}

.mpx-header-secondary.mpx-is-sticky.mpx-show {
	transform: translateY(0);
}

/* =====================================================
   LOGO SWAP (OPTIONAL)
   Apply to both headers
===================================================== */

/* Primary logo swap */
.mpx-header-primary .logo-2 {
	display: none;
}

.header-scrolled.mpx-header-primary .logo-1 {
	display: none;
}

.header-scrolled.mpx-header-primary .logo-2 {
	display: inline-block;
}

/* Secondary logo swap (if needed) */
.mpx-header-secondary .logo-secondary-2 {
	display: none;
}

.header-scrolled.mpx-header-secondary .logo-secondary-1 {
	display: none;
}

.header-scrolled.mpx-header-secondary .logo-secondary-2 {
	display: inline-block;
}

/* =====================================================
   BASE STRUCTURE
===================================================== */

.mpx-header__inner {
	width: 100%;
	margin: 0 auto;
}

.header-scrolled.mpx-header .e-con-inner {
	position: relative;
}

/* =====================================================
   PRIMARY HEADER - SHRINK MODE
===================================================== */

.header-scrolled.mpx-header-primary:where(:not(.mpx-header-pill)):not([data-header-mode]),
.header-scrolled.mpx-header-primary:where(:not(.mpx-header-pill))[data-header-mode='shrink'] {
	background: var(--primary-shrink-bg);
	backdrop-filter: blur(var(--primary-shrink-blur));
	box-shadow: var(--primary-shrink-shadow);
}

.header-scrolled.mpx-header-primary:where(:not(.mpx-header-pill)):not([data-header-mode]) .e-con-inner,
.header-scrolled.mpx-header-primary:where(:not(.mpx-header-pill))[data-header-mode='shrink'] .e-con-inner {
	padding-top: var(--primary-shrink-pad-y);
	padding-bottom: var(--primary-shrink-pad-y);
}

.header-scrolled.mpx-header-primary:where(:not(.mpx-header-pill)):not([data-header-mode]) .mpx-header__inner,
.header-scrolled.mpx-header-primary:where(:not(.mpx-header-pill))[data-header-mode='shrink'] .mpx-header__inner {
	max-width: none;
	padding: 0;
	background: none;
	box-shadow: none;
	border-radius: 0;
}

/* =====================================================
   PRIMARY HEADER - NAV MENU COLORS ON SCROLL
===================================================== */

/* Default state (when scrolled) */
.header-scrolled.mpx-header-primary .elementor-nav-menu a {
	color: var(--primary-menu-color) !important;
	transition: color var(--mpx-anim-ms) ease !important;
}

/* Hover state */
.header-scrolled.mpx-header-primary .elementor-nav-menu a:hover {
	color: var(--primary-menu-color-hover) !important;
}

/* Active menu item (current page) */
.header-scrolled.mpx-header-primary .elementor-nav-menu a.elementor-item-active {
	color: var(--primary-menu-color-hover) !important;
}

/* =====================================================
   SECONDARY HEADER - SHRINK MODE
===================================================== */

.header-scrolled.mpx-header-secondary:where(:not(.mpx-header-pill)):not([data-header-mode]),
.header-scrolled.mpx-header-secondary:where(:not(.mpx-header-pill))[data-header-mode='shrink'] {
	background: var(--secondary-shrink-bg);
	backdrop-filter: blur(var(--secondary-shrink-blur));
	box-shadow: var(--secondary-shrink-shadow);
}

.header-scrolled.mpx-header-secondary:where(:not(.mpx-header-pill)):not([data-header-mode]) .e-con-inner,
.header-scrolled.mpx-header-secondary:where(:not(.mpx-header-pill))[data-header-mode='shrink'] .e-con-inner {
	padding-top: var(--secondary-shrink-pad-y);
	padding-bottom: var(--secondary-shrink-pad-y);
}

.header-scrolled.mpx-header-secondary:where(:not(.mpx-header-pill)):not([data-header-mode]) .mpx-header__inner,
.header-scrolled.mpx-header-secondary:where(:not(.mpx-header-pill))[data-header-mode='shrink'] .mpx-header__inner {
	max-width: none;
	padding: 0;
	background: none;
	box-shadow: none;
	border-radius: 0;
}

/* =====================================================
   SECONDARY HEADER - NAV MENU COLORS ON SCROLL
   For Elementor standard nav menu (not mega menu)
===================================================== */

/* Default state (when scrolled) */
.header-scrolled.mpx-header-secondary .mpx-nav-secondary .elementor-nav-menu a {
	color: var(--secondary-menu-color) !important;
	transition: color var(--mpx-anim-ms) ease !important;
}

/* Hover state */
.header-scrolled.mpx-header-secondary .mpx-nav-secondary .elementor-nav-menu a:hover {
	color: var(--secondary-menu-color-hover) !important;
}

/* Active menu item (current page) */
.header-scrolled.mpx-header-secondary .mpx-nav-secondary .elementor-nav-menu a.elementor-item-active {
	color: var(--secondary-menu-color-hover) !important;
}

/* =====================================================
   SMOOTH VISUAL POLISH
===================================================== */

.header-scrolled .mpx-header__inner {
	transition:
		padding 180ms ease,
		background 180ms ease,
		box-shadow 180ms ease;
}

/* Spacer styling */
.mpx-header-spacer {
	transition: height var(--mpx-anim-ms) ease;
	pointer-events: none;
}

/* Elementor header setup:
 * - Outer role: mpx-header-primary or mpx-header-secondary.
 * - Optional scrolled pill: mpx-header-pill with one mpx-header__inner container.
 * - Logo widgets: logo-1/logo-2 or logo-secondary-1/logo-secondary-2.
 * - State classes are owned by header-menu.js; do not set them manually.
 *
 * Full configuration: outer-workspace docs/headers-and-navigation.md.
 */

@media (prefers-reduced-motion: reduce) {

	.mpx-header-primary,
	.mpx-header-secondary,
	.mpx-header__inner,
	.mpx-header-spacer {
		transition: none !important;
	}
}

/* Opt-in pill surface. Default and legacy shrink paths retain their behavior. */
:is(.mpx-header-primary, .mpx-header-secondary).mpx-header-pill.header-scrolled {
	min-height: 0 !important;
	padding: var(--mpx-header-pill-gap) var(--mpx-header-pill-gutter) 0 !important;
	background: none !important;
	backdrop-filter: none;
	box-shadow: none;
	color: var(--mpx-header-pill-color);
	pointer-events: none;
	--primary-menu-color: var(--mpx-header-pill-color);
	--primary-menu-color-hover: var(--mpx-header-pill-link-hover);
	--secondary-menu-color: var(--mpx-header-pill-color);
	--secondary-menu-color-hover: var(--mpx-header-pill-link-hover);
}

.mpx-header-pill.header-scrolled::before {
	background: none !important;
	pointer-events: none;
}

.mpx-header-pill.header-scrolled>.e-con-inner {
	width: 100%;
	max-width: none;
	padding: 0;
}

.mpx-header-pill.header-scrolled .mpx-header__inner {
	width: 100%;
	max-width: var(--mpx-header-pill-width) !important;
	min-width: 0;
	margin-inline: auto;
	padding: var(--mpx-header-pill-padding) !important;
	border: 1px solid var(--mpx-header-pill-border);
	border-radius: var(--mpx-brd-pill) !important;
	background: var(--mpx-header-pill-bg) !important;
	color: var(--mpx-header-pill-color);
	box-shadow: var(--mpx-header-pill-shadow) !important;
	pointer-events: auto;
	transition:
		background var(--mpx-anim-ms) ease, box-shadow var(--mpx-anim-ms) ease;
}

@supports (backdrop-filter: blur(1px)) {
	.mpx-header-pill.header-scrolled .mpx-header__inner {
		background: var(--mpx-header-pill-glass-bg) !important;
		backdrop-filter: blur(var(--mpx-header-pill-blur));
	}
}

@media (max-width: 767px) {
	.mpx-header-pill.header-scrolled {
		--mpx-header-pill-gap: var(--mpx-pad-sm);
		--mpx-header-pill-gutter: var(--mpx-pad-sm);
	}
}

/* HTML-widget trigger; only enabled when its target has modal support. */
.mpx-nav-button[data-mpx-nav-target] {
	display: none;
}

.mpx-nav-button.mpx-nav-ready,
body.elementor-editor-active .mpx-nav-button[data-mpx-nav-target] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--mpx-nav-trigger-color, inherit);
	cursor: pointer;
}

.mpx-nav-button--light {
	--mpx-nav-trigger-color: var(--mpx-clr-acc-a);
}

.mpx-hamburger {
	position: relative;
	display: block;
	width: 24px;
	height: 17px;
}

.mpx-hamburger span {
	position: absolute;
	left: 0;
	width: 24px;
	height: 3px;
	border-radius: var(--mpx-brd-pill);
	background: currentColor;
	transition:
		transform var(--mpx-anim-ms, 180ms) ease, opacity var(--mpx-anim-ms, 180ms) ease;
}

.mpx-hamburger span:nth-child(1) {
	top: 0;
}

.mpx-hamburger span:nth-child(2) {
	top: 7px;
}

.mpx-hamburger span:nth-child(3) {
	top: 14px;
}

.mpx-nav-open .mpx-hamburger span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.mpx-nav-open .mpx-hamburger span:nth-child(2) {
	opacity: 0;
}

.mpx-nav-open .mpx-hamburger span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Hide the off-canvas content while editing pages in Elementor. */
body.elementor-editor-active .mpx-navigation {
	display: none !important;
}

/* Unsupported browsers/no JS retain the template as ordinary navigation. */
.mpx-navigation-dialog {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(100%, var(--mpx-nav-width));
	height: 100vh;
	height: 100dvh;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	padding: var(--mpx-nav-padding);
	box-sizing: border-box;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: var(--mpx-nav-bg);
	color: var(--mpx-nav-color);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.mpx-navigation-dialog[open] {
	animation: mpx-nav-enter var(--mpx-anim-ms, 180ms) ease both;
}

.mpx-navigation-dialog::backdrop {
	background: var(--mpx-nav-backdrop);
}

/* Reset only the host wrappers, never the Saved Template's containers/widgets. */
.mpx-navigation-dialog>.mpx-navigation-ready,
.mpx-navigation-dialog>.mpx-navigation-ready>.e-con-inner {
	width: 100% !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
}

.mpx-navigation-dialog .mpx-nav-close {
	position: fixed;
	top: max(var(--mpx-pad-sm), env(safe-area-inset-top));
	right: max(var(--mpx-pad-sm), env(safe-area-inset-right));
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--mpx-clr-gray-d);
	background: transparent;
	cursor: pointer;
}

.mpx-navigation-dialog .mpx-nav-close::before,
.mpx-navigation-dialog .mpx-nav-close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 2px;
	border-radius: var(--mpx-brd-pill);
	background: currentColor;
	transform: translate(-50%, -50%) rotate(45deg);
	pointer-events: none;
}

.mpx-navigation-dialog .mpx-nav-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.mpx-nav-button:focus-visible,
.mpx-nav-close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@keyframes mpx-nav-enter {
	from {
		transform: translateX(100%);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mpx-navigation-dialog[open] {
		animation: none;
	}

	.mpx-hamburger span,
	.mpx-header-pill.header-scrolled .mpx-header__inner {
		transition: none !important;
	}
}

@media (forced-colors: active) {

	.mpx-nav-button,
	.mpx-navigation-dialog .mpx-nav-close {
		color: ButtonText;
	}

	.mpx-header-pill.header-scrolled .mpx-header__inner,
	.mpx-navigation-dialog {
		background: Canvas;
		color: CanvasText;
		border: 1px solid CanvasText;
	}
}

/* Hide the pill's shadow/focus targets after its existing slide-out completes. */
.mpx-header-pill.mpx-is-sticky {
	visibility: hidden;
	transition:
		transform var(--mpx-anim-ms) ease, visibility 0s linear var(--mpx-anim-ms);
}

.mpx-header-pill.mpx-is-sticky.mpx-show {
	visibility: visible;
	transition-delay: 0s;
}

/* =======================
   Keep this desktop navigation horizontal
======================= */

.mpx-desktop-menu nav.hfe-nav-menu__layout-horizontal {
	width: auto !important;
	left: auto !important;
}

.mpx-desktop-menu nav.hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center;
}

.mpx-desktop-menu nav.hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu > li {
	flex: 0 0 auto;
}

.mpx-desktop-menu nav.hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu > li > a {
	white-space: nowrap;
}