/**
 * Main header navigation
 */

.hg-header {
	background-color: var(--background);
	border-bottom: 1px solid var(--border);
}

.hg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	max-width: var(--content-max);
	margin-inline: auto;
	padding: 1.125rem var(--section-padding-x);
}

.hg-header__brand {
	flex-shrink: 0;
}

.hg-header__brand .custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.hg-header__brand .custom-logo {
	max-height: 48px;
	width: auto;
}

/* Text logo placeholder (replace via Appearance → Customize → Logo) */
.hg-logo {
	position: relative;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--foreground);
	padding: 0.25rem 0.5rem;
}

.hg-logo__text {
	position: relative;
	z-index: 1;
	font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
	font-size: clamp(1.375rem, 2.5vw, 1.75rem);
	font-weight: 400;
	line-height: 1.1;
	white-space: nowrap;
}

.hg-logo__highlight {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.15em;
	height: 52%;
	background-color: var(--accent);
	z-index: 0;
}

/* Navigation */
.hg-nav {
	margin-left: auto;
}

.hg-nav__list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hg-nav__item,
.hg-nav .menu-item {
	margin: 0;
}

.hg-nav__link,
.hg-nav .menu-item a {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.25rem;
	font-family: var(--font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--foreground);
	background: transparent;
	border: none;
	transition: opacity 0.2s ease;
}

.hg-nav__link:hover,
.hg-nav .menu-item a:hover {
	opacity: 0.65;
}

.hg-nav__link[aria-current="page"],
.hg-nav__link[aria-current="page"]:hover,
.hg-nav .current-menu-item > a,
.hg-nav .current-menu-item > a:hover,
.hg-nav .current_page_item > a,
.hg-nav .current_page_item > a:hover {
	color: var(--foreground);
	background: transparent;
	border: none;
	opacity: 1;
	outline: none;
	box-shadow: none;
}

/* Mobile toggle */
.hg-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: transparent;
	cursor: pointer;
}

.hg-header__toggle-bar {
	display: block;
	width: 1.125rem;
	height: 2px;
	margin: 0 auto;
	background-color: var(--foreground);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.hg-header.is-open .hg-header__toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.hg-header.is-open .hg-header__toggle-bar:nth-child(2) {
	opacity: 0;
}

.hg-header.is-open .hg-header__toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

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

	.hg-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 100;
		display: none;
		padding: 1rem 1.5rem 1.5rem;
		background-color: var(--background);
		border-bottom: 1px solid var(--border);
		box-shadow: 0 12px 24px rgb(0 0 0 / 6%);
	}

	.hg-header {
		position: relative;
	}

	.hg-header.is-open .hg-nav {
		display: block;
	}

	.hg-nav__list,
	.hg-nav .menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
}

@media (max-width: 480px) {
	.hg-header__inner {
		padding: 1rem;
	}

	.hg-nav__link,
	.hg-nav .menu-item a {
		font-size: 0.75rem;
		letter-spacing: 0.05em;
	}
}
