/**
 * Header Styles
 *
 * Top bar, main header, desktop navigation, dropdowns,
 * CTA button, mobile toggle, and mobile menu.
 *
 * @package VooveTheme
 */

/* ==========================================================================
   Variables (scoped to header)
   ========================================================================== */

:root {
	/* Header-specific variables (brand colors come from global.css) */
	--voove-header-height: 80px;
	--voove-topbar-height: 40px;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.voove-topbar {
	background-color: var(--voove-dark-grey);
	color: var(--voove-light-grey);
	font-size: 0.8125rem;
	line-height: 1;
	border-bottom: 1px solid var(--voove-charcoal);
}

.voove-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: var(--voove-topbar-height);
}

.voove-topbar__contact {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.voove-topbar__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--voove-light-grey);
	text-decoration: none;
	transition: color var(--voove-transition);
}

.voove-topbar__link:hover,
.voove-topbar__link:focus {
	color: var(--voove-white);
}

.voove-topbar__icon {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
}

.voove-topbar__social {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.voove-topbar__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--voove-light-grey);
	text-decoration: none;
	transition: color var(--voove-transition);
}

.voove-topbar__social-link:hover,
.voove-topbar__social-link:focus {
	color: var(--voove-white);
}

.voove-topbar__social-link svg {
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   Main Header
   ========================================================================== */

.voove-header {
	background-color: var(--voove-black);
	position: sticky;
	top: 0;
	z-index: 1000;
	height: var(--voove-header-height);
}

.voove-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 100%;
}

/* Brand / Logo
   ========================================================================== */

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

.voove-header__brand a {
	display: inline-flex;
	align-items: center;
}

.voove-header__brand img {
	max-height: 48px;
	width: auto;
}

.voove-header__site-name {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--voove-white);
	text-decoration: none;
	letter-spacing: 0.04em;
	transition: color var(--voove-transition);
}

.voove-header__site-name:hover,
.voove-header__site-name:focus {
	color: var(--voove-red);
}

/* ==========================================================================
   Desktop Navigation
   ========================================================================== */

.voove-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.voove-nav__list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.25rem;
}

.voove-nav__list li {
	position: relative;
}

.voove-nav__list li a {
	display: block;
	padding: 0.5rem 1rem;
	color: var(--voove-white);
	text-decoration: none;
	text-transform: uppercase;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	transition: color var(--voove-transition);
}

.voove-nav__list li a:hover,
.voove-nav__list li a:focus,
.voove-nav__list li.current-menu-item > a,
.voove-nav__list li.current-menu-parent > a,
.voove-nav__list li.current-menu-ancestor > a {
	color: var(--voove-red);
}

/* Dropdown / Sub-menu
   ========================================================================== */

.voove-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background-color: var(--voove-dark-grey);
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity var(--voove-transition), transform var(--voove-transition), visibility var(--voove-transition);
	border-top: 2px solid var(--voove-red);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	z-index: 1001;
}

.voove-nav__list li:hover > .sub-menu,
.voove-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.voove-nav__list .sub-menu li a {
	padding: 0.6rem 1.25rem;
	text-transform: none;
	font-size: 0.8125rem;
	font-weight: 500;
	white-space: nowrap;
}

.voove-nav__list .sub-menu li a:hover,
.voove-nav__list .sub-menu li a:focus {
	background-color: rgba(255, 255, 255, 0.05);
	color: var(--voove-red);
}

/* ==========================================================================
   Header CTA Button
   ========================================================================== */

.voove-header__cta {
	flex-shrink: 0;
}

.voove-header__cta-btn {
	display: inline-block;
	padding: 0.65rem 1.5rem;
	background-color: var(--voove-red);
	color: var(--voove-white);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 4px;
	transition: background-color var(--voove-transition), transform var(--voove-transition);
}

.voove-header__cta-btn:hover,
.voove-header__cta-btn:focus {
	background-color: var(--voove-red-hover);
	transform: translateY(-1px);
	color: var(--voove-white);
}

/* ==========================================================================
   Mobile Toggle (Hamburger)
   ========================================================================== */

.voove-mobile-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 1002;
}

.voove-mobile-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--voove-white);
	border-radius: 2px;
	transition: transform var(--voove-transition), opacity var(--voove-transition);
	transform-origin: center;
}

/* Hamburger -> X animation */
.voove-mobile-toggle[aria-expanded="true"] .voove-mobile-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.voove-mobile-toggle[aria-expanded="true"] .voove-mobile-toggle__bar:nth-child(2) {
	opacity: 0;
}

.voove-mobile-toggle[aria-expanded="true"] .voove-mobile-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.voove-mobile-menu {
	display: none;
	position: absolute;
	top: var(--voove-header-height);
	left: 0;
	width: 100%;
	background-color: var(--voove-dark-grey);
	z-index: 999;
	overflow-y: auto;
	max-height: calc(100vh - var(--voove-header-height));
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.voove-mobile-menu[aria-hidden="false"] {
	display: block;
}

.voove-mobile-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.voove-mobile-menu__list li {
	border-bottom: 1px solid var(--voove-charcoal);
}

.voove-mobile-menu__list li:last-child {
	border-bottom: none;
}

.voove-mobile-menu__list li a {
	display: block;
	padding: 1rem 1.5rem;
	color: var(--voove-white);
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	transition: color var(--voove-transition), background-color var(--voove-transition);
}

.voove-mobile-menu__list li a:hover,
.voove-mobile-menu__list li a:focus {
	color: var(--voove-red);
	background-color: rgba(255, 255, 255, 0.03);
}

.voove-mobile-menu__list li.current-menu-item > a {
	color: var(--voove-red);
}

/* Mobile sub-menu */
.voove-mobile-menu__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.voove-mobile-menu__list .sub-menu li a {
	padding-left: 3rem;
	font-size: 0.9375rem;
	color: var(--voove-light-grey);
}

.voove-mobile-menu__list .sub-menu li a:hover,
.voove-mobile-menu__list .sub-menu li a:focus {
	color: var(--voove-red);
}

/* Mobile CTA */
.voove-mobile-menu__cta {
	padding: 1.25rem 1.5rem;
}

.voove-mobile-menu__cta .voove-header__cta-btn {
	display: block;
	text-align: center;
	width: 100%;
}

/* ==========================================================================
   Responsive: Tablet & Mobile (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {

	/* Hide desktop nav and CTA, show hamburger */
	.voove-nav,
	.voove-header__cta {
		display: none;
	}

	.voove-mobile-toggle {
		display: flex;
	}
}

/* ==========================================================================
   Responsive: Small screens (max-width: 600px)
   ========================================================================== */

@media (max-width: 600px) {

	/* Stack contact info vertically */
	.voove-topbar__inner {
		flex-direction: column;
		height: auto;
		padding: 0.5rem 1rem;
		gap: 0.4rem;
	}

	.voove-topbar__contact {
		flex-direction: column;
		gap: 0.35rem;
		align-items: center;
	}

	.voove-topbar__social {
		gap: 1rem;
	}

	/* Reduce header height */
	:root {
		--voove-header-height: 64px;
	}

	.voove-header__brand img {
		max-height: 36px;
	}

	.voove-header__site-name {
		font-size: 1.25rem;
	}
}

/* ==========================================================================
   Skip Link (from header.php)
   ========================================================================== */

.skip-link.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
	background-color: var(--voove-black);
	clip: auto !important;
	clip-path: none;
	color: var(--voove-white);
	display: block;
	font-size: 1rem;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* ==========================================================================
   WordPress Admin Bar Adjustment
   ========================================================================== */

.admin-bar .voove-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .voove-header {
		top: 46px;
	}
}
