/*
 * Header, navigation, mobile drawer and footer. Values from SiteNav.dc.html / SiteFooter.dc.html.
 *
 * The desktop menu is CSS-only: level 1 opens on :hover / :focus-within, and the mega menu's left
 * rail switches the visible panel with :has(). JavaScript only drives the mobile drawer.
 */

:root {
	--nvs-header-height: 100px;
	--nvs-nav-breakpoint: 1120px;
}

/* -------------------------------------------------------------------------
 * Header shell
 * ---------------------------------------------------------------------- */

.nvs-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #ffffff;
	border-bottom: 1px solid var(--nvs-border);
	font-family: var(--nvs-font-body);
}

.nvs-header.is-scrolled {
	box-shadow: 0 6px 24px rgba(10, 31, 60, 0.07);
}

.nvs-header__bar {
	height: var(--nvs-header-height);
	display: flex;
	align-items: center;
	gap: 32px;
	padding-left: var(--nvs-gutter);
	padding-right: var(--nvs-gutter);
}

.nvs-header__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.nvs-header__logo img {
	height: 66px;
	width: auto;
	max-width: 260px;
	object-fit: contain;
	display: block;
}

.nvs-header__wordmark {
	font-family: var(--nvs-font-heading);
	font-size: 20px;
	font-weight: 800;
	color: var(--nvs-navy);
}

.nvs-header__cta {
	margin-left: 12px;
	flex-shrink: 0;
	font-size: 15px;
	padding: 13px 24px;
}

/* The header CTA darkens rather than inverting — it sits on white, not on a photo. */
.nvs-header__cta.nvs-btn--primary:hover {
	background: var(--nvs-blue-dark);
	color: #ffffff;
}

.nvs-header__burger {
	display: none;
	margin-left: auto;
	background: none;
	border: 0;
	font-size: 26px;
	line-height: 1;
	color: var(--nvs-navy);
	cursor: pointer;
	padding: 8px;
	min-width: 44px;
	min-height: 44px;
}

/* -------------------------------------------------------------------------
 * Desktop navigation
 * ---------------------------------------------------------------------- */

.nvs-nav {
	margin-left: auto;
}

.nvs-nav__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 4px;
}

.nvs-nav__item {
	position: relative;
}

button.nvs-nav__link {
	background: none;
	border: 0;
	cursor: pointer;
	font-family: inherit;
}

.nvs-nav__link {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #16283D;
	padding: 38px 14px;
	text-decoration: none;
	white-space: nowrap;
}

.nvs-nav__link:hover,
.nvs-nav__item:focus-within > .nvs-nav__link {
	color: var(--nvs-blue);
}

.nvs-nav__caret {
	font-size: 9px;
	opacity: 0.55;
}

.nvs-nav__submenu {
	position: absolute;
	top: var(--nvs-header-height);
	background: #ffffff;
	border-top: 3px solid var(--nvs-blue);
	box-shadow: 0 24px 60px rgba(10, 31, 60, 0.16);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}

.nvs-nav__item:hover > .nvs-nav__submenu,
.nvs-nav__item:focus-within > .nvs-nav__submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nvs-nav__submenu--plain {
	left: 0;
	width: 250px;
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nvs-nav__submenu--plain .nvs-nav__leaf {
	font-size: 14px;
	color: #4A5C70;
	text-decoration: none;
}

.nvs-nav__submenu--mega {
	left: 50%;
	margin-left: -360px;
	width: 720px;
	display: grid;
	grid-template-columns: 268px 1fr;
}

.nvs-nav__item:hover > .nvs-nav__submenu--mega,
.nvs-nav__item:focus-within > .nvs-nav__submenu--mega {
	transform: translateY(0);
}

.nvs-nav__rail {
	padding: 16px;
	border-right: 1px solid #EDF1F6;
	background: #FAFCFE;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nvs-nav__group {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-family: var(--nvs-font-heading);
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: 0.01em;
	padding: 13px 16px;
	border-radius: var(--nvs-radius-control);
	color: #16283D;
	text-decoration: none;
	background: transparent;
}

.nvs-nav__chevron {
	font-size: 11px;
	opacity: 0.5;
}

.nvs-nav__group:hover,
.nvs-nav__group:focus-visible {
	background: #EAF4FB;
	color: var(--nvs-blue);
}

/* With nothing hovered, the first group reads as selected — it is the panel on show. */
html:not(.nvs-js) .nvs-nav__rail:not(:hover):not(:focus-within) > .nvs-nav__group:first-child {
	background: #EAF4FB;
	color: var(--nvs-blue);
}

.nvs-nav__panels {
	position: relative;
}

.nvs-nav__panel {
	padding: 26px 30px 30px;
	flex-direction: column;
	gap: 4px;
	display: none;
}

.nvs-nav__panel:first-child {
	display: flex;
}

.nvs-nav__panel-title {
	font-family: var(--nvs-font-heading);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--nvs-navy);
	margin-bottom: 14px;
	text-decoration: none;
}

.nvs-nav__panel-title:hover {
	color: var(--nvs-blue);
}

.nvs-nav__panel .nvs-nav__leaf {
	font-size: 14.5px;
	line-height: 1.5;
	color: #4A5C70;
	padding: 7px 0;
	text-decoration: none;
}

.nvs-nav__leaf:hover,
.nvs-nav__leaf:focus-visible {
	color: var(--nvs-blue);
}

/*
 * Rail → panel correlation.
 *
 * The selected group is sticky: once you pick "Cybersecurity" its panel stays put while you move
 * across to the links. CSS alone cannot do that — `:has(…:hover)` has no memory, so the panel
 * would snap back to the first group the instant the pointer left the rail. site.js therefore
 * stamps `data-nvs-panel` on the submenu and sets `.nvs-js` on <html>.
 *
 * The `:has()` block below is the no-JS fallback: panels still switch, but only while the pointer
 * is actually over the rail. Supports up to eight groups; add pairs if the menu grows.
 */
html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(n + 2):is(:hover, :focus-visible)) .nvs-nav__panel:first-child {
	display: none;
}

html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(2):is(:hover, :focus-visible)) .nvs-nav__panel:nth-child(2),
html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(3):is(:hover, :focus-visible)) .nvs-nav__panel:nth-child(3),
html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(4):is(:hover, :focus-visible)) .nvs-nav__panel:nth-child(4),
html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(5):is(:hover, :focus-visible)) .nvs-nav__panel:nth-child(5),
html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(6):is(:hover, :focus-visible)) .nvs-nav__panel:nth-child(6),
html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(7):is(:hover, :focus-visible)) .nvs-nav__panel:nth-child(7),
html:not(.nvs-js) .nvs-nav__submenu--mega:has(.nvs-nav__rail > :nth-child(8):is(:hover, :focus-visible)) .nvs-nav__panel:nth-child(8) {
	display: flex;
}

/* JS present: the stamped group wins, and stays put until another group is chosen. */
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel] .nvs-nav__panel {
	display: none;
}

html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="1"] .nvs-nav__panel:nth-child(1),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="2"] .nvs-nav__panel:nth-child(2),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="3"] .nvs-nav__panel:nth-child(3),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="4"] .nvs-nav__panel:nth-child(4),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="5"] .nvs-nav__panel:nth-child(5),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="6"] .nvs-nav__panel:nth-child(6),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="7"] .nvs-nav__panel:nth-child(7),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="8"] .nvs-nav__panel:nth-child(8) {
	display: flex;
}

/* …and the rail tint follows the stamped group, not the pointer. */
html.nvs-js .nvs-nav__submenu--mega:not([data-nvs-panel]) .nvs-nav__rail > .nvs-nav__group:first-child,
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="1"] .nvs-nav__rail > .nvs-nav__group:nth-child(1),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="2"] .nvs-nav__rail > .nvs-nav__group:nth-child(2),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="3"] .nvs-nav__rail > .nvs-nav__group:nth-child(3),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="4"] .nvs-nav__rail > .nvs-nav__group:nth-child(4),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="5"] .nvs-nav__rail > .nvs-nav__group:nth-child(5),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="6"] .nvs-nav__rail > .nvs-nav__group:nth-child(6),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="7"] .nvs-nav__rail > .nvs-nav__group:nth-child(7),
html.nvs-js .nvs-nav__submenu--mega[data-nvs-panel="8"] .nvs-nav__rail > .nvs-nav__group:nth-child(8) {
	background: #EAF4FB;
	color: var(--nvs-blue);
}

/*
 * Without :has() support every panel stacks instead of switching — still fully navigable.
 */
@supports not selector(:has(*)) {
	html:not(.nvs-js) .nvs-nav__submenu--mega {
		grid-template-columns: 1fr;
		width: 320px;
	}

	html:not(.nvs-js) .nvs-nav__rail {
		display: none;
	}

	html:not(.nvs-js) .nvs-nav__panel,
	html:not(.nvs-js) .nvs-nav__panel:first-child {
		display: flex;
	}
}

/* -------------------------------------------------------------------------
 * Mobile drawer
 * ---------------------------------------------------------------------- */

.nvs-drawer {
	border-top: 1px solid var(--nvs-border);
	background: #ffffff;
	padding: 24px 28px 36px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	max-height: 70vh;
	overflow-y: auto;
}

.nvs-drawer[hidden] {
	display: none;
}

.nvs-drawer__label {
	font-family: var(--nvs-font-heading);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #93A3B4;
	margin-top: 6px;
	display: block;
}

.nvs-drawer__top {
	font-size: 16px;
	font-weight: 600;
	color: #16283D;
	text-decoration: none;
}

.nvs-drawer__group {
	display: flex;
	flex-direction: column;
	border-bottom: 1px solid #EDF1F6;
}

.nvs-drawer__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.nvs-drawer__group-link {
	flex: 1;
	font-family: var(--nvs-font-heading);
	font-size: 16px;
	font-weight: 700;
	color: #16283D;
	padding: 14px 0;
	text-decoration: none;
}

.nvs-drawer__toggle {
	background: none;
	border: 0;
	cursor: pointer;
	color: var(--nvs-blue);
	font-size: 22px;
	line-height: 1;
	min-width: 44px;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nvs-drawer__toggle span::before {
	content: "+";
}

.nvs-drawer__toggle[aria-expanded="true"] span::before {
	content: "\2212";
}

.nvs-drawer__sublist {
	display: flex;
	flex-direction: column;
	padding-bottom: 12px;
	padding-left: 14px;
	border-left: 2px solid var(--nvs-border);
	margin-left: 2px;
	gap: 2px;
}

.nvs-drawer__sublist[hidden] {
	display: none;
}

.nvs-drawer__leaf {
	font-size: 15.5px;
	color: #4A5C70;
	padding: 11px 0;
	text-decoration: none;
}

.nvs-drawer__cta {
	margin-top: 8px;
	text-align: center;
	font-size: 16px;
	padding: 15px 24px;
}

body.nvs-drawer-open {
	overflow: hidden;
}

@media (max-width: 1119px) {
	.nvs-nav,
	.nvs-header__cta {
		display: none;
	}

	.nvs-header__burger {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.nvs-header__logo img {
		height: 52px;
	}

	:root {
		--nvs-header-height: 84px;
	}
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */

.nvs-footer {
	background: var(--nvs-navy);
	color: #C7D5E4;
	font-family: var(--nvs-font-body);
}

.nvs-footer__top {
	padding-top: clamp(48px, 7vw, 72px);
	padding-bottom: 40px;
	padding-left: clamp(20px, 4vw, 32px);
	padding-right: clamp(20px, 4vw, 32px);
	display: flex;
	flex-wrap: wrap;
	gap: clamp(32px, 4vw, 48px);
}

.nvs-footer__brand {
	flex: 1.4 1 260px;
	min-width: 0;
	max-width: 400px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.nvs-footer__logo {
	height: 52px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	align-self: flex-start;
}

.nvs-footer__tagline {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: var(--nvs-on-dark-muted);
	max-width: 280px;
}

.nvs-footer__social {
	display: flex;
	gap: 12px;
}

.nvs-footer__social-link {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #C7D5E4;
	transition: background-color var(--nvs-duration-hover) ease, border-color var(--nvs-duration-hover) ease, color var(--nvs-duration-hover) ease;
}

.nvs-footer__social-link:hover {
	background: var(--nvs-blue);
	border-color: var(--nvs-blue);
	color: #ffffff;
}

.nvs-footer__column {
	flex: 1 1 150px;
	min-width: 140px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.nvs-footer__column-title {
	margin: 0 0 6px;
	font-family: var(--nvs-font-heading);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #ffffff;
}

.nvs-footer__link {
	font-size: 15px;
	color: var(--nvs-on-dark-muted);
	text-decoration: none;
}

.nvs-footer__link:hover {
	color: #ffffff;
}

.nvs-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nvs-footer__bottom-inner {
	padding-top: 24px;
	padding-bottom: 24px;
	padding-left: clamp(20px, 4vw, 32px);
	padding-right: clamp(20px, 4vw, 32px);
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	color: #7B8FA6;
}

.nvs-footer__legal {
	color: #7B8FA6;
	text-decoration: none;
}

.nvs-footer__legal:hover {
	color: #ffffff;
}

/* -------------------------------------------------------------------------
 * Language toggle
 *
 * Its own row beneath the menu, right-aligned, matching where the live site puts it. Only rendered
 * when the current page has a translation, so it is absent across the rest of the site.
 * ---------------------------------------------------------------------- */

.nvs-header__langbar {
	border-top: 1px solid var(--nvs-border);
	background: var(--nvs-surface);
}

.nvs-header__langbar > .nvs-container {
	display: flex;
	justify-content: flex-end;
	padding-top: 8px;
	padding-bottom: 8px;
}

.nvs-lang {
	display: flex;
	align-items: center;
	/* Wide gap between the two options — they read as separate choices, not one phrase. */
	gap: 32px;
	font-size: 14.5px;
	white-space: nowrap;
}

.nvs-lang__item {
	color: var(--nvs-blue);
	text-decoration: none;
	padding: 2px 0;
	border-bottom: 2px solid transparent;
}

.nvs-lang__item:hover,
.nvs-lang__item:focus-visible {
	color: var(--nvs-blue-dark);
	border-bottom-color: currentColor;
}

.nvs-lang__item.is-current {
	color: var(--nvs-navy);
	font-weight: 700;
	border-bottom-color: var(--nvs-green);
}

@media (max-width: 700px) {
	.nvs-lang {
		gap: 24px;
		font-size: 14px;
	}
}
