/**
 * HealFast navbar — responsive layout (no logo/menu overlap or jam-packing).
 */

/* Kill Divi’s absolute float stacking that causes logo ↔ link overlap */
body.healfast-divi-site #main-header .container,
body.healfast-divi-site #main-header .et_menu_container {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 0.75rem !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

/* clearfix ::after becomes a 3rd flex item and parks the toggle mid-bar */
body.healfast-divi-site #main-header .container.clearfix::before,
body.healfast-divi-site #main-header .container.clearfix::after,
body.healfast-divi-site #main-header .et_menu_container.clearfix::before,
body.healfast-divi-site #main-header .et_menu_container.clearfix::after {
	content: none !important;
	display: none !important;
}

body.healfast-divi-site #main-header .logo_container,
body.healfast-divi-site #main-header .logo_container.healfast-logo-container {
	position: relative !important;
	float: none !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	bottom: auto !important;
	z-index: 3 !important;
	flex: 0 1 auto !important;
	max-width: min(42%, 320px) !important;
	margin: 0 !important;
	padding: 0.35rem 0 !important;
	min-width: 0 !important;
}

body.healfast-divi-site #main-header #et-top-navigation {
	position: relative !important;
	float: none !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	bottom: auto !important;
	z-index: 2 !important;
	flex: 0 0 auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	margin: 0 0 0 auto !important; /* pin toggle / links to the right */
	/* Kill Divi’s inline padding-left (logo clearance) that crushes the links */
	padding: 0.35rem 0 !important;
	padding-left: 0 !important;
	min-width: 0 !important;
}

body.healfast-divi-site #main-header nav#top-menu-nav {
	float: none !important;
	margin: 0 !important;
	max-width: 100%;
	min-width: 0;
}

body.healfast-divi-site #main-header #top-menu {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 0 !important;
	margin: 0 !important;
	max-width: 100%;
}

body.healfast-divi-site #main-header #top-menu > li {
	float: none !important;
	display: inline-flex !important;
	align-items: center !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.healfast-divi-site #main-header #top-menu > li > a {
	white-space: nowrap !important;
	padding: 0.75rem 0.95rem !important;
	font-size: 0.84rem !important;
	letter-spacing: 0.04em;
	line-height: 1.25 !important;
	text-transform: uppercase !important;
}

/* All primary navbar labels — capital letters (desktop + Theme Builder + mobile) */
body.healfast-divi-site #main-header #top-menu > li > a,
body.healfast-divi-site #main-header #top-menu .sub-menu a,
body.healfast-divi-site .et-l--header .et_pb_menu .et-menu.nav > li > a,
body.healfast-divi-site .et-l--header .et_pb_menu .et-menu.nav .sub-menu a,
body.healfast-divi-site .et_mobile_menu .menu-item > a,
body.healfast-divi-site .et_pb_menu .et_mobile_menu .menu-item > a,
body.healfast-divi-site .et_mobile_menu .sub-menu a,
body.healfast-divi-site .et_pb_menu .et_mobile_menu .sub-menu a {
	text-transform: uppercase !important;
	letter-spacing: 0.04em;
}

/* Keep hover-preview summaries sentence case */
body.healfast-divi-site .healfast-nav-preview__summary {
	text-transform: none !important;
	letter-spacing: normal !important;
}

/* Compact logo so brand + links coexist on wide desktops */
body.healfast-divi-site .healfast-logo-icon-wrap img,
body.healfast-divi-site .healfast-logo-icon,
body.healfast-divi-site img#logo.healfast-logo-icon {
	max-height: 48px !important;
	max-width: 96px !important;
}

body.healfast-divi-site .healfast-logo-text {
	font-size: clamp(0.95rem, 1.4vw, 1.2rem) !important;
}

body.healfast-divi-site .healfast-logo-tagline {
	font-size: 0.62rem !important;
}

/* Theme Builder header row */
body.healfast-divi-site .et-l--header .et_pb_menu .et_pb_menu_inner_container {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 0.75rem !important;
	width: 100% !important;
}

body.healfast-divi-site .et-l--header .et_pb_menu__logo-wrap {
	position: relative !important;
	float: none !important;
	z-index: 3 !important;
	flex: 0 1 auto !important;
	max-width: min(42%, 320px) !important;
	min-width: 0 !important;
	margin: 0 !important;
}

body.healfast-divi-site .et-l--header .et_pb_menu__menu-container {
	position: relative !important;
	float: none !important;
	z-index: 2 !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
	display: flex !important;
	justify-content: flex-end !important;
	padding-left: 0 !important;
}

body.healfast-divi-site .et-l--header .et_pb_menu .et-menu.nav {
	display: flex !important;
	flex-wrap: nowrap !important;
	justify-content: flex-end !important;
	align-items: center !important;
	float: none !important;
	max-width: 100%;
}

body.healfast-divi-site .et-l--header .et_pb_menu .et-menu.nav > li {
	float: none !important;
}

body.healfast-divi-site .et-l--header .et_pb_menu .et-menu.nav > li > a {
	white-space: nowrap !important;
	padding: 0.75rem 0.95rem !important;
	font-size: 0.84rem !important;
	text-transform: uppercase !important;
	letter-spacing: 0.04em;
}

/* Hide search icon jam on narrow desktop bars */
body.healfast-divi-site #et_top_search {
	margin-left: 0.35rem !important;
}

/*
 * Breakpoint: hamburger below 1440px — 9 items jam on typical 1280–1366 laptops.
 * Divi’s default is 980px — far too late for this menu length.
 */
@media (max-width: 1439.98px) {
	/* Classic header → mobile menu */
	body.healfast-divi-site #main-header #top-menu,
	body.healfast-divi-site #main-header nav#top-menu-nav > ul#top-menu {
		display: none !important;
	}

	body.healfast-divi-site #main-header #et_mobile_nav_menu {
		display: block !important;
		float: none !important;
		/* static so open panel positions against #main-header, not the 44px toggle */
		position: static !important;
		z-index: 5 !important;
		margin: 0 !important;
		width: auto !important;
	}

	body.healfast-divi-site #main-header #et-top-navigation,
	body.healfast-divi-site #main-header #et-top-navigation.et-fixed-header {
		padding-left: 0 !important;
		padding-right: 0.25rem !important;
		overflow: visible !important;
		/* keep toggle on the right; allow dropdown to escape width */
		position: static !important;
		flex: 0 0 auto !important;
	}

	body.healfast-divi-site #main-header .container,
	body.healfast-divi-site #main-header .et_menu_container {
		overflow: visible !important;
		position: relative !important;
	}

	/* Hide Divi “Select Page” label — show a real hamburger instead */
	body.healfast-divi-site #main-header .mobile_nav .select_page {
		display: none !important;
		visibility: hidden !important;
		font-size: 0 !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
	}

	body.healfast-divi-site #main-header .mobile_nav {
		display: flex !important;
		align-items: center !important;
		justify-content: flex-end !important;
		float: none !important;
		position: static !important;
		width: auto !important;
	}

	body.healfast-divi-site #main-header .mobile_menu_bar,
	body.healfast-divi-site #main-header .mobile_menu_bar_toggle {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 44px !important;
		height: 44px !important;
		min-width: 44px !important;
		cursor: pointer !important;
		position: relative !important;
		background: transparent !important;
		border: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* CSS hamburger — override Divi ETmodules “a” glyph */
	body.healfast-divi-site #main-header .mobile_nav .mobile_menu_bar:before,
	body.healfast-divi-site #main-header .mobile_nav .mobile_menu_bar_toggle:before,
	body.healfast-divi-site #et_mobile_nav_menu .mobile_menu_bar:before,
	body.healfast-divi-site #et_mobile_nav_menu .mobile_menu_bar_toggle:before {
		content: "" !important;
		font-family: none !important;
		speak: none !important;
		display: block !important;
		width: 22px !important;
		height: 2px !important;
		background: #fff !important;
		background-color: #fff !important;
		border-radius: 2px !important;
		box-shadow:
			0 -7px 0 #fff,
			0 7px 0 #fff !important;
		font-size: 0 !important;
		line-height: 0 !important;
		color: transparent !important;
		position: static !important;
		transform: none !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	body.healfast-divi-site #main-header .mobile_nav .mobile_menu_bar,
	body.healfast-divi-site #et_mobile_nav_menu .mobile_menu_bar {
		width: 44px !important;
		height: 44px !important;
		min-width: 44px !important;
		font-size: 0 !important;
		line-height: 0 !important;
		color: transparent !important;
	}

	body.healfast-divi-site #main-header .mobile_nav.opened .mobile_menu_bar:before,
	body.healfast-divi-site #main-header .mobile_nav.opened .mobile_menu_bar_toggle:before {
		box-shadow: none !important;
		transform: rotate(45deg) !important;
	}

	body.healfast-divi-site #main-header .mobile_nav.opened .mobile_menu_bar:after,
	body.healfast-divi-site #main-header .mobile_nav.opened .mobile_menu_bar_toggle:after {
		content: "" !important;
		display: block !important;
		position: absolute !important;
		width: 22px !important;
		height: 2px !important;
		background: #fff !important;
		border-radius: 2px !important;
		transform: rotate(-45deg) !important;
	}

	body.healfast-divi-site #main-header .logo_container.healfast-logo-container {
		max-width: min(72%, 280px) !important;
	}

	body.healfast-divi-site .healfast-logo-icon-wrap img,
	body.healfast-divi-site .healfast-logo-icon,
	body.healfast-divi-site img#logo.healfast-logo-icon {
		max-height: 42px !important;
		max-width: 84px !important;
	}

	/* Theme Builder → mobile toggle */
	body.healfast-divi-site .et-l--header .et_pb_menu .et_pb_menu__menu,
	body.healfast-divi-site .et-l--header .et_pb_menu .et_pb_menu__menu-container .et-menu-nav,
	body.healfast-divi-site .et-l--header .et_pb_menu ul.et-menu {
		display: none !important;
	}

	body.healfast-divi-site .et-l--header .et_pb_menu .mobile_nav,
	body.healfast-divi-site .et-l--header .et_pb_menu .et_mobile_nav_menu,
	body.healfast-divi-site .et-l--header .et_pb_menu .mobile_menu_bar,
	body.healfast-divi-site .et-l--header .et_pb_menu__icon.et_pb_menu__mobile-toggle {
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
	}

	body.healfast-divi-site .et-l--header .et_pb_menu__logo-wrap {
		max-width: min(72%, 280px) !important;
	}

	body.healfast-divi-site .et-l--header .et_pb_menu__menu-container {
		flex: 0 0 auto !important;
		order: 2;
		padding-left: 0 !important;
	}

	/* Full-width panel under header (not the 44px hamburger column) */
	body.healfast-divi-site #main-header ul#mobile_menu,
	body.healfast-divi-site #main-header ul.et_mobile_menu,
	body.healfast-divi-site #main-header .et_mobile_menu,
	body.healfast-divi-site ul.et_mobile_menu,
	body.healfast-divi-site .et_pb_menu .et_mobile_menu {
		position: absolute !important;
		left: 0 !important;
		right: 0 !important;
		top: 100% !important;
		width: 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		max-height: min(75vh, 560px) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
		z-index: 99999 !important;
		background: var(--healfast-nav-bg, #0a2342) !important;
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
		padding: 0.5rem 0 !important;
		margin: 0 !important;
		float: none !important;
	}

	body.healfast-divi-site .et_mobile_menu .menu-item,
	body.healfast-divi-site .et_pb_menu .et_mobile_menu .menu-item {
		display: block !important;
		float: none !important;
		width: 100% !important;
		clear: both !important;
	}

	body.healfast-divi-site .et_mobile_menu .menu-item > a,
	body.healfast-divi-site .et_pb_menu .et_mobile_menu .menu-item > a {
		display: block !important;
		color: #fff !important;
		padding: 0.85rem 1.15rem !important;
		min-height: 48px;
		font-size: 0.95rem !important;
		line-height: 1.35 !important;
		white-space: normal !important;
		word-break: normal !important;
		overflow-wrap: break-word !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
		width: 100% !important;
		box-sizing: border-box !important;
	}

	body.healfast-divi-site .et_mobile_menu .sub-menu,
	body.healfast-divi-site .et_pb_menu .et_mobile_menu .sub-menu {
		position: static !important;
		width: 100% !important;
		box-shadow: none !important;
		background: rgba(0, 0, 0, 0.18) !important;
	}

	body.healfast-divi-site #et_top_search {
		display: none !important;
	}

	/* Self-contained toggle: show the mobile menu when opened by healfast-header.js */
	body.healfast-divi-site ul.et_mobile_menu.healfast-mnav-open,
	body.healfast-divi-site .et_pb_menu .et_mobile_menu.healfast-mnav-open,
	body.healfast-divi-site #main-header .et_mobile_menu.healfast-mnav-open {
		display: block !important;
	}
	/* Make the hamburger obviously tappable */
	body.healfast-divi-site #et_mobile_nav_menu .mobile_menu_bar,
	body.healfast-divi-site .et_pb_menu__mobile-toggle {
		cursor: pointer;
	}
}

/* Wide desktop only — room for full horizontal nav */
@media (min-width: 1440px) {
	/* Move the bar up + vertically center logo & links; give links breathing room */
	body.healfast-divi-site #main-header { padding-top: 0 !important; padding-bottom: 0 !important; }
	body.healfast-divi-site #main-header .container.et_menu_container {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 2rem !important;
		padding-top: 6px !important;
		padding-bottom: 6px !important;
		padding-left: 2rem !important;
		padding-right: 2rem !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
	}
	/* Space between logo and the menu so Partners never overlaps the logo */
	body.healfast-divi-site #main-header .logo_container.healfast-logo-container {
		margin-right: 1.5rem !important;
	}
	body.healfast-divi-site #main-header #et-top-navigation { padding-right: 0 !important; }
	body.healfast-divi-site #main-header #et-top-navigation {
		display: flex !important;
		align-items: center !important;
		padding-top: 0 !important;
		margin-left: auto !important;
	}
	body.healfast-divi-site #main-header #top-menu-nav,
	body.healfast-divi-site #main-header #top-menu {
		display: flex !important;
		align-items: center !important;
		float: none !important;
	}
	body.healfast-divi-site #main-header #top-menu > li {
		display: flex !important;
		align-items: center !important;
	}
	/* Theme Builder header variant */
	body.healfast-divi-site .et-l--header .et_pb_menu__menu-container,
	body.healfast-divi-site .et-l--header .et_pb_menu .et-menu.nav {
		align-items: center !important;
	}

	body.healfast-divi-site #main-header .logo_container.healfast-logo-container {
		max-width: min(36%, 340px) !important;
	}

	body.healfast-divi-site .healfast-logo-icon-wrap img,
	body.healfast-divi-site .healfast-logo-icon,
	body.healfast-divi-site img#logo.healfast-logo-icon {
		max-height: 56px !important;
		max-width: 112px !important;
	}

	body.healfast-divi-site #main-header #top-menu > li > a {
		padding: 0.8rem 1rem !important;
		font-size: 0.88rem !important;
	}

	body.healfast-divi-site .et-l--header .et_pb_menu .et-menu.nav > li > a {
		padding: 0.8rem 1rem !important;
		font-size: 0.88rem !important;
	}

	body.healfast-divi-site #main-header #et_mobile_nav_menu {
		display: none !important;
	}
}

@media (max-width: 480px) {
	body.healfast-divi-site #main-header .logo_container.healfast-logo-container,
	body.healfast-divi-site .et-l--header .et_pb_menu__logo-wrap {
		max-width: calc(100% - 3.5rem) !important;
	}

	body.healfast-divi-site .healfast-logo-tagline {
		display: none !important;
	}

	body.healfast-divi-site .healfast-logo-icon-wrap img,
	body.healfast-divi-site .healfast-logo-icon,
	body.healfast-divi-site img#logo.healfast-logo-icon {
		max-height: 36px !important;
		max-width: 72px !important;
	}
}

/* Hide the Divi header search (removes the stray "U" glyph + frees space for links) */
body.healfast-divi-site #et_top_search,
body.healfast-divi-site #et_search_icon,
body.healfast-divi-site .et_pb_menu__search-button,
body.healfast-divi-site .et_pb_menu__search {
	display: none !important;
}

/* Ensure header sits above page content */
body.healfast-divi-site #main-header,
body.healfast-divi-site .et-l--header {
	position: relative;
	z-index: 99998;
	overflow: visible !important;
}

/* Desktop nav hover previews — wide screens only */
@media (min-width: 1440px) {
	body.healfast-divi-site #main-header #top-menu > li,
	body.healfast-divi-site .et-l--header .et-menu.nav > li {
		position: relative !important;
	}

	body.healfast-divi-site #main-header #top-menu > li > a,
	body.healfast-divi-site .et-l--header .et-menu.nav > li > a {
		position: relative;
	}

	body.healfast-divi-site .healfast-nav-preview {
		position: absolute;
		left: 50%;
		top: calc(100% + 10px);
		transform: translateX(-50%) translateY(6px);
		width: min(240px, 28vw);
		padding: 0.55rem 0.55rem 0.65rem;
		border-radius: 12px;
		background: #0a2342;
		border: 1px solid rgba(217, 224, 28, 0.35);
		box-shadow: 0 16px 36px rgba(1, 37, 89, 0.28);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
		z-index: 100000;
		display: flex;
		flex-direction: column;
		gap: 0.45rem;
		text-align: left;
		white-space: normal;
	}

	body.healfast-divi-site .healfast-nav-preview__media {
		display: block;
		border-radius: 8px;
		overflow: hidden;
		background: rgba(255, 255, 255, 0.06);
		aspect-ratio: 16 / 10;
	}

	body.healfast-divi-site .healfast-nav-preview__media img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
		object-position: center;
		background: transparent;
	}

	body.healfast-divi-site .healfast-nav-preview__title {
		display: block;
		color: #d9e01c;
		font-size: 0.72rem;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		line-height: 1.25;
	}

	body.healfast-divi-site .healfast-nav-preview__summary {
		display: block;
		color: rgba(255, 255, 255, 0.9);
		font-size: 0.75rem;
		line-height: 1.35;
		font-weight: 400;
	}

	body.healfast-divi-site #main-header #top-menu > li:hover > a > .healfast-nav-preview,
	body.healfast-divi-site #main-header #top-menu > li:focus-within > a > .healfast-nav-preview,
	body.healfast-divi-site .et-l--header .et-menu.nav > li:hover > a > .healfast-nav-preview,
	body.healfast-divi-site .et-l--header .et-menu.nav > li:focus-within > a > .healfast-nav-preview {
		opacity: 1;
		visibility: visible;
		transform: translateX(-50%) translateY(0);
	}

	/* Keep last items from clipping off-screen */
	body.healfast-divi-site #main-header #top-menu > li:nth-last-child(-n+2) > a > .healfast-nav-preview,
	body.healfast-divi-site .et-l--header .et-menu.nav > li:nth-last-child(-n+2) > a > .healfast-nav-preview {
		left: auto;
		right: 0;
		transform: translateY(6px);
	}

	body.healfast-divi-site #main-header #top-menu > li:nth-last-child(-n+2):hover > a > .healfast-nav-preview,
	body.healfast-divi-site #main-header #top-menu > li:nth-last-child(-n+2):focus-within > a > .healfast-nav-preview,
	body.healfast-divi-site .et-l--header .et-menu.nav > li:nth-last-child(-n+2):hover > a > .healfast-nav-preview,
	body.healfast-divi-site .et-l--header .et-menu.nav > li:nth-last-child(-n+2):focus-within > a > .healfast-nav-preview {
		transform: translateY(0);
	}
}

@media (max-width: 1439.98px) {
	body.healfast-divi-site .healfast-nav-preview {
		display: none !important;
	}
}

