/**
 * Custom header/nav — brand tokens only, no Kadence header styling involved.
 *
 * Kadence's own nav/menu CSS (kadence/assets/css/header.min.css and
 * global.min.css) ships plain-class selectors that can tie or beat these
 * rules on specificity even though the default header render is unhooked
 * (see inc/header.php) — a leftover stylesheet can still target `.aca-nav`
 * children if a class name ever collides. Every rule here that sets color,
 * background, or typography is prefixed with `html body` (matching the
 * pattern already established in aquinas_child_button_override_css()) so
 * this header never has to be re-diagnosed as a cascade fight.
 */

html body .aca-header {
	background: var(--wp--preset--gradient--wine-gradient);
	border-bottom: 4px solid var(--wp--preset--color--mustard-gold);
	position: relative;
	z-index: 100;
}

html body .aca-header__bar {
	min-height: 106px;
	display: flex;
	align-items: center;
}

html body .aca-header__inner {
	width: 100%;
	max-width: 1680px;
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 3.5rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(1rem, 3vw, 3rem);
}

html body .aca-header__logo-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

html body .aca-header__logo-image {
	display: block;
	width: 163px;
	height: 40px;
}

html body .aca-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

html body .aca-nav__menu {
	display: flex;
	align-items: center;
	gap: clamp(1.5rem, 2.5vw, 2.5rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

html body .aca-nav__menu li {
	position: relative;
}

html body .aca-nav__menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 0.4375rem;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 1rem;
	color: var(--wp--preset--color--off-white);
	text-decoration: none;
	line-height: 1.5;
	white-space: nowrap;
}

html body .aca-nav__menu > li > a:hover,
html body .aca-nav__menu > li > a:focus {
	color: var(--wp--preset--color--warm-cream);
}

/* Dropdown caret — CSS triangle, no icon asset dependency. */
html body .aca-nav__menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 6px;
	background-color: currentColor;
	clip-path: polygon(0 0, 100% 0, 50% 100%);
	flex: none;
}

html body .aca-nav__menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	min-width: 220px;
	background-color: var(--wp--preset--color--white);
	border-top: 3px solid var(--wp--preset--color--mustard-gold);
	box-shadow: 0 12px 24px rgba(20, 20, 20, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%) translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 10;
}

html body .aca-nav__menu li.menu-item-has-children:hover > .sub-menu,
html body .aca-nav__menu li.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

html body .aca-nav__menu .sub-menu a {
	display: block;
	padding: 0.5rem 1.25rem;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.9375rem;
	color: var(--wp--preset--color--charcoal-brown);
	text-decoration: none;
	white-space: nowrap;
}

html body .aca-nav__menu .sub-menu a:hover,
html body .aca-nav__menu .sub-menu a:focus {
	background-color: var(--wp--preset--color--warm-cream);
	color: var(--wp--preset--color--black);
}

html body .aca-header__actions {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 2.5vw, 2.75rem);
	flex: none;
}

html body .aca-header__donate {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--wp--preset--color--off-white);
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--roboto);
	font-size: 1rem;
	font-weight: 400;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border-radius: 5px;
	padding: 0.8125rem 1.5rem;
	white-space: nowrap;
}

html body .aca-header__donate:hover,
html body .aca-header__donate:focus {
	background-color: var(--wp--preset--color--warm-cream);
	color: var(--wp--preset--color--black);
}

html body .aca-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
}

html body .aca-header__toggle-bar {
	display: block;
	width: 100%;
	height: 2px;
	background-color: var(--wp--preset--color--off-white);
}

html body .aca-mobile-menu {
	display: none;
	flex-direction: column;
	background-color: var(--wp--preset--color--charcoal-brown);
	padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2rem;
}

html body .aca-mobile-menu.is-open {
	display: flex;
}

html body .aca-mobile-menu__list {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

html body .aca-mobile-menu__list .sub-menu {
	list-style: none;
	margin: 0.25rem 0 0.5rem 1rem;
	padding: 0;
}

html body .aca-mobile-menu__list a {
	display: block;
	padding: 0.6rem 0;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 1rem;
	color: var(--wp--preset--color--off-white);
	text-decoration: none;
	border-bottom: 1px solid rgba(252, 252, 252, 0.12);
}

@media (max-width: 900px) {
	html body .aca-nav {
		display: none;
	}

	html body .aca-header__toggle {
		display: flex;
	}
}

@media (min-width: 901px) {
	html body .aca-mobile-menu {
		display: none !important;
	}
}
