/* Custom Header CSS - Designed by Dreamedge Technology */

:root {
	--top-bar-bg: #0d73e0;
	--top-bar-text: #ffffff;
	--header-bg: #ffffff;
	--header-text: #333333;
	--accent-color: #0d73e0;
	--btn-bg: #000000;
	--btn-text: #ffffff;
	--container-width: 1351px;
}

body {
	margin: 0;
}

.custom-header-wrapper {
	font-family: 'Lora', serif;
	width: 100%;
	position: relative;
	z-index: 999;
}

.custom-container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 15px;
	box-sizing: border-box;
}

/* Top Bar */
.custom-top-bar {
	background-color: var(--top-bar-bg);
	color: var(--top-bar-text);
	padding: 8px 0;
	font-size: 14px;
}

.top-bar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.top-bar-left, .top-bar-right {
	display: flex;
	align-items: center;
	gap: 15px;
}

.top-bar-icon {
	background: #fff;
	color: var(--top-bar-bg);
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-style: normal;
}

.top-bar-title {
	font-family: 'Open Sans', sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
}

.top-bar-separator {
	margin: 0 5px;
}

.top-bar-desc {
	font-family: 'Urbanist', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
}

.top-bar-right .top-bar-date,
.top-bar-social-label {
	font-family: 'Urbanist', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
}

.top-bar-right .top-bar-date {
	border-right: 1px solid rgba(255,255,255,0.3);
	padding-right: 15px;
}

.top-bar-social-label {
	margin-right: 5px;
}

.top-bar-socials {
	display: flex;
	gap: 10px;
}

.social-icon {
	color: #0d73e0;
	text-decoration: none;
	font-size: 16px;
	transition: all 0.3s ease;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: #ffffff;
}

.social-icon:hover, .social-icon:active {
	background-color: #E63946;
	color: #fff;
}

/* Main Header */
.custom-site-header {
	background-color: var(--header-bg);
	border-bottom: 1px solid #eaeaea;
	transition: all 0.3s ease;
}

.custom-site-header.sticky-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	animation: slideDown 0.5s ease forwards;
}

@keyframes slideDown {
	from { transform: translateY(-100%); }
	to { transform: translateY(0); }
}

.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 80px;
}

.header-logo img {
	max-height: 50px;
	width: auto;
}

.header-logo .site-title-link {
	text-decoration: none;
	color: #000;
	font-size: 24px;
}

.header-logo .logo-text strong {
	font-weight: 700;
}

/* Navigation */
.header-nav-desktop {
	flex-grow: 1;
	display: flex;
	justify-content: center;
}

.custom-main-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 30px;
}

.custom-main-menu li {
	position: relative;
}

.custom-main-menu a {
	text-decoration: none;
	color: var(--header-text);
	font-family: 'Lora', serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 18px;
	letter-spacing: -0.6px;
	vertical-align: middle;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

.custom-main-menu a:hover,
.custom-main-menu li.current-menu-item > a,
.custom-main-menu li.current-menu-ancestor > a {
	color: #E63946;
	text-decoration: underline;
	text-decoration-color: #E63946;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}

.custom-main-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
	list-style: none;
	padding: 10px 0;
	margin: 0;
	min-width: 200px;
	z-index: 100;
}

.custom-main-menu li:hover > .sub-menu {
	display: block;
}

.custom-main-menu .sub-menu li {
	padding: 0;
}

.custom-main-menu .sub-menu a {
	padding: 10px 20px;
	display: block;
	text-transform: none;
	text-decoration: none; /* no underline in submenu */
}

.custom-main-menu .sub-menu a:hover {
	background: #f9f9f9;
	color: #E63946;
}

/* Actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.search-toggle-btn, .mobile-menu-toggle {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--header-text);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.search-toggle-btn:hover, .search-toggle-btn:active,
.mobile-menu-toggle:hover, .mobile-menu-toggle:active {
	background-color: #E63946;
	color: #fff;
}

.header-subscribe-btn {
	background-color: var(--btn-bg);
	color: var(--btn-text);
	text-decoration: none;
	width: 151.99px;
	height: 45.22px;
	padding: 8.37px 33.5px;
	border-radius: 10px;
	font-family: 'Lora', serif;
	font-weight: 600;
	font-size: 13.4px;
	line-height: 1;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	transition: background 0.3s ease;
}

.header-subscribe-btn:hover {
	background-color: #333;
	color: #fff;
}

.mobile-menu-toggle {
	display: none;
}

/* Mobile Off-Canvas */
.offcanvas-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.offcanvas-menu {
	position: fixed;
	top: 0;
	left: -300px;
	width: 300px;
	height: 100%;
	background: #fff;
	z-index: 1001;
	transition: left 0.3s ease;
	box-shadow: 2px 0 10px rgba(0,0,0,0.1);
	overflow-y: auto;
}

.offcanvas-menu.open {
	left: 0;
}

.offcanvas-menu-overlay.open {
	opacity: 1;
	visibility: visible;
}

.offcanvas-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	cursor: pointer;
	color: #333;
}

.offcanvas-content {
	padding: 60px 20px 30px;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}

.offcanvas-nav .custom-main-menu {
	flex-direction: column;
	gap: 15px;
}

.offcanvas-nav .custom-main-menu .sub-menu {
	position: static;
	box-shadow: none;
	display: none;
	padding-left: 20px;
}

.offcanvas-nav .custom-main-menu li.menu-item-has-children > a::after {
	content: '+';
	float: right;
}

.offcanvas-nav .custom-main-menu li.menu-item-has-children.active > a::after {
	content: '-';
}

.offcanvas-actions {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 1px solid #eee;
}

.offcanvas-socials {
	margin-top: auto;
	padding-top: 30px;
}

.offcanvas-social-label {
	display: block;
	margin-bottom: 15px;
	font-weight: 600;
}

.offcanvas-socials .social-icon {
	color: #333;
}

/* Fullscreen Search Popup */
.search-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	z-index: 2000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	font-family: 'Lora', serif;
	padding-top: 80px; /* Offset from top */
}

.search-popup.open {
	opacity: 1;
	visibility: visible;
}

.search-popup-content {
	position: relative;
	width: 90%;
	max-width: 700px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	padding: 40px 30px;
	text-align: center;
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.search-popup.open .search-popup-content {
	transform: translateY(0);
}

.search-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	cursor: pointer;
	color: #666;
	transition: transform 0.3s ease, color 0.3s ease;
}

.search-popup-close:hover {
	transform: rotate(90deg);
	color: #E63946;
}

.search-popup-content h2 {
	font-size: 24px;
	margin-top: 0;
	margin-bottom: 25px;
	color: #333;
}

.search-input-wrapper {
	position: relative;
	margin-bottom: 20px;
}

.search-input-wrapper input {
	width: 100%;
	padding: 20px 60px 20px 20px;
	font-size: 20px;
	border: 2px solid #ddd;
	border-radius: 8px;
	outline: none;
	font-family: 'Lora', serif;
	transition: border-color 0.3s ease;
}

.search-input-wrapper input:focus {
	border-color: var(--accent-color);
}

.search-submit-btn {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	transition: color 0.3s ease;
}

.search-submit-btn:hover {
	color: #ffffff;
}

.search-tags {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 40px;
}

.search-tag {
	background: #f0f0f0;
	padding: 6px 16px;
	border-radius: 20px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.search-tag:hover {
	background: var(--accent-color);
	color: #fff;
}

.search-results-area {
	text-align: left;
	max-height: 40vh;
	overflow-y: auto;
	padding-right: 10px;
}

/* Custom Scrollbar for results */
.search-results-area::-webkit-scrollbar {
	width: 6px;
}
.search-results-area::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.search-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.result-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
	text-decoration: none;
	color: #333;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.result-image {
	width: 100%;
	height: 140px;
	object-fit: cover;
}

.result-title {
	padding: 15px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
}

.search-spinner {
	text-align: center;
	padding: 20px;
	color: #666;
}

/* Responsive */
@media (max-width: 991px) {
	.custom-top-bar {
		display: none;
	}
	.header-nav-desktop, .header-subscribe-btn {
		display: none;
	}
	.mobile-menu-toggle {
		display: flex;
	}
	.search-popup-content h2 {
		font-size: 24px;
	}
}
