/* HPBC Header Widget Styles */

/* Base Header Styles */
.hpbc-header {
	position: relative;
	width: 100%;
	z-index: 1000;
	box-sizing: border-box;
}

.hpbc-header * {
	box-sizing: border-box;
}

.hpbc-header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
}

/* Logo Styles */
.hpbc-header-logo {
	flex-shrink: 0;
	z-index: 1001;
}

.hpbc-header-logo img {
	display: block;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

.hpbc-header-logo a {
	display: inline-block;
	line-height: 0;
}

/* Desktop Navigation Styles */
.hpbc-desktop-nav {
	display: flex;
	align-items: center;
}

.hpbc-nav-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}

.hpbc-nav-item {
	position: relative;
	margin: 0;
	padding: 0;
}

.hpbc-nav-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	padding: 10px 0;
	transition: color 0.3s ease;
	white-space: nowrap;
}

.hpbc-nav-link:hover {
	text-decoration: none;
}

.hpbc-dropdown-icon {
	margin-left: 5px;
	font-size: 0.8em;
	transition: transform 0.3s ease;
}

.hpbc-nav-item:hover .hpbc-dropdown-icon {
	transform: rotate(180deg);
}

/* Dropdown Menu Styles */
.hpbc-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-10px);
	min-width: 200px;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 1002;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.hpbc-nav-item:hover .hpbc-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.hpbc-dropdown-menu li {
	margin: 0;
	padding: 0;
}

.hpbc-dropdown-menu a {
	display: block;
	padding: 12px 20px;
	color: #333333;
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease;
	border-bottom: 1px solid #f0f0f0;
	line-height: 1.5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hpbc-dropdown-menu a:hover {
	background-color: #f8f9fa;
	color: #007cba;
	text-decoration: none;
}

.hpbc-dropdown-menu li:last-child a {
	border-bottom: none;
}

/* Mobile Toggle Button */
.hpbc-mobile-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	z-index: 1001;
	position: relative;
	transition: color 0.3s ease;
}

.hpbc-mobile-toggle:focus {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

.hpbc-hamburger-icon,
.hpbc-close-icon {
	display: block;
	transition: opacity 0.3s ease;
}

/* Mobile Menu Styles */
.hpbc-mobile-menu {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: #ffffff;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-100%);
	transition: all 0.3s ease;
	overflow-y: auto;
	padding-top: 80px;
}

.hpbc-mobile-menu.active {
	opacity: 1;
	visibility: visible;
	transform: translateX(0);
}

.hpbc-mobile-nav {
	padding: 20px;
}

.hpbc-mobile-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hpbc-mobile-nav-item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #e0e0e0;
}

.hpbc-mobile-nav-item:last-child {
	border-bottom: none;
}

.hpbc-mobile-nav-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 0;
	text-decoration: none;
	font-size: 18px;
	font-weight: 500;
	color: #000000;
	transition: color 0.3s ease;
}

.hpbc-mobile-nav-link:hover {
	color: #000000;
	background-color: #f8f9fa;
	text-decoration: none;
}

.hpbc-mobile-dropdown-icon {
	font-size: 14px;
	transition: transform 0.3s ease;
}

.hpbc-mobile-nav-item.dropdown-open .hpbc-mobile-dropdown-icon {
	transform: rotate(180deg);
}

/* Mobile Dropdown Menu */
.hpbc-mobile-dropdown-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
	background: #f8f9fa;
	border-radius: 4px;
	margin-top: 10px;
}

.hpbc-mobile-nav-item.dropdown-open .hpbc-mobile-dropdown-menu {
	max-height: 500px;
	padding: 10px 0;
}

.hpbc-mobile-dropdown-menu li {
	margin: 0;
	padding: 0;
}

.hpbc-mobile-dropdown-menu a {
	display: block;
	padding: 12px 40px;
	color: #000000;
	background-color: #ffffff;
	text-decoration: none;
	font-size: 14px;
	border-bottom: 1px solid #f0f0f0;
	transition: all 0.3s ease;
	line-height: 1.5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	position: relative;
	z-index: 1;
}

.hpbc-mobile-dropdown-menu a:hover,
.hpbc-mobile-dropdown-menu a:focus {
	color: #000000;
	background-color: #e9ecef;
	text-decoration: none;
	padding-left: 25px;
	transform: translateX(5px);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
	.hpbc-header-container {
		padding: 0 20px;
	}

	.hpbc-nav-menu {
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.hpbc-desktop-nav {
		display: none;
	}

	.hpbc-mobile-toggle {
		display: block;
	}

	.hpbc-header-container {
		padding: 0 15px;
	}

	.hpbc-header-logo img {
		width: 100% !important;
		max-height: 65px !important;
	}
}

@media (max-width: 480px) {
	.hpbc-header-container {
		padding: 0 10px;
	}

	.hpbc-mobile-nav {
		padding: 15px;
	}

	.hpbc-mobile-nav-link {
		font-size: 16px;
		padding: 12px 0;
	}

	.hpbc-mobile-dropdown-menu a {
		font-size: 14px;
		padding: 10px 15px;
		color: #000000;
		background-color: #ffffff;
	}
}

/* Animation for mobile menu overlay */
.hpbc-mobile-menu::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #ffffff;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: -1;
}

.hpbc-mobile-menu.active::before {
	opacity: 1;
	visibility: visible;
}

/* Accessibility improvements */
.hpbc-nav-link:focus,
.hpbc-mobile-nav-link:focus,
.hpbc-dropdown-menu a:focus,
.hpbc-mobile-dropdown-menu a:focus {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

/* Smooth scrolling for mobile menu */
.hpbc-mobile-menu {
	-webkit-overflow-scrolling: touch;
}

/* Prevent body scroll when mobile menu is open */
body.hpbc-mobile-menu-open {
	overflow: hidden;
	position: fixed;
	width: 100%;
}

/* Custom breakpoint support */
.hpbc-header[data-mobile-breakpoint] .hpbc-desktop-nav {
	display: flex;
}

.hpbc-header[data-mobile-breakpoint] .hpbc-mobile-toggle {
	display: none;
}

/* Dynamic breakpoint styles will be added via JavaScript */

/* Loading state */
.hpbc-header.loading {
	opacity: 0.7;
	pointer-events: none;
}

/* RTL Support */
.rtl .hpbc-dropdown-menu {
	left: auto;
	right: 0;
}

.rtl .hpbc-dropdown-icon {
	margin-left: 0;
	margin-right: 5px;
}

.rtl .hpbc-mobile-menu {
	transform: translateX(100%);
}

.rtl .hpbc-mobile-menu.active {
	transform: translateX(0);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.hpbc-dropdown-menu {
		border: 2px solid #000000;
	}

	.hpbc-mobile-menu {
		border: 2px solid #000000;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.hpbc-dropdown-menu,
	.hpbc-mobile-menu,
	.hpbc-dropdown-icon,
	.hpbc-mobile-dropdown-icon,
	.hpbc-mobile-dropdown-menu,
	.hpbc-hamburger-icon,
	.hpbc-close-icon {
		transition: none;
	}
}

/* Print styles */
@media print {
	.hpbc-mobile-toggle,
	.hpbc-mobile-menu {
		display: none !important;
	}

	.hpbc-desktop-nav {
		display: block !important;
	}

	.hpbc-dropdown-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 1px solid #000000;
	}
}
