/**
 * Global header / footer — overlay on hero; sticky only when enabled.
 */

body.jp-global-hf-on .elementor-widget-jp-header,
body.jp-global-hf-on .elementor-widget-jp-footer,
body.jp-global-hf-on .elementor-element.elementor-widget-jp-header,
body.jp-global-hf-on .elementor-element.elementor-widget-jp-footer {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	visibility: hidden !important;
}

/*
 * Shared shell when header overlays page content (sticky OR static-on-hero):
 * zero flow height so the hero starts at the top of the viewport.
 */
body.jp-global-hf-sticky #jp-global-header,
body.jp-global-hf-static:has(.jp-home-hero) #jp-global-header {
	position: relative;
	z-index: 1000;
	width: 100%;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	pointer-events: none;
	border: 0 !important;
}

/* Sticky ON — stays fixed while scrolling; flush to viewport top (admin bar offset only). */
body.jp-global-hf-sticky #jp-global-header > .jp-header {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 1000 !important;
	margin: 0 !important;
	/* Keep side centering on wide screens; do not zero padding-inline. */
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: max(16px, calc((100% - var(--jp-shell-max, 1440px)) / 2)) !important;
	padding-right: max(16px, calc((100% - var(--jp-shell-max, 1440px)) / 2)) !important;
	pointer-events: auto;
	opacity: 1 !important;
	visibility: visible !important;
	color: #1d1a15 !important;
}

/* Logged-in desktop: sit flush under WP admin bar — use WP’s height only (no double offset). */
body.admin-bar.jp-global-hf-sticky #jp-global-header > .jp-header {
	top: var(--wp-admin--admin-bar--height, 32px) !important;
}

/* Narrow viewports: WP admin bar is absolute — keep header at viewport top */
@media screen and (max-width: 782px) {
	body.admin-bar.jp-global-hf-sticky #jp-global-header > .jp-header,
	body.admin-bar.jp-global-hf-static:has(.jp-home-hero) #jp-global-header > .jp-header {
		top: 0 !important;
	}
}

/*
 * Sticky OFF + home hero — absolute over hero (sits on top),
 * but scrolls away with the page (not fixed).
 * top:0 — wrapper is already below the admin-bar body margin (do not double-offset).
 */
body.jp-global-hf-static:has(.jp-home-hero) #jp-global-header > .jp-header {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 1000 !important;
	margin: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: max(16px, calc((100% - var(--jp-shell-max, 1440px)) / 2)) !important;
	padding-right: max(16px, calc((100% - var(--jp-shell-max, 1440px)) / 2)) !important;
	pointer-events: auto;
	opacity: 1 !important;
	visibility: visible !important;
	color: #1d1a15 !important;
}

body.admin-bar.jp-global-hf-static:has(.jp-home-hero) #jp-global-header > .jp-header {
	top: 0 !important;
}

@media screen and (max-width: 782px) {
	body.admin-bar .jp-header {
		--jp-header-offset-top: 0px;
	}
}

body.jp-global-hf-sticky .elementor-location-single,
body.jp-global-hf-sticky .elementor,
body.jp-global-hf-sticky .jp-main,
body.jp-global-hf-static:has(.jp-home-hero) .elementor,
body.jp-global-hf-static:has(.jp-home-hero) .jp-main {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.jp-global-hf-sticky .elementor > .elementor-element:first-child,
body.jp-global-hf-static:has(.jp-home-hero) .elementor > .elementor-element:first-child {
	margin-top: 0 !important;
}

/* Sticky OFF, no hero — normal in-flow header */
body.jp-global-hf-static:not(:has(.jp-home-hero)) #jp-global-header {
	position: relative;
	z-index: 1000;
	width: 100%;
	height: auto !important;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: visible;
	pointer-events: auto;
}

body.jp-global-hf-static:not(:has(.jp-home-hero)) #jp-global-header > .jp-header {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	width: 100% !important;
	margin: 0 !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: max(16px, calc((100% - var(--jp-shell-max, 1440px)) / 2)) !important;
	padding-right: max(16px, calc((100% - var(--jp-shell-max, 1440px)) / 2)) !important;
}

/* Mobile/tablet — full-bleed bar; inner pad uses --jp-shell-pad-x */
@media (max-width: 1100px) {
	body.jp-global-hf-sticky #jp-global-header > .jp-header,
	body.jp-global-hf-static:has(.jp-home-hero) #jp-global-header > .jp-header,
	body.jp-global-hf-static:not(:has(.jp-home-hero)) #jp-global-header > .jp-header {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* Transparent bar over hero (sticky or not) so gradient shows underneath */
body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled):not(.is-dropdown-open):not(.is-nav-open) .jp-header__bar::before {
	opacity: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled):not(.is-dropdown-open):not(.is-nav-open) .jp-header__bar {
	background: transparent !important;
	box-shadow: none !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	opacity: 1 !important;
	color: #1d1a15 !important;
}

body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled) .jp-header__logo,
body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled) .jp-header__logo-text,
body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled) .jp-header__link,
body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled) .jp-header__toggle,
body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled) .jp-header__chev {
	color: #1d1a15 !important;
}

body.jp-global-hf-on:has(.jp-home-hero) .jp-header:not(.is-scrolled) .jp-header__logo-img {
	filter: none;
}

/*
 * Sticky OFF on hero: never treat as scrolled-solid (would look sticky).
 * Keep transparent look; header just scrolls off with the page.
 */
body.jp-global-hf-static:has(.jp-home-hero) .jp-header .jp-header__bar::before {
	opacity: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.jp-global-hf-static:has(.jp-home-hero) .jp-header .jp-header__bar {
	background: transparent !important;
	box-shadow: none !important;
}

/* Stub styles removed — full footer in assets/css/sections/footer.css */
