/*
 * Bayline Services — Header & Navigation Styles
 * Navy from logo: #0d2f55 · Blue from palette: #1a5fa8
 * Multi-page site: nav links go to their own pages; bl-header.js marks the current one.
 */

html {
	scroll-behavior: smooth;
}

section[id] {
	scroll-margin-top: 92px;
}

.bl-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background-color: #ffffff;
	transition: box-shadow 0.3s ease;
}

.bl-site-header.scrolled {
	box-shadow: 0 2px 16px rgba(13, 47, 85, 0.12);
}

.bl-header-wrap {
	height: 76px;
}

.bl-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1280px;
	margin: 0 auto;
	padding: 14px 40px;
}

.bl-logo-link {
	flex-shrink: 0;
	display: block;
	line-height: 0;
}

.bl-logo-img {
	height: 48px;
	width: auto;
	display: block;
}

.bl-nav__list {
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bl-nav__list > li > a {
	color: var(--wp--preset--color--brand-dark);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.bl-nav__list > li > a:hover,
.bl-nav__list > li.current-menu-item > a {
	color: var(--wp--preset--color--brand);
}

.bl-nav__list > li.current-menu-item > a {
	font-weight: 700;
}

.bl-nav__list > li > a:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-dark);
	outline-offset: 4px;
	border-radius: 2px;
}

.bl-header-phone {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	background-color: var(--wp--preset--color--brand);
	color: #ffffff;
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 999px;
	padding: 0.65rem 1.4rem;
	transition: background-color 0.2s ease;
}

.bl-header-phone:hover {
	background-color: var(--bl-brand-hover);
	color: #ffffff;
}

.bl-header-phone__icon {
	display: inline-flex;
	line-height: 0;
}

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

.bl-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 8px;
	background: transparent;
	border: none;
	cursor: pointer;
}

.bl-hamburger span {
	display: block;
	height: 2px;
	width: 100%;
	background-color: var(--wp--preset--color--brand-dark);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.bl-hamburger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.bl-hamburger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.bl-hamburger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.bl-mobile-menu {
	background-color: #ffffff;
	border-top: 1px solid var(--bl-border);
	box-shadow: 0 12px 24px rgba(13, 47, 85, 0.12);
}

.bl-mobile-menu ul {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
}

.bl-mobile-menu a {
	display: block;
	padding: 0.9rem 40px;
	color: var(--wp--preset--color--brand-dark);
	text-decoration: none;
	font-size: 1.05rem;
	font-weight: 500;
}

.bl-mobile-menu a:hover,
.bl-mobile-menu li.current-menu-item > a {
	color: var(--wp--preset--color--brand);
}

.bl-mobile-menu__phone {
	color: var(--wp--preset--color--brand) !important;
	font-weight: 600 !important;
}

@media (max-width: 1023px) {
	.bl-nav,
	.bl-header-phone {
		display: none;
	}

	.bl-hamburger {
		display: flex;
	}

	.bl-header-inner {
		padding: 12px 24px;
	}

	.bl-mobile-menu a {
		padding: 0.9rem 24px;
	}

	.bl-logo-img {
		height: 40px;
	}

	.bl-header-wrap {
		height: 66px;
	}

	section[id] {
		scroll-margin-top: 66px;
	}
}
