/*
 * Site header. Values mirror the Elementor header template (#36):
 * brown bar with accent top/bottom borders, logo 220px (182px mobile), centered menu with a
 * fading background pointer, "Get Started" button. At <= 1024px the menu becomes a burger with a
 * full-width white dropdown and the button is hidden.
 */

.uof-header {
	position: relative;
	background-color: #35261f;
	border-top: 1px solid var(--uof-color-accent);
	border-bottom: 1px solid var(--uof-color-accent);
}

.uof-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--uof-gap);
	width: 100%;
	max-width: min(100%, var(--uof-container));
	margin-inline: auto;
}

/* ---------- Logo ---------- */

.uof-header__logo {
	display: block;
	flex: 0 0 auto;
	width: 220px;
	max-width: 220px;
	line-height: 0;
}

.uof-header__logo img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Desktop menu ---------- */

.uof-nav__list {
	position: relative;
	z-index: 2; /* keeps the pointer (z-index: -1) above the header background */
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.uof-nav__list > li {
	display: flex;
	position: relative;
}

.uof-nav__list a {
	position: relative;
	display: flex;
	align-items: center;
	flex-grow: 1;
	padding: 24px 16px;
	font-family: var(--uof-font-heading), sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 30px;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--uof-color-primary);
	transition: 0.4s;
}

/* Background pointer with fade animation. */
.uof-nav__list a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	display: block;
	background-color: #99542a;
	opacity: 0;
	transition: 0.3s;
	transition-timing-function: cubic-bezier(0.58, 0.3, 0.005, 1);
}

.uof-nav__list a:hover,
.uof-nav__list a:focus,
.uof-nav__list .current-menu-item > a {
	color: var(--uof-color-primary);
}

.uof-nav__list a:hover::before,
.uof-nav__list a:focus::before,
.uof-nav__list .current-menu-item > a::before {
	opacity: 1;
}

/* ---------- Button ---------- */

.uof-header__cta {
	flex: 0 0 auto;
	transition: 0.3s;
}

/* ---------- Burger toggle (tablet and mobile only) ---------- */

.uof-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	padding: 0.25em;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	font-size: 30px;
	line-height: 1.5;
	color: var(--uof-color-primary);
	cursor: pointer;
}

.uof-header__toggle:hover,
.uof-header__toggle:focus {
	background-color: transparent;
	color: var(--uof-color-accent);
}

/* Inline SVG inside a line-height:1 span gives the 30px line box Elementor's 45px toggle relies on. */
.uof-header__toggle svg {
	width: 1em;
	height: auto;
	fill: currentColor;
}

.uof-header__toggle-open,
.uof-header__toggle-close {
	line-height: 1;
}

.uof-header__toggle[aria-expanded="true"] .uof-header__toggle-open,
.uof-header__toggle:not([aria-expanded="true"]) .uof-header__toggle-close {
	display: none;
}

/* ---------- Dropdown (tablet and mobile only) ---------- */

.uof-nav-dropdown {
	display: none;
	position: absolute;
	top: 71px; /* 10px below the 45px toggle inside the 16px header padding */
	left: 0;
	z-index: 9997;
	width: 100%;
	max-height: 0;
	overflow: hidden;
	background-color: #fff;
	transform: scaleY(0);
	transform-origin: top;
	transition: max-height 0.3s, transform 0.3s;
	visibility: hidden;
}

.uof-nav-dropdown.is-open {
	max-height: 100vh;
	overflow-y: auto;
	transform: scaleY(1);
	visibility: visible;
}

.uof-nav-dropdown__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.uof-nav-dropdown__list a {
	display: flex;
	align-items: center;
	padding: 10px 20px;
	font-family: var(--uof-font-heading), sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 30px;
	text-transform: uppercase;
	color: var(--uof-color-secondary);
}

.uof-nav-dropdown__list a:hover,
.uof-nav-dropdown__list a:focus,
.uof-nav-dropdown__list .current-menu-item > a {
	background-color: #995329;
	color: var(--uof-color-primary);
}

/* ---------- Breakpoints ---------- */

@media (max-width: 1024px) {
	.uof-header {
		padding: 16px;
	}

	.uof-nav,
	.uof-header__cta {
		display: none;
	}

	.uof-header__toggle {
		display: flex;
	}

	.uof-nav-dropdown {
		display: block;
	}
}

@media (max-width: 767px) {
	.uof-header__logo {
		width: 182px;
		max-width: 182px;
	}
}
