/* ==========================================================================
   BAAK public header (redesign 2026-11)
   Markup: header.inc.php  ·  Behaviour: js/header.js
   Everything is scoped to .bh-header so other page components are unaffected.
   ========================================================================== */

.bh-header {
	--bh-indigo: #393185;
	--bh-indigo-700: #2c2569;
	--bh-indigo-900: #1f1a4d;
	--bh-red: #e31e24;
	--bh-red-700: #c4161c;
	--bh-tint: #f3f2fa;
	--bh-tint-2: #e9e7f6;
	--bh-border: #e6e4f1;
	--bh-text: #2a2462;
	--bh-muted: #5b5785;
	--bh-accent: #cdc8f7;          /* calm lavender accent derived from the indigo */
	--bh-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--bh-utility-h: 44px;
	--bh-bar-h: 92px;
	--bh-bar-h-stuck: 72px;
	--bh-logo-h: 60px;
	--bh-logo-h-stuck: 48px;
	--bh-ease: cubic-bezier(.2, .7, .2, 1);
	--bh-fast: 180ms;

	position: relative;
	z-index: 9990;
	font-family: var(--bh-font);
	font-size: 16px;
	line-height: 1.4;
	color: var(--bh-text);
	-webkit-font-smoothing: antialiased;
}

.bh-header *,
.bh-header *::before,
.bh-header *::after {
	box-sizing: border-box;
}

/* Zero-specificity resets so component rules below always win */
:where(.bh-header) ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

:where(.bh-header) li {
	list-style: none;
}

/* Neutralise the theme's global `a, button { color: #1696e7; transition: all .3s }` and bootstrap's a:hover */
:where(.bh-header) a:hover {
	color: inherit;
}

:where(.bh-header) a,
:where(.bh-header) button {
	color: inherit;
	text-decoration: none;
	transition: color var(--bh-fast) ease, background-color var(--bh-fast) ease, border-color var(--bh-fast) ease, box-shadow var(--bh-fast) ease;
}

:where(.bh-header) button {
	font: inherit;
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.bh-header a:focus,
.bh-header button:focus {
	outline: none;
}

.bh-header a:focus-visible,
.bh-header button:focus-visible {
	outline: 2px solid var(--bh-indigo);
	outline-offset: 2px;
	border-radius: 6px;
}

.bh-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/* 1. Utility bar                                                       */
/* ------------------------------------------------------------------ */

.bh-utility {
	background: var(--bh-indigo);
	color: rgba(255, 255, 255, .9);
	font-size: 14px;
}

.bh-utility__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--bh-utility-h);
}

.bh-utility a:focus-visible {
	outline-color: #fff;
}

.bh-contact {
	display: flex;
	align-items: center;
	gap: 6px 28px;
	min-width: 0;
}

.bh-contact__item {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.bh-contact__icon {
	width: 16px;
	font-size: 13px;
	text-align: center;
	color: var(--bh-accent);
	flex: none;
}

.bh-contact__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 32px;
	color: #fff;
	border-bottom: 1px solid transparent;
}

.bh-contact__link:hover .bh-contact__text {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: var(--bh-accent);
	text-underline-offset: 3px;
}

.bh-chip {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 10px;
	border: 1px solid rgba(255, 255, 255, .32);
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .01em;
	color: #fff;
}

.bh-chip:hover {
	background: rgba(255, 255, 255, .14);
	border-color: rgba(255, 255, 255, .6);
	color: #fff;
}

.bh-utility__end {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: none;
}

.bh-lang {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .08);
}

.bh-lang__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 28px;
	padding: 0 6px;
	border-radius: 6px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .04em;
	color: rgba(255, 255, 255, .88);
}

.bh-lang__link:hover {
	color: #fff;
	background: rgba(255, 255, 255, .14);
}

.bh-lang__link.is-current {
	background: #fff;
	color: var(--bh-indigo);
}

.bh-social {
	display: flex;
	align-items: center;
	gap: 4px;
	padding-left: 16px;
	border-left: 1px solid rgba(255, 255, 255, .2);
}

.bh-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 14px;
	color: #fff;
}

.bh-social__link:hover {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

/* ------------------------------------------------------------------ */
/* 2. Main bar                                                          */
/* ------------------------------------------------------------------ */

.bh-bar-slot {
	min-height: var(--bh-bar-h);       /* reserves space so the sticky switch never shifts content */
}

.bh-bar {
	position: relative;
	background: #fff;
	border-bottom: 1px solid transparent;
	transition: box-shadow 220ms ease, border-color 220ms ease;
}

.bh-bar__inner {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 32px;
	height: var(--bh-bar-h);
	transition: height 220ms var(--bh-ease);
}

.bh-logo {
	display: flex;
	align-items: center;
	flex: none;
}

.bh-logo img {
	display: block;
	height: var(--bh-logo-h);
	width: auto;
	max-width: 100%;
	transition: height 220ms var(--bh-ease);
}

.bh-header.is-stuck .bh-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	border-bottom-color: var(--bh-border);
	box-shadow: 0 6px 20px -8px rgba(31, 26, 77, .18);
}

.bh-header.is-stuck .bh-bar__inner {
	height: var(--bh-bar-h-stuck);
}

.bh-header.is-stuck .bh-logo img {
	height: var(--bh-logo-h-stuck);
}

/* Navigation list (desktop) */

.bh-nav {
	display: flex;
	align-items: stretch;
	min-width: 0;
}

.bh-menu {
	display: flex;
	align-items: stretch;
	gap: 6px;
}

.bh-item {
	position: relative;
	display: flex;
	align-items: stretch;
}

.bh-link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 0 13px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--bh-indigo);
	text-align: left;
}

.bh-header .bh-link:hover,
.bh-item.is-open > .bh-link {
	color: var(--bh-red);
}

/* Short animated indicator under the item label */
.bh-link::after {
	content: "";
	position: absolute;
	left: 13px;
	bottom: calc(50% - 22px);
	width: 22px;
	height: 3px;
	border-radius: 3px;
	background: var(--bh-red);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 200ms var(--bh-ease);
}

.bh-link:hover::after,
.bh-item.is-open > .bh-link::after,
.bh-item.is-active > .bh-link::after {
	transform: scaleX(1);
}

.bh-item.is-active > .bh-link {
	color: var(--bh-red);
}

.bh-link:focus-visible {
	outline-offset: -6px;
}

.bh-caret {
	font-size: 10px;
	opacity: .7;
	transition: transform 200ms var(--bh-ease);
}

.bh-item.is-open > .bh-link .bh-caret {
	transform: rotate(180deg);
}

/* Dropdowns (desktop) */

.bh-sub {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	min-width: 248px;
	max-width: min(360px, calc(100vw - 32px));
	padding: 8px;
	margin-top: -10px;
	background: #fff;
	border: 1px solid var(--bh-border);
	border-radius: 14px;
	box-shadow: 0 16px 36px -12px rgba(31, 26, 77, .22), 0 2px 6px rgba(31, 26, 77, .06);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--bh-fast) ease, transform var(--bh-fast) var(--bh-ease), visibility 0s linear var(--bh-fast);
}

/* Invisible bridge so the pointer can travel from the item into the panel */
.bh-sub::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -14px;
	height: 14px;
}

.bh-sub--end {
	left: auto;
	right: 0;
}

.bh-item.is-open > .bh-sub,
.bh-header:not(.bh-js) .bh-item:hover > .bh-sub,
.bh-header:not(.bh-js) .bh-item:focus-within > .bh-sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity var(--bh-fast) ease, transform var(--bh-fast) var(--bh-ease), visibility 0s;
}

.bh-sub__link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--bh-text);
}

.bh-header .bh-sub__link:hover,
.bh-header .bh-sub__link:focus-visible {
	background: var(--bh-tint);
	color: var(--bh-indigo);
}

.bh-sub__link:focus-visible {
	outline-offset: -2px;
}

.bh-sub__link[aria-current="page"] {
	color: var(--bh-red);
	background: var(--bh-tint);
}

.bh-sub__label {
	flex: 1 1 auto;
	min-width: 0;
}

.bh-sub__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: var(--bh-tint);
	color: var(--bh-indigo);
	font-size: 14px;
	transition: background-color var(--bh-fast) ease, color var(--bh-fast) ease;
}

.bh-sub__link:hover .bh-sub__icon,
.bh-sub__link:focus-visible .bh-sub__icon {
	background: var(--bh-indigo);
	color: #fff;
}

.bh-sub__ext {
	flex: none;
	font-size: 11px;
	color: var(--bh-muted);
	opacity: .65;
}

.bh-sub--rich {
	min-width: 300px;
}

.bh-sub--rich .bh-sub__link {
	min-height: 52px;
	font-weight: 600;
}

/* Hamburger and drawer extras are hidden on desktop */
.bh-burger,
.bh-drawer-extra {
	display: none;
}

/* ------------------------------------------------------------------ */
/* 3. Desktop size steps                                                */
/* ------------------------------------------------------------------ */

@media (min-width: 1400px) {
	.bh-menu {
		gap: 8px;
	}
	.bh-link {
		font-size: 17px;
		padding: 0 15px;
	}
	.bh-link::after {
		left: 15px;
	}
}

@media (min-width: 1200px) and (max-width: 1299.98px) {
	.bh-bar__inner {
		gap: 20px;
	}
	.bh-menu {
		gap: 0;
	}
	.bh-link {
		padding: 0 10px;
	}
	.bh-link::after {
		left: 10px;
	}
}

/* Utility bar: drop the street address before anything can collide */
@media (max-width: 1199.98px) {
	.bh-contact__item--address .bh-contact__text {
		display: none;
	}
}

@media (max-width: 991.98px) {
	.bh-contact__item--address {
		display: none;
	}
}

/* ------------------------------------------------------------------ */
/* 4. Collapsed navigation (tablet + mobile, < 1200px)                  */
/* ------------------------------------------------------------------ */

@media (max-width: 1199.98px) {
	.bh-header {
		--bh-bar-h: 80px;
		--bh-bar-h-stuck: 64px;
		--bh-logo-h: 52px;
		--bh-logo-h-stuck: 42px;
	}

	.bh-bar__inner {
		align-items: center;
	}

	.bh-burger {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		margin-right: -8px;
		border-radius: 10px;
		color: var(--bh-indigo);
	}

	.bh-burger:hover {
		background: var(--bh-tint);
	}

	.bh-burger__box {
		position: relative;
		display: block;
		width: 22px;
		height: 16px;
	}

	.bh-burger__line,
	.bh-burger__line::before,
	.bh-burger__line::after {
		position: absolute;
		left: 0;
		display: block;
		width: 22px;
		height: 2px;
		border-radius: 2px;
		background: currentColor;
		transition: transform 200ms var(--bh-ease), opacity 150ms ease, top 200ms var(--bh-ease);
	}

	.bh-burger__line {
		top: 7px;
	}

	.bh-burger__line::before,
	.bh-burger__line::after {
		content: "";
	}

	.bh-burger__line::before {
		top: -7px;
	}

	.bh-burger__line::after {
		top: 7px;
	}

	.bh-burger[aria-expanded="true"] .bh-burger__line {
		background: transparent;
	}

	.bh-burger[aria-expanded="true"] .bh-burger__line::before {
		top: 0;
		transform: rotate(45deg);
	}

	.bh-burger[aria-expanded="true"] .bh-burger__line::after {
		top: 0;
		transform: rotate(-45deg);
	}

	/* Without JS the nav stays in the flow as a simple stacked list */
	.bh-header:not(.bh-js) .bh-burger {
		display: none;
	}

	.bh-header:not(.bh-js) .bh-bar__inner {
		flex-wrap: wrap;
		height: auto;
	}

	/* Full-width panel under the bar */
	.bh-header.bh-js .bh-nav {
		position: fixed;
		left: 0;
		right: 0;
		top: var(--bh-drawer-top, 124px);
		bottom: 0;
		z-index: 30;
		display: block;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		background: #fff;
		border-top: 1px solid var(--bh-border);
		padding: 8px 0 32px;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 200ms ease, transform 200ms var(--bh-ease), visibility 0s linear 200ms;
	}

	.bh-header.is-menu-open .bh-nav {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity 200ms ease, transform 200ms var(--bh-ease), visibility 0s;
	}

	.bh-menu {
		display: block;
		max-width: 720px;
		margin: 0 auto;
		padding: 0 16px;
	}

	.bh-item {
		display: block;
		border-bottom: 1px solid var(--bh-border);
	}

	.bh-link {
		width: 100%;
		min-height: 56px;
		padding: 12px 4px;
		font-size: 17px;
		justify-content: space-between;
		white-space: normal;
	}

	.bh-link::after {
		display: none;
	}

	.bh-item.is-active > .bh-link {
		box-shadow: inset 3px 0 0 var(--bh-red);
		padding-left: 14px;
	}

	.bh-caret {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 32px;
		height: 32px;
		border-radius: 8px;
		background: var(--bh-tint);
		font-size: 11px;
		opacity: 1;
		flex: none;
	}

	/* Accordion panels */
	.bh-sub,
	.bh-sub--rich,
	.bh-header:not(.bh-js) .bh-item:hover > .bh-sub {
		position: static;
		display: none;
		min-width: 0;
		max-width: none;
		margin: 0 0 12px;
		padding: 4px;
		border: 0;
		border-radius: 12px;
		background: var(--bh-tint);
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}

	.bh-sub::before {
		display: none;
	}

	.bh-item.is-open > .bh-sub,
	.bh-header:not(.bh-js) .bh-sub {
		display: block;
	}

	.bh-sub__link {
		min-height: 48px;
		font-size: 16px;
	}

	.bh-header .bh-sub__link:hover,
	.bh-header .bh-sub__link:focus-visible,
	.bh-sub__link[aria-current="page"] {
		background: #fff;
	}

	.bh-sub__icon {
		background: #fff;
	}

	/* Contact block at the bottom of the panel */
	.bh-header.bh-js .bh-drawer-extra {
		display: block;
		max-width: 720px;
		margin: 24px auto 0;
		padding: 0 20px;
		color: var(--bh-muted);
		font-size: 15px;
	}

	.bh-drawer-contact li {
		display: flex;
		align-items: center;
		gap: 10px;
		margin-bottom: 4px;
	}

	.bh-drawer-contact li > i {
		width: 18px;
		text-align: center;
		color: var(--bh-indigo);
	}

	.bh-drawer-contact a {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		min-height: 44px;
		color: var(--bh-indigo);
		font-weight: 500;
	}

	.bh-drawer-contact a > i {
		width: 18px;
		text-align: center;
	}

	.bh-drawer-contact__chips {
		padding-left: 28px;
		margin-top: 4px;
		margin-bottom: 8px !important;
	}

	.bh-chip--light {
		height: 44px;
		min-width: 72px;
		justify-content: center;
		padding: 0 16px;
		font-size: 14px;
		color: var(--bh-indigo);
		border-color: var(--bh-border);
		background: #fff;
	}

	.bh-header .bh-chip--light:hover {
		background: var(--bh-tint);
		border-color: var(--bh-tint-2);
		color: var(--bh-indigo);
	}

	.bh-drawer-social {
		display: flex;
		gap: 8px;
		margin-top: 16px;
	}

	.bh-social__link--light {
		width: 44px;
		height: 44px;
		background: var(--bh-tint);
		color: var(--bh-indigo);
	}

	.bh-header .bh-social__link--light:hover {
		background: var(--bh-indigo);
		color: #fff;
	}
}

/* ------------------------------------------------------------------ */
/* 5. Phone (< 768px)                                                   */
/* ------------------------------------------------------------------ */

@media (max-width: 767.98px) {
	.bh-header {
		--bh-utility-h: 44px;
		--bh-bar-h: 68px;
		--bh-bar-h-stuck: 60px;
		--bh-logo-h: 44px;
		--bh-logo-h-stuck: 38px;
	}

	.bh-utility__inner {
		gap: 8px;
	}

	.bh-contact {
		gap: 0;
	}

	.bh-contact__text,
	.bh-social {
		display: none;
	}

	.bh-contact__link {
		justify-content: center;
		width: 44px;
		height: 44px;
	}

	.bh-contact__icon {
		font-size: 15px;
		color: #fff;
	}

	/* 44x44 touch targets; the visible pill is painted inside via content-box */
	.bh-lang {
		padding: 0;
		gap: 0;
		background: none;
	}

	.bh-lang__link {
		min-width: 44px;
		height: 44px;
		padding: 7px 4px;
		border-radius: 10px;
		background-clip: content-box;
	}

	.bh-header .bh-lang__link:hover {
		background-color: rgba(255, 255, 255, .14);
	}

	.bh-header .bh-lang__link.is-current {
		background-color: #fff;
	}
}

@media (max-width: 339.98px) {
	.bh-contact__item:last-child {
		display: none;
	}
}

/* Body scroll lock while the panel is open */
html.bh-lock,
html.bh-lock body {
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* 6. Reduced motion                                                    */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.bh-header *,
	.bh-header *::before,
	.bh-header *::after {
		transition-duration: 0s !important;
		transition-delay: 0s !important;
		animation: none !important;
	}
	.bh-sub,
	.bh-header.bh-js .bh-nav {
		transform: none !important;
	}
}
