/**
 * advent.studio — smart overlay header.
 *
 * Applies to any Elementor header container carrying `adv-header--smart`;
 * smart-header.js adds the state classes. See src/Design/Smart_Header.php.
 *
 *   adv-smart--logo-filter  overlay state, no light logo: whiten the logo
 *   adv-smart--scrolled     past the hero: white bar, kit ink, shadow
 *   adv-smart--fixed        pinned to the top at the width it had
 *
 * Elementor prints each widget's colours with high-specificity selectors
 * (`.elementor-123 .elementor-element.elementor-element-abc ...`), so the
 * scrolled overrides are !important: they are a state, not a style.
 */

.adv-header--smart {
	--adv-smart-bg-default: var(--adv-surface, var(--e-global-color-alps_white, #fff));
	--adv-smart-ink-default: var(--e-global-color-text, #3a3a3a);
	--adv-smart-hover-default: var(--e-global-color-primary, var(--e-global-color-alps_bright_blue, #0f6eb5));
	transition: background-color 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

.adv-header--smart :is(.elementor-widget-theme-site-logo, .elementor-widget-site-logo, .elementor-widget-adv-site-logo, .adv-site-logo) img {
	transition: filter 0.2s ease;
}

/* Overlay state without a light logo image: render the logo white. */
.adv-header--smart.adv-smart--logo-filter :is(.elementor-widget-theme-site-logo, .elementor-widget-site-logo, .elementor-widget-adv-site-logo, .adv-site-logo) img {
	filter: brightness(0) invert(1);
}

/* Scrolled: solid bar. `background` (not -color) also drops the overlay's
   gradient image. */
.adv-header--smart.adv-smart--scrolled {
	background: var(--adv-smart-bg, var(--adv-smart-bg-default)) !important;
	box-shadow: 0 2px 14px var(--adv-shadow, rgba(0, 0, 0, 0.12));
	padding-top: var(--adv-smart-pt, var(--padding-top)) !important;
	padding-bottom: var(--adv-smart-pb, var(--padding-bottom)) !important;
}

.adv-header--smart.adv-smart--scrolled :is(a, .elementor-item, .elementor-heading-title, .elementor-icon, .elementor-icon-list-text, .elementor-icon-list-icon, .elementor-search-form__toggle, .elementor-search-form__toggle i, .adv-site-logo__text, .elementor-menu-toggle):not(.elementor-button, .adv-visit-btn) {
	color: var(--adv-smart-ink, var(--adv-smart-ink-default)) !important;
}

/* The mobile menu toggle too: a template that paints it white for the hero kept it white on the white bar. */
.adv-header--smart.adv-smart--scrolled :is(.elementor-icon, .elementor-icon-list-icon, .elementor-search-form__toggle, .elementor-nav-menu--main, .elementor-menu-toggle) svg {
	fill: currentColor !important;
}

.adv-header--smart.adv-smart--scrolled .elementor-search-form__toggle {
	--e-search-form-toggle-color: var(--adv-smart-ink, var(--adv-smart-ink-default));
}

.adv-header--smart.adv-smart--scrolled :is(a, .elementor-item):not(.elementor-button, .adv-visit-btn):is(:hover, :focus-visible),
.adv-header--smart.adv-smart--scrolled .elementor-item:is(.elementor-item-active, .highlighted) {
	color: var(--adv-smart-hover-default) !important;
}

.adv-header--smart.adv-smart--scrolled .elementor-nav-menu--main .elementor-item::before,
.adv-header--smart.adv-smart--scrolled .elementor-nav-menu--main .elementor-item::after {
	background-color: var(--adv-smart-hover-default) !important;
}

/* Pinned. Left and width come from the header's slot in the page (the 6/7
   content column on ALPS), so the sabbath column and its fixed logo
   (z-index 9999) stay clear; top clears the admin bar when it is fixed. */
.adv-header--smart.adv-smart--fixed {
	position: fixed !important;
	top: var(--adv-smart-top, 0px) !important;
	left: var(--adv-smart-left, 0px) !important;
	right: auto !important;
	width: var(--adv-smart-width, 100%) !important;
	max-width: var(--adv-smart-width, 100%) !important;
	margin: 0 !important;
	z-index: 3 !important;
	animation: adv-smart-in 0.2s ease-out;
}

@keyframes adv-smart-in {
	from {
		transform: translateY(-100%);
	}

	to {
		transform: none;
	}
}

.adv-smart-spacer {
	display: block;
	width: 100%;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.adv-header--smart,
	.adv-header--smart :is(.elementor-widget-theme-site-logo, .elementor-widget-site-logo, .elementor-widget-adv-site-logo, .adv-site-logo) img {
		transition: none !important;
		animation: none !important;
	}
}
