/**
 * AlexaHire Mega Menu & Header Design System
 * Matches approved reference image specifications (Desktop, Sticky, Mobile Drawer)
 *
 * @package AlexaHire
 * @version 3.8.1
 */

/* ==========================================================================
   1. Brand Logo & Layout
   ========================================================================== */
.ah-header {
	background-color: #ffffff;
	border-bottom: 1px solid #e2e8f0;
	position: sticky;
	top: 0;
	z-index: 999;
	transition: all 0.25s ease;
}

.ah-header.is-sticky {
	box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(10px);
}

.ah-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4.75rem;
	gap: 1.5rem;
	transition: height 0.25s ease;
}

.ah-header.is-sticky .ah-header__inner {
	height: 3.85rem;
}

.ah-brand-wrap {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.ah-brand-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	text-decoration: none;
}

.ah-brand-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	flex-shrink: 0;
}

.ah-brand-name-group {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.ah-brand-text {
	font-family: var(--ah-font-heading, 'Plus Jakarta Sans', sans-serif);
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.ah-brand-dark {
	color: #0f172a;
}

.ah-brand-orange {
	color: #ea580c;
}

.ah-brand-tagline {
	font-size: 0.6875rem;
	font-weight: 600;
	color: #64748b;
	letter-spacing: 0.01em;
	margin-top: 2px;
	white-space: nowrap;
	transition: opacity 0.2s ease, max-height 0.2s ease;
}

.ah-header.is-sticky .ah-brand-tagline {
	display: none;
}

/* ==========================================================================
   2. Desktop Primary Navigation Menu
   ========================================================================== */
.ah-nav {
	display: flex;
	align-items: center;
	flex-grow: 1;
	justify-content: center;
}

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

.ah-nav__item {
	position: relative;
}

.ah-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.5rem 0.85rem;
	color: #1e293b;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 8px;
	transition: color 0.15s ease, background 0.15s ease;
	white-space: nowrap;
}

.ah-nav__icon {
	color: inherit;
	flex-shrink: 0;
}

.ah-nav__chevron {
	color: #94a3b8;
	margin-left: 1px;
	transition: transform 0.2s ease;
}

.ah-nav__link:hover,
.ah-nav__item:hover > .ah-nav__link,
.ah-nav__item--active .ah-nav__link {
	color: #ea580c;
	background: #fff7ed;
}

.ah-nav__item--active .ah-nav__link .ah-nav__icon {
	fill: #ea580c;
}

.ah-nav__item:hover > .ah-nav__link .ah-nav__chevron {
	transform: rotate(180deg);
	color: #ea580c;
}

/* ==========================================================================
   3. Dropdown Containers & Animation
   ========================================================================== */
.ah-nav__dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	background: #ffffff;
	border-radius: 14px;
	border: 1px solid #fed7aa;
	box-shadow: 0 14px 45px -4px rgba(15, 23, 42, 0.16), 0 4px 16px -2px rgba(15, 23, 42, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
	z-index: 1000;
	overflow: hidden;
	pointer-events: none;
}

.ah-nav__item:hover > .ah-nav__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

/* Arrow indicator on top of dropdown */
.ah-nav__dropdown::before {
	content: '';
	position: absolute;
	top: -7px;
	left: 24px;
	width: 14px;
	height: 14px;
	background: #ea580c;
	transform: rotate(45deg);
	border-top-left-radius: 3px;
	z-index: 2;
}

/* Dropdown Header Card (Orange Top Bar) */
.ah-dropdown__header {
	background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
	color: #ffffff;
	padding: 0.65rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	font-size: 0.9375rem;
	position: relative;
	z-index: 3;
}

.ah-dropdown__header-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* Single Column Dropdowns (Companies, Career, Blog, Employers) */
.ah-dropdown--single {
	min-width: 320px;
}

.ah-dropdown__list {
	padding: 0.5rem;
	max-height: 480px;
	overflow-y: auto;
}

/* Mega Menu Dropdown (Find Jobs - 2 Columns) */
.ah-dropdown--find-jobs {
	min-width: 640px;
}

.ah-dropdown__mega-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	padding: 0.6rem;
	background: #ffffff;
}

.ah-dropdown__col {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

/* Dropdown Links & Icon Badges */
.ah-drop-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.45rem 0.7rem;
	text-decoration: none;
	border-radius: 8px;
	transition: background 0.15s ease, transform 0.15s ease;
}

.ah-drop-item:hover {
	background: #fff7ed;
	transform: translateX(2px);
}

.ah-drop-icon {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
}

.ah-icon--blue   { background: #eff6ff; color: #2563eb; }
.ah-icon--green  { background: #f0fdf4; color: #16a34a; }
.ah-icon--orange { background: #fff7ed; color: #ea580c; }
.ah-icon--amber  { background: #fefce8; color: #ca8a04; }
.ah-icon--purple { background: #faf5ff; color: #9333ea; }
.ah-icon--pink   { background: #fdf2f8; color: #db2777; }
.ah-icon--cyan   { background: #ecfeff; color: #0891b2; }
.ah-icon--indigo { background: #eef2ff; color: #4f46e5; }
.ah-icon--red    { background: #fef2f2; color: #dc2626; }

.ah-drop-text {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ah-drop-title {
	font-size: 0.845rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.25;
	white-space: nowrap;
}

.ah-drop-item:hover .ah-drop-title {
	color: #ea580c;
}

.ah-drop-desc {
	font-size: 0.715rem;
	font-weight: 500;
	color: #64748b;
	line-height: 1.2;
	white-space: nowrap;
	margin-top: 1px;
}

.ah-drop-footer-link {
	padding: 0.5rem 0.7rem;
	margin-top: 0.25rem;
	border-top: 1px solid #f1f5f9;
}

.ah-drop-footer-link a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #ea580c;
	text-decoration: none;
}

.ah-drop-footer-link a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   4. Header Right Actions
   ========================================================================== */
.ah-header__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.ah-header__search-toggle {
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: 1px solid transparent;
	background: transparent;
	color: #1e293b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
}

.ah-header__search-toggle:hover {
	color: #ea580c;
	background: #f8fafc;
	border-color: #e2e8f0;
}

.ah-btn-login {
	padding: 0.5rem 1.15rem;
	background: #ffffff;
	border: 1.5px solid #cbd5e1;
	color: #0f172a;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	line-height: 1.2;
}

.ah-btn-login:hover {
	border-color: #94a3b8;
	background: #f8fafc;
	color: #000000;
}

.ah-btn-post-job {
	padding: 0.5rem 1.15rem;
	background: #ea580c;
	color: #ffffff;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	box-shadow: 0 2px 8px rgba(234, 88, 12, 0.28);
	transition: all 0.15s ease;
	line-height: 1.2;
}

.ah-btn-post-job:hover {
	background: #c2410c;
	box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
	transform: translateY(-1px);
	color: #ffffff;
}

/* User Account Chip when Logged In */
.ah-user-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.75rem;
	border-radius: 9999px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	font-size: 0.845rem;
	font-weight: 600;
	color: #0f172a;
	cursor: pointer;
}

.ah-user-avatar {
	width: 24px;
	height: 24px;
	border-radius: 9999px;
	background: #ea580c;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 800;
}

.ah-user-menu-wrap {
	position: relative;
}

.ah-user-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 180px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	list-style: none;
	padding: 0.5rem 0;
	margin: 0;
	display: none;
	z-index: 1000;
}

.ah-user-menu-wrap:hover .ah-user-dropdown {
	display: block;
}

.ah-user-drop-link {
	display: block;
	padding: 0.5rem 1rem;
	font-size: 0.845rem;
	color: #1e293b;
	text-decoration: none;
}

.ah-user-drop-link:hover {
	background: #f8fafc;
	color: #ea580c;
}

/* ==========================================================================
   5. Mobile Header View & Responsive Behavior (<= 1024px)
   ========================================================================== */
.ah-hamburger {
	display: none;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	color: #0f172a;
	cursor: pointer;
	border-radius: 8px;
}

@media (max-width: 1024px) {
	.ah-hamburger {
		display: flex;
	}

	.ah-nav {
		display: none; /* Hide Desktop navbar on tablets & phones */
	}

	.ah-header__inner {
		height: 4.15rem;
		gap: 0.75rem;
	}

	.ah-brand-tagline {
		display: none; /* Keep mobile header clean and single-line */
	}

	.ah-brand-text {
		font-size: 1.35rem;
	}

	.ah-btn-post-job span {
		display: inline;
	}

	.ah-btn-post-job {
		padding: 0.45rem 0.85rem;
		font-size: 0.8125rem;
	}

	.ah-btn-login {
		padding: 0.45rem 0.85rem;
		font-size: 0.8125rem;
	}
}

@media (max-width: 540px) {
	.ah-btn-post-job span {
		display: none; /* Icon-only on very narrow mobile screens */
	}
	.ah-btn-post-job {
		padding: 0.5rem;
	}
}

/* ==========================================================================
   6. Mobile Menu (Expanded Drawer - Item 9)
   ========================================================================== */
.ah-mobile-drawer {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	z-index: 2000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ah-mobile-drawer.active {
	opacity: 1;
	visibility: visible;
}

.ah-mobile-drawer__content {
	width: 85%;
	max-width: 340px;
	height: 100%;
	background: #ffffff;
	box-shadow: 6px 0 25px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transform: translateX(-100%);
	transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
	overflow-y: auto;
}

.ah-mobile-drawer.active .ah-mobile-drawer__content {
	transform: translateX(0);
}

.ah-mobile-drawer__header {
	padding: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #f1f5f9;
}

.ah-mobile-drawer__close {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	font-size: 1.25rem;
	color: #64748b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.ah-mobile-drawer__close:hover {
	color: #0f172a;
	background: #f1f5f9;
}

.ah-mobile-drawer__nav {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0.75rem;
}

.ah-mobile-drawer__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 0.85rem;
	color: #1e293b;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 8px;
	transition: background 0.15s ease;
	cursor: pointer;
}

.ah-mobile-drawer__link:hover {
	background: #f8fafc;
	color: #ea580c;
}

.ah-mobile-link-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.ah-mobile-chevron {
	color: #94a3b8;
	transition: transform 0.2s ease;
}

.ah-sub-open > .ah-mobile-drawer__toggle .ah-mobile-chevron {
	transform: rotate(90deg);
	color: #ea580c;
}

.ah-mobile-drawer__sub {
	list-style: none;
	margin: 0.25rem 0 0.5rem 1.75rem;
	padding: 0.25rem 0 0.25rem 0.75rem;
	border-left: 2px solid #fed7aa;
}

.ah-mobile-drawer__sub li a {
	display: block;
	padding: 0.45rem 0.5rem;
	font-size: 0.845rem;
	font-weight: 500;
	color: #475569;
	text-decoration: none;
	border-radius: 6px;
}

.ah-mobile-drawer__sub li a:hover {
	color: #ea580c;
	background: #fff7ed;
}

.ah-mobile-drawer__footer {
	padding: 1.25rem;
	border-top: 1px solid #f1f5f9;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ah-mobile-btn-login {
	width: 100%;
	padding: 0.7rem;
	border-radius: 8px;
	border: 1.5px solid #cbd5e1;
	background: #ffffff;
	color: #0f172a;
	font-weight: 700;
	font-size: 0.875rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	cursor: pointer;
	text-decoration: none;
}

.ah-mobile-btn-post {
	width: 100%;
	padding: 0.75rem;
	border-radius: 8px;
	background: #ea580c;
	color: #ffffff;
	font-weight: 700;
	font-size: 0.875rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(234, 88, 12, 0.3);
}

.ah-mobile-btn-post:hover {
	background: #c2410c;
	color: #ffffff;
}
