/* ==========================================================================
   Nexusa Navigation Menu  v1.1.0
   ========================================================================== */

.nexusa-nav-wrap {
	position: relative;
	width: 100%;
}

/* ---------- Sticky header ---------- */
.nexusa-nav-wrap.nexusa-nav-sticky {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 999;
}
.nexusa-nav-wrap.nexusa-nav-sticky .nexusa-nav-bg {
	transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.nexusa-nav-wrap.nexusa-nav-sticky .nexusa-nav-inner {
	transition: padding .3s ease;
}
.nexusa-nav-sticky-spacer {
	display: block;
	width: 100%;
}

.nexusa-nav-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}
.nexusa-nav-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.nexusa-nav-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.nexusa-nav-logo { flex-shrink: 1; min-width: 0; }
.nexusa-nav-logo a { display: inline-flex; align-items: center; text-decoration: none; max-width: 100%; }
.nexusa-nav-logo img { display: block; max-width: 100%; height: auto; }
.nexusa-nav-logo-text { font-weight: 700; font-size: 22px; }

/* ---------- Top level list ---------- */
.nexusa-nav-menu {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	flex: 1;
}
.nexusa-nav-menu > li {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}
.nexusa-nav-menu a { text-decoration: none; font-weight: 600; transition: color .2s ease; }

/* Row wrapper = link + arrow toggle sit side by side */
.nexusa-nav-item-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* ---------- Arrow toggle button ---------- */
.nexusa-sub-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 2px;
	margin: 0;
	cursor: pointer;
	line-height: 1;
	color: inherit;
	transition: transform .25s ease;
}
.nexusa-sub-toggle i,
.nexusa-sub-toggle svg {
	font-size: 11px;
	width: 1em;
	height: 1em;
	fill: currentColor;
	pointer-events: none;
}
li.nexusa-sub-open > .nexusa-nav-item-row > .nexusa-sub-toggle { transform: rotate(180deg); }

/* ==========================================================================
   SUBMENU — hidden by default, opens only on toggle click (or hover mode)
   ========================================================================== */
.nexusa-nav-menu ul.nexusa-sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background-color: #0e1b34;
	border-radius: 10px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
	z-index: 50;

	/* hidden state */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px);
	transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.nexusa-nav-menu ul.nexusa-sub-menu li {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}
.nexusa-nav-menu ul.nexusa-sub-menu .nexusa-nav-item-row { justify-content: space-between; }
.nexusa-nav-menu ul.nexusa-sub-menu a {
	display: block;
	width: 100%;
	padding: 10px 18px;
	font-weight: 500;
	white-space: nowrap;
}

/* open state (desktop) */
.nexusa-nav-wrap:not(.nexusa-nav-mobile) li.nexusa-sub-open > ul.nexusa-sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

/* 3rd level and deeper — fly out to the side */
.nexusa-nav-wrap:not(.nexusa-nav-mobile) ul.nexusa-sub-menu ul.nexusa-sub-menu {
	top: -8px;
	left: 100%;
	transform: translateX(10px);
}
.nexusa-nav-wrap:not(.nexusa-nav-mobile) ul.nexusa-sub-menu li.nexusa-sub-open > ul.nexusa-sub-menu {
	transform: translateX(0);
}
.nexusa-nav-wrap:not(.nexusa-nav-mobile) ul.nexusa-sub-menu > li > .nexusa-nav-item-row > .nexusa-sub-toggle {
	transform: rotate(-90deg);
	margin-right: 14px;
}
.nexusa-nav-wrap:not(.nexusa-nav-mobile) ul.nexusa-sub-menu > li.nexusa-sub-open > .nexusa-nav-item-row > .nexusa-sub-toggle {
	transform: rotate(-90deg);
}

/* Flip the dropdown when it would overflow the right edge */
.nexusa-nav-wrap:not(.nexusa-nav-mobile) ul.nexusa-sub-menu.nexusa-sub-flip { left: auto; right: 0; }
.nexusa-nav-wrap:not(.nexusa-nav-mobile) ul.nexusa-sub-menu ul.nexusa-sub-menu.nexusa-sub-flip { left: auto; right: 100%; }

/* ==========================================================================
   Burger
   ========================================================================== */
.nexusa-nav-burger {
	display: none;
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
}
.nexusa-nav-burger-close { display: none; }
.nexusa-nav-wrap.nexusa-nav-open .nexusa-nav-burger-open { display: none; }
.nexusa-nav-wrap.nexusa-nav-open .nexusa-nav-burger-close { display: inline-flex; }

.nexusa-nav-cta-wrap { display: flex; }
.nexusa-nav-cta {
	display: inline-block;
	text-decoration: none;
	font-weight: 700;
	white-space: nowrap;
	transition: background-color .25s ease;
	border: none;
	cursor: pointer;
	font-family: inherit;
	line-height: normal;
	-webkit-appearance: none;
	appearance: none;
}

/* ==========================================================================
   MOBILE — breakpoint is JS-controlled (reads --nexusa-nav-breakpoint)
   ========================================================================== */
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-burger { display: inline-flex; align-items: center; justify-content: center; order: 1; }
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-inner { flex-wrap: wrap; }
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-logo { max-width: 60%; }
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-logo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-menu {
	flex-basis: 100%;
	order: 3;
	flex-direction: column;
	align-items: stretch;
	max-height: 0;
	overflow: hidden;
	gap: 0;
	transition: max-height .3s ease;
}
.nexusa-nav-wrap.nexusa-nav-mobile.nexusa-nav-open .nexusa-nav-menu {
	max-height: min(600px, 70vh);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-top: 10px;
}
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-menu > li { width: 100%; }
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-item-row {
	justify-content: space-between;
	width: 100%;
	padding: 11px 0;
}
/* Bigger tap target for the arrow on touch screens */
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-sub-toggle {
	padding: 8px 4px;
	min-width: 38px;
	min-height: 38px;
}

/* Mobile submenu = inline accordion, not a floating dropdown */
.nexusa-nav-wrap.nexusa-nav-mobile ul.nexusa-sub-menu {
	position: static;
	min-width: 0;
	width: 100%;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	box-shadow: none;
	background: transparent;
	border-radius: 0;
	padding: 0 0 0 16px;
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease;
}
.nexusa-nav-wrap.nexusa-nav-mobile li.nexusa-sub-open > ul.nexusa-sub-menu {
	max-height: 1500px;
}
.nexusa-nav-wrap.nexusa-nav-mobile ul.nexusa-sub-menu a {
	padding: 9px 0;
	white-space: normal;
}
.nexusa-nav-wrap.nexusa-nav-mobile ul.nexusa-sub-menu .nexusa-nav-item-row { padding: 0; }

/* CTA gets its own full-width row on mobile */
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-cta-wrap {
	order: 2;
	flex-basis: 100%;
	width: 100%;
	margin-top: 12px;
	justify-content: center;
}
.nexusa-nav-wrap.nexusa-nav-mobile .nexusa-nav-cta {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	text-align: center;
	white-space: normal;
	word-break: break-word;
}

/* No-JS / pre-init fallback */
@media (max-width: 992px) {
	.nexusa-nav-wrap:not(.nexusa-nav-desktop) .nexusa-nav-burger { display: inline-flex; align-items: center; justify-content: center; }
	.nexusa-nav-wrap:not(.nexusa-nav-desktop) ul.nexusa-sub-menu { position: static; opacity: 1; visibility: visible; transform: none; max-height: 0; overflow: hidden; }
}
