:root {
	--mgh-rgb: 3, 93, 205;
	--mgh-color: #035dcd;
	--mgh-text: #fff;
	--mgh-cta-bg: #fff;
	--mgh-cta-text: #035dcd;
	--mgh-a: .86;
	--mgh-blur: 14px;
	--mgh-h-d: 76px;
	--mgh-logo: 40px;
	--mgh-gap: 0px;
	--mgh-h: var(--mgh-h-d);
	--mgh-bar: 0px;
	--mgh-total: calc(var(--mgh-h) + var(--mgh-gap));
}

.admin-bar { --mgh-bar: 32px; }

@media (max-width: 782px) {
	.admin-bar { --mgh-bar: 46px; }
}

@media (max-width: 1100px) {
	:root { --mgh-h: 64px; --mgh-logo-m: 34px; }
}

html #msh-hero { --msh-top: var(--mgh-total); }

.mgh-spacer { display: block; height: var(--mgh-total); }

html.mgh-locked { overflow: hidden; }

.mgh,
.mgh-drawer,
.mgh-overlay { font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; }

.mgh *,
.mgh *::before,
.mgh *::after,
.mgh-drawer *,
.mgh-drawer *::before,
.mgh-drawer *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.mgh ul,
.mgh li,
.mgh-drawer ul,
.mgh-drawer li { margin: 0; padding: 0; list-style: none; }

.mgh li::before,
.mgh-drawer li::before { content: none; }

.mgh a,
.mgh a:hover,
.mgh-drawer a,
.mgh-drawer a:hover { text-decoration: none; box-shadow: none; }

.mgh-i { display: block; flex: none; height: 1em; fill: currentColor; }

/* ---------------------------------------------------------------- bar */
.mgh {
	position: fixed;
	top: calc(var(--mgh-bar) + var(--mgh-gap));
	right: 0;
	left: 0;
	z-index: 99990;
	height: var(--mgh-h);
	margin: 0;
	padding: 0;
	background: rgba(var(--mgh-rgb), var(--mgh-a));
	color: var(--mgh-text);
	direction: rtl;
	text-align: right;
	-webkit-backdrop-filter: blur(var(--mgh-blur)) saturate(160%);
	backdrop-filter: blur(var(--mgh-blur)) saturate(160%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(255, 255, 255, .16), 0 6px 20px rgba(15, 23, 42, .08);
	transition: background-color .2s ease, box-shadow .2s ease;
}

.mgh.mgh-no-border { box-shadow: 0 6px 20px rgba(15, 23, 42, .08); }

.mgh.is-scrolled { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(255, 255, 255, .16), 0 10px 28px rgba(15, 23, 42, .18); }
.mgh.mgh-no-border.is-scrolled { box-shadow: 0 10px 28px rgba(15, 23, 42, .18); }

.mgh-layout-floating { right: 12px; left: 12px; border-radius: 16px; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.mgh { background: var(--mgh-color); }
}

.mgh-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	height: 100%;
	padding-inline: clamp(16px, 4.4vw, 84px);
}

.mgh-logo { display: flex; flex: none; align-items: center; color: var(--mgh-text); }
.mgh-logo-img { display: block; width: auto; height: var(--mgh-logo); max-width: 190px; object-fit: contain; }
.mgh-logo-text { color: var(--mgh-text); font-size: 18px; font-weight: 700; white-space: nowrap; }

/* -------------------------------------------------------------- links */
.mgh-nav { flex: none; }
.mgh .mgh-menu { display: flex; align-items: center; gap: 2px; }
.mgh-item { position: relative; }

.mgh .mgh-link {
	display: flex;
	align-items: center;
	gap: 7px;
	height: 40px;
	padding: 0 11px;
	border-radius: 9px;
	color: var(--mgh-text);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	transition: background-color .16s ease;
}

.mgh .mgh-link .mgh-i { font-size: 14px; opacity: .88; }
.mgh .mgh-link .mgh-chev { font-size: 10px; opacity: .72; transition: transform .2s ease; }

.mgh .mgh-link:hover,
.mgh .mgh-item.is-open > .mgh-link,
.mgh .mgh-link[aria-current="page"] { background: rgba(255, 255, 255, .15); color: var(--mgh-text); }

.mgh-item:hover > .mgh-link .mgh-chev,
.mgh-item.is-open > .mgh-link .mgh-chev,
.mgh-item:not(.is-dismissed):has(:focus-visible) > .mgh-link .mgh-chev { transform: rotate(180deg); }

/* ---------------------------------------------------------- dropdowns */
.mgh .mgh-sub {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 10;
	min-width: 220px;
	padding: 7px;
	border: 1px solid rgba(15, 23, 42, .07);
	border-radius: 13px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.mgh .mgh-sub.to-left { right: auto; left: 0; }

/* Keeps the menu open while the mouse crosses the gap. */
.mgh .mgh-sub::before { content: ""; position: absolute; top: -12px; right: 0; left: 0; height: 12px; }

.mgh-item:hover > .mgh-sub,
.mgh-item.is-open > .mgh-sub,
.mgh-item:not(.is-dismissed):has(:focus-visible) > .mgh-sub { opacity: 1; visibility: visible; transform: translateY(0); }

.mgh .mgh-sub a {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 41px;
	padding: 8px 11px;
	border-radius: 8px;
	color: #334155;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	transition: background-color .14s ease, color .14s ease;
}

.mgh .mgh-sub a .mgh-i { width: 18px; font-size: 15px; color: var(--mgh-color); }
.mgh .mgh-sub a:hover,
.mgh .mgh-sub a[aria-current="page"] { background: #f1f5f9; color: var(--mgh-color); }

/* ------------------------------------------------------------ buttons */
.mgh-actions { display: flex; flex: none; align-items: center; gap: 8px; }

.mgh-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 40px;
	padding: 0 16px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.mgh-action .mgh-i { font-size: 14px; }
.mgh .mgh-action.is-ghost,
.mgh-drawer .mgh-action.is-ghost { background: transparent; color: var(--mgh-text); }
.mgh .mgh-action.is-ghost:hover { background: rgba(255, 255, 255, .15); color: var(--mgh-text); }
.mgh .mgh-action.is-solid,
.mgh-drawer .mgh-action.is-solid { background: var(--mgh-cta-bg); color: var(--mgh-cta-text); }
.mgh .mgh-action.is-solid:hover { background: var(--mgh-cta-bg); color: var(--mgh-cta-text); transform: translateY(-1px); }

.mgh .mgh-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .14);
	color: var(--mgh-text);
	font-size: 20px;
	cursor: pointer;
	box-shadow: none;
}

/* ------------------------------------------------------------- drawer */
.mgh-overlay {
	position: fixed;
	inset: 0;
	z-index: 99991;
	background: rgba(15, 23, 42, .55);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s;
}

.mgh-overlay.is-open { opacity: 1; visibility: visible; }

.mgh-drawer {
	position: fixed;
	top: var(--mgh-bar);
	right: 0;
	bottom: 0;
	z-index: 99992;
	display: flex;
	flex-direction: column;
	width: min(320px, 88vw);
	overflow-y: auto;
	background: var(--mgh-color);
	color: var(--mgh-text);
	direction: rtl;
	text-align: right;
	box-shadow: -10px 0 30px rgba(15, 23, 42, .22);
	visibility: hidden;
	transform: translateX(105%);
	transition: transform .28s cubic-bezier(.16, 1, .3, 1), visibility .28s;
}

.mgh-drawer.is-open { visibility: visible; transform: translateX(0); transition: transform .28s cubic-bezier(.16, 1, .3, 1), visibility 0s; }

.mgh-drawer-head {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.mgh-drawer .mgh-logo-img { height: min(var(--mgh-logo), 36px); }

.mgh-drawer .mgh-close {
	display: grid;
	flex: none;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	color: var(--mgh-text);
	font-size: 17px;
	cursor: pointer;
	box-shadow: none;
}

.mgh-drawer .mgh-mlist { flex: 1 1 auto; padding: 10px 14px; }
.mgh-drawer .mgh-mitem { border-bottom: 1px solid rgba(255, 255, 255, .1); }

.mgh-drawer .mgh-mlink {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--mgh-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	text-align: right;
	cursor: pointer;
	box-shadow: none;
}

.mgh-drawer .mgh-mlink:hover { background: rgba(255, 255, 255, .1); color: var(--mgh-text); }
.mgh-mtext { display: flex; align-items: center; gap: 12px; }
.mgh-mtext .mgh-i { width: 20px; font-size: 16px; }
.mgh-drawer .mgh-chev { font-size: 12px; opacity: .8; transition: transform .22s ease; }
.mgh-drawer .mgh-mlink[aria-expanded="true"] .mgh-chev { transform: rotate(180deg); }

.mgh-msub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s ease; }
.mgh-msub.is-open { grid-template-rows: 1fr; }
.mgh-msub > ul { min-height: 0; overflow: hidden; border-radius: 10px; background: rgba(0, 0, 0, .13); }
.mgh-msub.is-open > ul { margin-bottom: 8px; }

.mgh-drawer .mgh-msub a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 8px 14px;
	color: var(--mgh-text);
	font-size: 14px;
	font-weight: 600;
}

.mgh-drawer .mgh-msub a:hover { background: rgba(255, 255, 255, .1); color: var(--mgh-text); }
.mgh-drawer .mgh-msub .mgh-i { width: 20px; font-size: 15px; }

.mgh-drawer-foot { display: grid; flex: none; gap: 8px; padding: 16px 18px; border-top: 1px solid rgba(255, 255, 255, .15); }
.mgh-drawer-foot .mgh-action { height: 46px; }
.mgh-drawer-foot .mgh-action.is-ghost { border: 1px solid rgba(255, 255, 255, .3); }

.mgh a:focus-visible,
.mgh button:focus-visible,
.mgh-drawer a:focus-visible,
.mgh-drawer button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1100px) {
	/* A lighter blur keeps scrolling smooth on phones. */
	.mgh {
		-webkit-backdrop-filter: blur(min(var(--mgh-blur), 8px));
		backdrop-filter: blur(min(var(--mgh-blur), 8px));
	}
	.mgh .mgh-nav,
	.mgh .mgh-action { display: none; }
	.mgh .mgh-toggle { display: flex; }
	.mgh .mgh-logo-img { height: var(--mgh-logo-m); }
}

/* Applied by script when the links no longer fit on one line. */
.mgh.mgh-compact .mgh-nav,
.mgh.mgh-compact .mgh-action { display: none; }
.mgh.mgh-compact .mgh-toggle { display: flex; }

@media (prefers-reduced-motion: reduce) {
	.mgh *, .mgh, .mgh-drawer, .mgh-drawer *, .mgh-overlay { transition: none !important; }
}
