/* Sticky Theme Builder header — see includes/ui.php. */
header.elementor-location-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

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

@media screen and (max-width: 600px) {
	/* The admin bar itself scrolls away at this width. */
	.admin-bar header.elementor-location-header {
		top: 0;
	}
}

/* Menu row of Header v2 (element 10453d7, transparent over the Home hero) gets a solid
   background once scrolled. Element id survives staging ⇄ local imports. */
header.elementor-location-header .elementor-element-10453d7 {
	transition: background-color .25s ease, box-shadow .25s ease, padding .25s ease;
}

/* Scrolled: solid background + tighter vertical padding (Elementor sets it via --padding-*:
   24px desktop / 14px mobile). */
body.nm-scrolled header.elementor-location-header .elementor-element-10453d7 {
	--padding-top: 12px;
	--padding-bottom: 12px;
	background-color: #FFFCF4;
	box-shadow: 0 6px 16px rgba(17, 17, 17, .08);
}

@media (max-width: 767px) {
	body.nm-scrolled header.elementor-location-header .elementor-element-10453d7 {
		--padding-top: 8px;
		--padding-bottom: 8px;
	}
}

/*
 * Header on the page grid (rows padded with --nm-gutter, see .claude/elementor-kit/
 * bugherd-header-footer-grid.php) is narrower than the old 1390px box, so the mega menu
 * pill would wrap onto two lines. The nav group (12f6d91) takes the space left between the
 * logo and Quick Exit instead of a fixed 61%, and the menu items (mega menu 194a7d2) scale
 * with the viewport: desktop 18px / 12px padding at ≥1512px → 16px / 8px at 1367px;
 * laptop 16px / 6px at 1366px → 14px / 4px at 1025px.
 */
@media (min-width: 1025px) {
	header.elementor-location-header .elementor-element-12f6d91 {
		flex: 1 1 auto !important;
		width: auto !important;
		min-width: 0;
	}
}

@media (min-width: 1367px) {
	header.elementor-location-header .elementor-element-194a7d2 .e-n-menu-title-text {
		font-size: clamp(16px, calc(16px + (100vw - 1367px) * .0138), 18px) !important;
	}
	header.elementor-location-header .elementor-element-194a7d2 .e-n-menu-title {
		padding-inline: clamp(8px, calc(8px + (100vw - 1367px) * .0276), 12px) !important;
	}
}

@media (min-width: 1025px) and (max-width: 1366px) {
	header.elementor-location-header .elementor-element-194a7d2 .e-n-menu-title-text {
		font-size: clamp(14px, calc(14px + (100vw - 1025px) * .00587), 16px) !important;
	}
	header.elementor-location-header .elementor-element-194a7d2 .e-n-menu-title {
		padding-inline: clamp(4px, calc(4px + (100vw - 1025px) * .00587), 6px) !important;
	}
}

/* 1367–1511px: logo and Quick Exit grow from their laptop size (170 / 150px) to the desktop one
   (210 / 207px at 1512px) so the menu pill keeps one line on the narrower desktop widths. */
@media (min-width: 1367px) and (max-width: 1511px) {
	header.elementor-location-header .elementor-element-626a7dc img {
		width: calc(170px + (100vw - 1367px) * .2759) !important;
	}
	header.elementor-location-header .elementor-element-626a7dc {
		--container-widget-width: auto;
		width: auto !important;
	}
	header.elementor-location-header .elementor-element-07ffb9c {
		--container-widget-width: calc(150px + (100vw - 1367px) * .3931) !important;
		width: calc(150px + (100vw - 1367px) * .3931) !important;
		max-width: calc(150px + (100vw - 1367px) * .3931) !important;
	}
	header.elementor-location-header .elementor-element-07ffb9c .elementor-button {
		width: 100% !important;
		padding-inline: 12px !important;
		justify-content: center;
	}
}
