/* Cresset — layout/nojs-nav.css
   No-JS fallback nav (header + footer menu), progressive-enhancement dropdowns.
   Split from style.css 2026-08-22 (Stage 1); rules verbatim. */

/** NO JS Nav **/
.nojs-menu {
	gap: 35px;
}

.nojs-nav .nojs-nav__wrap {
	display: flex;
	justify-content: flex-end;
}

.nojs-menu .menu-item a {
	color: black;
	font-family: "Metropolis", Sans-serif;
	font-size: 16px;
	font-weight: 300;
	letter-spacing: 1px;
}

.nojs-nav .nojs-menu>li>a:hover,
.nojs-nav .nojs-menu>li:hover>a {
	color: var(--e-global-color-secondary);
}

.nojs-nav .nojs-menu li.menu-item-has-children:hover>.sub-menu {
	display: flex !important;
	flex-direction: column;
}

.nojs-menu .sub-menu {
	list-style: none;
	text-align: left;
}

@media (min-width: 769px) {
	.nojs-menu .sub-menu {
		background: #fff;
		border-radius: 14px;
		box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
		border-style: solid;
		border-width: 5px;
		border-color: var(--e-global-color-19fcedc);
		padding: 0 !important;
		z-index: 999;
	}

	.nojs-menu .sub-menu a {
		display: flex;
		padding: 7px 10px;
		min-height: 40px !important;
		font-size: 14px;
		width: 100%;
	}

	.nojs-menu .sub-menu>li:first-of-type>a {
		border-top-left-radius: 8px;
		border-top-right-radius: 8px;
	}

	.nojs-menu .sub-menu>li:last-of-type>a {
		border-bottom-left-radius: 8px;
		border-bottom-right-radius: 8px;
	}

	.nojs-menu .sub-menu a:hover {
		background-color: #EEEEEE;
	}

	.nojs-menu .sub-menu li:not(:last-of-type) {
		border-style: solid;
		border-bottom: 1px solid #EEEEEE;
	}

}

.nojs-nav .nojs-menu>li>a {
	padding: 5px 0;
}

#header-nojs .nojs-menu>li:last-of-type>a {
	padding: 5px 20px;
	border: 2px solid #005172;
	border-radius: 50px;
	overflow: hidden;
	position: relative;
	transition: all 0.3s ease;
	font-weight: 800;
	color: #005172;
}

#header-nojs .nojs-menu>li:last-of-type>a:hover {
	color: white;
}

#header-nojs .nojs-menu>li:last-of-type>a:before {
	content: '';
	position: absolute;
	top: 50%;
	left: -2px;
	height: 200%;
	background: #005172;
	transition: all 0.3s ease;
	z-index: -1;
	transform: translateY(-50%);
	transform-origin: 100% 50%;
	margin: 0;
	padding: 0;
	width: 0;
}

#header-nojs .nojs-menu>li:last-of-type>a:hover:before {
	width: 102%;
}

.nojs-menu .sub-menu a {
	white-space: nowrap;
}


.nojs-menu>li.menu-item-has-children>a::after {
	content: "\f107";
	font-family: "cresset";
	font-weight: 300;
	margin-left: 6px;
	display: inline-block;
}

/* --- Anchor the submenu to its parent li --- */
.nojs-nav .nojs-menu>li {
	position: relative;
}

/* --- Keep it open while you move into the submenu --- */
.nojs-nav .nojs-menu li.menu-item-has-children:hover>.sub-menu,
.nojs-nav .nojs-menu li.menu-item-has-children:focus-within>.sub-menu {
	display: flex !important;
}

/* --- Hover bridge: eliminates micro-gaps under the parent link --- */
.nojs-nav .nojs-menu>li.menu-item-has-children::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 10px;
}

/* 1) Keep submenu open when hovering the link OR the submenu itself */
.nojs-nav .nojs-menu li.menu-item-has-children:hover>.sub-menu,
.nojs-nav .nojs-menu li.menu-item-has-children>a:hover+.sub-menu,
.nojs-nav .nojs-menu li.menu-item-has-children>.sub-menu:hover {
	display: flex !important;
	flex-direction: column;
}

/* Progressive enhancement: keep open if the submenu is hovered (modern browsers) */
.nojs-nav .nojs-menu>li.menu-item-has-children:has(> .sub-menu:hover)>.sub-menu {
	display: flex !important;
	flex-direction: column;
}

/* 2) Remove the micro-gap by overlapping the top edge slightly */
.nojs-menu .sub-menu {
	position: absolute;
	/* you already set this in the fix */
	left: 0;
	top: calc(100% - 1px);
	/* slight overlap to avoid hover drop */
	margin-top: 0;
	/* all your existing visual styles stay as-is */
}

/* 3) Bigger invisible hover bridge under the parent */
.nojs-nav .nojs-menu>li.menu-item-has-children::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 20px;
	/* was 10px — give yourself more room */
	/* no background; it just catches hover while you cross the seam */
}

@media (max-width: 768px) {
	.nojs-nav label.nojs-nav__burger {
		display: block !important;
		/* wins against later display:none */
	}

	#header-nojs .nojs-menu>li:last-of-type>a {
		display: none;
	}

	.nojs-menu {
		gap: 0;
	}
}

.nojs-nav__burger span {
	background-color: #FF9E1B;
}

/*NO JS Footer nav*/

#footer-nojs {
	display: none;
}

#footer-nojs .nojs-nav .nojs-menu {
	flex-direction: column;
	gap: 3px;
}

#footer-nojs .nojs-menu .menu-item a {
	color: black;
	font-family: "Metropolis", Sans-serif;
	font-size: 15px;
	font-weight: 300;
	letter-spacing: unset;
	padding: 0;
}

#footer-nojs .nojs-menu .menu-item a:hover {
	color: #FF9E1B;
}

@media (max-width: 768px) {
	#footer-nojs .nojs-nav .nojs-nav__wrap {
		max-height: unset;
	}

	#footer-nojs .nojs-nav .nojs-nav__wrap .nojs-menu {
		width: 100% !important;
		align-items: center !important;
	}
}
