/**
 * Advanced Header Styles
 */

/* ── Header Default Layout (header-default.php) ─────────────────────────── */
.header-main {
	padding: 14px 0;
	background: rgba(6,2,29,.92);
	border-bottom: 1px solid rgba(255,255,255,.07);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	position: relative;
	z-index: 100;
}
.header-main .container {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 24px;
	width: 100%;
}
.header-main__content {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 24px;
}
.site-branding {
	flex-shrink: 0;
}
.site-branding .site-logo,
.site-branding .custom-logo-link {
	display: block;
}
.site-branding .custom-logo {
	max-height: 40px;
	width: auto;
}
.header-main .main-navigation {
	flex: 1;
}
.header-main__right {
	display: flex !important;
	align-items: center !important;
	gap: 8px;
	flex-shrink: 0;
}
.header-search-toggle,
.mobile-menu-toggle {
	background: rgba(255,255,255,.06) !important;
	border: 1px solid rgba(255,255,255,.08) !important;
	color: #94a3b8 !important;
	border-radius: 8px !important;
	padding: 8px 10px !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, border-color .2s, color .2s;
}
.header-search-toggle:hover,
.mobile-menu-toggle:hover {
	background: rgba(255,94,46,.1) !important;
	border-color: rgba(255,94,46,.3) !important;
	color: #ff5e2e !important;
}
/* Search overlay */
.header-search {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: rgba(6,2,29,.96);
	border-bottom: 1px solid rgba(255,255,255,.07);
	padding: 20px 0;
	z-index: 200;
}
.header-search.active {
	display: block;
}
.header-search__inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.header-search-close {
	background: none;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	font-size: 18px;
	padding: 4px 8px;
}

/* Sticky Header */
.site-header.sticky-enabled {
	transition: all 0.3s ease;
}

.site-header.sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--sf-z-sticky);
	width: 100%;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
	background: white;
}

.site-header.sticky.shrink {
	padding: 10px 0;
}

.site-header.sticky.shrink .site-logo img {
	max-height: 50px;
}

/* Transparent header */
.site-header.transparent-header {
	background: transparent;
	border-bottom: none;
}

.site-header.transparent-header.sticky {
	background: white;
	border-bottom: 1px solid #f0f0f0;
}

/* Header styles */
.site-header.header-minimal .site-branding-area {
	justify-content: space-between;
}

.site-header.header-minimal .primary-menu {
	display: none;
}

.site-header.header-centered .site-branding-area {
	justify-content: center;
}

.site-header.header-centered .site-navigation {
	margin-left: auto;
	margin-right: auto;
}

/* Top Bar */
.sf-topbar {
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
	padding: 8px 0;
	font-size: 13px;
}

.sf-topbar .container-fluid {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 20px;
}

.sf-topbar-left {
	display: flex;
	gap: 30px;
	align-items: center;
}

.sf-topbar-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #666;
	text-decoration: none;
	transition: color 0.3s ease;
}

.sf-topbar-item:hover {
	color: #007bff;
}

.sf-topbar-item svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 2;
}

.sf-topbar-social {
	display: flex;
	gap: 15px;
	align-items: center;
}

.sf-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: #666;
	transition: color 0.3s ease;
}

.sf-social-link:hover {
	color: #007bff;
}

.sf-social-link svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* Search Overlay */
.sf-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	z-index: var(--sf-z-modal);
	transition: all 0.3s ease;
}

.sf-search-overlay.active {
	opacity: 1;
	visibility: visible;
}

.sf-search-overlay-content {
	background: white;
	padding: 60px 40px;
	border-radius: 8px;
	text-align: center;
	max-width: 600px;
	width: 90%;
	position: relative;
	animation: slideUp 0.3s ease;
}

@keyframes slideUp {
	from {
		transform: translateY(30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.sf-search-overlay-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	transition: color 0.3s ease;
}

.sf-search-overlay-close:hover {
	color: #333;
}

.sf-search-overlay-close svg {
	width: 32px;
	height: 32px;
	stroke: currentColor;
	stroke-width: 2;
}

.sf-search-overlay-content h2 {
	margin: 0 0 30px;
	color: #333;
	font-size: 28px;
}

.sf-search-form {
	display: flex;
	gap: 10px;
	margin-bottom: 30px;
}

.sf-search-form input {
	flex: 1;
	padding: 12px 16px;
	border: 2px solid #f0f0f0;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.3s ease;
}

.sf-search-form input:focus {
	outline: none;
	border-color: #007bff;
}

.sf-search-form button {
	background: #007bff;
	color: white;
	border: none;
	padding: 12px 16px;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
}

.sf-search-form button:hover {
	background: #0056b3;
}

.sf-search-form svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	stroke-width: 2;
}

.sf-search-results {
	max-height: 400px;
	overflow-y: auto;
	text-align: left;
}

.sf-search-result {
	display: block;
	padding: 15px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: #333;
	transition: background 0.3s ease;
}

.sf-search-result:hover {
	background: #f9f9f9;
}

.sf-search-result h4 {
	margin: 0 0 5px;
	color: #007bff;
	font-size: 14px;
	font-weight: 600;
}

.sf-search-result p {
	margin: 0;
	color: #666;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Off-Canvas Menu */
.sf-offcanvas-menu {
	position: fixed;
	top: 0;
	right: 0;
	width: 350px;
	height: 100vh;
	background: white;
	z-index: 2001;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.sf-offcanvas-menu.active {
	transform: translateX(0);
}

.sf-offcanvas-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	z-index: 1999;
	transition: all 0.3s ease;
}

.sf-offcanvas-overlay.active {
	opacity: 1;
	visibility: visible;
}

.sf-offcanvas-header {
	display: flex;
	justify-content: flex-end;
	padding: 20px;
	border-bottom: 1px solid #f0f0f0;
}

.sf-offcanvas-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	transition: color 0.3s ease;
}

.sf-offcanvas-close:hover {
	color: #333;
}

.sf-offcanvas-close svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	stroke-width: 2;
}

.sf-offcanvas-nav {
	flex: 1;
	overflow-y: auto;
	padding: 20px 0;
}

.sf-offcanvas-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sf-offcanvas-nav li {
	margin: 0;
}

.sf-offcanvas-nav a {
	display: block;
	padding: 12px 20px;
	color: #333;
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: all 0.3s ease;
}

.sf-offcanvas-nav a:hover,
.sf-offcanvas-nav a.current-menu-item {
	background: #f9f9f9;
	color: #007bff;
	border-left-color: #007bff;
	padding-left: 17px;
}

.sf-offcanvas-footer {
	padding: 20px;
	border-top: 1px solid #f0f0f0;
}

.sf-offcanvas-footer .button {
	width: 100%;
	display: block;
	text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
	.sf-topbar {
		font-size: 12px;
	}

	.sf-topbar-left {
		gap: 15px;
	}

	.sf-topbar-item {
		gap: 5px;
	}

	.sf-search-overlay-content {
		padding: 40px 20px;
	}

	.sf-search-overlay-content h2 {
		font-size: 20px;
		margin-bottom: 20px;
	}

	.sf-offcanvas-menu {
		width: 280px;
	}

	.sf-topbar-right {
		display: none;
	}

	.sf-topbar-left {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.sf-offcanvas-menu {
		width: 100%;
	}

	.sf-topbar .container-fluid {
		flex-direction: column;
		gap: 10px;
	}
}
