/* ================================ Site header ============================ */

.bb-header {
	background: #fff;
	border-bottom: 1px solid var(--bb-border);
	position: relative;
	z-index: 50;
}

.bb-header--sticky {
	position: sticky;
	top: 0;
}

.bb-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding-block: 14px;
	transition: padding .25s var(--bb-ease);
}

.bb-header.is-stuck {
	box-shadow: var(--bb-shadow-sm);
}

.bb-header.is-stuck .bb-header__inner {
	padding-block: 9px;
}

/* ------------------------------------------------------------------ brand */

.bb-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: none;
	min-width: 0;
}

.bb-brand__logo {
	width: 54px;
	height: auto;
	object-fit: contain;
}

.bb-brand__mono {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border: 1.5px solid var(--bb-saffron);
	border-radius: 8px;
	color: var(--bb-navy);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.02em;
	flex: none;
}

.bb-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	min-width: 0;
}

.bb-brand__name {
	color: var(--bb-navy);
	font-size: 19px;
	font-weight: 700;
	white-space: nowrap;
}

.bb-brand__tagline {
	color: var(--bb-saffron);
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .01em;
	white-space: nowrap;
}

/* The drawer close button is injected by JS on every screen; it is only ever
   used inside the mobile drawer, so hide it by default. */
.bb-nav__close {
	display: none;
}

/* -------------------------------------------------------------------- nav */

.bb-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

.bb-nav__list {
	display: flex;
	align-items: center;
	gap: 26px;
	flex-wrap: wrap;
	justify-content: center;
}

.bb-nav__list > li {
	position: relative;
}

.bb-nav__list a {
	display: inline-block;
	padding: 6px 0;
	color: var(--bb-navy);
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
	position: relative;
}

.bb-nav__list a::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -2px;
	width: 0;
	height: 2.5px;
	border-radius: 2px;
	background: var(--bb-saffron);
	transform: translateX(-50%);
	transition: width .25s var(--bb-ease);
}

.bb-nav__list a:hover {
	color: var(--bb-saffron);
}

.bb-nav__list a:hover::after,
.bb-nav__list .current-menu-item > a::after,
.bb-nav__list .current_page_item > a::after {
	width: 22px;
}

.bb-nav__list .current-menu-item > a,
.bb-nav__list .current_page_item > a {
	color: var(--bb-saffron);
	font-weight: 600;
}

/* submenus */

.bb-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 20;
	min-width: 210px;
	padding: 10px 0;
	margin-top: 10px;
	transform: translateX(-50%) translateY(6px);
	background: #fff;
	border-radius: var(--bb-radius);
	box-shadow: var(--bb-shadow);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s var(--bb-ease), transform .2s var(--bb-ease), visibility .2s;
}

.bb-nav__list > li:hover > .sub-menu,
.bb-nav__list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.bb-nav__list .sub-menu a {
	display: block;
	padding: 8px 20px;
	white-space: normal;
}

.bb-nav__list .sub-menu a::after {
	display: none;
}

.bb-nav__hint {
	margin: 0;
	font-size: 13px;
	color: var(--bb-body);
	opacity: .7;
}

/* ---------------------------------------------------------------- actions */

.bb-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
}

.bb-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	border: 1px solid var(--bb-border);
	color: var(--bb-navy);
}

.bb-header__toggle .bb-icon {
	width: 20px;
	height: 20px;
}

/* ------------------------------------------------------------ mobile menu */

@media (max-width: 1100px) {
	.bb-nav__list {
		gap: 18px;
	}

	.bb-nav__list a {
		font-size: 14px;
	}
}

@media (max-width: 991px) {
	.bb-header__toggle {
		display: inline-flex;
	}

	.bb-nav {
		position: fixed;
		inset: 0;
		z-index: 100;
		display: block;
		padding: 84px 24px 40px;
		background: #fff;
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform .3s var(--bb-ease);
	}

	.bb-nav.is-open {
		transform: translateX(0);
	}

	.bb-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.bb-nav__list > li {
		border-bottom: 1px solid var(--bb-border);
	}

	.bb-nav__list a {
		display: block;
		padding: 15px 4px;
		font-size: 16px;
	}

	.bb-nav__list a::after {
		display: none;
	}

	.bb-nav__list .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 8px 14px;
		margin: 0;
		transform: none;
		opacity: 1;
		visibility: visible;
		box-shadow: none;
	}

	.bb-nav__close {
		position: absolute;
		top: 22px;
		right: 22px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		border-radius: 10px;
		border: 1px solid var(--bb-border);
		color: var(--bb-navy);
	}

	.bb-nav__close .bb-icon {
		width: 18px;
		height: 18px;
	}

	body.bb-menu-open {
		overflow: hidden;
	}
}

@media (max-width: 600px) {
	.bb-brand__name {
		font-size: 16px;
	}

	.bb-brand__mono {
		width: 42px;
		height: 42px;
		font-size: 17px;
	}

	.bb-brand__tagline {
		font-size: 10.5px;
	}

	.bb-header__inner {
		gap: 12px;
		padding-block: 11px;
	}
}
