:root {
	--tajali-navy: #1a355d;
	--tajali-blue-soft: #bbd8ed;
	--tajali-accent: #ff9900;
	--tajali-ink: #172033;
	--tajali-white: #fff;
	--tajali-shell: rgba(255, 255, 255, 0.25);
	--tajali-shadow: 0 12px 35px rgba(14, 28, 50, 0.16);
}

.tajali-header,
.tajali-header * {
	box-sizing: border-box;
}

.tajali-header {
	position: relative;
	z-index: 9999;
	width: min(1200px, calc(100% - 32px));
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 10px auto 0;
	font-family: inherit;
	color: var(--tajali-ink);
	line-height: normal;
	isolation: isolate;
}

/* The Elementor header location must be sticky; a sticky child would otherwise
   be constrained by the short Theme Builder wrapper. This class is added by
   the plugin script only to the location containing this header. */
.elementor-location-header.tajali-header-location {
	position: sticky;
	top: 0;
	z-index: 9999;
}

body.admin-bar .elementor-location-header.tajali-header-location {
	top: 32px;
}

.tajali-header .tajali-header__bar {
	position: relative;
	display: flex !important;
	align-items: center !important;
	gap: 24px;
	width: 100% !important;
	height: 90px !important;
	min-height: 90px !important;
	max-height: 90px !important;
	padding: 10px 20px;
	border: 1px solid rgba(255, 255, 255, 0.42) !important;
	border-radius: 40px;
	background: var(--tajali-shell) !important;
	box-shadow: var(--tajali-shadow);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.tajali-header .tajali-brand {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	width: auto !important;
	height: 50px !important;
	min-height: 0 !important;
	max-height: 50px !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--tajali-ink) !important;
	text-decoration: none;
}

.tajali-brand__logo {
	display: grid;
	place-items: center;
	margin: 0;
}

.tajali-brand__logo img,
.tajali-brand__logo .custom-logo {
	display: block;
	width: 50px;
	height: 50px;
	object-fit: contain;
}

.tajali-brand__fallback {
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	border-radius: 16px;
	background: var(--tajali-navy);
	color: var(--tajali-white);
	font-size: 25px;
	font-weight: 800;
}

.tajali-brand__copy {
	display: grid;
	gap: 3px;
	white-space: nowrap;
}

.tajali-brand__copy strong {
	color: var(--tajali-ink) !important;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.25;
}

.tajali-brand__copy small {
	color: var(--tajali-ink) !important;
	font-size: 11px;
	line-height: 1.3;
}

.tajali-header .tajali-nav {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0 !important;
	background: transparent !important;
}

.tajali-header .tajali-nav__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: auto !important;
	height: 44px !important;
	min-height: 44px !important;
	max-height: 44px !important;
	padding: 9px 13px;
	border: 0 !important;
	border-radius: 13px;
	background: transparent !important;
	color: var(--tajali-ink) !important;
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	transition: color 160ms ease, background-color 160ms ease;
}

.tajali-header .tajali-nav__link:hover,
.tajali-header .tajali-nav__link:focus-visible,
.tajali-header .tajali-courses.is-mega-open > .tajali-mega-trigger {
	background: rgba(187, 216, 237, 0.58) !important;
	color: var(--tajali-navy) !important;
	outline: none;
}

.tajali-mega-trigger svg {
	transition: transform 180ms ease;
}

.tajali-courses.is-mega-open > .tajali-mega-trigger svg {
	transform: rotate(180deg);
}

.tajali-courses {
	position: static;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

.tajali-mega {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	left: 0;
	visibility: hidden;
	overflow: hidden;
	border: 1px solid rgba(26, 53, 93, 0.14);
	border-radius: 25px;
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 2px 15px 20px rgba(0, 0, 0, 0.24);
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}

.tajali-courses.is-mega-open .tajali-mega {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.tajali-tabs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 5px;
	padding: 0;
	background: #fff;
}

.tajali-header .tajali-tab {
	min-height: 58px !important;
	height: auto !important;
	max-height: none !important;
	padding: 9px 12px;
	border: 1px solid #333 !important;
	border-bottom-width: 0;
	border-radius: 15px 15px 0 0;
	background: var(--tajali-blue-soft) !important;
	color: var(--tajali-navy) !important;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.55;
	cursor: pointer;
	box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.18);
	transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.tajali-header .tajali-tab:hover,
.tajali-header .tajali-tab:focus-visible,
.tajali-header .tajali-tab.is-active {
	border-color: var(--tajali-accent) !important;
	border-bottom: 5px double var(--tajali-accent) !important;
	background: var(--tajali-navy) !important;
	color: var(--tajali-white) !important;
	outline: none;
}

.tajali-panel {
	position: relative;
	isolation: isolate;
	min-height: 190px;
	padding: 30px 34px;
	background-color: var(--tajali-navy);
	background-image: linear-gradient(rgba(7, 16, 29, 0.58), rgba(7, 16, 29, 0.58)), var(--tajali-panel-bg, none);
	background-position: center;
	background-size: cover;
}

.tajali-panel[hidden] {
	display: none;
}

.tajali-course-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px 28px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tajali-header .tajali-course-grid a {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 54px !important;
	padding: 10px 13px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 14px;
	height: auto !important;
	max-height: none !important;
	background: rgba(255, 255, 255, 0.9) !important;
	color: var(--tajali-ink) !important;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
	transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.tajali-header .tajali-course-grid a:hover,
.tajali-header .tajali-course-grid a:focus-visible {
	background: #fff !important;
	color: var(--tajali-navy) !important;
	transform: translateY(-2px);
	outline: 3px solid rgba(255, 153, 0, 0.55);
	outline-offset: 1px;
}

.tajali-course-grid img {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.tajali-course-grid img:not([src]) {
	opacity: 0;
}

.tajali-header .tajali-account {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 7px;
	max-width: 190px;
	height: 44px !important;
	min-height: 44px !important;
	max-height: 44px !important;
	padding: 9px 13px;
	border: 0 !important;
	border-radius: 10px;
	background: var(--tajali-navy) !important;
	color: var(--tajali-white) !important;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
	transition: background-color 160ms ease, transform 160ms ease;
}

.tajali-account span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tajali-header .tajali-account:hover,
.tajali-header .tajali-account:focus-visible {
	background: #112846 !important;
	color: #fff !important;
	transform: translateY(-1px);
	outline: 3px solid rgba(255, 153, 0, 0.45);
	outline-offset: 2px;
}

.tajali-header .tajali-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px !important;
	min-height: 44px !important;
	max-height: 44px !important;
	padding: 0;
	border: 0 !important;
	border-radius: 12px;
	background: transparent !important;
	color: var(--tajali-navy) !important;
	cursor: pointer;
}

.tajali-toggle-line {
	transform-box: fill-box;
	transform-origin: center;
	transition: opacity 160ms ease, transform 160ms ease;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 1050px) {
	.tajali-header__bar {
		gap: 13px;
	}

	.tajali-brand__copy {
		display: none;
	}

	.tajali-nav__link {
		padding-inline: 10px;
	}
}

@media (max-width: 900px) {
	.tajali-header {
		width: 100%;
		margin-top: 0;
	}

	.tajali-header .tajali-header__bar {
		height: 72px !important;
		min-height: 72px !important;
		max-height: 72px !important;
		padding: 10px 14px;
		border-radius: 0 0 22px 22px;
		background: rgba(255, 255, 255, 0.84) !important;
		-webkit-backdrop-filter: blur(8px);
		backdrop-filter: blur(8px);
	}

	.tajali-header .tajali-brand {
		order: 1;
		height: 46px !important;
		max-height: 46px !important;
	}

	.tajali-brand__logo img,
	.tajali-brand__logo .custom-logo,
	.tajali-brand__fallback {
		width: 46px;
		height: 46px;
	}

	.tajali-header .tajali-mobile-toggle {
		display: inline-flex;
		order: 3;
	}

	.tajali-mobile-toggle[aria-expanded="true"] .tajali-toggle-line--top {
		transform: translateY(5px) rotate(45deg);
	}

	.tajali-mobile-toggle[aria-expanded="true"] .tajali-toggle-line--middle {
		opacity: 0;
	}

	.tajali-mobile-toggle[aria-expanded="true"] .tajali-toggle-line--bottom {
		transform: translateY(-5px) rotate(-45deg);
	}

	.tajali-header .tajali-account {
		order: 2;
		margin-inline-start: auto;
		max-width: min(190px, 45vw);
		height: 40px !important;
		min-height: 40px !important;
		max-height: 40px !important;
		padding: 7px 10px;
		font-size: 12px;
	}

	.tajali-header .tajali-nav {
		position: absolute;
		top: calc(100% + 8px);
		right: 10px;
		left: 10px;
		display: none;
		max-height: calc(100vh - 94px);
		padding: 12px !important;
		overflow: auto;
		border: 1px solid rgba(26, 53, 93, 0.14);
		border-radius: 22px;
		background: rgba(255, 255, 255, 0.94) !important;
		box-shadow: var(--tajali-shadow);
		overscroll-behavior: contain;
	}

	.tajali-header.is-mobile-open .tajali-nav {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		align-items: stretch;
		gap: 8px;
	}

	.tajali-header .tajali-nav__link {
		width: 100%;
		height: 46px !important;
		min-height: 46px !important;
		max-height: 46px !important;
		background: rgba(187, 216, 237, 0.35) !important;
	}

	.tajali-courses {
		position: static;
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.tajali-mega {
		position: static;
		display: none;
		visibility: visible;
		margin-top: 8px;
		border-radius: 18px;
		opacity: 1;
		transform: none;
		pointer-events: auto;
		transition: none;
	}

	.tajali-courses.is-mega-open .tajali-mega {
		display: block;
	}

	.tajali-tabs {
		display: flex;
		gap: 7px;
		padding: 8px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
	}

	.tajali-header .tajali-tab {
		flex: 0 0 min(230px, 72vw);
		min-height: 52px !important;
		border-width: 1px;
		border-radius: 10px;
		scroll-snap-align: start;
	}

	.tajali-panel {
		min-height: 0;
		padding: 20px;
	}

	.tajali-course-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.tajali-header .tajali-course-grid a {
		min-height: 52px !important;
		padding: 9px;
		font-size: 14px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .elementor-location-header.tajali-header-location {
		top: 46px;
	}
}

@media (max-width: 560px) {
	.tajali-header.is-mobile-open .tajali-nav {
		grid-template-columns: repeat(2, 1fr);
	}

	.tajali-courses {
		grid-row: 2;
	}

	.tajali-account span {
		max-width: 100px;
	}

	.tajali-course-grid {
		grid-template-columns: 1fr;
	}

	.tajali-panel {
		padding: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tajali-header *,
	.tajali-header *::before,
	.tajali-header *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
