/* =====================================================================
   layout/header.css — black nav bar with an oversized brand lockup that
   overflows into the section below it (as per the design).
   ===================================================================== */

.site-header {
	position: relative;
	z-index: 20;
	background-color: var(--black-bar);
}

.site-header .navbar {
	--bs-navbar-padding-y: 0;
	min-height: 6.5625rem;
	/* 105px */
	padding-block: 0;
}

.site-header .container {
	position: relative;
}

/* -- Brand lockup -- */
.site-brand {
	display: block;
	padding: 0;
	margin: 0;
}

.site-brand img,
.site-brand .custom-logo {
	width: auto;
	max-width: 100%;
	height: auto;
}

.site-brand .brand-name {
	font-family: var(--font-secondary);
	font-size: clamp(1.125rem, 0.99rem + 0.59vw, 1.5rem);
	font-weight: 700;
	color: var(--accent-gold);
}

@media (min-width: 1200px) {

	/* Brand lockup width is the single source of truth for the desktop bar:
	   the menu reserves exactly this much space to its left. Fluid so the
	   logo scales smoothly from 1200px to 1920px with no breakpoint gaps.
	   ~307px at 1920, ~283px at 1700, ~250px at 1400, 208px floor. One
	   continuous curve, so there is no jump at any breakpoint boundary.
	   Width only - height stays auto, so the aspect ratio is preserved. */
	.site-header {
		--brand-w: clamp(13rem, 6rem + 11vw, 20rem);
	}

	/* The lockup sits on the bar and spills over the hero beneath it. */
	.site-brand {
		position: absolute;
		top: .375rem;
		left: var(--bs-gutter-x, .75rem);
		z-index: 2;
		width: var(--brand-w);
	}

	.site-brand img,
	.site-brand .custom-logo {
		width: 100%;
	}

	/* Clear the absolutely-positioned lockup so the menu starts beside it.
	   Tracks --brand-w, so the reservation can never fall out of step with
	   the logo and squeeze or overlap the menu. */
	.site-header .primary-nav {
		padding-left: calc(var(--brand-w) + 1.25rem);
	}
}

/* -- Primary menu -- */
.site-header .navbar-nav {
	gap: 1rem;
}

.site-header .nav-link {
	padding: 0;
	font-family: var(--font-primary);
	font-size: 1.0625rem;
	font-weight: 400;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	transition: color .25s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible,
.site-header .current-menu-item > .nav-link,
.site-header .current_page_item > .nav-link {
	color: var(--accent-gold);
}

/* Sub-menus (depth 2) */
.site-header .navbar-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: .5rem 0;
	background: var(--black-bar);
	border: 1px solid var(--border-dark);
	border-radius: var(--radius-md);
}

@media (min-width: 1200px) {
	.site-header .navbar-nav .menu-item-has-children {
		position: relative;
	}

	.site-header .navbar-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 14rem;
		opacity: 0;
		visibility: hidden;
		transform: translateY(.5rem);
		transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	}

	.site-header .navbar-nav .menu-item-has-children:hover > .sub-menu,
	.site-header .navbar-nav .menu-item-has-children:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.site-header .navbar-nav .sub-menu .nav-link,
	.site-header .navbar-nav .sub-menu a {
		display: block;
		padding: .5rem 1.25rem;
		text-transform: none;
		letter-spacing: 0;
		color: #fff;
	}
}

/* -- Header actions (call pill + quote button) -- */
.header-actions {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.header-call {
	--bs-btn-padding-y: .8125rem;
	--bs-btn-padding-x: 1.75rem;
	font-size: 1.125rem;
	white-space: nowrap;
}

.header-call svg {
	width: 1.125rem;
	height: 1.125rem;
}

.header-quote {
	--bs-btn-padding-y: .8125rem;
	--bs-btn-padding-x: 1.75rem;
	font-size: 1.0625rem;
	white-space: nowrap;
}

/* -- Search toggle --
   The design has no search control, so nav-header.php does not render the
   button. SearchService still registers its overlay, so these styles are kept
   ready: re-add the [data-ktm-toggle] search button to nav-header.php and the
   feature works, on-brand, with no CSS changes. -- */
.site-header .header-search {
	padding: .5rem .875rem;
	font-family: var(--font-primary);
	font-size: .9375rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--text-on-dark);
	background: transparent;
	border: 1px solid var(--border-dark);
	border-radius: var(--radius-pill);
}

.site-header .header-search:hover,
.site-header .header-search:focus-visible {
	color: var(--accent-gold);
	border-color: rgba(255, 192, 106, .4);
}

/* -- Mobile toggler -- */
.site-header .navbar-toggler {
	padding: .5rem .625rem;
	border: 1px solid var(--border-dark);
	border-radius: var(--radius-sm);
}

.site-header .navbar-toggler:focus {
	box-shadow: none;
}

.site-header .navbar-toggler-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23FFC06A' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
