/* hsa-header.css — Hillside Addon header styles */

body::before {
	content: "";
	position: fixed;
	inset: 0 0 auto;
	height: env(safe-area-inset-top, 0px);
	z-index: 60;
	background: var(--hsa-bg);
}

.hsa-site-header {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 50;
	background: color-mix(in srgb, var(--hsa-bg) 84%, transparent);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s;
}

.hsa-site-header.hsa-scrolled {
	border-color: var(--hsa-line);
}

/* ── Topbar ──────────────────────────────────────────────── */
.hsa-topbar {
	background: var(--hsa-green-deep);
	color: var(--hsa-on-green-muted);
	font-size: 14px;
}

.hsa-topbar .hsa-wrap {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-block: 8px;
}

.hsa-topbar a {
	text-decoration: none;
	color: var(--hsa-on-green);
}

.hsa-topbar a:hover {
	color: var(--hsa-yellow);
}

.hsa-topbar span {
	display: inline-flex;
	gap: 8px;
	align-items: center;
}

.hsa-topbar-icon {
	width: 15px;
	height: 15px;
	flex: none;
	color: var(--hsa-yellow);
}

/* ── Nav ─────────────────────────────────────────────────── */
.hsa-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-block: 14px;
	position: relative;
}

.hsa-links {
	display: flex;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hsa-links a {
	text-decoration: none;
	font-weight: 500;
	font-size: 16px;
	color: var(--hsa-muted);
	transition: color 0.2s;
	position: relative;
	padding-block: 6px;
}

.hsa-links a:hover,
.hsa-links a[aria-current="page"] {
	color: var(--hsa-fg);
}

.hsa-links a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--hsa-yellow);
	border-radius: 2px;
}

.hsa-links .hsa-m-only {
	display: none;
}

/* ── Brand ───────────────────────────────────────────────── */
.hsa-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}

.hsa-brand > span {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.hsa-brand-name {
	font-weight: 600;
	font-size: 17px;
	color: var(--hsa-fg);
}

.hsa-brand-sub {
	font-size: 12px;
	color: var(--hsa-muted);
	letter-spacing: 0.03em;
}

.hsa-logo {
	width: 44px;
	height: auto;
	flex: none;
}

/* ── Menu Button ─────────────────────────────────────────── */
.hsa-menu-btn {
	display: none;
	background: none;
	border: 1.5px solid var(--hsa-line);
	border-radius: 12px;
	width: 46px;
	height: 46px;
	cursor: pointer;
	color: var(--hsa-fg);
}

.hsa-menu-btn span {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	margin: 4px auto;
	transition: transform 0.3s, opacity 0.3s;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1060px) {
	.hsa-links {
		gap: 20px;
	}

	.hsa-links a {
		font-size: 15px;
	}
}

@media (max-width: 900px) {
	.hsa-links,
	.hsa-nav > .hsa-btn {
		display: none;
	}

	.hsa-menu-btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.hsa-links.hsa-open {
		display: flex;
		flex-direction: column;
		gap: 0;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--hsa-bg);
		border-bottom: 1px solid var(--hsa-line);
		padding: 8px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px));
		box-shadow: var(--hsa-shadow);
	}

	.hsa-links.hsa-open a {
		display: block;
		padding-block: 14px;
		font-size: 19px;
		border-bottom: 1px solid var(--hsa-line);
	}

	.hsa-links.hsa-open a[aria-current="page"]::after {
		display: none;
	}

	.hsa-links.hsa-open a[aria-current="page"] {
		color: var(--hsa-brand-text);
	}

	.hsa-links .hsa-m-only {
		display: list-item;
	}

	.hsa-menu-btn[aria-expanded="true"] span:nth-child(1) {
		transform: translateY(6px) rotate(45deg);
	}

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

	.hsa-menu-btn[aria-expanded="true"] span:nth-child(3) {
		transform: translateY(-6px) rotate(-45deg);
	}

	.hsa-topbar .hsa-hide-sm {
		display: none;
	}
}
