/* JO Harmonia — navigation surfaces; layout and shared CTA styles stay global. */
body header.wgl-theme-header,
body .wgl-theme-header .wgl-site-header,
body .wgl-theme-header .wgl-sticky-header,
body .wgl-theme-header .wgl-mobile-header,
body .mobile_nav_wrapper,
body .mobile_nav_wrapper .wgl-menu_outer {
	background: radial-gradient(ellipse at 85% 0%, rgba(20, 110, 115, .14), transparent 65%), #08111f !important;
	color: #c5d0da !important;
	font-family: "Source Sans Pro", sans-serif;
}

body .wgl-theme-header .elementor-element-19f7c5b,
body .wgl-theme-header .elementor-element-16ec633 {
	background: transparent !important;
	box-shadow: none;
}

body .wgl-theme-header .elementor-element-19f7c5b {
	border-bottom: 0 !important;
	padding-bottom: 8px;
}

body .wgl-theme-header .elementor-element-16ec633 {
	border-top: 0 !important;
	border-bottom: 0 !important;
	/* A soft gold divider ties the two header rows together. */
	background-image: linear-gradient(90deg, rgba(225, 196, 119, .08), #e1c477 35%, #e1c477 65%, rgba(225, 196, 119, .08)) !important;
	background-size: 100% 3px !important;
	background-position: center top !important;
	background-repeat: no-repeat !important;
}

body .wgl-theme-header .wgl-site-header,
body .wgl-theme-header .wgl-sticky-header,
body .wgl-theme-header .wgl-mobile-header {
	border-bottom: 1px solid rgba(225, 196, 119, .22) !important;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}

body .wgl-theme-header .elementor-element-16ec633 .primary-nav > ul > li > a,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on > li > a {
	color: #c5d0da !important;
	font-family: "Raleway", sans-serif;
	font-size: 16px !important;
	font-weight: 600 !important;
	letter-spacing: 0;
	text-transform: none;
	transition: color .18s ease, background-color .18s ease;
}

body .wgl-theme-header .elementor-element-16ec633 .primary-nav > ul > li:is(:hover, :focus-within, .current-menu-item, .current-menu-ancestor) > a,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on > li:is(:hover, :focus-within, .current-menu-item, .current-menu-ancestor) > a {
	color: #e1c477 !important;
}

body .wgl-theme-header .primary-nav > ul > li > a::before {
	background-color: #e1c477;
}

body .wgl-theme-header .primary-nav a:focus-visible,
body .mobile_nav_wrapper .primary-nav > ul > li > a:focus-visible {
	outline: 2px solid #e1c477;
	outline-offset: -2px;
}

@media (min-width: 1201px) {
	body .wgl-theme-header .primary-nav > ul > li:not(.jo-mega-more) ul.sub-menu {
		background: #fbfaf7 !important;
		border: 1px solid rgba(225, 196, 119, .3);
		border-radius: 18px;
		padding: 12px;
		box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
	}

	body .wgl-theme-header .primary-nav > ul > li:not(.jo-mega-more) ul.sub-menu a {
		color: #172033 !important;
		font-family: "Source Sans Pro", sans-serif;
		font-weight: 400;
		border-radius: 8px;
	}

	body .wgl-theme-header .primary-nav > ul > li:not(.jo-mega-more) ul.sub-menu a:is(:hover, :focus-visible),
	body .wgl-theme-header .primary-nav > ul > li:not(.jo-mega-more) ul.sub-menu .current-menu-item > a {
		background: rgba(225, 196, 119, .2);
		color: #0c3d54 !important;
	}
}

@media (max-width: 1200px) {
	body .wgl-theme-header .wgl-mobile-header {
		border-bottom: 3px solid #e1c477 !important;
	}

	/* Keep one account CTA and one search field in the drawer. */
	body .mobile_nav_wrapper .wgl-menu-outer_content .mobile_header.html1_editor {
		display: none !important;
	}

	body .mobile_nav_wrapper .wgl-menu_outer .wgl-menu-outer_content {
		padding: 20px 20px 28px;
	}

	body .mobile_nav_wrapper .wgl-menu_outer .wgl-menu-outer_header,
	body .mobile_nav_wrapper .wgl-menu_outer .mobile-hamburger-close {
		width: 44px;
		height: 44px;
	}

	body .mobile_nav_wrapper .search_mobile_menu .header_search-field,
	body .mobile_nav_wrapper .search_mobile_menu .search-form {
		background: #0e1b2b !important;
		border-radius: 18px;
		overflow: hidden;
	}

	body .mobile_nav_wrapper .search_mobile_menu .search-field {
		margin-bottom: 0 !important;
		background: #0e1b2b !important;
		color: #c5d0da !important;
		border: 1px solid rgba(225, 196, 119, .3);
		border-radius: 18px;
		font-family: "Source Sans Pro", sans-serif;
		font-size: 16px;
	}

	body .mobile_nav_wrapper .search_mobile_menu .search-field::placeholder {
		color: #c5d0da;
		opacity: 1;
	}

	body .mobile_nav_wrapper .search_mobile_menu .search__icon {
		color: #e1c477 !important;
	}

	body .mobile_nav_wrapper .search_mobile_menu .search-field:focus-visible {
		outline: 2px solid #e1c477;
		outline-offset: -3px;
	}

	body .mobile_nav_wrapper .mobile_header.html6_editor a[href*="youtube.com"]::before {
		content: "";
		flex: 0 0 26px;
		width: 26px;
		height: 19px;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'%3E%3Crect width='28' height='20' rx='6' fill='%23f00'/%3E%3Cpath d='M11 5l8 5-8 5z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
	}

	/* Links acting as disclosure buttons need a visible state indicator. */
	body .mobile_nav_wrapper .primary-nav a[role="button"][aria-expanded]::after {
		content: "";
		position: absolute;
		right: 16px;
		top: 21px;
		width: 8px;
		height: 8px;
		border-right: 2px solid #e1c477;
		border-bottom: 2px solid #e1c477;
		transform: rotate(45deg);
		display: block;
	}

	body .mobile_nav_wrapper .primary-nav a[role="button"][aria-expanded="true"]::after {
		transform: rotate(225deg);
	}

	/* Reserve a real grid cell for the logo beside the account controls. */
	body .wgl-theme-header .wgl-mobile-header .wgl-header-row_wrapper {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
		gap: 8px;
	}

	body .wgl-theme-header .wgl-mobile-header .position_center {
		position: absolute !important;
		grid-column: auto;
		grid-row: 1;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	body .wgl-theme-header .wgl-mobile-header .position_right {
		grid-column: 3;
		grid-row: 1;
	}

	body .wgl-theme-header .wgl-mobile-header .wgl-logotype-container.logo-mobile {
		transform: none;
	}

	/* The JO search control already provides this action. */
	body .wgl-theme-header .wgl-mobile-header .wgl-header-row_wrapper > .position_:has(.header_search),
	body .wgl-theme-header .wgl-mobile-header .position_right .header_search:not(.jo-lms-header-search) {
		display: none !important;
	}

	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on > li {
		border-bottom-color: rgba(225, 196, 119, .16);
	}

	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on > li > a {
		font-size: 16px;
		min-height: 52px;
	}

	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on > li:not(.jo-mega-more) .sub-menu a {
		font-family: "Source Sans Pro", sans-serif;
		font-weight: 400;
		color: #c5d0da !important;
	}

	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on > li:not(.jo-mega-more) .sub-menu a:is(:hover, :focus-visible) {
		color: #e1c477 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body .wgl-theme-header .elementor-element-16ec633 .primary-nav > ul > li > a,
	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on > li > a {
		transition: none;
	}
}

/* Keep the logo on the viewport centre; search remains available in the drawer. */
@media (max-width: 600px) {
	body .wgl-theme-header .wgl-mobile-header .position_right .jo-lms-mobile-actions--bar .jo-lms-header-search {
		display: none !important;
	}
	body .wgl-theme-header .wgl-mobile-header .mobile_header.html1_editor .jo-lms-mobile-actions--bar {
		grid-template-columns: repeat(2, 44px) !important;
	}
	body .wgl-theme-header .wgl-mobile-header .mobile_header.html1_editor .jo-lms-mobile-actions--bar .jo-lms-cart {
		grid-column: 2 !important;
	}
}

body .wgl-theme-header .primary-nav .jo-mega-calculator .jo-menu-rich-link__badge,
body .mobile_nav_wrapper .primary-nav .jo-mega-calculator .jo-menu-rich-link__badge {
	color: #fff !important;
	align-self: center;
	justify-self: center;
	margin-inline: auto;
}

body .wgl-theme-header .primary-nav > ul > li.jo-mega-more .jo-mega-calculator > a,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.jo-mega-more .jo-mega-calculator > a {
	text-align: center !important;
	padding: 16px 12px !important;
}

body .wgl-theme-header .primary-nav .jo-mega-calculator .item_text,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.jo-mega-more .jo-mega-calculator > a > span,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.jo-mega-more .jo-mega-calculator .item_text,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.jo-mega-more .jo-mega-calculator .jo-menu-rich-link__details {
	text-align: center !important;
	white-space: normal !important;
	justify-items: center;
	width: 100%;
}

body .wgl-theme-header .primary-nav .jo-mega-calculator .jo-menu-rich-link__details {
	align-items: center;
	text-align: center;
}

/* Align disclosure controls to their heading row, never to the expanded branch. */
@media (max-width: 1200px) {
	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.menu-item-has-children {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) 36px;
	}
	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.menu-item-has-children > a {
		grid-column: 1 / -1;
		grid-row: 1;
		position: relative;
		padding-right: 44px !important;
	}
	body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.menu-item-has-children > ul {
		grid-column: 1 / -1;
		grid-row: 2;
	}
	body .mobile_nav_wrapper .primary-nav .menu-item > .jo-mobile-menu-toggle {
		grid-column: 2;
		grid-row: 1;
		align-self: center;
		justify-self: end;
		position: relative !important;
		top: auto;
		right: auto;
		margin: 0;
	}
	body .mobile_nav_wrapper .primary-nav .menu-item > .jo-mobile-menu-toggle::before {
		position: absolute;
		top: 50%;
		left: 50%;
		right: auto;
		margin: 0;
		width: 8px;
		height: 8px;
		border: 0;
		border-right: 2px solid #e1c477;
		border-bottom: 2px solid #e1c477;
		transform: translate(-50%, -65%) rotate(45deg);
	}
	body .mobile_nav_wrapper .primary-nav .menu-item > .jo-mobile-menu-toggle[aria-expanded="true"]::before {
		transform: translate(-50%, -35%) rotate(225deg);
	}
	body .mobile_nav_wrapper .primary-nav a[role="button"][aria-expanded]::after {
		right: 13px;
		top: 50%;
		transform: translateY(-65%) rotate(45deg);
	}
	body .mobile_nav_wrapper .primary-nav a[role="button"][aria-expanded="true"]::after {
		transform: translateY(-35%) rotate(225deg);
	}
}

/* Read the calculator CTA as badge, title, then description. */
body .wgl-theme-header .primary-nav > ul > li.jo-mega-more .jo-mega-calculator > a,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.jo-mega-more .jo-mega-calculator > a {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 8px;
	justify-items: center;
}
body .wgl-theme-header .primary-nav .jo-mega-calculator .jo-menu-rich-link__details,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.jo-mega-more .jo-mega-calculator .jo-menu-rich-link__details {
	display: contents !important;
}
body .wgl-theme-header .primary-nav .jo-mega-calculator > a > span:first-child,
body .mobile_nav_wrapper .primary-nav .jo-mega-calculator > a > span:first-child {
	grid-row: 2;
	grid-column: 1;
}
body .wgl-theme-header .primary-nav .jo-mega-calculator .jo-menu-rich-link__badge,
body .mobile_nav_wrapper .primary-nav .jo-mega-calculator .jo-menu-rich-link__badge {
	grid-row: 1;
	grid-column: 1;
}
body .wgl-theme-header .primary-nav .jo-mega-calculator .jo-menu-rich-link__description,
body .mobile_nav_wrapper .primary-nav .jo-mega-calculator .jo-menu-rich-link__description {
	grid-row: 3;
	grid-column: 1;
}
body .wgl-theme-header .primary-nav > ul > li.jo-mega-more .jo-mega-calculator > a > span:first-child,
body .wgl-theme-header .primary-nav > ul > li.jo-mega-more .jo-mega-calculator .item_text {
	display: block;
	width: 100%;
	text-align: center !important;
}

/* The concise calculator label stays on one line in both menu variants. */
body .wgl-theme-header .primary-nav > ul > li.jo-mega-more .jo-mega-calculator .item_text,
body .mobile_nav_wrapper .primary-nav ul.mobile_switch_on li.jo-mega-more .jo-mega-calculator .item_text {
	white-space: nowrap !important;
}
