/* Header container */
.site-header {
	transition: all 0.3s ease;
	width: 100%;
	z-index: 1000;
	position: relative;
}

.site-header.sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	animation: slideDown 0.3s ease-in-out;
}

/* Add padding to the body when header becomes sticky to prevent content jump */
body.has-sticky-header {
	padding-top: var(--header-height, 80px);
}

/* Animation for sticky header appearance */
@keyframes slideDown {
	from {
		transform: translateY(-100%);
	}
	to {
		transform: translateY(0);
	}
}

/* Adjust for WordPress admin bar when logged in */
.admin-bar .site-header.sticky {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .site-header.sticky {
		top: 46px;
	}
}

.header-container {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	height: var(--header-height);
	position: relative;
	z-index: 999;
}

/* Site title styles */

.site-title {
	font-family: var(--font-heading);
	font-weight: var(--font-weight-bold);
	margin: 0;
	font-size: 24px;
}

.site-title a {
	color: var(--color-text-primary);
	text-decoration: none;
}

/* Site branding container */

.site-branding {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	transition: opacity 0.3s ease;
}

.site-branding.opacity-0 {
	opacity: 0;
}

/* Site description */

.site-description {
	font-family: var(--font-primary);
	font-size: 14px;
	margin: 5px 0 0;
	color: var(--color-text-secondary);
}

/* Custom logo styles */

.custom-logo-link {
	display: block;
	max-width: 250px;
	max-height: 80px;
}

.custom-logo {
	max-height: 80px;
	width: auto;
	height: auto;
	max-width: 100%;
}

/* Site logo container */

.site-logo {
	transition: opacity 0.3s ease;
}

.site-logo.opacity-0 {
	opacity: 0;
}

/* Hamburger menu button */

.menu-btn {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 56px;
	height: 56px;
	cursor: pointer;
	z-index: 101;
}

.hamburger-line {
	position: absolute;
	width: 40px;
	height: 2px;
	background-color: var(--color-text-primary);
	transition: all 0.3s ease;
}

/* Position each line in normal state */

.hamburger-line:nth-child(1) {
	top: 8px;
}

.hamburger-line:nth-child(2) {
	top: 26px;
}

.hamburger-line:nth-child(3) {
	top: 44px;
}

/* Hover animation - lines move closer to middle by 2px */
.menu-btn:not(.active):hover .hamburger-line:nth-child(1) {
	top: 12px;
}
.menu-btn:not(.active):hover .hamburger-line:nth-child(3) {
	top: 40px;
}
/* Hamburger to X animation - centered */

.menu-btn.active .hamburger-line:nth-child(1) {
	transform: rotate(45deg);
	top: 24px;
	background-color: var(--color-text-primary) !important;
}

.menu-btn.active .hamburger-line:nth-child(2) {
	opacity: 0;
}

.menu-btn.active .hamburger-line:nth-child(3) {
	transform: rotate(-45deg);
	top: 24px;
	background-color: var(--color-text-primary) !important;
}

/* Mobile menu styles */

.mobile-menu {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: var(--color-background);
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease;
	overflow-y: auto;
	padding-top: var(--header-height);
}

.mobile-menu.active {
	opacity: 1;
	visibility: visible;
}

.menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
}

.menu-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Updated menu item styles */

.nav-link {
	display: block;
	padding: 2rem 0rem 1rem 5rem;
	position: relative;
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 0.5s ease,
		transform 0.5s ease;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	text-decoration: none;
}

.nav-link-inner {
	display: flex;
	align-items: center;
	font-family: var(--font-heading);
	font-weight: var(--font-weight-semibold);
	font-size: 48px;
	line-height: 48px;
}

.nav-number {
	color: var(--color-menu-number);
	margin-right: 10rem;
	transition: color 0.3s ease;
	min-width: 64px;
}

.nav-text {
	color: var(--color-text-primary);
	position: relative;
	display: block;
	width: 100%;
}

.nav-text::after {
	content: "";
	position: absolute;
	bottom: -16px;
	right: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-text-primary);
	transition: width 0.3s ease;
}

.nav-link:hover .nav-text::after {
	width: 100%;
	right: 0;
	left: auto;
}

.nav-link:hover .nav-number {
	color: var(--color-text-primary);
}

/* Animation for staggered menu items */

.mobile-menu.active .nav-link:nth-child(1) {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.1s;
}

.mobile-menu.active .nav-link:nth-child(2) {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.2s;
}

.mobile-menu.active .nav-link:nth-child(3) {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.3s;
}

.mobile-menu.active .nav-link:nth-child(4) {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.4s;
}

.mobile-menu.active .nav-link:nth-child(5) {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.5s;
}

.mobile-menu.active .nav-link:nth-child(6) {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.6s;
}

/* Hide default WP admin bar when menu is active */

.admin-bar .mobile-menu {
	padding-top: calc(var(--header-height) + 32px);
}

@media (max-width: 782px) {
	.admin-bar .mobile-menu {
		padding-top: calc(var(--header-height) + 46px);
	}
}

@media (max-width: 767px) {
	.nav-link {
		padding: 1.5rem 0rem 1rem 1.5rem;
	}
	.nav-link-inner {
		font-size: 40px;
	}
	.nav-number {
		margin-right: 2rem;
	}

	.site-description {
		font-size: 12px;
	}
	.custom-logo {
		max-height: 60px;
	}

	.header-container {
		padding: 0;
	}

	.header-right.justify-between {
		justify-content: space-between;
	}
}
