/* Audarrya site header.
   Selectors start with #aud-header so page-level CSS resets (*, a, ul, img ...) cannot change it. */

/* Page layouts set overflow-x:hidden on html/body, which stops a sticky header from sticking
   (and doubles the admin-bar gap). "clip" still prevents sideways scrolling but keeps sticky working. */
html:root,
html:root > body {
	overflow-x: clip !important;
}

#aud-header {
	--aud-green: #16933a;
	--aud-green-dark: #0f7a2f;
	--aud-navy: #06243e;
	--aud-line: #e6ece8;
	position: sticky;
	top: 0;
	z-index: 9999;
	margin: 0;
	padding: 0;
	background: #fff;
	border-bottom: 1px solid var(--aud-line);
	box-shadow: none !important;
	font-family: 'Inter', Arial, sans-serif;
	transition: box-shadow .2s ease;
}

.admin-bar #aud-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

#aud-header.is-scrolled {
	box-shadow: 0 4px 18px rgba(6, 36, 62, .08) !important;
}

#aud-header *,
#aud-header *::before,
#aud-header *::after {
	box-sizing: border-box;
}

#aud-header .aud-header__inner {
	display: flex;
	align-items: center;
	gap: 40px;
	max-width: 1240px;
	height: 92px;
	margin: 0 auto;
	padding: 0 24px;
}

#aud-header .aud-header__logo {
	display: block;
	flex: 0 0 auto;
	line-height: 0;
}

#aud-header .aud-header__logo img {
	display: block;
	width: auto;
	height: 40px;
	max-width: none;
}

/* Navigation */
#aud-header .aud-nav {
	display: flex;
	flex: 1 1 auto;
	justify-content: center;
}

#aud-header .aud-nav__list {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#aud-header .aud-nav__item {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

#aud-header .aud-nav__link {
	display: block;
	padding: 10px 14px;
	color: var(--aud-navy);
	font-size: 15.5px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
	transition: color .15s ease;
}

#aud-header .has-sub .aud-nav__link {
	padding-right: 4px;
}

#aud-header .aud-nav__link:hover,
#aud-header .aud-nav__item.is-active > .aud-nav__link {
	color: var(--aud-green);
}

#aud-header .aud-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: 0 6px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--aud-navy);
	cursor: pointer;
}

#aud-header .aud-nav__toggle svg {
	transition: transform .2s ease;
}

/* Base button styles (from base.css) must not touch the header icon buttons. */
#aud-header button,
#aud-header button:hover,
#aud-header button:focus,
#aud-header button:active {
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--aud-navy);
	transform: none;
}

#aud-header button:focus-visible,
#aud-header a:focus-visible {
	outline: 2px solid var(--aud-green);
	outline-offset: 2px;
}

/* Products dropdown */
#aud-header .aud-sub {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 250px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--aud-line);
	border-radius: 8px;
	box-shadow: 0 12px 30px rgba(6, 36, 62, .10);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

#aud-header .aud-sub li {
	margin: 0;
	padding: 0;
	list-style: none;
}

#aud-header .aud-sub a {
	display: block;
	padding: 10px 14px;
	border-radius: 6px;
	color: var(--aud-navy);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

#aud-header .aud-sub a:hover,
#aud-header .aud-sub .is-active a {
	background: #f1f7f3;
	color: var(--aud-green);
}

@media (min-width: 1025px) {
	#aud-header .has-sub:hover .aud-sub,
	#aud-header .has-sub:focus-within .aud-sub,
	#aud-header .has-sub.is-open .aud-sub {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	#aud-header .has-sub:hover .aud-nav__toggle svg,
	#aud-header .has-sub.is-open .aud-nav__toggle svg {
		transform: rotate(180deg);
	}
}

/* Contact button */
#aud-header .aud-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 26px;
	border-radius: 6px;
	background: var(--aud-green);
	color: #fff;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s ease;
}

#aud-header .aud-btn:hover {
	background: var(--aud-green-dark);
	color: #fff;
}

#aud-header .aud-btn--desktop {
	flex: 0 0 auto;
}

#aud-header .aud-btn--mobile,
#aud-header .aud-burger {
	display: none;
}

/* Smaller laptops */
@media (max-width: 1200px) and (min-width: 1025px) {
	#aud-header .aud-header__inner {
		gap: 24px;
	}

	#aud-header .aud-header__logo img {
		height: 34px;
	}

	#aud-header .aud-nav__link {
		padding: 10px 10px;
		font-size: 15px;
	}
}

/* Tablet + mobile */
@media (max-width: 1024px) {
	#aud-header .aud-header__inner {
		justify-content: space-between;
		height: 76px;
		padding: 0 20px;
	}

	#aud-header .aud-header__logo img {
		height: 32px;
	}

	#aud-header .aud-btn--desktop {
		display: none;
	}

	#aud-header .aud-burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 6px;
		width: 44px;
		height: 44px;
		margin: 0 -8px 0 0;
		padding: 0 10px;
		border: 0 !important;
		border-radius: 0;
		background: transparent !important;
		box-shadow: none !important;
		cursor: pointer;
	}

	#aud-header .aud-burger span {
		display: block;
		width: 24px;
		height: 2px;
		border-radius: 2px;
		background: var(--aud-navy);
		transition: transform .2s ease, opacity .2s ease;
	}

	#aud-header.is-menu-open .aud-burger span:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	#aud-header.is-menu-open .aud-burger span:nth-child(2) {
		opacity: 0;
	}

	#aud-header.is-menu-open .aud-burger span:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	#aud-header .aud-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		max-height: calc(100vh - 76px);
		padding: 8px 20px 24px;
		overflow-y: auto;
		background: #fff;
		border-top: 1px solid var(--aud-line);
		border-bottom: 1px solid var(--aud-line);
		box-shadow: 0 16px 30px rgba(6, 36, 62, .08);
	}

	#aud-header.is-menu-open .aud-nav {
		display: flex;
	}

	#aud-header .aud-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	#aud-header .aud-nav__item {
		flex-wrap: wrap;
		justify-content: space-between;
		border-bottom: 1px solid var(--aud-line);
	}

	#aud-header .aud-nav__link,
	#aud-header .has-sub .aud-nav__link {
		flex: 1 1 auto;
		padding: 16px 0;
		font-size: 16px;
	}

	#aud-header .aud-nav__toggle {
		width: 44px;
		height: 44px;
		margin: 0 -10px 0 0;
	}

	#aud-header .has-sub.is-open .aud-nav__toggle svg {
		transform: rotate(180deg);
	}

	#aud-header .aud-sub {
		position: static;
		display: none;
		flex-basis: 100%;
		min-width: 0;
		margin: 0 0 12px;
		padding: 0 0 0 12px;
		border: 0;
		border-left: 2px solid var(--aud-line);
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	#aud-header .has-sub.is-open .aud-sub {
		display: block;
	}

	#aud-header .aud-sub a {
		padding: 10px 12px;
	}

	#aud-header .aud-btn--mobile {
		display: flex;
		width: 100%;
		margin-top: 20px;
		padding: 15px 20px;
	}
}

@media (max-width: 480px) {
	#aud-header .aud-header__inner {
		height: 70px;
		padding: 0 16px;
	}

	#aud-header .aud-header__logo img {
		height: 28px;
	}

	#aud-header .aud-nav {
		max-height: calc(100vh - 70px);
		padding: 4px 16px 20px;
	}
}
