/**
 * Mobile Menu - CSS
 * Uses main theme tokens from css/base.css (--gold, --navy, --white, etc.)
 * Only --nav-height is local to this module.
 */

:root {
	--nav-height: 52px;
}

/* ========================================
   1. MAIN NAVIGATION (Block)
   Source: navigation.css lines 29-72
   ======================================== */

.gbp-navigation {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
	width: 100%;
	min-height: var(--nav-height);
	padding: 0.2rem 0.83rem;
	background:
		radial-gradient(
			ellipse at 85% 50%,
			rgba(var(--gold-rgb), 0.07) 0%,
			transparent 55%
		),
		linear-gradient(
			135deg,
			var(--navy) 0%,
			var(--navy-mid) 40%,
			#1c3366 70%,
			var(--navy) 100%
		);
	transition:
		background 0.2s ease,
		box-shadow 0.25s ease-in-out,
		padding 0.15s ease;
	border-bottom: none;
	backdrop-filter: none;
	will-change: transform;
}

.gbp-navigation--scrolled {
	box-shadow: var(--shadow-elevated);
}

.gbp-navigation.kpl-header--scrolled {
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Nav Container inner flex */
.gbp-navigation > .gb-element {
	height: 100%;
	padding: 0 1rem;
}

/* ========================================
   2. NAVIGATION LINKS (BEM)
   Source: navigation.css lines 110-170
   ======================================== */

.gbp-navigation .gbp-navigation__menu {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.gbp-navigation .gbp-navigation__link {
	position: relative;
	background: transparent;
	color: rgba(255, 255, 255, 0.85);
	transition: color 0.3s ease;
	font-size: 0.85rem;
	font-weight: 500;
	text-decoration: none;
}

/* Underline animation */
.gbp-navigation__link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--gold);
	transition: width 0.3s ease;
}

.gbp-navigation__link:hover::after {
	width: 100%;
}

.gbp-navigation a.gbp-navigation__link:hover,
.gbp-navigation a.gbp-navigation__link:focus,
.gbp-navigation .gbp-navigation__link:hover,
.gbp-navigation .gbp-navigation__link:focus {
	background: transparent;
	color: var(--gold);
}

/* ========================================
   3. MOBILE TOGGLE (BEM)
   Source: navigation.css lines 297-344
   ======================================== */

.gbp-navigation__mobile-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 6.1px;
	width: 44px;
	height: 44px;
	padding: 8px;
	background: transparent;
	border: none;
	cursor: pointer;
}

/* Hamburger Line */
.gbp-navigation__hamburger-line {
	width: 24px;
	height: 2px;
	background: #ffffff;
	transition:
		transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
		opacity 0.2s ease;
}

/* Active State — X icon */
.gbp-navigation__mobile-toggle--active
	.gbp-navigation__hamburger-line:nth-child(1) {
	transform: rotate(45deg) translate(6px, 6px);
}

.gbp-navigation__mobile-toggle--active
	.gbp-navigation__hamburger-line:nth-child(2) {
	opacity: 0;
}

.gbp-navigation__mobile-toggle--active
	.gbp-navigation__hamburger-line:nth-child(3) {
	transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   4. RESPONSIVE — TABLET ≤1024px
   Source: navigation.css lines 350-421
   ======================================== */

@media (width <= 1024px) {
	:root {
		--nav-height: 55px;
	}

	body {
		padding-top: 55px;
	}

	.gbp-navigation {
		min-height: 55px;
		padding: 0.5rem 0.65rem;
	}

	.gbp-navigation .gbp-navigation__menu {
		display: none;
	}

	.gbp-navigation .gbp-navigation__mobile-toggle {
		display: flex;
	}

	/* Menu Open State */
	.gbp-navigation .gbp-navigation__menu--open {
		position: fixed;
		top: 55px;
		right: 0;
		left: 0;
		z-index: 999;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0;
		padding: 1.5rem;
		background:
			radial-gradient(
				ellipse at 85% 50%,
				rgba(var(--gold-rgb), 0.07) 0%,
				transparent 55%
			),
			linear-gradient(
				135deg,
				var(--navy) 0%,
				var(--navy-mid) 40%,
				#1c3366 70%,
				var(--navy) 100%
			);
		text-align: center;
		border-radius: 0 0 16px 16px;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
		animation: slideDown 0.3s ease;
	}

	@keyframes slideDown {
		from {
			transform: translateY(-20px);
			opacity: 0;
		}

		to {
			transform: translateY(0);
			opacity: 1;
		}
	}

	.gbp-navigation__menu--open .gbp-navigation__link {
		display: inline-block;
		padding: 0.85rem 0;
		text-align: center;
		font-size: 1rem;
	}

	.gbp-navigation__menu--open .gbp-navigation__cta-button {
		display: none;
	}
}

/* ========================================
   5. RESPONSIVE — MOBILE ≤767px
   Source: navigation.css lines 427-471
   ======================================== */

@media (width <= 767px) {
	:root {
		--nav-height: 50px;
	}

	body {
		padding-top: 50px;
	}

	.gbp-navigation {
		min-height: 50px;
	}

	.gbp-navigation__menu--open {
		top: 50px;
	}

	.gbp-navigation__link {
		display: flex;
		align-items: center;
		padding: 12px 0;
		min-height: 44px;
	}
}

/* ========================================
   7. GENERATEBLOCKS INLINE CSS (REMOVED)
   Migrated to BEM classes in §§1-3:
     .gb-element-3e9f8c2d → .gbp-navigation__menu (§2)
     .gb-text-*           → .gbp-navigation__link (§2)
     .gb-element-3c8f7a2d → .gbp-navigation__mobile-toggle (§3)
   GB inline CSS is still generated per-block in HTML,
   but styling is now controlled by BEM selectors.
   ======================================== */
