/* ==========================================================================
   BiographyPoints Family & History Theme - Header & Global Navigation
   ========================================================================== */

.bpt-site-header {
	background-color: var(--bpt-primary-navy);
	border-bottom: 3px solid var(--bpt-secondary-green);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 4px 18px rgba(11, 21, 53, 0.25);
}

.bpt-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 78px;
	gap: 20px;
}

/* Brand Logo */
.bpt-header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	flex-shrink: 0;
}

.bpt-brand-logo-text {
	font-family: var(--bpt-font-heading);
	font-size: 1.65rem;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: -0.5px;
}

.bpt-brand-tag {
	background-color: var(--bpt-secondary-green);
	color: #ffffff;
	font-family: var(--bpt-font-body);
	font-size: 0.72rem;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: var(--bpt-radius-sm);
	text-transform: uppercase;
	letter-spacing: 0.8px;
}

/* Main Navigation Menu */
.bpt-primary-nav {
	display: flex;
	align-items: center;
}

.bpt-nav-list {
	display: flex;
	list-style: none;
	gap: 4px;
	align-items: center;
	margin: 0;
	padding: 0;
}

.bpt-nav-item {
	position: relative;
}

.bpt-nav-link {
	color: #E2E8F0;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: var(--bpt-radius-sm);
	transition: var(--bpt-transition);
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.bpt-nav-link:hover,
.bpt-nav-item.current-menu-item .bpt-nav-link,
.bpt-nav-item.active .bpt-nav-link {
	color: #ffffff;
	background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu for Important Pages */
.bpt-dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #ffffff;
	border: 1px solid var(--bpt-border-subtle);
	border-radius: var(--bpt-radius-md);
	box-shadow: var(--bpt-shadow-lg);
	min-width: 220px;
	list-style: none;
	padding: 8px 0;
	margin-top: 4px;
	z-index: 1001;
}

.bpt-dropdown:hover .bpt-dropdown-menu,
.bpt-dropdown:focus-within .bpt-dropdown-menu {
	display: block;
}

.bpt-dropdown-item a {
	display: block;
	padding: 8px 18px;
	color: var(--bpt-primary-navy);
	font-size: 0.9rem;
	font-weight: 500;
	transition: var(--bpt-transition);
}

.bpt-dropdown-item a:hover {
	background-color: var(--bpt-green-light);
	color: var(--bpt-secondary-green);
}

/* Header Search */
.bpt-header-search-wrapper {
	position: relative;
	flex: 0 1 280px;
}

.bpt-header-search-input {
	width: 100%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	padding: 8px 16px 8px 36px;
	color: #ffffff;
	font-size: 0.88rem;
	transition: var(--bpt-transition);
}

.bpt-header-search-input::placeholder {
	color: #94A3B8;
}

.bpt-header-search-input:focus {
	outline: none;
	background: #ffffff;
	color: var(--bpt-text-main);
	border-color: var(--bpt-secondary-green);
}

.bpt-header-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #94A3B8;
	pointer-events: none;
	font-size: 14px;
}

/* Live Search Autocomplete Popup */
.bpt-search-results-popup {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #ffffff;
	border-radius: var(--bpt-radius-md);
	box-shadow: var(--bpt-shadow-lg);
	border: 1px solid var(--bpt-border-subtle);
	max-height: 380px;
	overflow-y: auto;
	z-index: 1002;
	padding: 10px 0;
}

.bpt-search-group-title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #64748b;
	padding: 6px 16px;
	background: var(--bpt-neutral-bg);
}

.bpt-search-result-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	color: var(--bpt-primary-navy);
	text-decoration: none;
	font-size: 0.9rem;
	transition: var(--bpt-transition);
}

.bpt-search-result-item:hover {
	background: var(--bpt-green-light);
	color: var(--bpt-secondary-green);
}

.bpt-search-thumb {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	background: #cbd5e1;
	flex-shrink: 0;
}

/* Auth Actions */
.bpt-header-auth {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.bpt-user-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 0.88rem;
	font-weight: 600;
	transition: var(--bpt-transition);
}

.bpt-user-btn:hover {
	background: var(--bpt-secondary-green);
	border-color: var(--bpt-secondary-green);
	color: #ffffff;
}

.bpt-user-avatar-sm {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

/* Mobile Toggle */
.bpt-mobile-toggle {
	display: none;
	background: none;
	border: none;
	color: #ffffff;
	font-size: 26px;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
}

/* Responsive Navigation Breakpoint */
@media (max-width: 991px) {
	.bpt-mobile-toggle {
		display: block;
	}

	.bpt-primary-nav {
		display: none;
		position: fixed;
		top: 78px;
		left: 0;
		right: 0;
		bottom: 0;
		background: var(--bpt-primary-navy);
		flex-direction: column;
		align-items: stretch;
		padding: 24px;
		overflow-y: auto;
	}

	.bpt-primary-nav.active {
		display: flex;
	}

	.bpt-nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.bpt-nav-link {
		padding: 12px 16px;
		font-size: 1.1rem;
	}

	.bpt-dropdown-menu {
		position: static;
		box-shadow: none;
		background: rgba(255, 255, 255, 0.05);
		border: none;
		border-radius: var(--bpt-radius-sm);
		margin: 6px 0 12px 16px;
	}

	.bpt-dropdown-item a {
		color: #E2E8F0;
		padding: 8px 12px;
	}

	.bpt-header-search-wrapper {
		order: 3;
		flex: 1 1 100%;
		margin-top: 14px;
	}
}
