/* Desktop header overrides. */
.site-header.mehe-desktop-header {
	position: sticky;
	inset-block-start: 0;
	z-index: 1000;
	background: #FFFFFF;
	border-bottom: 1px solid #E3E7E5;
	backdrop-filter: none;
}

.admin-bar .site-header.mehe-desktop-header {
	inset-block-start: 32px;
}

.mehe-desktop-header .site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: min(calc(100% - clamp(32px, 4vw, 56px)), 1260px);
	max-width: 1260px;
	gap: clamp(18px, 2.15vw, 34px);
	min-height: 70px;
	margin-inline: auto;
}

.mehe-header__primary,
.mehe-header__actions {
	display: flex;
	align-items: center;
}

.mehe-header__primary {
	flex: 1 1 auto;
	gap: clamp(20px, 2vw, 32px);
	min-width: 0;
}

.mehe-header__actions {
	flex: 0 0 auto;
	flex-direction: row;
	gap: 10px;
	min-width: max-content;
}

.mehe-desktop-header .site-branding {
	flex: 0 0 auto;
	gap: 0;
}

.mehe-desktop-header .site-branding__mark,
.mehe-desktop-header .custom-logo-link {
	width: 54px;
	height: 48px;
	padding: 2px;
	border-radius: 10px;
	background: transparent;
	overflow: hidden;
}

.mehe-desktop-header .site-branding__mark img,
.mehe-desktop-header .custom-logo {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mehe-desktop-header .main-navigation {
	position: static;
	flex: 1 1 auto;
	justify-self: auto;
	min-width: 0;
}

.mehe-primary-menu,
.mehe-primary-menu ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mehe-primary-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: clamp(12px, 1.65vw, 26px);
}

.mehe-primary-menu > li {
	position: relative;
}

.mehe-primary-menu > li > a {
	position: relative;
	display: flex;
	align-items: center;
	gap: clamp(7px, 0.55vw, 9px);
	min-height: 42px;
	padding: 8px clamp(10px, 0.85vw, 14px);
	border-radius: 0;
	background: transparent !important;
	color: #191C1A;
	font-size: clamp(0.82rem, 0.73rem + 0.12vw, 0.9rem);
	font-weight: 400;
	white-space: nowrap;
}

.mehe-primary-menu > li > a::after {
	content: "";
	position: absolute;
	inset-inline: 11px;
	inset-block-end: 3px;
	height: 2px;
	border-radius: 99px;
	background: #176B45;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 180ms ease;
}

.mehe-primary-menu > li > a > i:first-child {
	width: 18px;
	color: #176B45;
	font-size: 0.92rem;
	text-align: center;
	transition: color 180ms ease;
}

.mehe-primary-menu > li:hover > a,
.mehe-primary-menu > li:focus-within > a,
.mehe-primary-menu > li.is-current > a,
.mehe-primary-menu > li.current-menu-item > a,
.mehe-primary-menu > li.current_page_item > a,
.mehe-primary-menu > li.current-menu-ancestor > a {
	background: transparent !important;
	color: #176B45;
}

.mehe-primary-menu > li:hover > a::after,
.mehe-primary-menu > li:focus-within > a::after,
.mehe-primary-menu > li.is-current > a::after,
.mehe-primary-menu > li.current-menu-item > a::after,
.mehe-primary-menu > li.current_page_item > a::after,
.mehe-primary-menu > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
}

.mehe-primary-menu > li:hover > a > i:first-child,
.mehe-primary-menu > li:focus-within > a > i:first-child,
.mehe-primary-menu > li.is-current > a > i:first-child,
.mehe-primary-menu > li.current-menu-item > a > i:first-child,
.mehe-primary-menu > li.current_page_item > a > i:first-child,
.mehe-primary-menu > li.current-menu-ancestor > a > i:first-child {
	color: #176B45;
	transform: none;
}

.mehe-menu-chevron {
	margin-inline-start: 1px;
	font-size: 0.62rem;
	transition: transform 180ms ease;
}

.mehe-services-menu {
	position: static !important;
}

.mehe-services-menu:hover .mehe-menu-chevron,
.mehe-services-menu:focus-within .mehe-menu-chevron {
	transform: rotate(180deg);
}

.mehe-services-submenu {
	position: absolute;
	inset-block-start: calc(100% - 1px);
	inset-inline: 0;
	z-index: 20;
	width: 100%;
	padding-block: 17px;
	background: #FFFFFF;
	border-top: 1px solid #E3E7E5;
	border-bottom: 1px solid #E3E7E5;
	box-shadow: 0 16px 34px rgba(25, 28, 26, 0.09);
	opacity: 0;
	visibility: hidden;
	transform: none;
	transition: opacity 170ms ease, visibility 0s linear 170ms;
}

.mehe-services-menu:hover .mehe-services-submenu,
.mehe-services-menu:focus-within .mehe-services-submenu {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.mehe-services-submenu__inner {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	width: min(calc(100% - clamp(32px, 4vw, 56px)), 1260px);
	max-width: 1260px;
	gap: 10px;
	margin-inline: auto;
}

.mehe-services-submenu__inner > a {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 68px;
	padding: 13px 15px;
	border: 1px solid #E3E7E5;
	border-radius: 12px;
	background: #FFFFFF;
	color: #191C1A;
	font-size: 0.82rem;
	white-space: nowrap;
	transform-origin: center;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.mehe-services-submenu__inner > a i {
	display: grid;
	place-items: center;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: #FFFFFF;
	color: #176B45;
	font-size: 0.94rem;
}

.mehe-services-submenu__inner > a:hover,
.mehe-services-submenu__inner > a:focus {
	background: #176B45;
	border-color: #176B45;
	color: #FFFFFF;
	transform: scale(0.975);
}

.mehe-services-submenu__inner > a:hover i,
.mehe-services-submenu__inner > a:focus i {
	background: #176B45;
	color: #FFFFFF;
}

.mehe-user-menu {
	position: relative;
}

.mehe-user-menu__trigger,
.mehe-user-login-link {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	min-height: 42px;
	padding: 0;
	border: 1px solid #E3E7E5;
	border-radius: 11px;
	background: #FFFFFF;
	color: #176B45;
	box-shadow: none;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.mehe-user-menu__trigger:hover,
.mehe-user-menu__trigger:focus,
.mehe-user-login-link:hover,
.mehe-user-login-link:focus,
.mehe-user-menu:focus-within .mehe-user-menu__trigger {
	background: #FFFFFF;
	border-color: #E3E7E5;
	color: #176B45;
	transform: scale(.96);
	box-shadow: none;
}

.mehe-user-menu__dropdown {
	position: absolute;
	inset-block-start: calc(100% + 10px);
	inset-inline-start: auto;
	inset-inline-end: 0;
	z-index: 30;
	width: 210px;
	padding: 8px;
	border: 1px solid #E3E7E5;
	border-radius: 13px;
	background: #FFFFFF;
	box-shadow: 0 16px 34px rgba(25, 28, 26, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}

.mehe-user-menu::after {
	content: "";
	position: absolute;
	inset-block-start: 100%;
	inset-inline-start: auto;
	inset-inline-end: 0;
	width: 100%;
	height: 12px;
}

.mehe-user-menu:hover .mehe-user-menu__dropdown,
.mehe-user-menu:focus-within .mehe-user-menu__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.mehe-user-menu__dropdown a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 11px;
	border-radius: 9px;
	color: #191C1A;
	font-size: 0.84rem;
}

.mehe-user-menu__dropdown a i {
	width: 18px;
	color: #176B45;
	text-align: center;
}

.mehe-user-menu__dropdown a:hover,
.mehe-user-menu__dropdown a:focus {
	background: #176B45;
	color: #FFFFFF;
}

.mehe-user-menu__dropdown a:hover i,
.mehe-user-menu__dropdown a:focus i {
	color: #FFFFFF;
}

.mehe-user-menu__dropdown .mehe-user-menu__logout {
	margin-top: 5px;
	border-top: 1px solid #E3E7E5;
	border-radius: 0 0 9px 9px;
}

.mehe-consultation-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 7px clamp(12px, 0.9vw, 15px);
	border: 1px solid #176B45;
	border-radius: 11px;
	background: #176B45;
	color: #FFFFFF;
	font-size: clamp(0.78rem, 0.72rem + 0.08vw, 0.83rem);
	font-weight: 500;
	box-shadow: none;
	transition: background-color 180ms ease, border-color 180ms ease;
}

.mehe-consultation-trigger:hover,
.mehe-consultation-trigger:focus {
	background: #176B45;
	border-color: #176B45;
	color: #FFFFFF;
	transform: none;
	box-shadow: none;
}


.mehe-consultation-trigger:active {
	background: #176B45;
	border-color: #176B45;
	color: #FFFFFF;
	transform: none;
}

.mehe-primary-menu > li > a > i:first-child,
.mehe-consultation-trigger i,
.mehe-user-menu__trigger i,
.mehe-user-login-link i {
	transform: none !important;
}

@media (max-width: 1259px) {
	.mehe-desktop-header .site-header__inner {
		width: min(calc(100% - 28px), 1260px);
		gap: 14px;
	}

	.mehe-header__primary {
		gap: 14px;
	}

	.mehe-primary-menu {
		gap: clamp(5px, 0.65vw, 9px);
	}

	.mehe-primary-menu > li > a {
		gap: 6px;
		padding-inline: 8px;
		font-size: 0.79rem;
	}

	.mehe-consultation-trigger {
		padding-inline: 12px;
		font-size: 0.8rem;
	}

	.mehe-services-submenu__inner {
		width: min(calc(100% - 28px), 1260px);
	}

	.mehe-services-submenu__inner > a {
		white-space: normal;
	}
}

@media (max-width: 1024px) {
	.site-header.mehe-desktop-header {
		display: none !important;
	}
}


/* Restrained secondary accent */
.mehe-primary-menu > li.is-current > a,
.mehe-primary-menu > li > a:hover { color: var(--mehe-brown); }
.mehe-primary-menu > li.is-current > a::after { background: var(--mehe-brown); }
.mehe-consultation-trigger { background: var(--mehe-primary); border-color: var(--mehe-primary); }

/* Focused header interactions — v1.4.1 */
.mehe-consultation-trigger {
	transition: transform 170ms ease !important;
}
.mehe-consultation-trigger:hover,
.mehe-consultation-trigger:focus-visible {
	background: #176B45 !important;
	border-color: #176B45 !important;
	color: #FFFFFF !important;
	transform: scale(.96) !important;
}
.mehe-consultation-trigger:active {
	transform: scale(.94) !important;
}
.mehe-user-panel-link {
	text-decoration: none;
}
