/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	width: 100%;
	border-top: 7px solid #dedede;
	border-right: 7px solid #dedede;
	border-left: 7px solid #dedede;
	background: #ffffff;
	box-shadow: 0 0 0 rgb(0 0 0 / 0%);
	transition:
		border-width 300ms ease,
		box-shadow 300ms ease,
		background-color 300ms ease;
}

/*
 * Compact header after scrolling.
 */
.site-header.is-scrolled {
	border-top-width: 3px;
	border-right-width: 3px;
	border-left-width: 3px;
	box-shadow: 0 7px 24px rgb(0 0 0 / 10%);
}

.site-header__container {
	display: grid;
	grid-template-columns: 250px 1fr auto;
	align-items: center;
	width: min(calc(100% - 80px), 1760px);
	min-height: 106px;
	margin-inline: auto;
	gap: 40px;
	transition:
		min-height 350ms cubic-bezier(0.22, 1, 0.36, 1),
		width 300ms ease,
		gap 300ms ease;
}

.site-header.is-scrolled
.site-header__container {
	min-height: 78px;
}

/* Logo */

.site-header__logo {
	display: flex;
	align-items: center;
	width: 165px;
	min-width: 165px;
	transition:
		width 350ms cubic-bezier(0.22, 1, 0.36, 1),
		min-width 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header__logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
	width: 100%;
}

.site-header__logo .custom-logo {
	display: block;
	width: 165px;
	height: auto;
	max-height: 78px;
	object-fit: contain;
	transform-origin: left center;
	transition:
		width 350ms cubic-bezier(0.22, 1, 0.36, 1),
		max-height 350ms cubic-bezier(0.22, 1, 0.36, 1),
		transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header.is-scrolled
.site-header__logo {
	width: 135px;
	min-width: 135px;
}

.site-header.is-scrolled
.site-header__logo .custom-logo {
	width: 135px;
	max-height: 60px;
}

.site-header__site-name {
	color: #222a62;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

/* Navigation */

.site-header__navigation {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.site-header__menu {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header__menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

.site-header__menu > li:not(:last-child)::after {
	content: "|";
	display: inline-block;
	margin: 0 13px;
	color: #5b5b5b;
	font-size: 21px;
	font-weight: 300;
	line-height: 1;
}

.site-header__menu a {
	color: #555555;
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	transition:
		color 200ms ease,
		font-size 300ms ease;
}

.site-header.is-scrolled
.site-header__menu a {
	font-size: 18px;
}

.site-header__menu a:hover,
.site-header__menu .current-menu-item > a,
.site-header__menu .current_page_item > a {
	color: #b58f42;
}

/* Header actions */

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 15px;
}

.header-icon-button,
.header-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #464646;
}

.header-icon-button:hover,
.header-menu-toggle:hover {
	color: #b58f42;
}

.header-icon-button:focus-visible,
.header-menu-toggle:focus-visible,
.offcanvas-menu__close:focus-visible {
	outline: 2px solid #b58f42;
	outline-offset: 4px;
}

.header-icon-button svg {
	width: 31px;
	height: 31px;
}

.header-menu-toggle {
    flex-direction: column;
    width: 20px;
    height: 20px;
    gap: 5px;
}

.header-menu-toggle span {
	display: block;
	width: 34px;
	height: 4px;
	border-radius: 4px;
	background: currentColor;
	transform-origin: center;
	transition:
		transform 250ms ease,
		opacity 250ms ease,
		width 250ms ease;
}

.header-menu-toggle.is-active span:nth-child(1) {
	transform: translateY(11px) rotate(45deg);
}

.header-menu-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.header-menu-toggle.is-active span:nth-child(3) {
	transform: translateY(-11px) rotate(-45deg);
}

/* ==========================================================================
   Search
   ========================================================================== */

.header-search {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 20;
	border-top: 1px solid #eeeeee;
	background: #ffffff;
	box-shadow: 0 10px 22px rgb(0 0 0 / 10%);
}

.header-search[hidden] {
	display: none;
}

.header-search .site-header__container {
	display: block;
	min-height: auto;
	padding-block: 20px;
}

.site-header.is-scrolled
.header-search .site-header__container {
	min-height: auto;
}

.header-search .search-form {
	display: flex;
	width: min(100%, 750px);
	margin-left: auto;
}

.header-search .search-field {
	width: 100%;
	min-height: 48px;
	padding: 11px 15px;
	border: 1px solid #d4d4d4;
	border-right: 0;
	border-radius: 0;
	outline: 0;
}

.header-search .search-field:focus {
	border-color: #b58f42;
}

.header-search .search-submit {
	min-width: 120px;
	padding-inline: 18px;
	border: 1px solid #b58f42;
	border-radius: 0;
	background: #b58f42;
	color: #ffffff;
	font-weight: 500;
}

/* ==========================================================================
   Off-canvas overlay
   ========================================================================== */

.offcanvas-overlay {
	position: fixed;
	inset: 0;
	z-index: 1190;
	background: rgb(0 0 0 / 35%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 350ms ease,
		visibility 350ms ease;
}

.offcanvas-overlay.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* ==========================================================================
   Off-canvas menu
   ========================================================================== */

.offcanvas-menu {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 1200;
	width: min(100%, 510px);
	height: 100vh;
	height: 100dvh;
	background: #b4914a;
	color: #ffffff;
	transform: translate3d(100%, 0, 0);
	visibility: hidden;
	pointer-events: none;
	transition:
		transform 430ms cubic-bezier(0.22, 1, 0.36, 1),
		visibility 430ms ease;
	will-change: transform;
}

.offcanvas-menu.is-open {
	transform: translate3d(0, 0, 0);
	visibility: visible;
	pointer-events: auto;
}

.offcanvas-menu__inner {
	position: relative;
	height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color:
		rgb(255 255 255 / 28%)
		transparent;
}

.offcanvas-menu__inner::-webkit-scrollbar {
	width: 4px;
}

.offcanvas-menu__inner::-webkit-scrollbar-thumb {
	background: rgb(255 255 255 / 28%);
}

.offcanvas-menu__close {
	position: absolute;
	top: 25px;
	right: 28px;
	z-index: 2;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #ffffff;
}

.offcanvas-menu__close span {
	position: absolute;
	top: 20px;
	left: 6px;
	width: 31px;
	height: 2px;
	background: currentColor;
}

.offcanvas-menu__close span:first-child {
	transform: rotate(45deg);
}

.offcanvas-menu__close span:last-child {
	transform: rotate(-45deg);
}

.offcanvas-menu__content {
	position: relative;
	width: 330px;
	min-height: 515px;
	margin: 58px 0 40px 33px;
	padding-right: 15px;
	border-right: 4px solid
		rgb(255 255 255 / 24%);
}

.offcanvas-menu__content::after {
	content: "";
	position: absolute;
	top: 61px;
	right: -4px;
	width: 4px;
	height: 60px;
	background: rgb(255 255 255 / 20%);
}

.offcanvas-menu__section {
	padding-bottom: 14px;
	border-bottom: 1px solid
		rgb(255 255 255 / 19%);
}

.offcanvas-menu__section +
.offcanvas-menu__section {
	padding-top: 11px;
}

.offcanvas-menu__heading {
	margin: 0 0 4px;
	color: #ffffff;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.25;
}

.offcanvas-menu__sublist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.offcanvas-menu__sublist li {
	margin: 0;
}

.offcanvas-menu__sublist a {
	display: inline-block;
	color: rgb(255 255 255 / 78%);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.28;
	transition:
		color 200ms ease,
		transform 200ms ease;
}

.offcanvas-menu__sublist a:hover {
	color: #ffffff;
	transform: translateX(3px);
}

.offcanvas-menu__main-links {
	display: flex;
	flex-direction: column;
}

.offcanvas-menu__main-links > a {
	display: flex;
	align-items: center;
	min-height: 48px;
	border-bottom: 1px solid
		rgb(255 255 255 / 19%);
	color: #ffffff;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.2;
	transition:
		padding-left 200ms ease,
		color 200ms ease;
}

.offcanvas-menu__main-links > a:hover {
	padding-left: 5px;
	color: #ffffff;
}

/* ==========================================================================
   Stable page locking
   ========================================================================== */

/*
 * The body becomes fixed at its current scroll position.
 * Padding compensates for the removed browser scrollbar.
 */
body.offcanvas-open {
	position: fixed;
	right: 0;
	left: 0;
	width: 100%;
	overflow: hidden;
	padding-right: var(
		--scrollbar-compensation,
		0px
	);
}

/*
 * Fixed and sticky elements also receive compensation so they do not shift.
 */
body.offcanvas-open .site-header {
	padding-right: var(
		--scrollbar-compensation,
		0px
	);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
	.site-header__container {
		grid-template-columns: 210px 1fr auto;
		width: min(calc(100% - 50px), 1760px);
	}

	.site-header__menu a {
		font-size: 17px;
	}

	.site-header.is-scrolled
	.site-header__menu a {
		font-size: 16px;
	}

	.site-header__menu > li:not(:last-child)::after {
		margin-inline: 9px;
	}
}

@media (max-width: 1024px) {
	.site-header {
		border-top-width: 4px;
		border-right-width: 4px;
		border-left-width: 4px;
	}

	.site-header.is-scrolled {
		border-top-width: 2px;
		border-right-width: 2px;
		border-left-width: 2px;
	}

	.site-header__container {
		grid-template-columns: 1fr auto;
		width: calc(100% - 34px);
		min-height: 82px;
		gap: 20px;
	}

	.site-header.is-scrolled
	.site-header__container {
		min-height: 66px;
	}

	.site-header__navigation {
		display: none;
	}

	.site-header__logo {
		width: 140px;
		min-width: 140px;
	}

	.site-header__logo .custom-logo {
		width: 140px;
		max-height: 65px;
	}

	.site-header.is-scrolled
	.site-header__logo {
		width: 118px;
		min-width: 118px;
	}

	.site-header.is-scrolled
	.site-header__logo .custom-logo {
		width: 118px;
		max-height: 52px;
	}
}

@media (max-width: 600px) {
	.site-header__container {
		width: calc(100% - 24px);
		min-height: 72px;
	}

	.site-header.is-scrolled
	.site-header__container {
		min-height: 60px;
	}

	.site-header__logo {
		width: 125px;
		min-width: 125px;
	}

	.site-header__logo .custom-logo {
		width: 125px;
		max-width: none;
	}

	.site-header.is-scrolled
	.site-header__logo {
		width: 105px;
		min-width: 105px;
	}

	.site-header.is-scrolled
	.site-header__logo .custom-logo {
		width: 105px;
		max-height: 46px;
	}

	.site-header__actions {
		gap: 9px;
	}

	.header-icon-button {
		width: 30px;
		height: 30px;
	}

	.header-icon-button svg {
		width: 27px;
		height: 27px;
	}

	.header-menu-toggle {
		width: 34px;
	}

	.header-menu-toggle span {
		width: 31px;
		height: 3px;
	}

	.header-menu-toggle.is-active
	span:nth-child(1) {
		transform:
			translateY(10px)
			rotate(45deg);
	}

	.header-menu-toggle.is-active
	span:nth-child(3) {
		transform:
			translateY(-10px)
			rotate(-45deg);
	}

	.offcanvas-menu {
		width: min(100%, 365px);
	}

	.offcanvas-menu__content {
		width: calc(100% - 67px);
		margin-top: 58px;
		margin-left: 33px;
	}

	.offcanvas-menu__heading,
	.offcanvas-menu__main-links > a {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.site-header__container,
	.site-header__logo,
	.site-header__logo .custom-logo,
	.site-header__menu a,
	.offcanvas-menu,
	.offcanvas-overlay {
		transition-duration: 0.01ms;
	}
}
/* ==========================================================================
   HEADER DROPDOWN ONLY
   Keeps existing main menu styling unchanged
   ========================================================================== */

.site-header__menu .menu-item-has-children {
	position: relative;
}

/* ==========================================================================
   Dropdown arrow
   ========================================================================== */

.site-header__menu
.menu-item-has-children > a {
	position: relative;
	padding-right: 16px;
}

.site-header__menu
.menu-item-has-children > a::after {
	content: "";

	position: absolute;
	top: 50%;
	right: 0;

	width: 7px;
	height: 7px;

	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;

	transform:
		translateY(-65%)
		rotate(45deg);

	transition:
		transform 220ms ease;
}

.site-header__menu
.menu-item-has-children:hover > a::after,
.site-header__menu
.menu-item-has-children:focus-within > a::after {
	transform:
		translateY(-25%)
		rotate(225deg);
}

/* ==========================================================================
   Dropdown box
   ========================================================================== */

.site-header__menu .sub-menu {
	position: absolute;

	top: calc(100% + 8px);

	/*
	 * Important:
	 * Align dropdown from the RIGHT side of parent.
	 * This prevents SERVICES dropdown going outside viewport.
	 */
	right: 0;
	left: auto;

	z-index: 99999;

	width: max-content;
	min-width: 250px;
	max-width: min(360px, calc(100vw - 30px));

	margin: 0;
	padding: 8px 0;

	list-style: none;

	background-color: #ffffff;

	border-top: 3px solid #92ba38;

	box-shadow:
		0 12px 30px rgb(0 0 0 / 14%);

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transform: translateY(10px);

	transition:
		opacity 220ms ease,
		visibility 220ms ease,
		transform 260ms ease;
}

/* ==========================================================================
   Invisible hover bridge
   ========================================================================== */

.site-header__menu .sub-menu::before {
	content: "";

	position: absolute;

	top: -12px;
	right: 0;

	width: 100%;
	height: 12px;
}

/* ==========================================================================
   Show dropdown
   ========================================================================== */

.site-header__menu
.menu-item-has-children:hover > .sub-menu,
.site-header__menu
.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;

	transform: translateY(0);
}

/* ==========================================================================
   Dropdown list item
   ========================================================================== */

.site-header__menu .sub-menu li {
	display: block;

	width: 100%;

	margin: 0;
	padding: 0;
}

/* ==========================================================================
   Dropdown links only
   ========================================================================== */

.site-header__menu .sub-menu a {
	display: block;

	width: 100%;

	padding: 12px 18px;

	color: #333333;
	background-color: #ffffff;

	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;

	text-decoration: none;

	/*
	 * Important:
	 * Long service names wrap instead of leaving viewport.
	 */
	white-space: normal;
	overflow-wrap: break-word;
	word-break: normal;

	box-sizing: border-box;

	transition:
		color 200ms ease,
		background-color 200ms ease,
		padding-left 200ms ease;
}

.site-header__menu .sub-menu a:hover,
.site-header__menu .sub-menu a:focus-visible {
	color: #006738;
	background-color: #f5f8ef;
	padding-left: 23px;
}

/* Current submenu page */

.site-header__menu
.sub-menu
.current-menu-item > a {
	color: #006738;
	background-color: #f5f8ef;
}

/* ==========================================================================
   Make sure dropdown isn't clipped
   ========================================================================== */

.site-header,
.site-header__container,
.site-header__navigation,
.site-header__menu {
	overflow: visible;
}

/* ==========================================================================
   Very wide dropdown labels
   ========================================================================== */

@media (max-width: 1200px) {

	.site-header__menu .sub-menu {
		min-width: 220px;
		max-width: 320px;
	}

	.site-header__menu .sub-menu a {
		font-size: 13px;
	}
}