/* ==========================================================================
   MindGurus Header
   ========================================================================== */

.mg-site-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	width: 100%;
	background-color: #F8F3E9;
	transition: box-shadow 0.3s ease;
}

.mg-site-header.is-scrolled {
	box-shadow: 0 2px 16px rgba(38, 29, 22, 0.08);
}

.mg-header-container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px;
}

.mg-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 76px;
	gap: 24px;
}

/* Logo
   ========================================================================== */

.mg-header-logo {
	flex-shrink: 0;
}

.mg-logo-link {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: #261D16;
}

.mg-logo-image {
	display: flex;
	align-items: center;
	line-height: 0;
}

.mg-custom-logo,
.mg-header-logo img {
	width: 159px;
	height: 44px;
	object-fit: contain;
	object-position: left center;
}

.mg-logo-text {
	font-family: 'Public Sans', sans-serif;
	font-weight: 600;
	font-size: 20px;
	color: #261D16;
}

/* Desktop Navigation
   ========================================================================== */

.mg-header-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.mg-header-nav .mg-header-menu {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mg-header-nav .mg-header-menu > li {
	position: relative;
	margin: 0;
	padding: 0;
}

.mg-header-nav .mg-header-menu > li > a {
	display: inline-block;
	font-family: 'Public Sans', sans-serif;
	font-weight: 500;
	font-size: 15px;
	line-height: 20px;
	color: #6B6459;
	text-decoration: none;
	padding: 8px 0;
	vertical-align: middle;
	transition: color 0.25s ease;
	position: relative;
}

.mg-header-nav .mg-header-menu > li > a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background-color: #865725;
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.25s ease;
}

.mg-header-nav .mg-header-menu > li > a:hover {
	color: #261D16;
}

.mg-header-nav .mg-header-menu > li.current-menu-item > a,
.mg-header-nav .mg-header-menu > li.current_page_item > a,
.mg-header-nav .mg-header-menu > li.current-menu-ancestor > a {
	color: #261D16;
}

.mg-header-nav .mg-header-menu > li.current-menu-item > a::after,
.mg-header-nav .mg-header-menu > li.current_page_item > a::after,
.mg-header-nav .mg-header-menu > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
}

/* Header Actions
   ========================================================================== */

.mg-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

/* Language Selector
   ========================================================================== */

.mg-lang-selector {
	position: relative;
}

.mg-lang-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px 10px;
	border-radius: 8px;
	transition: background-color 0.2s ease;
	font-family: 'Public Sans', sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: #6B6459;
	line-height: 1;
}

.mg-lang-toggle:hover,
.mg-lang-toggle[aria-expanded="true"] {
	background-color: rgba(107, 100, 89, 0.1);
}

.mg-lang-icon {
	display: flex;
	align-items: center;
	line-height: 0;
}

.mg-lang-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 200px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(38, 29, 22, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	z-index: 100;
	overflow: hidden;
}

.mg-lang-selector.is-open .mg-lang-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mg-lang-list {
	list-style: none;
	margin: 0;
	padding: 8px;
}

.mg-lang-list li {
	margin: 0;
	padding: 0;
}

.mg-lang-option {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 10px 14px;
	background: none;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-family: 'Public Sans', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #261D16;
	text-align: left;
	transition: background-color 0.2s ease;
}

.mg-lang-option:hover {
	background-color: #F8F3E9;
}

.mg-lang-option.is-active {
	background-color: #F8F3E9;
	color: #865725;
}

.mg-lang-flag {
	font-size: 20px;
	line-height: 1;
}

.mg-lang-name {
	flex: 1;
}

/* Register Button
   ========================================================================== */

.mg-register-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 112px;
	height: 44px;
	padding: 12px 24px;
	background-color: #13110F;
	color: #fff;
	font-family: 'Public Sans', sans-serif;
	font-weight: 500;
	font-size: 15px;
	line-height: 20px;
	text-decoration: none;
	border-radius: 33554400px;
	border: none;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.15s ease;
	white-space: nowrap;
}

.mg-register-btn:hover {
	background-color: #261D16;
	color: #fff;
}

.mg-register-btn:active {
	transform: scale(0.98);
}

/* Mobile Toggle
   ========================================================================== */

.mg-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	border-radius: 8px;
	transition: background-color 0.2s ease;
}

.mg-mobile-toggle:hover {
	background-color: rgba(107, 100, 89, 0.1);
}

.mg-hamburger {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
}

.mg-hamburger span {
	display: block;
	width: 100%;
	height: 2px;
	background-color: #261D16;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.mg-mobile-toggle[aria-expanded="true"] .mg-hamburger span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.mg-mobile-toggle[aria-expanded="true"] .mg-hamburger span:nth-child(2) {
	opacity: 0;
}

.mg-mobile-toggle[aria-expanded="true"] .mg-hamburger span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Sidebar
   ========================================================================== */

.mg-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(38, 29, 22, 0.4);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
	z-index: 10000;
	backdrop-filter: blur(2px);
}

.mg-mobile-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.mg-mobile-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	width: min(320px, 85vw);
	height: 100vh;
	height: 100dvh;
	background: #F8F3E9;
	z-index: 10001;
	transform: translateX(-100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	box-shadow: 4px 0 24px rgba(38, 29, 22, 0.1);
}

.mg-mobile-sidebar.is-open {
	transform: translateX(0);
}

.mg-mobile-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(107, 100, 89, 0.15);
}

.mg-mobile-sidebar-logo .custom-logo-link img,
.mg-mobile-sidebar-logo img {
	max-width: 140px;
	height: auto;
	max-height: 40px;
	object-fit: contain;
}

.mg-mobile-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
	border-radius: 8px;
	transition: background-color 0.2s ease;
}

.mg-mobile-close:hover {
	background-color: rgba(107, 100, 89, 0.1);
}

.mg-mobile-nav {
	flex: 1;
	padding: 16px 0;
}

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

.mg-mobile-nav .mg-mobile-menu > li {
	margin: 0;
	border-bottom: 1px solid rgba(107, 100, 89, 0.1);
}

.mg-mobile-nav .mg-mobile-menu > li > a {
	display: block;
	padding: 16px 24px;
	font-family: 'Public Sans', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 24px;
	color: #6B6459;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.mg-mobile-nav .mg-mobile-menu > li > a:hover,
.mg-mobile-nav .mg-mobile-menu > li.current-menu-item > a,
.mg-mobile-nav .mg-mobile-menu > li.current_page_item > a {
	color: #261D16;
	background-color: rgba(134, 87, 37, 0.06);
}

.mg-mobile-sidebar-footer {
	padding: 24px;
	border-top: 1px solid rgba(107, 100, 89, 0.15);
}

.mg-register-btn--mobile {
	width: 100%;
}

/* Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.mg-header-nav .mg-header-menu {
		gap: 20px;
	}

	.mg-header-nav .mg-header-menu > li > a {
		font-size: 14px;
	}
}

@media (max-width: 992px) {
	.mg-header-nav {
		display: none;
	}

	.mg-register-btn--desktop {
		display: none;
	}

	.mg-mobile-toggle {
		display: flex;
	}

	.mg-lang-current {
		display: none;
	}

	.mg-header-inner {
		min-height: 64px;
	}
}

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

	.mg-custom-logo,
	.mg-header-logo img {
		width: 130px;
		height: 36px;
	}
}

/* Body lock when mobile menu open
   ========================================================================== */

body.mg-menu-open {
	overflow: hidden;
}

/* Hide default Hello Elementor header when MindGurus header is active
   ========================================================================== */

#mg-site-header ~ #site-header {
	display: none;
}
