/**
 * Noble Workshops — Mega Menu
 *
 * Layout model:
 *  - .nw-mega stays exactly as tall as the bar, so opening the panel never
 *    changes the widget's in-flow height (the logo / button beside it stay put).
 *  - .nw-mega__backdrop is the visible white card. It is absolutely positioned
 *    and its height is animated from "bar height" to "bar height + pane height".
 *  - .nw-mega__panel is a clipping window below the bar whose height animates in
 *    lockstep with the backdrop, so the two read as one card growing downward.
 *  - Every pane is rendered once and stacked absolutely inside the panel, which
 *    is what makes switching between items a crossfade instead of a re-render.
 *
 * Values below come from Figma: Noble Workshops Redesign → Navigation →
 * Rectangle 1 (node 2156:3925), a 750×400 card. Elementor controls default to
 * these same numbers; these declarations are the fallback when the widget
 * renders outside Elementor.
 */

.nw-mega {
	/* Brand tokens (Figma variables) */
	--nw-white: #ffffff;
	--nw-cream: #fbf6f2;
	--nw-dark-green: #2f403d;
	--nw-light-green: #4e6863;
	--nw-copper: #c97e61;

	--nw-font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--nw-font-heading: "Marcellus", Georgia, "Times New Roman", serif;

	/* Card geometry: 32 + 302 + 35 + 349 + 32 = 750 */
	--nw-card-width: 750px;
	--nw-media-width: 349px;
	--nw-media-height: 287px;
	--nw-column-gap: 35px;
	--nw-bar-gap: 33px;

	--nw-panel-bg: var(--nw-white);
	--nw-bar-color: var(--nw-white);
	--nw-bar-color-open: var(--nw-dark-green);
	--nw-bar-color-active: var(--nw-light-green);
	--nw-link-color: var(--nw-dark-green);
	--nw-link-color-hover: var(--nw-light-green);

	--nw-duration: 280ms;
	--nw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	position: relative;
	display: flex;
	justify-content: center;
}

.nw-mega *,
.nw-mega *::before,
.nw-mega *::after {
	box-sizing: border-box;
}

/* --- The card ---------------------------------------------------------- */

.nw-mega__backdrop {
	position: absolute;
	top: 0;
	left: 50%;
	z-index: 1;
	width: var(--nw-card-width);
	height: 100%;
	background-color: var(--nw-panel-bg);
	border-radius: 20px;
	opacity: 0;
	transform: translateX(-50%);
	transition:
		height var(--nw-duration) var(--nw-ease),
		opacity var(--nw-duration) var(--nw-ease);
	pointer-events: none;
}

.nw-mega.is-open .nw-mega__backdrop {
	opacity: 1;
}

/* --- Menu bar ---------------------------------------------------------- */

.nw-mega__bar {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: var(--nw-bar-gap);
	width: var(--nw-card-width);
	margin: 0;
	/* 29px top + 24px line box + 29px bottom = 82px, where the panel starts. */
	padding: 29px 32px;
	list-style: none;
}

.nw-mega__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nw-mega__trigger {
	display: inline-block;
	font-family: var(--nw-font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--nw-duration) var(--nw-ease);
}

/*
 * Colour selectors are two classes deep so a theme's `a` / `a:hover` rules
 * cannot win. The values come from custom properties, so the Elementor colour
 * controls (which set the properties on the wrapper) still override everything.
 */
.nw-mega .nw-mega__trigger {
	color: var(--nw-bar-color);
}

/*
 * Dark link colour needs a light surface behind it: either an open card, or the
 * white sticky bar. At the top of the page is-lit alone must NOT darken them —
 * there is nothing behind but the hero, and they would disappear into it.
 */
.nw-mega.is-open .nw-mega__trigger,
.nw-mega--sticky.is-pinned.is-lit .nw-mega__trigger,
.nw-mega--sticky.is-hidden.is-lit .nw-mega__trigger {
	color: var(--nw-bar-color-open);
}

/*
 * Hover is included here, not just .is-active: items without a dropdown never
 * receive that class, and there is an open delay before it lands on ones that do.
 */
.nw-mega .nw-mega__trigger:hover,
.nw-mega .nw-mega__trigger.is-active,
.nw-mega.is-open .nw-mega__trigger:hover,
.nw-mega.is-open .nw-mega__trigger.is-active {
	color: var(--nw-bar-color-active);
}

/*
 * :focus-visible is kept in its own rule on purpose. A browser that does not
 * understand it discards the ENTIRE selector group it appears in — which would
 * silently take the :hover and .is-active colours down with it.
 */
.nw-mega .nw-mega__trigger:focus-visible,
.nw-mega.is-open .nw-mega__trigger:focus-visible {
	color: var(--nw-bar-color-active);
}

/* --- Panel window ------------------------------------------------------ */

.nw-mega__panel {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 2;
	width: var(--nw-card-width);
	height: 0;
	overflow: hidden;
	transform: translateX(-50%);
	transition: height var(--nw-duration) var(--nw-ease);
}

.nw-mega.is-open .nw-mega__panel {
	pointer-events: auto;
}

.nw-mega__pane {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: stretch;
	gap: var(--nw-column-gap);
	width: 100%;
	padding: 0 32px 31px;
	opacity: 0;
	transform: translate3d(var(--nw-enter-x, 0px), var(--nw-enter-y, -8px), 0);
	transition:
		opacity calc(var(--nw-duration) * 0.55) var(--nw-ease),
		transform calc(var(--nw-duration) * 0.55) var(--nw-ease);
	pointer-events: none;
}

.nw-mega__pane.is-active {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	/* Let the outgoing pane clear before this one arrives. */
	transition-delay: calc(var(--nw-duration) * 0.18);
	pointer-events: auto;
}

/* --- Panel content ----------------------------------------------------- */

.nw-mega__col {
	display: flex;
	flex-direction: column;
}

.nw-mega__col--text {
	flex: 1 1 auto;
	min-width: 0;
}

.nw-mega__col--media {
	flex: 0 0 var(--nw-media-width);
	width: var(--nw-media-width);
}

.nw-mega__heading {
	margin: 0 0 8px;
	font-family: var(--nw-font-heading);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.2;
	color: #000000;
}

.nw-mega__text {
	margin: 0;
	font-family: var(--nw-font-body);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: #000000;
}

.nw-mega__links {
	display: flex;
	flex-direction: column;
	/* 34px between baselines − 21px line box = 13px gap. */
	gap: 13px;
	margin: auto 0 0;
	padding: 24px 0 0;
	list-style: none;
}

.nw-mega__links li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nw-mega__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--nw-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	transition: color 160ms var(--nw-ease);
}

.nw-mega .nw-mega__link {
	color: var(--nw-link-color);
}

.nw-mega .nw-mega__link:hover {
	color: var(--nw-link-color-hover);
}

.nw-mega .nw-mega__link:focus-visible {
	color: var(--nw-link-color-hover);
}

.nw-mega__link-arrow {
	flex: 0 0 auto;
	transition: transform 160ms var(--nw-ease);
}

.nw-mega__link:hover .nw-mega__link-arrow {
	transform: translate3d(1px, -1px, 0);
}

/* --- Image + CTA ------------------------------------------------------- */

/*
 * The CTA bar overlays the bottom 55px of the image rather than sitting below
 * it, so the media block is exactly --nw-media-height tall (Figma: Rectangle 4
 * 349×287 with Group 29 at y=232).
 */
.nw-mega__media {
	position: relative;
	display: block;
	height: var(--nw-media-height);
	overflow: hidden;
	border-radius: 10px;
	background-color: #ededed;
	text-decoration: none;
}

/*
 * Figma draws the 1px stroke inside the rectangle's bounds. A real border would
 * shrink the content box and push the CTA bar 1px up and 2px narrow, so the
 * stroke is an overlay instead.
 */
.nw-mega__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: inherit;
	pointer-events: none;
}

.nw-mega__image {
	position: absolute;
	inset: 0;
	display: block;
}

.nw-mega__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Figma: Button/Photo, Variant2 — hovering the card turns the CTA bar copper.
 * Split from :focus-visible on purpose; an unsupported :focus-visible in the
 * same selector group would discard the hover rule with it.
 */
.nw-mega .nw-mega__media-link:hover .nw-mega__cta {
	background-color: var(--nw-cta-bg-hover);
}

.nw-mega .nw-mega__media-link:focus-visible .nw-mega__cta {
	background-color: var(--nw-cta-bg-hover);
}

.nw-mega__cta {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	/* 15 + 24 line box + 16 = 55px */
	padding: 15px 17px 16px;
	/*
	 * Both resting and hover colours come from custom properties. Setting the
	 * resting one as a plain property let Elementor's generated rule — same
	 * specificity as the hover rule, but loaded later — win even on hover.
	 */
	background-color: var(--nw-cta-bg);
	font-family: var(--nw-font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--nw-cream);
	transition: background-color 180ms var(--nw-ease);
}

/* --- Link decoration ---------------------------------------------------- */

/*
 * Themes and Elementor global link styles routinely underline every <a>, often
 * with their own text-decoration-color. These selectors are deliberately two
 * classes deep so they outrank rules like `.elementor-kit-123 a:hover` without
 * resorting to !important — set an underline from the Style tab if you want one.
 */
.nw-mega .nw-mega__trigger,
.nw-mega .nw-mega__trigger:hover,
.nw-mega .nw-mega__trigger:focus,
.nw-mega .nw-mega__link,
.nw-mega .nw-mega__link:hover,
.nw-mega .nw-mega__link:focus,
.nw-mega .nw-mega__media,
.nw-mega .nw-mega__media:hover,
.nw-mega .nw-mega__media:focus,
.nw-mega .nw-mega__media .nw-mega__cta {
	text-decoration: none;
}

/* --- Focus ------------------------------------------------------------- */

.nw-mega a:focus-visible,
.nw-mega button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -3px;
	border-radius: 2px;
}

/* Full-bleed rows look wrong with an outset ring, so theirs sits inside. */
.nw-mega a:focus-visible:not(.nw-mega__row):not(.nw-mega__media-link) {
	outline-offset: 3px;
}

/* =======================================================================
 * Mobile drawer
 *
 * Same repeater, different presentation. Above the breakpoint the bar and
 * hover card show and the drawer is inert; below it, the bar is removed and a
 * hamburger opens a full-screen drawer with a two-level drill-down.
 * ==================================================================== */

.nw-mega {
	--nw-drawer-bg: var(--nw-cream);
	--nw-drawer-icon: var(--nw-dark-green);
	--nw-drawer-divider: rgba(47, 64, 61, 0.12);
	--nw-drawer-row-color: var(--nw-dark-green);
	--nw-toggle-color: var(--nw-white);
	/*
	 * Drives the hamburger's bar width AND the mobile icon's font-size, so the
	 * pair stays matched - the same reason they share one colour control. The
	 * gap between the bars is derived from it rather than fixed, so the burger
	 * scales as a whole shape instead of just getting wider.
	 */
	--nw-icon-size: 25px;
	--nw-burger-gap: calc( var( --nw-icon-size ) * 0.32 );
	/*
	 * The square both mobile icons are centred in. They MUST share it: the
	 * drawn icon is smaller than its tap target, so the visible gap to the
	 * screen edge is the row's padding plus half the leftover. If only the
	 * hamburger had a box, it would sit (44 - 25) / 2 = 9.5px further in than
	 * the calendar and the header would look lopsided. 44px is also the
	 * minimum comfortable touch target.
	 */
	--nw-tap-size: 44px;
	--nw-drawer-head-height: 92px;
	--nw-drawer-top-gap: 14px;
}

.nw-mega__toggle,
.nw-mega__drawer {
	display: none;
}

/* --- Hamburger ---------------------------------------------------------- */

.nw-mega__toggle {
	position: relative;
	z-index: 3;
	width: var( --nw-tap-size );
	height: var( --nw-tap-size );
	padding: 0;
	border: 0;
	background: none;
	color: var(--nw-toggle-color);
	cursor: pointer;
}

.nw-mega__burger,
.nw-mega__burger::before,
.nw-mega__burger::after {
	position: absolute;
	left: 50%;
	width: var( --nw-icon-size );
	height: 2px;
	margin-left: calc( var( --nw-icon-size ) / -2 );
	background-color: currentColor;
	border-radius: 2px;
}

.nw-mega__burger {
	top: 50%;
	margin-top: -1px;
}

.nw-mega__burger::before,
.nw-mega__burger::after {
	content: "";
	left: 0;
	margin-left: 0;
}

.nw-mega__burger::before {
	top: calc( var( --nw-burger-gap ) * -1 );
}

.nw-mega__burger::after {
	top: var( --nw-burger-gap );
}

/* --- Drawer shell ------------------------------------------------------- */

.nw-mega__drawer {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	background-color: var(--nw-drawer-bg);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--nw-duration) var(--nw-ease),
		visibility 0s linear var(--nw-duration);
}

.nw-mega__drawer.is-open {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s, 0s;
}

.nw-mega__drawer-head {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: var(--nw-drawer-head-height);
	padding: 16px 24px;
	border-bottom: 1px solid var(--nw-drawer-divider);
}

.nw-mega__drawer-close {
	position: absolute;
	top: 50%;
	left: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--nw-drawer-icon);
	transform: translateY(-50%);
	cursor: pointer;
}

.nw-mega__drawer-logo img {
	display: block;
	width: 140px;
	height: auto;
}

/*
 * "Match your header logo": JS measures the real header logo and copies its box
 * here. Fixed rather than absolute so the coordinates are plain viewport
 * coordinates — the drawer header is position:relative for its close button, so
 * absolute would resolve against that instead.
 */
.nw-mega__drawer-logo.is-matched {
	position: fixed;
	margin: 0;
}

.nw-mega__drawer-logo.is-matched img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* --- Drill-down track --------------------------------------------------- */

.nw-mega__drawer-body {
	position: relative;
	flex: 1 1 auto;
	overflow: hidden;
}

/*
 * The root list and each sheet occupy the same space and slide horizontally
 * past one another, which is what makes this a drill-down rather than an
 * accordion. Both scroll independently when their content is taller.
 */
.nw-mega__drawer-body > .nw-mega__level,
.nw-mega__sheet {
	position: absolute;
	inset: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	/* Closes the top of every drill-down screen, not just the root list. */
	border-top: 1px solid var(--nw-drawer-divider);
	transition: transform var(--nw-duration) var(--nw-ease);
}

.nw-mega__drawer-body > .nw-mega__level {
	margin: 0;
	padding: 0;
	list-style: none;
	transform: translate3d(0, 0, 0);
}

.nw-mega__drawer.is-drilled .nw-mega__drawer-body > .nw-mega__level {
	transform: translate3d(-100%, 0, 0);
}

.nw-mega__sheet {
	transform: translate3d(100%, 0, 0);
}

.nw-mega__sheet.is-active {
	transform: translate3d(0, 0, 0);
}

/* --- Rows --------------------------------------------------------------- */

.nw-mega__level {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nw-mega__level-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nw-mega__row {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	/*
	 * 23 + 24 line box + 22 + 1px border = 70px line-to-line, matching Figma.
	 * The bottom is one less than the top because Figma's dividers have no
	 * thickness in layout, whereas a CSS border adds to the box.
	 */
	padding: 23px 22px 22px;
	border: 0;
	border-bottom: 1px solid var(--nw-drawer-divider);
	background: none;
	font-family: var(--nw-font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--nw-drawer-row-color);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.nw-mega .nw-mega__row,
.nw-mega .nw-mega__row:hover,
.nw-mega .nw-mega__row:focus {
	color: var(--nw-drawer-row-color);
	text-decoration: none;
}

.nw-mega__chevron {
	flex: 0 0 auto;
	color: var(--nw-drawer-icon);
}

/* --- Sheet -------------------------------------------------------------- */

/* The whole header row is one back button, chevron and title together. */
.nw-mega__sheet-head {
	position: relative;
	display: flex;
	width: 100%;
	align-items: center;
	gap: 14px;
	padding: 20px 24px;
	border: 0;
	border-bottom: 1px solid var(--nw-drawer-divider);
	background: none;
	text-align: left;
	cursor: pointer;
}

.nw-mega__back-icon {
	flex: 0 0 auto;
	color: var(--nw-drawer-icon);
}

/* Gives the back button an accessible name of "Back to menu: <section>". */
.nw-mega__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.nw-mega .nw-mega__sheet-title {
	font-family: var(--nw-font-heading);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--nw-dark-green);
	text-decoration: none;
}

.nw-mega__sheet-text {
	margin: 0;
	padding: 20px 24px;
	font-family: var(--nw-font-body);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--nw-dark-green);
	border-bottom: 1px solid var(--nw-drawer-divider);
}

.nw-mega__row--sub {
	justify-content: flex-start;
	gap: 6px;
	font-size: 14px;
}

.nw-mega__sheet-media {
	padding: 24px;
}

.nw-mega__sheet-media .nw-mega__media {
	width: 100%;
}

/* --- Interactive-state reset -------------------------------------------- */

/*
 * The drawer is built from bare <button> and <a> elements, which themes style
 * with their own background on hover / focus / active. Resetting only the
 * resting state is not enough: the theme's :hover rule still wins on tap. Two
 * classes deep so it outranks `.elementor-kit-123 button:hover` and friends.
 */
.nw-mega .nw-mega__toggle,
.nw-mega .nw-mega__toggle:hover,
.nw-mega .nw-mega__toggle:focus,
.nw-mega .nw-mega__toggle:active,
.nw-mega .nw-mega__drawer-close,
.nw-mega .nw-mega__drawer-close:hover,
.nw-mega .nw-mega__drawer-close:focus,
.nw-mega .nw-mega__drawer-close:active,
.nw-mega .nw-mega__sheet-head,
.nw-mega .nw-mega__sheet-head:hover,
.nw-mega .nw-mega__sheet-head:focus,
.nw-mega .nw-mega__sheet-head:active,
.nw-mega .nw-mega__row,
.nw-mega .nw-mega__row:hover,
.nw-mega .nw-mega__row:focus,
.nw-mega .nw-mega__row:active {
	background: none;
	box-shadow: none;
}

/* --- Breakpoint switch -------------------------------------------------- */

@media (max-width: 767px) {
	.nw-mega--bp-tablet .nw-mega__bar,
	.nw-mega--bp-tablet .nw-mega__panel,
	.nw-mega--bp-tablet .nw-mega__backdrop {
		display: none;
	}

	.nw-mega--bp-tablet .nw-mega__toggle,
	.nw-mega--bp-tablet .nw-mega__drawer {
		display: flex;
	}

	/* The hamburger sits at the widget's leading edge, not centred like the bar. */
	.nw-mega--bp-tablet {
		justify-content: flex-start;
	}
}

@media (max-width: 1024px) {
	.nw-mega--bp-desktop .nw-mega__bar,
	.nw-mega--bp-desktop .nw-mega__panel,
	.nw-mega--bp-desktop .nw-mega__backdrop {
		display: none;
	}

	.nw-mega--bp-desktop .nw-mega__toggle,
	.nw-mega--bp-desktop .nw-mega__drawer {
		display: flex;
	}

	.nw-mega--bp-desktop {
		justify-content: flex-start;
	}
}

/* --- Wide breakpoint: the 750px card needs ~1250px of room beside the button --- */

@media (max-width: 1299px) {
	.nw-mega--bp-wide .nw-mega__bar,
	.nw-mega--bp-wide .nw-mega__panel,
	.nw-mega--bp-wide .nw-mega__backdrop {
		display: none;
	}

	.nw-mega--bp-wide .nw-mega__toggle,
	.nw-mega--bp-wide .nw-mega__drawer {
		display: flex;
	}

	.nw-mega--bp-wide {
		justify-content: flex-start;
	}
}

/* The page must not scroll behind an open drawer. */
body.nw-mega-locked {
	overflow: hidden;
}

/* --- Reduced motion ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.nw-mega,
	.nw-mega * {
		--nw-duration: 1ms;
	}

	.nw-mega__pane {
		transform: none;
	}

	.nw-mega__pane.is-active {
		transition-delay: 0ms;
	}
}

/* =======================================================================
 * Full header mode
 *
 * The widget renders the whole header row — logo, menu, actions — so all
 * three share one layout. That removes the need to align anything by
 * measurement: the logo cannot move between states because it is the same
 * element, and the hamburger cannot drift from the close button because it
 * IS the close button.
 * ==================================================================== */

.nw-mega {
	--nw-header-height: 85px;
	--nw-header-padding: 30px;
	--nw-header-max-width: 1600px;
	--nw-sticky-height: 134px;
	--nw-sticky-bg: rgba(47, 64, 61, 0.8);
	--nw-sticky-blur: 7px;
	--nw-sticky-radius: 0 0 20px 20px;
	--nw-sticky-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.35);
	--nw-logo-width: 158px;
	--nw-action-bg: var(--nw-cream);
	--nw-action-color: var(--nw-dark-green);
	--nw-cta-bg: var(--nw-dark-green);
	--nw-cta-bg-hover: var(--nw-copper);
}

.nw-mega--header {
	display: block;
	width: 100%;
}

/*
 * A three-column grid with equal outer tracks, which centres the nav on the row
 * regardless of the logo and button having different widths. An earlier version
 * used space-between plus an absolutely-centred nav; that centred correctly but
 * took the nav out of flow, so between roughly 1025px and 1150px it overlapped
 * the logo and the button. In the grid the tracks push each other apart instead.
 */
.nw-mega__header-row {
	position: relative;
	/* Above the drawer, so the logo and hamburger stay put and visible. */
	z-index: 10000;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 24px;
	width: 100%;
	min-height: var(--nw-header-height);
	/*
	 * The row spans the full width so the sticky background can bleed to the
	 * viewport edges; the CONTENT is capped by padding instead of max-width.
	 * max-width here would shrink the background with it.
	 */
	padding-right: max(
		var(--nw-header-padding),
		calc( ( 100% - var(--nw-header-max-width) ) / 2 )
	);
	padding-left: max(
		var(--nw-header-padding),
		calc( ( 100% - var(--nw-header-max-width) ) / 2 )
	);
	transition: min-height var(--nw-duration) var(--nw-ease);
}

.nw-mega__header-row > .nw-mega__logo {
	justify-self: start;
}

.nw-mega__header-row > .nw-mega__bar {
	justify-self: center;
}

.nw-mega__header-row > .nw-mega__actions {
	justify-self: end;
}

.nw-mega__header-row > .nw-mega__toggle {
	justify-self: start;
}

.nw-mega--header .nw-mega__bar {
	width: auto;
	padding: 0;
}

/* --- Logo --------------------------------------------------------------- */

.nw-mega__logo {
	position: relative;
	flex: 0 0 auto;
	display: block;
	width: var(--nw-logo-width);
	line-height: 0;
	text-decoration: none;
}

.nw-mega__logo-img {
	display: block;
	width: 100%;
	height: auto;
	transition: opacity var(--nw-duration) var(--nw-ease);
}

/* The dark logo sits exactly on top of the light one and cross-fades. */
.nw-mega__logo-img--dark {
	position: absolute;
	inset: 0;
	opacity: 0;
}

.nw-mega.is-drawer-open .nw-mega__logo-img--light {
	opacity: 0;
}

.nw-mega.is-drawer-open .nw-mega__logo-img--dark {
	opacity: 1;
}

/* --- Right-hand slot ---------------------------------------------------- */

.nw-mega__actions {
	flex: 0 0 auto;
	transition:
		opacity var(--nw-duration) var(--nw-ease),
		visibility 0s linear 0s;
}

.nw-mega.is-drawer-open .nw-mega__actions {
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--nw-duration) var(--nw-ease),
		visibility 0s linear var(--nw-duration);
}

/* Layout and type for the header button; colours are set further down. */
.nw-mega .nw-mega__action {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 20px;
	border-radius: 6px;
	font-family: var(--nw-font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color var(--nw-duration) var(--nw-ease),
		color var(--nw-duration) var(--nw-ease);
}

/*
 * Two classes, which lands exactly between the rules that matter:
 *
 *   reset.css          `a`                        (0,0,1)  loses
 *   Elementor kit      `.elementor-kit-6 a`       (0,1,1)  loses
 *   THIS               `.nw-mega .nw-mega__action`(0,2,0)
 *   site button class  `.elementor .btn-primary-*`(0,2,0)  wins on load order
 *
 * The tie with the button classes is deliberate and safe: Elementor's global
 * CSS is enqueued after the plugin's, so the site's class wins wherever it is
 * defined, and this takes over wherever it is not. One class was not enough —
 * it fell below the kit's link rule and the button went black on pages that
 * do not load the button classes.
 */
.nw-mega .nw-mega__action {
	background-color: var(--nw-action-bg);
	color: var(--nw-action-color);
}

/*
 * Fallback colours for the inverted state, applied by swapping the variables
 * rather than adding specificity — so a site class still wins when present.
 */
.nw-mega--sticky.is-pinned.is-open,
.nw-mega--sticky.is-pinned.is-lit,
.nw-mega--sticky.is-hidden.is-open,
.nw-mega--sticky.is-hidden.is-lit {
	--nw-action-bg: var(--nw-dark-green);
	--nw-action-color: var(--nw-cream);
}

.nw-mega__action-icon {
	display: none;
	font-size: var( --nw-icon-size );
	line-height: 1;
}

.nw-mega__action-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* --- Hamburger becomes the close button --------------------------------- */

.nw-mega__burger,
.nw-mega__burger::before,
.nw-mega__burger::after {
	transition:
		transform var(--nw-duration) var(--nw-ease),
		opacity calc(var(--nw-duration) * 0.4) var(--nw-ease);
}

/*
 * Transitions off. Set by JS when the drawer has to disappear without being
 * seen to move: a back/forward restore arrives with the menu still up, because
 * following a link deliberately leaves it up, and animating it away there
 * would read as the menu closing itself in front of the reader.
 */
.nw-mega.is-frozen .nw-mega__drawer,
.nw-mega.is-frozen .nw-mega__burger,
.nw-mega.is-frozen .nw-mega__burger::before,
.nw-mega.is-frozen .nw-mega__burger::after {
	transition: none;
}

.nw-mega.is-drawer-open .nw-mega__toggle {
	color: var(--nw-drawer-icon);
}

.nw-mega.is-drawer-open .nw-mega__burger {
	transform: rotate(45deg);
}

.nw-mega.is-drawer-open .nw-mega__burger::before {
	transform: translateY( var( --nw-burger-gap ) ) rotate(90deg);
}

.nw-mega.is-drawer-open .nw-mega__burger::after {
	opacity: 0;
}

/* --- Sticky states ------------------------------------------------------ */

/*
 * Three states, driven from JS:
 *   is-top    resting appearance, overlaying the hero, no background
 *   is-pinned visible with the scrolled treatment
 *   is-hidden translated out of view (user is scrolling down)
 *
 * The header is fixed in all three so it always overlays page content; only
 * its appearance changes. NOTE the transform lives on the row, never on the
 * root: a transform on the root would become the containing block for the
 * drawer's position:fixed and trap it inside the header.
 */
.nw-mega--sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9998;
}

.nw-mega--sticky .nw-mega__header-row {
	background-color: transparent;
	transition:
		transform var(--nw-duration) var(--nw-ease),
		min-height var(--nw-duration) var(--nw-ease),
		background-color var(--nw-duration) var(--nw-ease);
}

.nw-mega--sticky.is-pinned .nw-mega__header-row,
.nw-mega--sticky.is-hidden .nw-mega__header-row {
	min-height: var(--nw-sticky-height);
}

/*
 * Layer order inside the widget:
 *   0  sticky background   the blurred green bar
 *   1  backdrop            the white dropdown card, so it covers the green
 *   2  panel               the card's contents
 *   10000 header row       logo and links, above the card and the drawer
 */
.nw-mega__sticky-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	opacity: 0;
	pointer-events: none;
	transition:
		opacity var(--nw-duration) var(--nw-ease),
		background-color var(--nw-duration) var(--nw-ease),
		transform var(--nw-duration) var(--nw-ease);
}

.nw-mega--sticky.is-pinned .nw-mega__sticky-bg,
.nw-mega--sticky.is-hidden .nw-mega__sticky-bg {
	opacity: 1;
	background-color: var(--nw-sticky-bg);
	-webkit-backdrop-filter: blur(var(--nw-sticky-blur));
	backdrop-filter: blur(var(--nw-sticky-blur));
	border-radius: var(--nw-sticky-radius);
	box-shadow: var(--nw-sticky-shadow);
}

/*
 * Opening a dropdown turns the whole bar white, so the bar and the card read as
 * one surface. Scoped to the scrolled states — at rest there is no bar to
 * recolour. Shares --nw-duration with the card's fade so they move together.
 */
.nw-mega--sticky.is-pinned.is-open .nw-mega__sticky-bg,
.nw-mega--sticky.is-pinned.is-lit .nw-mega__sticky-bg,
.nw-mega--sticky.is-hidden.is-open .nw-mega__sticky-bg,
.nw-mega--sticky.is-hidden.is-lit .nw-mega__sticky-bg {
	background-color: var(--nw-panel-bg);
}

/*
 * ...which means the light logo would vanish against it, so the dark one takes
 * over for as long as the bar is white — the same swap the drawer uses.
 */
.nw-mega--sticky.is-pinned.is-open .nw-mega__logo-img--light,
.nw-mega--sticky.is-pinned.is-lit .nw-mega__logo-img--light,
.nw-mega--sticky.is-hidden.is-open .nw-mega__logo-img--light,
.nw-mega--sticky.is-hidden.is-lit .nw-mega__logo-img--light {
	opacity: 0;
}

.nw-mega--sticky.is-pinned.is-open .nw-mega__logo-img--dark,
.nw-mega--sticky.is-pinned.is-lit .nw-mega__logo-img--dark,
.nw-mega--sticky.is-hidden.is-open .nw-mega__logo-img--dark,
.nw-mega--sticky.is-hidden.is-lit .nw-mega__logo-img--dark {
	opacity: 1;
}

/* Moves with the row when the header hides. */
.nw-mega--sticky.is-hidden .nw-mega__sticky-bg {
	transform: translate3d(0, -100%, 0);
}

.nw-mega--sticky.is-hidden .nw-mega__header-row {
	transform: translate3d(0, -100%, 0);
}

/* The hover card must not hang in mid-air while the row is away. */
.nw-mega--sticky.is-hidden .nw-mega__backdrop,
.nw-mega--sticky.is-hidden .nw-mega__panel {
	opacity: 0;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.nw-mega--sticky .nw-mega__header-row {
		transition: none;
	}
}

/* --- Full header at the drawer breakpoint ------------------------------- */

@media (max-width: 1024px) {
	.nw-mega--bp-desktop.nw-mega--header .nw-mega__action-label {
		display: none;
	}

	.nw-mega--bp-desktop.nw-mega--header .nw-mega__action-icon {
		display: inline-flex;
	}

	.nw-mega--bp-desktop.nw-mega--header .nw-mega__action {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var( --nw-tap-size );
		height: var( --nw-tap-size );
		padding: 0;
		border: 0;
		background: none;
		color: var(--nw-toggle-color);
	}

	/*
	 * No drawer header of its own: the real header row sits above it, so the
	 * drawer is inset by the header's height. The padding goes on the drawer,
	 * not the body — the body's children are absolutely positioned and would
	 * resolve against its padding box, ignoring padding entirely.
	 */
	.nw-mega--bp-desktop.nw-mega--header .nw-mega__drawer {
		padding-top: var(--nw-header-height);
	}

	/* Hamburger first, logo centred, action last — matching the design. */
	.nw-mega--bp-desktop.nw-mega--header .nw-mega__toggle {
		order: 1;
	}

	.nw-mega--bp-desktop.nw-mega--header .nw-mega__logo {
		order: 2;
		margin: 0 auto;
	}

	.nw-mega--bp-desktop.nw-mega--header .nw-mega__actions {
		order: 3;
	}
}

@media (max-width: 1299px) {
	.nw-mega--bp-wide.nw-mega--header .nw-mega__action-label {
		display: none;
	}

	.nw-mega--bp-wide.nw-mega--header .nw-mega__action-icon {
		display: inline-flex;
	}

	.nw-mega--bp-wide.nw-mega--header .nw-mega__action {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var( --nw-tap-size );
		height: var( --nw-tap-size );
		padding: 0;
		border: 0;
		background: none;
		color: var(--nw-toggle-color);
	}

	/*
	 * No drawer header of its own: the real header row sits above it, so the
	 * drawer is inset by the header's height. The padding goes on the drawer,
	 * not the body — the body's children are absolutely positioned and would
	 * resolve against its padding box, ignoring padding entirely.
	 */
	.nw-mega--bp-wide.nw-mega--header .nw-mega__drawer {
		padding-top: var(--nw-header-height);
	}

	/* Hamburger first, logo centred, action last — matching the design. */
	.nw-mega--bp-wide.nw-mega--header .nw-mega__toggle {
		order: 1;
	}

	.nw-mega--bp-wide.nw-mega--header .nw-mega__logo {
		order: 2;
		margin: 0 auto;
	}

	.nw-mega--bp-wide.nw-mega--header .nw-mega__actions {
		order: 3;
	}
}

@media (max-width: 767px) {
	.nw-mega--bp-tablet.nw-mega--header .nw-mega__action-label {
		display: none;
	}

	.nw-mega--bp-tablet.nw-mega--header .nw-mega__action-icon {
		display: inline-flex;
	}

	.nw-mega--bp-tablet.nw-mega--header .nw-mega__action {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var( --nw-tap-size );
		height: var( --nw-tap-size );
		padding: 0;
		border: 0;
		background: none;
		color: var(--nw-toggle-color);
	}

	.nw-mega--bp-tablet.nw-mega--header .nw-mega__drawer {
		padding-top: var(--nw-header-height);
	}

	.nw-mega--bp-tablet.nw-mega--header .nw-mega__toggle { order: 1; }
	.nw-mega--bp-tablet.nw-mega--header .nw-mega__logo { order: 2; margin: 0 auto; }
	.nw-mega--bp-tablet.nw-mega--header .nw-mega__actions { order: 3; }
}

/* --- WordPress admin bar ------------------------------------------------- */

/*
 * A sticky header is fixed to the viewport, so it would sit underneath the
 * admin bar for logged-in users. These offsets mirror WordPress's own
 * breakpoints. Below 601px the admin bar is not fixed — it scrolls away — so
 * no offset is applied there.
 */
@media screen and (min-width: 783px) {
	body.admin-bar .nw-mega--sticky {
		top: 32px;
	}
}

@media screen and (min-width: 601px) and (max-width: 782px) {
	body.admin-bar .nw-mega--sticky {
		top: 46px;
	}
}
