/* Site footer */
.mehe-footer {
	position: relative;
	z-index: 20;
	isolation: isolate;
	margin-top: clamp(6rem, 11vw, 9rem);
	background: #176B45;
	color: #FFFFFF;
}

.mehe-footer__wave {
	position: absolute;
	inset: -110px 0 auto;
	z-index: -1;
	height: 112px;
	pointer-events: none;
	overflow: hidden;
}

.mehe-footer__wave svg {
	display: block;
	width: 100%;
	height: 100%;
}

.mehe-footer__wave-back {
	fill: #176B45;
	opacity: 1;
}

.mehe-footer__wave-front {
	fill: #176B45;
}

.mehe-footer__main {
	display: grid;
	grid-template-columns: minmax(240px, 1.45fr) minmax(150px, 0.8fr) minmax(180px, 1fr) minmax(150px, 0.72fr);
	gap: clamp(30px, 4vw, 58px);
	padding-block: clamp(48px, 6vw, 72px);
}

.mehe-footer__brand-link {
	display: inline-flex;
	align-items: center;
	margin-bottom: 18px;
}

.mehe-footer__brand-link > span {
	display: grid;
	place-items: center;
	width: 88px;
	height: 64px;
	padding: 6px;
	border-radius: 17px;
	background: #FFFFFF;
	box-shadow: 0 14px 32px rgba(25, 28, 26, 0.16);
}

.mehe-footer__brand-link img {
	width: 72px;
	height: 52px;
	object-fit: contain;
}

.mehe-footer__brand > p {
	max-width: 390px;
	margin: 0;
	color: #FFFFFF;
	font-size: 0.86rem;
	line-height: 2.1;
}

.mehe-footer__column h2 {
	position: relative;
	margin: 0 0 22px;
	padding-bottom: 12px;
	color: #FFFFFF;
	font-size: 1rem;
}

.mehe-footer__column h2::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-end: 0;
	width: 34px;
	height: 2px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
}

.mehe-footer__links {
	display: grid;
	gap: 9px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.mehe-footer__links a {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: #FFFFFF;
	font-size: 0.82rem;
}

.mehe-footer__links a::before {
	content: "";
	flex: 0 0 auto;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #FFFFFF;
	transition: transform 180ms ease, opacity 180ms ease;
}

.mehe-footer__links a:hover,
.mehe-footer__links a:focus-visible {
	color: #FFFFFF;
	transform: translateX(-3px);
}

.mehe-footer__links a:hover::before,
.mehe-footer__links a:focus-visible::before {
	opacity: 0.72;
	transform: scale(1.35);
}

/* Single-item license slider */
.mehe-license-slider {
	width: min(100%, 150px);
}

.mehe-license-slider__viewport {
	width: 100%;
	overflow: hidden;
	border-radius: 16px;
}

.mehe-license-slider__track {
	direction: ltr;
	display: flex;
	width: 100%;
	transform: translate3d(0, 0, 0);
	transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.mehe-license-slider__slide {
	direction: rtl;
	display: flex;
	flex: 0 0 100%;
	aspect-ratio: 1 / 1;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 6px;
	padding: 14px 10px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 16px;
	background: #FFFFFF;
	color: #176B45;
	text-align: center;
}

.mehe-license-slider__icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin-bottom: 1px;
	border-radius: 12px;
	background: #EAF3EE;
	color: #176B45;
	font-size: 1rem;
}

.mehe-license-slider__slide strong {
	color: #176B45;
	font-size: 0.78rem;
	font-weight: 500;
}

.mehe-license-slider__slide small {
	max-width: 126px;
	color: #176B45;
	font-size: 0.62rem;
	line-height: 1.65;
}

.mehe-license-slider__controls {
	direction: ltr;
	display: grid;
	grid-template-columns: 32px minmax(42px, 1fr) 32px;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
}

.mehe-license-slider__controls button {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 10px;
	background: transparent;
	color: #FFFFFF;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mehe-license-slider__controls button:hover,
.mehe-license-slider__controls button:focus-visible {
	border-color: rgba(255, 255, 255, 0.55);
	background: transparent;
	color: #FFFFFF;
	transform: scale(.94);
}

.mehe-license-slider__counter {
	color: #FFFFFF;
	font-size: 0.72rem;
	text-align: center;
}

.mehe-license-slider__counter b {
	color: #FFFFFF;
	font-weight: 500;
}

.mehe-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	background: #176B45;
}

.mehe-footer__bottom .site-container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 66px;
	padding-block: 15px;
}

.mehe-footer__bottom p {
	margin: 0;
	color: #FFFFFF;
	font-size: 0.74rem;
	text-align: center;
}

/* Bottom navigation is only available on mobile and tablet. */
.mehe-footer-nav {
	display: none;
}

/* Services menu above the mobile/tablet footer navigation */
.mehe-services-rail[hidden] {
	display: none;
}

.mehe-services-rail {
	position: fixed;
	inset: 0 0 calc(78px + env(safe-area-inset-bottom));
	z-index: 10000;
	display: block;
	padding: 0;
	pointer-events: none;
}

.mehe-services-rail__outside {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
	background: transparent !important;
	box-shadow: none;
	color: transparent;
	opacity: 0;
	pointer-events: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

.mehe-services-rail__outside:hover,
.mehe-services-rail__outside:focus,
.mehe-services-rail__outside:focus-visible,
.mehe-services-rail__outside:active {
	border: 0;
	outline: 0;
	background: transparent !important;
	box-shadow: none !important;
}

.mehe-services-rail.is-open .mehe-services-rail__outside {
	pointer-events: auto;
}

.mehe-services-rail__panel {
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	width: 100%;
	height: auto;
	max-height: calc(100svh - 112px - env(safe-area-inset-bottom));
	padding: 18px clamp(18px, 4vw, 46px) 22px;
	border: 1px solid var(--mehe-line);
	border-inline: 0;
	border-bottom: 0;
	border-radius: 0;
	background: var(--mehe-white);
	box-shadow: 0 -12px 34px rgba(25, 28, 26, 0.13);
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(0, calc(100% + 16px), 0);
	transition:
		transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
		opacity 180ms ease,
		visibility 0s linear 360ms;
	will-change: transform, opacity;
}

.mehe-services-rail.is-open .mehe-services-rail__panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
	transition-delay: 0s;
}

.mehe-services-rail__handle {
	display: none;
}

.mehe-services-rail__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	max-width: 1120px;
	margin-inline: auto;
	padding: 0 0 14px;
	border-bottom: 1px solid var(--mehe-line);
}

.mehe-services-rail__header span {
	display: block;
	margin-bottom: 3px;
	color: var(--mehe-muted);
	font-size: 0.73rem;
}

.mehe-services-rail__header h2 {
	margin: 0;
	font-size: clamp(1.08rem, 3vw, 1.32rem);
}

.mehe-services-rail__close {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mehe-soft);
	color: var(--mehe-secondary);
	transition: background-color 150ms ease, color 150ms ease;
}

.mehe-services-rail__close:hover,
.mehe-services-rail__close:focus-visible {
	background: var(--mehe-soft);
	color: var(--mehe-secondary);
	transform: scale(.94);
}

.mehe-services-rail__links {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	max-width: 1120px;
	margin-inline: auto;
	padding-top: 16px;
}

.mehe-services-rail__links > a {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 18px;
	align-items: center;
	gap: 11px;
	min-height: 64px;
	padding: 10px 12px;
	border: 1px solid var(--mehe-line);
	border-radius: 14px;
	background: var(--mehe-white);
	color: var(--mehe-ink);
	font-size: 0.82rem;
	font-weight: 500;
}


.mehe-services-rail__links > a:hover,
.mehe-services-rail__links > a:focus-visible {
	border-color: var(--mehe-primary);
	background: var(--mehe-soft);
	color: var(--mehe-secondary);
	transform: translateY(-1px);
}

.mehe-services-rail__icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 13px;
	background: var(--mehe-accent);
	color: var(--mehe-secondary);
	font-size: 1rem;
}

.mehe-services-rail__arrow {
	color: var(--mehe-primary);
	font-size: 0.72rem;
}

body.mehe-services-rail-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	body {
		padding-bottom: calc(78px + env(safe-area-inset-bottom));
	}

	.mehe-footer {
		margin-top: clamp(5.5rem, 13vw, 8rem);
	}

	.mehe-footer__main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 38px 52px;
		padding-block: 54px;
	}

	.mehe-footer__licenses {
		max-width: 180px;
	}

	.mehe-footer-nav {
		position: fixed;
		z-index: 9999;
		inset-inline: 0;
		inset-block-end: 0;
		display: block;
		height: calc(78px + env(safe-area-inset-bottom));
		padding-bottom: env(safe-area-inset-bottom);
		border-top: 1px solid var(--mehe-line);
		border-radius: 0;
		background: #FFFFFF;
		box-shadow: none;
	}

	.mehe-footer-nav__list {
		direction: rtl;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		align-items: stretch;
		gap: 3px;
		width: 100%;
		min-height: 78px;
		padding: 0 clamp(12px, 2.4vw, 24px);
		margin: 0;
		list-style: none;
	}

	.mehe-footer-nav__item {
		position: relative;
		min-width: 0;
	}

	.mehe-footer-nav__item:not(.mehe-footer-nav__item--logo):not(.mehe-footer-nav__item--services)::before {
		content: "";
		position: absolute;
		inset-block-start: 0;
		inset-inline: 28%;
		height: 1px;
		background: var(--mehe-secondary);
		transform: scaleX(0);
		transition: transform 170ms ease;
	}

	.mehe-footer-nav__item.is-current:not(.mehe-footer-nav__item--services)::before {
		transform: scaleX(1);
	}

	.mehe-footer-nav__link {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		gap: 5px;
		width: 100%;
		height: 100%;
		min-height: 78px;
		padding: 10px 4px 8px;
		border: 0;
		background: transparent;
		color: var(--mehe-muted);
		font-family: inherit;
		font-size: 0.65rem;
		font-weight: 400;
		line-height: 1.35;
		text-align: center;
	}

	button.mehe-footer-nav__link {
		appearance: none;
	}

	.mehe-footer-nav__link > i {
		font-size: 1.04rem;
	}

	.mehe-footer-nav__item.is-current:not(.mehe-footer-nav__item--services) .mehe-footer-nav__link,
	.mehe-footer-nav__link:hover,
	.mehe-footer-nav__link:focus-visible {
		color: var(--mehe-secondary);
	}

	.mehe-footer-nav__item--services .mehe-footer-nav__link,
	.mehe-footer-nav__item--services .mehe-footer-nav__link[aria-expanded="true"],
	.mehe-footer-nav__item--services .mehe-footer-nav__link:hover,
	.mehe-footer-nav__item--services .mehe-footer-nav__link:focus-visible {
		color: var(--mehe-muted);
	}

	.mehe-footer-nav__item--logo {
		z-index: 2;
	}

	.mehe-footer-nav__logo {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
		min-height: 78px;
		padding: 0;
	}

	.mehe-footer-nav__logo > span {
		position: relative;
		display: grid;
		place-items: center;
		width: 56px;
		height: 56px;
		padding: 5px;
		border: 0;
		border-radius: 50%;
		background: #FFFFFF;
		box-shadow: none;
		transform: none;
	}

	.mehe-footer-nav__logo > span::before,
	.mehe-footer-nav__logo > span::after {
		content: "";
		position: absolute;
		top: 5px;
		bottom: 5px;
		width: calc(50% + 4px);
		border: 1px solid #176B45;
		pointer-events: none;
		transition: transform 220ms ease;
	}

	.mehe-footer-nav__logo > span::before {
		left: -4px;
		border-right: 0;
		border-radius: 999px 0 0 999px;
		transform-origin: right center;
	}

	.mehe-footer-nav__logo > span::after {
		right: -4px;
		border-left: 0;
		border-radius: 0 999px 999px 0;
		transform-origin: left center;
	}

	.mehe-footer-nav__logo:hover > span::before,
	.mehe-footer-nav__logo:focus-visible > span::before,
	.mehe-footer-nav__logo:hover > span::after,
	.mehe-footer-nav__logo:focus-visible > span::after {
		transform: scale(1.035);
	}

	.mehe-footer-nav__logo img {
		width: 44px;
		height: 34px;
		object-fit: contain;
	}
}

@media (min-width: 1025px) {
	.mehe-services-rail {
		display: none !important;
	}
}

@media (max-width: 640px) {
	.mehe-footer__wave {
		inset-block-start: -88px;
		height: 90px;
	}

	.mehe-footer__main {
		grid-template-columns: 1fr;
		gap: 34px;
		padding-block: 46px;
	}

	.mehe-footer__brand > p {
		max-width: none;
	}

	.mehe-footer__licenses,
	.mehe-license-slider {
		width: 100%;
		max-width: 150px;
	}

	.mehe-license-slider {
		margin-inline: auto;
	}

	.mehe-footer-nav__list {
		gap: 1px;
		padding-inline: 10px;
	}

	.mehe-footer-nav__link {
		gap: 4px;
		padding-inline: 4px;
		font-size: 0.58rem;
	}

	.mehe-footer-nav__link > span {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.mehe-footer-nav__link > i {
		font-size: 0.98rem;
	}

	.mehe-footer-nav__logo > span {
		width: 52px;
		height: 52px;
	}

	.mehe-footer-nav__logo img {
		width: 41px;
		height: 32px;
	}

	.mehe-services-rail__panel {
		padding: 14px 12px 16px;
	}

	.mehe-services-rail__links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		padding-top: 13px;
	}

	.mehe-services-rail__links > a {
		grid-template-columns: 36px minmax(0, 1fr);
		gap: 9px;
		min-height: 56px;
		padding: 8px 9px;
		font-size: 0.73rem;
	}

	.mehe-services-rail__icon {
		width: 36px;
		height: 36px;
		border-radius: 11px;
		font-size: 0.88rem;
	}

	.mehe-services-rail__arrow {
		display: none;
	}
}

@media (max-width: 370px) {
	.mehe-footer-nav__list {
		padding-inline: 7px;
	}

	.mehe-footer-nav__link {
		font-size: 0.53rem;
	}

	.mehe-footer-nav__logo > span {
		width: 48px;
		height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mehe-footer-nav *,
	.mehe-services-rail *,
	.mehe-license-slider * {
		transition-duration: 0.01ms !important;
	}
}

.mehe-license-slider__controls button:disabled {
	border-color: rgba(255, 255, 255, 0.2);
	background: transparent;
	color: rgba(255, 255, 255, 0.34);
	cursor: default;
	transform: none;
}


/* Four-color palette balance */
.mehe-footer {
	background: var(--mehe-primary);
	color: var(--mehe-white);
}
.mehe-footer__wave-back { fill: var(--mehe-primary); }
.mehe-footer__wave-front { fill: var(--mehe-primary); }
.mehe-footer__column h2::after,
.mehe-license-slider__counter b { color: var(--mehe-green-soft); }
.mehe-footer-nav,
.mehe-services-rail__panel { background: var(--mehe-white); }
