/**
 * Header Styles
 * Desktop and Mobile layouts with Dark Mode support
 */

/* ============================================
   Header Container
   ============================================ */
.bfi-header {
	position: sticky;
	top: 0;
	z-index: 1001;
	width: 100%;
	background-color: #ffffff;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.bfi-header-inner {
	padding: 1rem 1.5rem;
}

@media (min-width: 768px) {
	.bfi-header-inner {
		padding: 1rem 3rem;
	}

	@media (min-width: 1024px) {
		.bfi-header-inner {
			padding: 1rem 5rem;
		}
	}
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
	.bfi-header {
		background-color: #1a2632;
	}
}

/* ============================================
   Desktop Layout
   ============================================ */
.bfi-header-desktop {
	display: none;
	align-items: center;
	gap: 1rem;
	position: relative;
}

@media (min-width: 768px) {
	.bfi-header-desktop {
		display: flex;
	}
}

.bfi-header-logo-wrapper {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.bfi-header-logo-link {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.bfi-header-logo {
	height: 3rem;
	width: auto;
}

@media (min-width: 768px) {
	.bfi-header-logo {
		height: 3.5rem;
	}
}

.bfi-header-nav {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	justify-content: center;
}

.bfi-header-nav-menu {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	white-space: nowrap;
}

@media (min-width: 1024px) {
	.bfi-header-nav-menu {
		gap: 1.5rem;
	}

	@media (min-width: 1280px) {
		.bfi-header-nav-menu {
			gap: 2rem;
		}
	}
}

.bfi-header-nav-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	border-radius: 0.5rem;
	padding: 0.5rem 0.625rem;
	transition: color 0.2s;
	color: #4b5563;
}

.bfi-header-nav-link:hover {
	color: #00b8f5;
}

.bfi-header-nav-link.active {
	color: #2b9dee;
	font-weight: 700;
	background-color: rgba(43, 157, 238, 0.1) !important;
}

.bfi-header-nav-link .material-symbols-outlined {
	font-size: 1rem;
}

.bfi-header-right {
	flex-shrink: 0;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 1rem;
	margin-left: auto;
}

/* Dark Mode - Desktop Navigation */
@media (prefers-color-scheme: dark) {
	.bfi-header-nav-link {
		color: #d1d5db;
	}

	.bfi-header-nav-link:hover {
		color: #00b8f5;
	}

	.bfi-header-nav-link.active {
		color: #2b9dee;
		background-color: rgba(43, 157, 238, 0.1) !important;
	}
}

/* ============================================
   Mobile Layout
   ============================================ */
.bfi-header-mobile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	position: relative;
}

@media (min-width: 768px) {
	.bfi-header-mobile {
		display: none;
	}
}

.bfi-mobile-menu-toggle {
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.75rem;
	background-color: #f9fafb;
	color: #4b5563;
	z-index: 10;
	border: none;
	cursor: pointer;
	padding: 0;
}

.bfi-mobile-menu-toggle .material-symbols-outlined {
	font-size: 1.5rem;
}

.bfi-mobile-logo-link {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.bfi-mobile-logo {
	height: 2.5rem;
	width: auto;
}

.bfi-mobile-spacer {
	width: 2.5rem;
	height: 2.5rem;
}

/* Dark Mode - Mobile Toggle */
@media (prefers-color-scheme: dark) {
	.bfi-mobile-menu-toggle {
		background-color: #1f2937;
		color: #d1d5db;
	}
}

/* ============================================
   Mobile Slide-out Menu
   ============================================ */
.bfi-mobile-menu-overlay {
	position: fixed;
	inset: 0;
	z-index: 1002;
	display: none;
}

@media (min-width: 768px) {
	.bfi-mobile-menu-overlay {
		display: none !important;
	}
}

.bfi-mobile-menu-overlay.active {
	display: block;
}

.bfi-mobile-menu-backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.bfi-mobile-menu-panel {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 20rem;
	max-width: 85vw;
	background-color: #ffffff;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	transform: translateX(-100%);
	transition: transform 0.3s ease-in-out;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.bfi-mobile-menu-overlay.active .bfi-mobile-menu-panel {
	transform: translateX(0);
}

.bfi-mobile-menu-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem;
	border-bottom: 1px solid #f3f4f6;
}

.bfi-mobile-menu-header-logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.bfi-mobile-menu-header-logo img {
	height: 2.5rem;
	width: auto;
}

.bfi-mobile-menu-close {
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.5rem;
	background-color: #f9fafb;
	color: #4b5563;
	border: none;
	cursor: pointer;
	padding: 0;
}

.bfi-mobile-menu-close .material-symbols-outlined {
	font-size: 1.25rem;
}

.bfi-mobile-menu-content {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
}

.bfi-mobile-menu-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.bfi-mobile-menu-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	border-radius: 0.5rem;
	padding: 0.5rem 0.625rem;
	transition: color 0.2s;
	color: #4b5563;
}

.bfi-mobile-menu-link:hover {
	color: #00b8f5;
}

.bfi-mobile-menu-link.active {
	color: #2b9dee;
	font-weight: 700;
	background-color: rgba(43, 157, 238, 0.1) !important;
}

/* Dark Mode - Mobile Menu */
@media (prefers-color-scheme: dark) {
	.bfi-mobile-menu-panel {
		background-color: #1a2632;
	}

	.bfi-mobile-menu-header {
		border-bottom-color: #374151;
	}

	.bfi-mobile-menu-close {
		background-color: #1f2937;
		color: #d1d5db;
	}

	.bfi-mobile-menu-link {
		color: #d1d5db;
	}

	.bfi-mobile-menu-link:hover {
		color: #00b8f5;
	}

	.bfi-mobile-menu-link.active {
		color: #2b9dee;
		background-color: rgba(43, 157, 238, 0.1) !important;
	}
}

/* ============================================
   General Navigation Styles (for compatibility)
   ============================================ */
/* General navigation menu hover - applies to all header nav links */
header nav a:hover,
header nav ul a:hover,
nav a:hover,
nav ul a:hover {
	color: #00b8f5 !important;
}

/* Mobile menu overlay ID-based styles (for backward compatibility) */
#mobile-menu-overlay {
	transition: opacity 0.3s ease-in-out;
}

#mobile-menu-panel {
	will-change: transform;
}

#mobile-menu-panel:not(.-translate-x-full) {
	transform: translateX(0);
}

@media (max-width: 768px) {
	/* Ensure mobile menu overlay is on top */
	#mobile-menu-overlay {
		z-index: 9999;
	}
}

/* ============================================
   Dark Mode - General Navigation Styles
   ============================================ */
@media (prefers-color-scheme: dark) {
	/* General header element dark mode */
	header {
		background-color: rgba(30, 41, 59, 0.9) !important;
		border-bottom-color: #334155 !important;
	}

	/* Navigation menu dark mode text - High specificity */
	header nav a.dark\:text-gray-300,
	header nav .dark\:text-gray-300,
	nav a.dark\:text-gray-300,
	nav a .dark\:text-gray-300,
	.dark\:text-gray-300 {
		color: #aaa !important;
	}

	/* Navigation menu hover in dark mode - High specificity */
	header nav a:hover.dark\:hover\:text-\[#00b8f5\],
	header nav a.dark\:hover\:text-\[#00b8f5\]:hover,
	nav a:hover.dark\:hover\:text-\[#00b8f5\],
	nav a.dark\:hover\:text-\[#00b8f5\]:hover,
	.dark\:hover\:text-\[#00b8f5\]:hover {
		color: #00b8f5 !important;
	}

	/* Light mode hover - High specificity */
	header nav a.hover\:text-\[#00b8f5\]:hover,
	nav a.hover\:text-\[#00b8f5\]:hover,
	.hover\:text-\[#00b8f5\]:hover {
		color: #00b8f5 !important;
	}

	/* Navigation links hover - High specificity for dark mode */
	header nav a:hover,
	header nav ul a:hover,
	header nav ul li a:hover,
	nav a:hover,
	nav ul a:hover,
	nav ul li a:hover {
		color: #00b8f5 !important;
	}

	/* Dark mode text colors - High specificity */
	header nav a.dark\:text-gray-100,
	header nav .dark\:text-gray-100,
	nav a.dark\:text-gray-100,
	.dark\:text-gray-100 {
		color: #f3f4f6 !important;
	}

	.dark\:text-gray-300 {
		color: #d1d5db !important;
	}

	/* Hover states dark mode - High specificity */
	.hover\:text-\[#002970\]:hover {
		color: #00b8f5 !important;
	}

	header nav a.hover\:text-\[#00b8f5\]:hover,
	header nav a:hover.hover\:text-\[#00b8f5\],
	nav a.hover\:text-\[#00b8f5\]:hover,
	.hover\:text-\[#00b8f5\]:hover {
		color: #00b8f5 !important;
	}

	header nav a.dark\:hover\:text-\[#00b8f5\]:hover,
	header nav a:hover.dark\:hover\:text-\[#00b8f5\],
	nav a.dark\:hover\:text-\[#00b8f5\]:hover,
	.dark\:hover\:text-\[#00b8f5\]:hover {
		color: #00b8f5 !important;
	}
}

