/*
 * LB Marketing — Premium Redesign
 * Primary navigation styling.
 *
 * Design language: deep navy surfaces, electric blue and violet accents,
 * generous white space and clear, high-contrast type.
 */

:root {
	--lbmpr-navy: #0a1428;
	--lbmpr-navy-2: #0e1c38;
	--lbmpr-navy-3: #142546;
	--lbmpr-line: rgba(120, 160, 230, 0.22);
	--lbmpr-blue: #2f7bff;
	--lbmpr-blue-soft: #6ea8ff;
	--lbmpr-purple: #8b5cf6;
	--lbmpr-text: #eaf1ff;
	--lbmpr-muted: #9db2d4;
	--lbmpr-white: #ffffff;
	--lbmpr-nav-h: 66px;
	--lbmpr-radius: 12px;
	--lbmpr-shadow: 0 18px 45px rgba(2, 8, 24, 0.45);
}

/* ------------------------------------------------------------------ *
 * Retire the competing headers (presentation only — nothing deleted).
 * The older growth-pages plugin header and the theme template-part
 * header are both hidden so only one clean bar remains.
 * ------------------------------------------------------------------ */
body .lbun-header,
body header.wp-block-template-part,
body .wp-site-blocks > header.wp-block-template-part {
	display: none !important;
}

/* The older plugin adds top padding for its own fixed bar. Cancel it with
 * higher specificity so our own offset below is the only one applied. */
html body.lbun-has-header {
	padding-top: 0 !important;
}

/* A legacy in-content header on the homepage. */
body.home .entry-content header.nav,
body.home .entry-content .nav {
	display: none !important;
}

/* Offset the page for the fixed bar. Extra specificity beats the inline
 * style printed by the older plugin. */
html body.lbmpr-has-nav {
	padding-top: var(--lbmpr-nav-h) !important;
}

/* ------------------------------------------------------------------ *
 * Bar
 * ------------------------------------------------------------------ */
.lbmpr-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	background: linear-gradient(180deg, rgba(10, 20, 40, 0.98), rgba(9, 17, 34, 0.96));
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--lbmpr-line);
	color: var(--lbmpr-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.4;
}

.lbmpr-nav *,
.lbmpr-nav *::before,
.lbmpr-nav *::after {
	box-sizing: border-box;
}

.lbmpr-bar {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
	height: var(--lbmpr-nav-h);
	display: flex;
	align-items: center;
	gap: 18px;
}

/* Brand */
.lbmpr-brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	text-decoration: none !important;
	color: var(--lbmpr-white) !important;
	flex: 0 1 auto;
	min-width: 0;
}

.lbmpr-brand-logo {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.06);
	padding: 3px;
	flex: 0 0 auto;
}

.lbmpr-brand-text {
	display: flex;
	flex-direction: column;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -0.01em;
	min-width: 0;
}

.lbmpr-brand-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lbmpr-brand-sub {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lbmpr-blue-soft);
	margin-top: 2px;
}

/* Menu */
.lbmpr-menu {
	margin-left: auto;
	min-width: 0;
}

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

.lbmpr-item {
	position: relative;
	margin: 0;
}

.lbmpr-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 13px;
	border: 0;
	background: none;
	border-radius: 9px;
	font: inherit;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--lbmpr-text) !important;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.18s ease, background-color 0.18s ease;
}

.lbmpr-link:hover,
.lbmpr-link:focus-visible {
	background: rgba(110, 168, 255, 0.12);
	color: var(--lbmpr-white) !important;
	outline: none;
}

.lbmpr-link:focus-visible {
	box-shadow: 0 0 0 2px var(--lbmpr-blue);
}

.lbmpr-link.is-current {
	color: var(--lbmpr-white) !important;
	background: rgba(47, 123, 255, 0.16);
	box-shadow: inset 0 -2px 0 var(--lbmpr-blue);
}

.lbmpr-chevron {
	transition: transform 0.18s ease;
	opacity: 0.8;
}

.lbmpr-has-sub.is-open > .lbmpr-sub-toggle .lbmpr-chevron,
.lbmpr-has-sub:hover > .lbmpr-sub-toggle .lbmpr-chevron {
	transform: rotate(180deg);
}

/* CTA */
.lbmpr-item-cta {
	margin-left: 6px;
}

.lbmpr-cta {
	display: inline-block;
	padding: 11px 20px;
	border-radius: 10px;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--lbmpr-white) !important;
	text-decoration: none !important;
	background: linear-gradient(120deg, var(--lbmpr-blue), var(--lbmpr-purple));
	box-shadow: 0 10px 24px rgba(47, 123, 255, 0.32);
	white-space: nowrap;
	transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.lbmpr-cta:hover,
.lbmpr-cta:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(139, 92, 246, 0.4);
	outline: none;
}

/* Dropdowns */
.lbmpr-sub {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	min-width: 244px;
	margin: 0;
	padding: 9px;
	list-style: none;
	background: var(--lbmpr-navy-2);
	border: 1px solid var(--lbmpr-line);
	border-radius: var(--lbmpr-radius);
	box-shadow: var(--lbmpr-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.lbmpr-sub::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 0;
	right: 0;
	height: 12px;
}

.lbmpr-sub a {
	display: block;
	padding: 10px 13px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--lbmpr-text) !important;
	text-decoration: none !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.lbmpr-sub a:hover,
.lbmpr-sub a:focus-visible {
	background: linear-gradient(120deg, rgba(47, 123, 255, 0.22), rgba(139, 92, 246, 0.22));
	color: var(--lbmpr-white) !important;
	outline: none;
}

.lbmpr-has-sub:hover > .lbmpr-sub,
.lbmpr-has-sub:focus-within > .lbmpr-sub,
.lbmpr-has-sub.is-open > .lbmpr-sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Keep the right-most dropdown inside the viewport. */
.lbmpr-has-sub.lbmpr-sub-right > .lbmpr-sub {
	left: auto;
	right: 0;
}

/* Toggle button (mobile) */
.lbmpr-toggle {
	display: none;
	margin-left: auto;
	flex: 0 0 auto;
	align-items: center;
	gap: 9px;
	padding: 9px 14px;
	border: 1px solid var(--lbmpr-line);
	border-radius: 10px;
	background: rgba(110, 168, 255, 0.1);
	color: var(--lbmpr-white);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.lbmpr-toggle:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--lbmpr-blue);
}

.lbmpr-toggle-box {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	width: 18px;
}

.lbmpr-toggle-box span {
	display: block;
	height: 2px;
	width: 100%;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.lbmpr-nav.is-open .lbmpr-toggle-box span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.lbmpr-nav.is-open .lbmpr-toggle-box span:nth-child(2) {
	opacity: 0;
}

.lbmpr-nav.is-open .lbmpr-toggle-box span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* Admin bar offset */
body.admin-bar .lbmpr-nav {
	top: 32px;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.lbmpr-link {
		padding: 10px 10px;
		font-size: 14px;
	}
}

@media (max-width: 900px) {
	:root {
		--lbmpr-nav-h: 62px;
	}

	.lbmpr-bar {
		padding: 0 16px;
		gap: 12px;
	}

	.lbmpr-brand-sub {
		display: none;
	}

	/* JavaScript-enhanced mobile menu */
	html.lbmpr-js .lbmpr-nav .lbmpr-toggle {
		display: inline-flex;
	}

	html.lbmpr-js .lbmpr-nav .lbmpr-menu {
		position: fixed;
		top: var(--lbmpr-nav-h);
		left: 0;
		right: 0;
		margin: 0;
		max-height: 0;
		overflow: hidden;
		background: linear-gradient(180deg, #0b1730, #0a1428);
		border-bottom: 1px solid var(--lbmpr-line);
		transition: max-height 0.28s ease;
	}

	html.lbmpr-js .lbmpr-nav.is-open .lbmpr-menu {
		max-height: calc(100dvh - var(--lbmpr-nav-h));
		overflow-y: auto;
	}

	html.lbmpr-js .lbmpr-list {
		display: block;
		padding: 10px 16px 22px;
	}

	html.lbmpr-js .lbmpr-item {
		width: 100%;
		border-bottom: 1px solid rgba(120, 160, 230, 0.12);
	}

	html.lbmpr-js .lbmpr-link {
		width: 100%;
		justify-content: space-between;
		padding: 15px 6px;
		font-size: 16px;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	html.lbmpr-js .lbmpr-link.is-current {
		background: none;
		box-shadow: none;
		color: var(--lbmpr-blue-soft) !important;
	}

	html.lbmpr-js .lbmpr-sub {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		border-radius: 0;
		background: rgba(110, 168, 255, 0.06);
		min-width: 0;
		padding: 0;
		display: none;
	}

	html.lbmpr-js .lbmpr-has-sub.is-open > .lbmpr-sub {
		display: block;
	}

	html.lbmpr-js .lbmpr-sub a {
		padding: 13px 22px;
		font-size: 15px;
	}

	html.lbmpr-js .lbmpr-item-cta {
		margin: 16px 0 0;
		border-bottom: 0;
	}

	html.lbmpr-js .lbmpr-cta {
		display: block;
		text-align: center;
		padding: 14px 20px;
	}

	/* No-JavaScript fallback: a plain, static, wrapping menu. */
	html:not(.lbmpr-js) .lbmpr-nav {
		position: static;
	}

	html:not(.lbmpr-js) .lbmpr-list {
		flex-wrap: wrap;
		padding: 8px 0;
	}

	html:not(.lbmpr-js) .lbmpr-sub {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		min-width: 0;
	}

	html:not(.lbmpr-js) .lbmpr-chevron {
		display: none;
	}
}

@media (max-width: 420px) {
	.lbmpr-bar {
		padding: 0 12px;
		gap: 8px;
	}

	.lbmpr-brand {
		gap: 8px;
	}

	.lbmpr-brand-logo {
		width: 36px;
		height: 36px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .lbmpr-nav {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lbmpr-nav *,
	.lbmpr-nav *::before,
	.lbmpr-nav *::after {
		transition: none !important;
		animation: none !important;
	}
}
