/**
 * NM custom mobile header — replaces theme header below 1025px.
 */

@media (max-width: 1024px) {
	body.nm-ds #header {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
		height: 0 !important;
		overflow: hidden !important;
	}

	body.nm-ds {
		padding-top: 64px !important;
	}

	body.nm-ds.admin-bar {
		padding-top: calc(64px + 46px) !important;
	}

	body.nm-ds.nm-mh-open {
		overflow: hidden !important;
	}
}

@media (max-width: 1024px) and (min-width: 783px) {
	body.nm-ds.admin-bar {
		padding-top: calc(64px + 32px) !important;
	}
}

/* Custom mobile chrome — only visible on small screens */
.nm-mh {
	display: none;
}

@media (max-width: 1024px) {
	.nm-mh {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 100000;
		font-family: Poppins, system-ui, sans-serif;
		--nm-mh-navy: #0b2e59;
		--nm-mh-coral: #cf2030;
		--nm-mh-paper: #f7f5f2;
		--nm-mh-line: rgba(0, 26, 54, 0.1);
	}

	body.admin-bar .nm-mh {
		top: 46px;
	}
}

@media (max-width: 1024px) and (min-width: 783px) {
	body.admin-bar .nm-mh {
		top: 32px;
	}
}

.nm-mh__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 64px;
	padding: 0 1rem;
	background: rgba(255, 255, 255, 0.97);
	border-bottom: 1px solid var(--nm-mh-line);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-sizing: border-box;
}

body.nm-ds-header-scrolled .nm-mh__bar {
	box-shadow: 0 10px 28px rgba(0, 26, 54, 0.08);
}

.nm-mh__logo {
	display: flex;
	align-items: center;
	flex: 0 1 auto;
	min-width: 0;
	text-decoration: none;
	line-height: 0;
}

.nm-mh__logo-crop {
	/* Crop NM2.png to mark + wordmark only */
	--cw: 118px;
	--sx: 362;
	--sy: 220;
	--sw: 743;
	--sh: 282;
	--ch: calc(var(--cw) * var(--sh) / var(--sw));
	width: var(--cw);
	height: var(--ch);
	overflow: hidden;
	position: relative;
}

.nm-mh__logo img {
	position: absolute;
	width: calc(var(--cw) * 1536 / var(--sw));
	max-width: none;
	height: auto;
	left: calc(var(--cw) * var(--sx) / var(--sw) * -1);
	top: calc(var(--ch) * var(--sy) / var(--sh) * -1);
	display: block;
}

.nm-mh__burger {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--nm-mh-line);
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	position: relative;
	appearance: none;
	-webkit-appearance: none;
}

.nm-mh__burger span {
	position: absolute;
	left: 11px;
	right: 11px;
	height: 1.5px;
	background: var(--nm-mh-navy);
	border-radius: 1px;
	transition: transform 0.22s ease, opacity 0.22s ease, top 0.22s ease;
}

.nm-mh__burger span:nth-child(1) { top: 15px; }
.nm-mh__burger span:nth-child(2) { top: 21px; }
.nm-mh__burger span:nth-child(3) { top: 27px; }

body.nm-mh-open .nm-mh__burger span:nth-child(1) {
	top: 21px;
	transform: rotate(45deg);
}

body.nm-mh-open .nm-mh__burger span:nth-child(2) {
	opacity: 0;
}

body.nm-mh-open .nm-mh__burger span:nth-child(3) {
	top: 21px;
	transform: rotate(-45deg);
}

.nm-mh__scrim {
	position: fixed;
	inset: 0;
	background: rgba(0, 26, 54, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	z-index: 99998;
}

body.nm-mh-open .nm-mh__scrim {
	opacity: 1;
	pointer-events: auto;
}

body.admin-bar .nm-mh__scrim {
	top: 46px;
}

@media (min-width: 783px) {
	body.admin-bar .nm-mh__scrim {
		top: 32px;
	}
}

.nm-mh__panel {
	position: fixed;
	top: 64px;
	left: 0;
	right: 0;
	bottom: 0;
	background: #fff;
	z-index: 99999;
	transform: translateY(-8px);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.28s ease, opacity 0.28s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 0.5rem 0 2.5rem;
	box-sizing: border-box;
}

body.admin-bar .nm-mh__panel {
	top: calc(64px + 46px);
}

@media (min-width: 783px) {
	body.admin-bar .nm-mh__panel {
		top: calc(64px + 32px);
	}
}

body.nm-mh-open .nm-mh__panel {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.nm-mh__nav {
	list-style: none;
	margin: 0;
	padding: 0.25rem 0;
}

.nm-mh__nav > li {
	border-bottom: 1px solid var(--nm-mh-line);
}

.nm-mh__nav > li > a,
.nm-mh__nav > li > button.nm-mh__parent {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 1rem 1.25rem;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--nm-mh-navy) !important;
	text-decoration: none !important;
	background: transparent;
	border: 0;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
	line-height: 1.3;
}

.nm-mh__nav > li > a:hover,
.nm-mh__nav > li > button.nm-mh__parent:hover {
	color: var(--nm-mh-coral) !important;
	background: var(--nm-mh-paper);
}

.nm-mh__chev {
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
	margin-left: 0.75rem;
	opacity: 0.55;
}

.nm-mh__item--open > .nm-mh__parent .nm-mh__chev {
	transform: rotate(225deg);
	opacity: 1;
}

.nm-mh__sub {
	list-style: none;
	margin: 0;
	padding: 0 0 0.65rem;
	display: none;
	background: var(--nm-mh-paper);
}

.nm-mh__item--open > .nm-mh__sub {
	display: block;
}

.nm-mh__sub a {
	display: block;
	padding: 0.7rem 1.25rem 0.7rem 1.75rem;
	font-size: 0.95rem;
	font-weight: 500;
	color: #3a4656 !important;
	text-decoration: none !important;
}

.nm-mh__sub a:hover {
	color: var(--nm-mh-coral) !important;
}

.nm-mh__cta {
	margin: 1.5rem 1.25rem 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.95rem 1.25rem;
	background: var(--nm-mh-coral);
	color: #fff !important;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none !important;
	border-radius: 2px;
}

.nm-mh__cta:hover {
	background: #c9443a;
	color: #fff !important;
}

.nm-mh__meta {
	margin: 1.25rem 1.25rem 0;
	padding-top: 1rem;
	border-top: 1px solid var(--nm-mh-line);
	font-size: 0.85rem;
	color: #5a6574;
	line-height: 1.6;
}

.nm-mh__meta a {
	color: var(--nm-mh-navy) !important;
	font-weight: 500;
	text-decoration: none !important;
}

@media (min-width: 1025px) {
	.nm-mh {
		display: none !important;
	}
}
