/* Transparent Astra Header Builder states */
#masthead.site-header {
	--la-header-light: #ffffff;
	--la-header-dark: #54595f;
	--la-header-accent: #ee8020;
	--la-header-button-dark: #1f2937;
	--la-header-bg: rgba(255, 255, 255, 0.98);
}

#masthead.site-header,
body:not(.la-header-scrolled) #masthead.site-header :is(
	.main-header-bar,
	.ast-main-header-wrap,
	.main-header-bar-wrap,
	.ast-primary-header-bar,
	.site-primary-header-wrap,
	.ast-builder-grid-row-container
) {
	background: transparent !important;
	border: 0 !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
	transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Base transparent state: white header controls. */
#masthead.site-header :is(
	.main-header-menu > .menu-item > .menu-link,
	.main-header-menu > .menu-item > a,
	.main-header-menu > .menu-item > .menu-link .menu-text,
	.main-header-menu > .menu-item > a .menu-text,
	.site-title a,
	.site-branding a,
	.menu_input_search,
	.menu_input_search a,
	.ast-menu-toggle,
	.sub-arrow,
	.dropdown-menu-toggle,
	.ast-header-navigation-arrow,
	.ast-header-navigation-arrow .ast-icon,
	.ast-header-navigation-arrow svg,
	.ast-icon,
	.ast-masthead-custom-menu-items .ast-custom-button-link,
	.ast-masthead-custom-menu-items .ast-button,
	.ast-header-button-1 .ast-custom-button-link,
	.ast-header-button-1 .ast-custom-button
) {
	color: var(--la-header-light) !important;
	fill: var(--la-header-light) !important;
	stroke: var(--la-header-light) !important;
	transition: color 0.25s ease, fill 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

body:not(.la-header-scrolled) #masthead.site-header .ast-header-navigation-arrow .ast-icon::before {
	color: var(--la-header-light) !important;
}

/* Scrolled and transparent-hover states share the white header background. */
body.la-header-scrolled #masthead.site-header,
body.la-header-scrolled #masthead.site-header :is(
	.main-header-bar,
	.ast-main-header-wrap,
	.main-header-bar-wrap,
	.ast-primary-header-bar,
	.site-primary-header-wrap,
	.ast-builder-grid-row-container
),
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within),
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) :is(
	.main-header-bar,
	.ast-main-header-wrap,
	.main-header-bar-wrap,
	.ast-primary-header-bar,
	.site-primary-header-wrap,
	.ast-builder-grid-row-container
) {
	background: var(--la-header-bg) !important;
	border: 0 !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

/* Dark controls on white header: after scroll or while the transparent header is hovered/focused. */
body.la-header-scrolled #masthead.site-header :is(
	.main-header-menu > .menu-item > .menu-link,
	.main-header-menu > .menu-item > a,
	.main-header-menu > .menu-item > .menu-link .menu-text,
	.main-header-menu > .menu-item > a .menu-text,
	.site-title a,
	.site-branding a,
	.menu_input_search,
	.menu_input_search a,
	.ast-menu-toggle,
	.sub-arrow,
	.dropdown-menu-toggle,
	.ast-header-navigation-arrow,
	.ast-header-navigation-arrow .ast-icon,
	.ast-header-navigation-arrow svg,
	.ast-icon,
	.ast-masthead-custom-menu-items .ast-custom-button-link,
	.ast-masthead-custom-menu-items .ast-button
),
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) :is(
	.main-header-menu > .menu-item > .menu-link,
	.main-header-menu > .menu-item > a,
	.main-header-menu > .menu-item > .menu-link .menu-text,
	.main-header-menu > .menu-item > a .menu-text,
	.site-title a,
	.site-branding a,
	.menu_input_search,
	.menu_input_search a,
	.ast-menu-toggle,
	.sub-arrow,
	.dropdown-menu-toggle,
	.ast-header-navigation-arrow,
	.ast-header-navigation-arrow .ast-icon,
	.ast-header-navigation-arrow svg,
	.ast-icon,
	.ast-masthead-custom-menu-items .ast-custom-button-link,
	.ast-masthead-custom-menu-items .ast-button
) {
	color: var(--la-header-dark) !important;
	fill: var(--la-header-dark) !important;
	stroke: var(--la-header-dark) !important;
}

body.la-header-scrolled #masthead.site-header .ast-header-navigation-arrow .ast-icon::before,
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .ast-header-navigation-arrow .ast-icon::before {
	color: var(--la-header-dark) !important;
}

#masthead.site-header #ast-mobile-header .ast-builder-menu-3 :is(
	.main-header-menu,
	.main-navigation,
	.main-header-bar-navigation,
	.trp-language-switcher-container,
	.trp-language-switcher-container > .menu-link,
	.trp-menu-ls-label
) {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

body:not(.la-header-scrolled) #masthead.site-header:not(:hover):not(:focus-within) .main-header-menu-toggle,
body:not(.la-header-scrolled) #masthead.site-header:not(:hover):not(:focus-within) .main-header-menu-toggle :is(
	.mobile-menu-toggle-icon,
	.ahfb-svg-iconset,
	.ast-mobile-svg,
	.ast-mobile-svg path
) {
	color: var(--la-header-light) !important;
	fill: var(--la-header-light) !important;
	stroke: var(--la-header-light) !important;
}

body.la-header-scrolled #masthead.site-header .main-header-menu-toggle,
body.la-header-scrolled #masthead.site-header .main-header-menu-toggle :is(
	.mobile-menu-toggle-icon,
	.ahfb-svg-iconset,
	.ast-mobile-svg,
	.ast-mobile-svg path
),
#masthead.site-header .ast-header-sticked .main-header-menu-toggle,
#masthead.site-header .ast-header-sticked .main-header-menu-toggle :is(
	.mobile-menu-toggle-icon,
	.ahfb-svg-iconset,
	.ast-mobile-svg,
	.ast-mobile-svg path
),
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .main-header-menu-toggle,
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .main-header-menu-toggle :is(
	.mobile-menu-toggle-icon,
	.ahfb-svg-iconset,
	.ast-mobile-svg,
	.ast-mobile-svg path
) {
	color: var(--la-header-dark) !important;
	fill: var(--la-header-dark) !important;
	stroke: var(--la-header-dark) !important;
}

body.la-header-scrolled #masthead.site-header :is(
	.ast-header-button-1 .ast-custom-button-link,
	.ast-header-button-1 .ast-custom-button
),
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) :is(
	.ast-header-button-1 .ast-custom-button-link,
	.ast-header-button-1 .ast-custom-button
) {
	color: var(--la-header-button-dark) !important;
	fill: var(--la-header-button-dark) !important;
}

body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button,
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .ast-header-button-1 .ast-custom-button {
	background: transparent !important;
	border-color: currentColor !important;
	color: var(--la-header-button-dark) !important;
	fill: var(--la-header-button-dark) !important;
}

/* Menu item hover color, including Astra's generated dropdown arrows. */
#masthead.site-header .main-header-menu > .menu-item > :is(.menu-link, a):is(:hover, :focus),
#masthead.site-header .main-header-menu > .menu-item > :is(.menu-link, a):is(:hover, :focus) :is(
	.menu-text,
	.sub-arrow,
	.dropdown-menu-toggle,
	.ast-header-navigation-arrow,
	.ast-header-navigation-arrow .ast-icon,
	.ast-header-navigation-arrow svg,
	.ast-icon,
	svg
) {
	color: var(--la-header-accent) !important;
	fill: var(--la-header-accent) !important;
	stroke: var(--la-header-accent) !important;
}

#masthead.site-header .main-header-menu > .menu-item > :is(.menu-link, a):is(:hover, :focus) .ast-header-navigation-arrow .ast-icon::before {
	color: var(--la-header-accent) !important;
}

#masthead.site-header :is(
	.ast-masthead-custom-menu-items .ast-custom-button-link,
	.ast-header-button-1 .ast-custom-button-link
):is(:hover, :focus),
#masthead.site-header :is(
	.ast-masthead-custom-menu-items .ast-custom-button-link,
	.ast-header-button-1 .ast-custom-button-link
):is(:hover, :focus) :is(.ast-button, .ast-custom-button) {
	background: #f06623 !important;
	border-color: #f06623 !important;
	color: var(--la-header-light) !important;
	fill: var(--la-header-light) !important;
}

/* Submenu / mega menu */
#masthead.site-header :is(.astra-full-megamenu-wrapper, .astra-megamenu),
body.la-header-scrolled #masthead.site-header :is(.sub-menu, .astra-megamenu) {
	background: #ffffff !important;
	border-top: 0 !important;
	box-shadow: rgba(0, 0, 0, 0.2) 0px 60px 40px -7px !important;
}

body.la-header-scrolled #masthead.site-header :is(
	.sub-menu .menu-link,
	.astra-megamenu .menu-link,
	.astra-megamenu .elementor-heading-title,
	.astra-megamenu .elementor-widget-text-editor,
	.astra-megamenu .elementor-widget-text-editor p
) {
	color: #1f2937 !important;
}

@media (min-width: 769px) {
	/* Pull dropdowns closer to the top menu to remove the hover gap. */
	#masthead.site-header .main-header-menu > .menu-item-has-children:is(:hover, :focus-within) > :is(.sub-menu, .astra-full-megamenu-wrapper) {
		margin-top: -2px !important;
	}

	/* Sticky header needs the same correction without overlapping the header. */
	#masthead.site-header .ast-header-sticked .main-header-menu > .menu-item-has-children:is(:hover, :focus-within) > :is(.sub-menu, .astra-full-megamenu-wrapper) {
		margin-top: 0 !important;
	}

	#masthead.site-header .main-header-menu > .menu-item-has-children > :is(.sub-menu, .astra-full-megamenu-wrapper) {
		box-shadow: rgba(0, 0, 0, 0.2) 0px 60px 40px -7px !important;
		opacity: 0;
		transform: translateY(8px) scale(0.985);
		transform-origin: top center;
		visibility: hidden;
		pointer-events: none;
		will-change: opacity, transform;
		transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.28s, box-shadow 0.28s ease;
	}

	#masthead.site-header .main-header-menu > .menu-item-has-children:is(:hover, :focus-within) > :is(.sub-menu, .astra-full-megamenu-wrapper) {
		opacity: 1;
		transform: translateY(0) scale(1);
		visibility: visible;
		pointer-events: auto;
		transition-delay: 0s;
	}
}

/* High-specificity final overrides for Astra menu hover arrows and CTA. */
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .main-header-menu > .menu-item > :is(.menu-link, a):is(:hover, :focus),
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .main-header-menu > .menu-item > :is(.menu-link, a):is(:hover, :focus) :is(
	.menu-text,
	.sub-arrow,
	.dropdown-menu-toggle,
	.ast-header-navigation-arrow,
	.ast-header-navigation-arrow .ast-icon,
	.ast-header-navigation-arrow .ast-icon::before,
	.ast-header-navigation-arrow svg,
	.ast-icon,
	svg
),
body.la-header-scrolled #masthead.site-header .main-header-menu > .menu-item > :is(.menu-link, a):is(:hover, :focus),
body.la-header-scrolled #masthead.site-header .main-header-menu > .menu-item > :is(.menu-link, a):is(:hover, :focus) :is(
	.menu-text,
	.sub-arrow,
	.dropdown-menu-toggle,
	.ast-header-navigation-arrow,
	.ast-header-navigation-arrow .ast-icon,
	.ast-header-navigation-arrow .ast-icon::before,
	.ast-header-navigation-arrow svg,
	.ast-icon,
	svg
) {
	color: var(--la-header-accent) !important;
	fill: var(--la-header-accent) !important;
	stroke: var(--la-header-accent) !important;
}

#masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus),
#masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus) .ast-custom-button {
	background: #f06623 !important;
	border-color: #f06623 !important;
	color: var(--la-header-light) !important;
	fill: var(--la-header-light) !important;
}

/* Final CTA guard: keep the Header Builder button visible in hover and sticky states. */
body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button-link,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button-link,
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .ast-header-button-1 .ast-custom-button-link {
	background: transparent !important;
	color: var(--la-header-button-dark) !important;
	fill: var(--la-header-button-dark) !important;
}

body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button,
body:not(.la-search-open):not(.la-header-scrolled) #masthead.site-header:is(:hover, :focus-within) .ast-header-button-1 .ast-custom-button {
	background: transparent !important;
	border: 2px solid currentColor !important;
	border-color: var(--la-header-button-dark) !important;
	color: var(--la-header-button-dark) !important;
	fill: var(--la-header-button-dark) !important;
}

body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button *,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button * {
	color: var(--la-header-button-dark) !important;
	fill: var(--la-header-button-dark) !important;
}

body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button-link,
body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button-link .ast-custom-button,
body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button-link .ast-custom-button *,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button-link,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button-link .ast-custom-button,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button-link .ast-custom-button * {
	color: var(--la-header-button-dark) !important;
	-webkit-text-fill-color: var(--la-header-button-dark) !important;
	text-shadow: none !important;
	opacity: 1 !important;
	visibility: visible !important;
}

body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus),
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus),
body:not(.la-header-scrolled) #masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus),
body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus) .ast-custom-button,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus) .ast-custom-button,
body:not(.la-header-scrolled) #masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus) .ast-custom-button,
body.la-header-scrolled #masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus) .ast-custom-button *,
#masthead.site-header .ast-header-sticked .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus) .ast-custom-button *,
body:not(.la-header-scrolled) #masthead.site-header .ast-header-button-1 .ast-custom-button-link:is(:hover, :focus) .ast-custom-button * {
	background: #f06623 !important;
	border-color: #f06623 !important;
	color: var(--la-header-light) !important;
	-webkit-text-fill-color: var(--la-header-light) !important;
	fill: var(--la-header-light) !important;
}
