/* ============================================================================
   Global nav — fixed hamburger button + full-screen overlay panel.
   Loaded on every page via functions.php.
   ============================================================================ */

:root {
	--monash-nav-bg: #ffffef;
	--monash-nav-fg: #006dae;
	--monash-nav-accent: #5198c1;
	--monash-nav-panel-bg: #2f2f31;
	--monash-nav-panel-fg: #f7f7f7;
	--monash-nav-panel-line: #31a6de;
}

/* ── Hamburger button ───────────────────────────────────────────────────── */
.monash-nav-toggle {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 999;
	display: flex;
	width: fit-content;
	overflow: visible;
	background: transparent;
	color: #fff;
	border: 0;
	border-radius: 0;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
	transition:
		color 0.25s ease,
		transform 0.18s ease-out,
		opacity 0.18s ease-out;
	font: inherit;
}

@media (max-width: 768px) {
	.page-template-page-quiz .monash-nav-toggle {	
			position: fixed;
	}
}
/* Adaptive contrast: dark burger when over a light-background section. */
body.nav-on-light .monash-nav-toggle {
	color: #006dae;
}

/* Child pages (non-blue-bg): burger is always black. */
body.nav-burger-dark .monash-nav-toggle {
	color: #1a1a1a;
}
.monash-nav-toggle:focus-visible {
	outline: 2px solid var(--monash-nav-accent);
	outline-offset: 3px;
}

.monash-nav-toggle__bars {
	display: inline-flex;
	flex-direction: column;
	gap: 6px;
	width: 32px;
}
.monash-nav-toggle__bars span {
	display: block;
	height: 2px;
	width: 100%;
	background-color: currentColor;
	border-radius: 1px;
}

/* Hide the hamburger while the panel is open. */
body.monash-nav-open .monash-nav-toggle {
	opacity: 0;
	pointer-events: none;
}

/* ── Overlay panel ──────────────────────────────────────────────────────── */
.monash-nav-panel {
	position: fixed;
	top: 0;
	bottom: 0;
	left: max(0px, calc((100vw - var(--monash-shell-width, 529px)) / 2));
	right: max(0px, calc((100vw - var(--monash-shell-width, 529px)) / 2));
	z-index: 9998;
	background: #000000;
	color: var(--monash-nav-panel-fg);
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	opacity: 0;
	transform: translateY(-12px);
	transition:
		opacity 0.22s ease-out,
		transform 0.22s ease-out;
	pointer-events: none;
	font-family: "Albert Sans", system-ui, sans-serif;
	overflow-y: auto;
	padding-bottom: 1.25rem;
}
.monash-nav-panel[hidden] {
	display: none;
}
.monash-nav-panel.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

@media (min-width: 1024px) {
	.monash-nav-panel {
		top: var(--monash-shell-offset-y, 16px);
		bottom: auto;
		height: var(--monash-shell-height, 874px);
		border-radius: var(--monash-shell-radius, 24px);
		overflow: hidden auto;
        max-height: 100dvh;
	}
}

body.monash-nav-open {
	overflow: hidden;
}

/* ── Close button ───────────────────────────────────────────────────────── */
.monash-nav-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: auto;
	height: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: #fff;
	border: 0;
	cursor: pointer;
	padding: 0;
	border-radius: 0;
}
.monash-nav-close:hover {
	opacity: 0.8;
}
.monash-nav-close:focus-visible {
	outline: 2px solid var(--monash-nav-accent);
	outline-offset: 3px;
}

/* ── Menu list ──────────────────────────────────────────────────────────── */
.monash-nav-menu {
	width: 100%;
	padding: 1.4rem 2.25rem 1rem;
}

.monash-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	text-align: left;
}
.monash-nav-list > li {
	display: block;
	padding: 0.7rem 0 1.2rem;
	border-bottom: 1px solid var(--grey-1);
}
.monash-nav-list > li:last-child {
	border-bottom: 0;
}
.monash-nav-list > li > a {
	display: inline-block;
	font-size: 20px;
	font-weight: 600;
	text-transform: uppercase;
	text-decoration: none;
	letter-spacing: 0;
	line-height: 1.08;
	padding: 0.2rem 0;
	transition: color 0.15s ease-out;
  color: var(--monash-blue);
    font-family: var(--second-family);
}
.monash-nav-list > li > a:hover,
.monash-nav-list > li > a:focus-visible {
	color: #79c6eb;
	outline: none;
}
.monash-nav-list .current-menu-item > a,
.monash-nav-list .current_page_item > a {
	color: #8fd5f4;
}

/* Sub-menus: nested pages under hub items render smaller + indented. */
.monash-nav-list .sub-menu {
	list-style: none;
	margin: 1rem 0 0 1rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.85rem;
}
.monash-nav-list .sub-menu a {
	font-size: 16px;
	font-weight: 400;
	opacity: 1;
	color: #fff;
	text-transform: none;
	line-height: 1.28;
	padding: 0.05rem 0;
    font-family: var(--font-family);
}
.monash-nav-list .sub-menu a:hover,
.monash-nav-list .sub-menu a:focus-visible {
	color: #bfe8fb;
}

/* If no submenu exists, style top-level item as a plain row link. */
.monash-nav-list > li:not(.menu-item-has-children) > a {
	font-size: 20px;
}

.monash-nav-empty-hint {
	margin-top: 1rem;
	font-size: 0.95rem;
	color: #d6f1ff;
	max-width: 28rem;
	line-height: 1.5;
}
