.csa-header {
	--csa-header-breakpoint: 960px;
	--csa-header-logo-width: 200px;
	--csa-header-logo-width-mobile: 110px;
	--csa-header-top-offset: 24px;
	--csa-header-top-offset-mobile: 0px;
	--csa-header-mobile-item-pad-y: 9px;
	--csa-header-mobile-item-gap: 0px;
	--csa-header-max-width: 1280px;
	--csa-header-side-padding: 32px;
	--csa-header-side-padding-mobile: 16px;
	--csa-header-logo-gap: 32px;
	--csa-header-logo-gap-mobile: 16px;
	position: relative;
	width: 100%;
	font-family: inherit;
	overflow: visible;
}

/* ---------- Logo (absolutely positioned, can overflow below) ---------- */

/*
 * --csa-header-top-offset drives BOTH the logo top and the top bar's top
 * padding, so the top edge of the logo always lines up with the top edge of
 * the top-bar pill. Keep the two usages in sync — they share one control.
 */
.csa-header__logo {
	position: absolute;
	top: var(--csa-header-top-offset);
	left: var(--csa-header-side-padding);
	width: var(--csa-header-logo-width);
	z-index: 10;
	display: inline-flex;
	align-items: flex-start;
	text-decoration: none;
}

.csa-header__logo img {
	display: block;
	width: 100%;
	height: auto;
}

.csa-header__logo-text {
	font-weight: 700;
	font-size: 24px;
}

/* ---------- Top bar (transparent container with right-aligned pill) ---------- */

.csa-header__top {
	width: 100%;
}

.csa-header__top-inner {
	max-width: var(--csa-header-max-width);
	margin: 0 auto;
	padding: var(--csa-header-top-offset) var(--csa-header-side-padding) 12px;
	padding-left: calc(var(--csa-header-side-padding) + var(--csa-header-logo-width) + var(--csa-header-logo-gap));
	display: flex;
	justify-content: flex-end;
}

.csa-header__top-pill {
	display: inline-flex;
	align-items: stretch;
	background-color: #fff;
	border: 2px solid #F4C420;
	border-radius: 10px;
	overflow: hidden;
	max-width: 100%;
}

.csa-header__top-text {
	padding: 12px 24px;
	color: #6E6E6E;
	font-size: 15px;
	line-height: 1.3;
	display: inline-flex;
	align-items: center;
}

.csa-header__top-button {
	background-color: #F4C420;
	color: #fff;
	padding: 12px 24px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	transition: filter 0.2s ease;
}

.csa-header__top-button:hover {
	filter: brightness(0.95);
}

/* ---------- Main bar (white, contains nav) ---------- */

.csa-header__main {
	width: 100%;
	position: relative;
}

.csa-header__main-inner {
	max-width: var(--csa-header-max-width);
	margin: 0 auto;
	padding: 12px var(--csa-header-side-padding) 20px;
	padding-left: calc(var(--csa-header-side-padding) + var(--csa-header-logo-width) + var(--csa-header-logo-gap));
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 24px;
	min-height: 64px;
}

/* ---------- Navigation ---------- */

.csa-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.csa-header__nav ul,
.csa-header__nav .csa-header__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 24px;
}

.csa-header__nav a {
	display: inline-block;
	padding: 6px 0;
	text-decoration: none;
	font-weight: 500;
	color: #1A1A1A;
	transition: color 0.2s ease;
}

.csa-header__nav a:hover,
.csa-header__nav .current-menu-item > a {
	color: #0E2A56;
}

/* Parent items with a submenu have no href: act as labels, not links. */
.csa-header__nav .menu-item-has-children > a[aria-haspopup="true"] {
	cursor: default;
}

.csa-header__nav li {
	position: relative;
}

.csa-header__nav ul.sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + 16px);
	left: -16px;
	min-width: 220px;
	background: #fff;
	margin: 0;
	padding: 8px 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0;
	z-index: 100;
	list-style: none;
}

/*
 * Invisible bridge: fills the gap between the parent item and the dropdown so
 * the cursor can cross it without dropping the :hover state. Height/offset mirror
 * the "Gap From Parent" control (submenu_offset_top); keep them in sync.
 */
.csa-header__nav ul.sub-menu::before {
	content: "";
	position: absolute;
	top: -16px;
	left: 0;
	right: 0;
	height: 16px;
}

.csa-header__nav .csa-header__nav-list .sub-menu,
.csa-header__nav .csa-header__nav-list .sub-menu li {
	text-align: left;
}

.csa-header__nav .csa-header__nav-list .sub-menu li {
	margin: 0;
	padding: 0;
	list-style: none;
	display: block;
}

.csa-header__nav .csa-header__nav-list .sub-menu li a {
	display: block;
	padding: 0;
	margin: 0;
	text-align: left;
}

.csa-header__nav li:hover > .sub-menu,
.csa-header__nav li:focus-within > .sub-menu,
.csa-header__nav li.csa-is-expanded > .sub-menu {
	display: flex;
}

.csa-header__nav-empty {
	margin: 0;
	color: #999;
	font-style: italic;
}

/* ---------- Burger (mobile) ---------- */

.csa-header__burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin-left: auto;
	background: transparent;
	border: 0;
	color: var(--csa-header-burger-color, #1A1A1A);
	cursor: pointer;
	flex-direction: column;
	gap: 6px;
}

.csa-header__burger span {
	display: block;
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background-color: currentColor;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

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

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

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

/* ---------- Drawer close button ---------- */

.csa-header__nav-close {
	display: none;
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 0;
	color: var(--csa-header-burger-color, #1A1A1A);
	cursor: pointer;
}

.csa-header__nav-close span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background-color: currentColor;
}

.csa-header__nav-close span:nth-child(1) {
	transform: translate(-50%, -50%) rotate(45deg);
}

.csa-header__nav-close span:nth-child(2) {
	transform: translate(-50%, -50%) rotate(-45deg);
}

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

@media (max-width: 959px) {
	.csa-header {
		--csa-header-logo-gap: var(--csa-header-logo-gap-mobile);
		--csa-header-side-padding: var(--csa-header-side-padding-mobile);
		--csa-header-top-offset: var(--csa-header-top-offset-mobile);
	}

	.csa-header__logo {
		width: var(--csa-header-logo-width-mobile);
	}

	.csa-header__top-inner,
	.csa-header__main-inner {
		padding-left: calc(var(--csa-header-side-padding) + var(--csa-header-logo-width-mobile) + var(--csa-header-logo-gap));
	}

	.csa-header__top--hide-mobile {
		display: none;
	}

	.csa-header__top-pill {
		width: 100%;
	}

	.csa-header__top-text {
		display: none;
	}

	.csa-header__top-button {
		width: 100%;
		justify-content: center;
	}

	.csa-header__burger {
		display: flex;
	}

	body.csa-header-nav-open {
		overflow: hidden;
	}

	.csa-header__nav-close {
		display: block;
		align-self: flex-end;
		flex: 0 0 auto;
		margin-bottom: 8px;
	}

	.csa-header__nav {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100%;
		height: 100dvh;
		background: #fff;
		padding: 16px var(--csa-header-side-padding) 32px;
		box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
		z-index: 1000;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		overflow-y: auto;
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.3s ease, visibility 0s linear 0.3s;
	}

	.csa-header__nav.is-open {
		transform: translateX(0);
		visibility: visible;
		transition: transform 0.3s ease, visibility 0s linear 0s;
	}

	.csa-header__nav ul,
	.csa-header__nav .csa-header__nav-list {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		width: 100%;
		gap: var(--csa-header-mobile-item-gap);
	}

	.csa-header__nav .csa-header__nav-list > li {
		border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	}

	.csa-header__nav a {
		display: block;
		padding: var(--csa-header-mobile-item-pad-y) 0;
		font-size: 17px;
	}

	.csa-header__nav .sub-menu {
		position: static;
		box-shadow: none;
		padding: 0 0 8px 16px;
	}

	.csa-header__nav ul.sub-menu::before {
		content: none;
	}
}
