/* E2Web main menu (e2web/nav-menu block). Values follow the site's HTML design tokens. */
.e2-menu {
	--e2-primary: #0588ca;
	--e2-secondary: #2362aa;
	--e2-head: #000417;
	--e2-nav: #333333;
	--e2-muted: #666666;
	--e2-line: #ececec;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: .375rem;
	margin: 0;
	padding: 0 0 0 3.125rem;
	list-style: none;
	font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.e2web-nav-menu-editor { flex: 1 1 auto; }
.e2-menu > li { margin: 0; list-style: none; }

/* Top-level links and toggles */
.e2-menu .e2-menu__link {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .75rem 1.5rem;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .01em;
	color: var(--e2-nav);
	white-space: nowrap;
	text-decoration: none;
	position: relative;
	cursor: pointer;
	transition: color .25s;
}
.e2-menu a.e2-menu__link::after {
	content: "";
	position: absolute;
	left: 1.5rem;
	right: 1.5rem;
	bottom: .25rem;
	height: 2px;
	background: var(--e2-primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s cubic-bezier(.22, .61, .36, 1);
}
.e2-menu .e2-menu__link:is(:hover, :focus-visible),
.e2-menu .is-current > .e2-menu__link,
.e2-menu .is-current > details > .e2-menu__link,
.e2-menu details[open] > .e2-menu__link { color: var(--e2-primary); }
.e2-menu a.e2-menu__link:hover::after,
.e2-menu .is-current > a.e2-menu__link::after { transform: scaleX(1); }

.e2-menu details { margin: 0; }
.e2-menu summary { list-style: none; }
.e2-menu summary::-webkit-details-marker { display: none; }
.e2-menu summary.e2-menu__link::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .25s;
}
.e2-menu details[open] > summary.e2-menu__link::after { margin-top: 3px; transform: rotate(-135deg); }

/* Phone and button items */
.e2-menu .e2-menu__item--phone { margin-left: auto; }
.e2-menu .e2-menu__item--button { margin-left: .5rem; }
.e2-menu .e2-menu__phone {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .01em;
	color: #000000;
	text-decoration: none;
	white-space: nowrap;
	transition: color .25s;
	padding-top:0.8rem;
	padding-right: 0.5rem;
}
.e2-menu .e2-menu__phone svg { width: 22px; height: 22px; color: var(--e2-primary); flex-shrink: 0; }
.e2-menu .e2-menu__phone:is(:hover, :focus-visible) { color: var(--e2-primary); }
.e2-menu .e2-menu__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .625rem 1.5625rem;
	border-radius: 8px;
	background: var(--e2-primary);
	color: #ffffff;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .01em;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color .25s, box-shadow .25s;
}
.e2-menu .e2-menu__button:is(:hover, :focus-visible) {
	background: var(--e2-secondary);
	color: #ffffff;
	box-shadow: 0 .5rem 1.25rem rgba(35, 98, 170, .25);
}

/* Simple dropdown (any parent item without the "mega" class) */
.e2-menu .e2-menu__item--dropdown { position: relative; }
.e2-menu .e2-dropdown {
	position: absolute;
	top: calc(100% + .5rem);
	left: .75rem;
	z-index: 99;
	min-width: 17.5rem;
	margin: 0;
	padding: .5rem;
	list-style: none;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 1rem 2.5rem rgba(0, 4, 23, .12);
}
.e2-menu .e2-dropdown li { margin: 0; }
.e2-menu .e2-dropdown__link {
	display: block;
	padding: .625rem .875rem;
	border-radius: 5px;
	font-size: 16px;
	font-weight: 600;
	color: var(--e2-nav);
	text-decoration: none;
}
.e2-menu .e2-dropdown__link:is(:hover, :focus-visible) { background: #e3f2ff; color: var(--e2-primary); }

/* Full-width mega menu: positioned against the sticky site header */
.e2-menu .e2-mega {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 99;
	max-height: calc(100vh - 75px);
	overflow-y: auto;
	padding: 30px;
	background: #ffffff;
	border-top: 1px solid #c8c8c8;
	box-shadow: 0 1rem 2.5rem rgba(0, 4, 23, .12);
	color: var(--e2-nav);
}
.e2-menu .e2-mega__inner { position: relative; min-height: 540px; }
.e2-menu .e2-mega__tabs { width: 350px; padding-right: 20px; border-right: 1px solid #eeeeee; }
.e2-menu .e2-mega__tab { margin: 0 0 4px; }
.e2-menu .e2-mega__tab > summary {
	display: block;
	padding: 24px;
	border-radius: 12px;
	border-bottom: 2px solid #eeeeee;
	font-size: 16px;
	font-weight: 600;
	color: var(--e2-nav);
	cursor: pointer;
	transition: background-color .3s, color .3s;
}
.e2-menu .e2-mega__tab > summary:hover,
.e2-menu .e2-mega__tab[open] > summary { background: var(--e2-primary); color: #ffffff; }
.e2-menu .e2-mega__panel {
	position: absolute;
	top: 0;
	left: calc(350px + 30px);
	right: 0;
	bottom: 0;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 20px;
	align-content: start;
}
.e2-menu .e2-mega__card {
	display: block;
	padding: 15px 15px 30px;
	border-radius: 5px;
	color: inherit;
	text-decoration: none;
	transition: background-color .3s;
}
.e2-menu .e2-mega__card:is(:hover, :focus-visible) { background: #e8f3ff; color: inherit; }
.e2-menu .e2-mega__head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.e2-menu .e2-mega__icon { display: inline-flex; flex-shrink: 0; color: var(--e2-primary); }
.e2-menu .e2-mega__icon svg { width: 30px; height: 30px; }
.e2-menu .e2-mega__title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--e2-head); }
.e2-menu .e2-mega__desc { display: block; font-size: 14px; line-height: 1.5; color: var(--e2-muted); }

/* ≤ 1360px */
@media (max-width: 1360px) {
	.e2-menu { gap: 0; padding-left: 1rem; }
	.e2-menu .e2-menu__link { padding-left: 1rem; padding-right: 1rem; }
	.e2-menu a.e2-menu__link::after { left: 1rem; right: 1rem; }
}

/* ≤ 1200px: phone shows the icon only */
@media (max-width: 1200px) {
	.e2-menu .e2-menu__phone { font-size: 0; gap: 0; }
}

/* Icons chosen from the Media Library (any size, shown at 30 x 30px) */
.e2-menu .e2-mega__icon img { display: block; width: 30px; height: 30px; max-width: none; object-fit: contain; }

/* ≤ 1024px: the menu sits inside the full-screen mobile overlay */
@media (max-width: 1024px) {
	.e2-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
	.e2-menu .e2-menu__link {
		display: flex;
		width: 100%;
		justify-content: space-between;
		padding: 1rem 0;
		border-bottom: 1px solid var(--e2-line);
	}
	.e2-menu a.e2-menu__link::after { display: none; }
	.e2-menu .e2-menu__item--phone { margin: 1.5rem 0 0; text-align: center; }
	.e2-menu .e2-menu__phone { font-size: 16px; gap: .375rem; justify-content: center; }
	.e2-menu .e2-menu__item--button { margin: .875rem 0 0; }
	.e2-menu .e2-menu__button { display: flex; width: 100%; }
	.e2-menu .e2-dropdown { position: static; min-width: 0; padding: .25rem 0 .5rem 1rem; box-shadow: none; }
	.e2-menu .e2-mega,
	.e2-menu .e2-mega__inner,
	.e2-menu .e2-mega__panel { position: static; }
	.e2-menu .e2-mega { max-height: none; overflow: visible; padding: 0; border-top: 0; box-shadow: none; }
	.e2-menu .e2-mega__inner { min-height: 0; }
	.e2-menu .e2-mega__tabs { width: 100%; padding-right: 0; border-right: 0; }
	.e2-menu .e2-mega__tab:first-child { margin-top: .5rem; }
	.e2-menu .e2-mega__panel { grid-template-columns: minmax(0, 1fr); padding: .5rem 0 .5rem .5rem; overflow: visible; }
	.e2-menu .e2-mega__card {padding: 15px;}
}

/* Primary buttons (the e2-btn-fill hover effect) keep white text while clicked or focused.
   GeneratePress turns every focused/active link dark (a:focus, a:active), which beat the buttons' own colour. */
.e2-btn-fill:is(:focus, :active),
.e2-btn-fill:is(:focus, :active) .gb-text { color: #ffffff; }
