/* ==========================================================================
   nDash site header
   Everything is scoped under .ndh so theme / WPBakery styles can't leak in
   and nothing here leaks out. Change the brand color in --ndh-accent.
   ========================================================================== */

.ndh {
	--ndh-accent: #1E6FE6;      /* nDash blue (matched from the old Sign Up Free button) */
	--ndh-accent-ink: #FFFFFF;  /* text on the accent color */
	--ndh-ink: #16181D;
	--ndh-text: #3A3F4A;
	--ndh-muted: #5B606B;
	--ndh-line: #E3E5EA;
	--ndh-soft: #F6F7F9;
	--ndh-hover: #F0F2F6;
	--ndh-gutter: 48px;
	--ndh-bar-h: 76px;
	--ndh-util-h: 36px;  /* top bar height */

	position: sticky;
	top: 0;
	z-index: 1000;
	color: var(--ndh-ink);
	font-family: 'DM Sans', system-ui, sans-serif;
	line-height: 1.4;
}

body.admin-bar .ndh { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ndh { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .ndh { top: 0; } }

/* ---- Local resets (protect against theme element styles) --------------- */
.ndh *, .ndh *::before, .ndh *::after { box-sizing: border-box; }
.ndh [hidden] { display: none !important; }
.ndh ul, .ndh li { list-style: none; margin: 0; padding: 0; }
.ndh p { margin: 0; }
.ndh a { text-decoration: none; color: inherit; box-shadow: none; }
.ndh button {
	font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0;
	border-radius: 0; box-shadow: none; text-transform: none; letter-spacing: normal;
	line-height: inherit; min-height: 0; width: auto; cursor: pointer;
}
.ndh svg { display: block; flex-shrink: 0; }
.ndh a:focus-visible, .ndh button:focus-visible { outline: 2px solid var(--ndh-accent); outline-offset: 2px; }

/* ---- Bar ---------------------------------------------------------------- */
.ndh .ndh-inner { position: relative; z-index: 2; background: #FFFFFF; border-bottom: 1px solid var(--ndh-line); }
.ndh .ndh-bar {
	position: relative; max-width: calc(1150px + 2 * var(--ndh-gutter)); /* lines up with the page content */ height: var(--ndh-bar-h); margin: 0 auto;
	padding: 0 var(--ndh-gutter); display: flex; align-items: center; gap: 40px;
}
.ndh .ndh-logo { display: flex; align-items: center; flex-shrink: 0; }
.ndh .ndh-logo img { display: block; height: 32px; width: auto; }

.ndh .ndh-menu { display: flex; align-items: center; gap: 4px; }
.ndh .ndh-item { position: relative; }
.ndh .ndh-item--mega { position: static; } /* mega panel anchors to the bar */

.ndh .ndh-trigger, .ndh .ndh-link {
	display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
	border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--ndh-ink); white-space: nowrap;
}
.ndh .ndh-trigger:hover, .ndh .ndh-link:hover, .ndh .ndh-trigger[aria-expanded="true"] { background: var(--ndh-hover); }
.ndh .ndh-trigger svg, .ndh .ndh-acc svg { transition: transform 0.15s ease; }
.ndh .ndh-trigger[aria-expanded="true"] svg, .ndh .ndh-acc[aria-expanded="true"] svg { transform: rotate(180deg); }

.ndh .ndh-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ndh .ndh-quiet {
	display: flex; align-items: center; height: 44px; padding: 0 12px;
	font-size: 14px; font-weight: 400; color: var(--ndh-muted); white-space: nowrap;
}
.ndh .ndh-quiet:hover { color: var(--ndh-ink); }
.ndh .ndh-divider { width: 1px; height: 24px; margin: 0 12px; background: var(--ndh-line); }
.ndh .ndh-cta { display: flex; gap: 10px; }

/* ---- Buttons ------------------------------------------------------------ */
.ndh .ndh-btn {
	display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px;
	border: 1.5px solid var(--ndh-accent); border-radius: 4px; font-size: 15px; font-weight: 700;
	white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease;
}
.ndh .ndh-btn--outline { background: #FFFFFF; color: var(--ndh-accent); }
.ndh .ndh-btn--outline:hover { background: var(--ndh-accent); color: var(--ndh-accent-ink); }
.ndh .ndh-btn--solid { background: var(--ndh-accent); color: var(--ndh-accent-ink); }
.ndh .ndh-btn--solid:hover { background: var(--ndh-ink); border-color: var(--ndh-ink); color: #FFFFFF; }
.ndh .ndh-btn--light { background: #FFFFFF; border-color: #FFFFFF; color: var(--ndh-ink); }
.ndh .ndh-btn--light:hover { background: var(--ndh-hover); border-color: var(--ndh-hover); }

/* ---- Shared panel pieces ------------------------------------------------ */
.ndh .ndh-panel { position: absolute; z-index: 3; background: #FFFFFF; border-radius: 16px; box-shadow: 0 24px 48px rgba(22, 24, 29, 0.18); }
.ndh .ndh-panel--drop { top: calc(100% + 30px); left: 0; }
.ndh .ndh-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ndh-muted); }
.ndh .ndh-textlink { font-size: 14px; font-weight: 700; color: var(--ndh-accent); }
.ndh .ndh-textlink:hover { text-decoration: underline; }
.ndh .ndh-textlink--muted { font-weight: 500; color: var(--ndh-muted); }
.ndh .ndh-rolelink { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; }
.ndh .ndh-rolelink:hover { background: var(--ndh-hover); }
.ndh .ndh-rolename { font-size: 15px; font-weight: 600; color: var(--ndh-ink); }
.ndh .ndh-roledesc { font-size: 13px; line-height: 1.4; color: var(--ndh-muted); }

/* ---- How It Works dropdown ---------------------------------------------- */
.ndh .ndh-panel--how { width: 720px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.ndh .ndh-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ndh .ndh-path { padding: 24px; border: 1px solid var(--ndh-line); border-radius: 12px; display: flex; flex-direction: column; gap: 14px; }
.ndh .ndh-path--managed { background: var(--ndh-soft); }
.ndh .ndh-path-title { font-family: 'Cabin', 'DM Sans', sans-serif; font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--ndh-ink); }
.ndh .ndh-checks { display: flex; flex-direction: column; gap: 8px; }
.ndh .ndh-checks li { display: flex; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--ndh-text); }
.ndh .ndh-checks svg { margin-top: 2px; color: var(--ndh-ink); }
.ndh .ndh-path .ndh-btn { margin-top: auto; width: 100%; }
.ndh .ndh-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 8px; }

/* ---- Roles mega-menu ---------------------------------------------------- */
.ndh .ndh-panel--mega {
	top: calc(100% + 12px); left: var(--ndh-gutter); right: var(--ndh-gutter);
	padding: 28px; display: flex; gap: 28px;
}
.ndh .ndh-mega-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ndh .ndh-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ndh .ndh-group { display: flex; flex-direction: column; gap: 2px; }
.ndh .ndh-group-label { padding: 0 12px 8px; }
.ndh .ndh-mega-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 12px 0; border-top: 1px solid var(--ndh-line); }
.ndh .ndh-feature {
	flex: 0 0 300px; padding: 28px; border-radius: 12px; background: var(--ndh-ink);
	display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.ndh .ndh-feature-body { display: flex; flex-direction: column; gap: 10px; }
.ndh .ndh-feature .ndh-eyebrow { color: #B8BDC8; }
.ndh .ndh-feature-title { font-family: 'Cabin', 'DM Sans', sans-serif; font-size: 22px; line-height: 1.25; font-weight: 700; color: #FFFFFF; }
.ndh .ndh-feature-copy { font-size: 14px; line-height: 1.5; color: #D5D8DF; }

/* ---- Resources dropdown ------------------------------------------------- */
.ndh .ndh-panel--res { width: 340px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }

/* ---- Scrim behind open menus -------------------------------------------- */
.ndh .ndh-scrim { position: fixed; inset: 0; z-index: 1; background: rgba(22, 24, 29, 0.32); }

/* ---- Mobile burger + drawer --------------------------------------------- */
.ndh .ndh-burger { display: none; width: 44px; height: 44px; margin-left: auto; align-items: center; justify-content: center; border-radius: 8px; color: var(--ndh-ink); }
.ndh .ndh-burger .ndh-icon-close { display: none; }
.ndh.ndh--drawer-open .ndh-burger .ndh-icon-open { display: none; }
.ndh.ndh--drawer-open .ndh-burger .ndh-icon-close { display: block; }

.ndh .ndh-drawer { position: fixed; left: 0; right: 0; bottom: 0; top: 64px; z-index: 3; background: #FFFFFF; display: flex; flex-direction: column; }
.ndh .ndh-drawer-nav { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 20px 16px; display: flex; flex-direction: column; }
.ndh .ndh-acc, .ndh .ndh-drawer-link {
	display: flex; width: 100%; height: 56px; align-items: center; justify-content: space-between;
	border-top: 1px solid #EEF0F3; font-size: 17px; font-weight: 500; color: var(--ndh-ink); text-align: left;
}
.ndh .ndh-drawer-nav > :first-child { border-top: 0; }
.ndh .ndh-acc svg { width: 14px; height: 14px; }
.ndh .ndh-acc-panel { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.ndh .ndh-mcard { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--ndh-line); border-radius: 12px; }
.ndh .ndh-mcard--managed { background: var(--ndh-soft); }
.ndh .ndh-mgroup { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.ndh .ndh-mgroup-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.ndh .ndh-mgroup-links a, .ndh .ndh-mres { display: flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ndh-text); }
.ndh .ndh-acc-panel .ndh-textlink { padding-top: 4px; }
.ndh .ndh-drawer-quiet { display: flex; flex-direction: column; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ndh-line); }
.ndh .ndh-drawer-quiet a { display: flex; align-items: center; height: 48px; font-size: 15px; font-weight: 500; color: var(--ndh-muted); }
.ndh .ndh-drawer-foot {
	flex-shrink: 0; display: flex; gap: 12px; border-top: 1px solid var(--ndh-line);
	padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
}
.ndh .ndh-drawer-foot .ndh-btn { flex: 1 1 0; height: 50px; border-radius: 4px; font-size: 16px; }

html.ndh-lock, html.ndh-lock body { overflow: hidden; }

/* ---- Page-type variants --------------------------------------------------
   white        solid white bar, dark text (default)
   transparent  sits over the dark hero with white text; turns dark and
                solid once you scroll or open a menu
   dark         solid dark bar, white text
   ------------------------------------------------------------------------ */
.ndh { --ndh-dark-bg: #212938; } /* dark header color: match your dark page hero */

/* Transparent: pull the hero up underneath the header */
.ndh.ndh--transparent { margin-bottom: calc(-1 * (var(--ndh-bar-h) + var(--ndh-util-h) + 1px)); } /* top bar + bar + its 1px border */
.ndh.ndh--transparent .ndh-inner { transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.ndh.ndh--transparent:not(.ndh--solid) .ndh-inner { background: transparent; border-bottom-color: transparent; }
.ndh.ndh--transparent.ndh--solid .ndh-inner { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }

/* Dark bar (dark pages, and transparent pages once scrolled) */
.ndh.ndh--dark .ndh-inner,
.ndh.ndh--transparent.ndh--solid .ndh-inner { background: var(--ndh-dark-bg); border-bottom-color: transparent; }

/* White text for dark and transparent */
.ndh.ndh--dark .ndh-trigger, .ndh.ndh--transparent .ndh-trigger,
.ndh.ndh--dark .ndh-link, .ndh.ndh--transparent .ndh-link,
.ndh.ndh--dark .ndh-burger, .ndh.ndh--transparent .ndh-burger { color: #FFFFFF; }
.ndh.ndh--dark .ndh-trigger:hover, .ndh.ndh--transparent .ndh-trigger:hover,
.ndh.ndh--dark .ndh-link:hover, .ndh.ndh--transparent .ndh-link:hover { background: rgba(255, 255, 255, 0.12); }
.ndh.ndh--dark .ndh-trigger[aria-expanded="true"],
.ndh.ndh--transparent .ndh-trigger[aria-expanded="true"] { background: rgba(255, 255, 255, 0.16); }
.ndh.ndh--dark .ndh-quiet, .ndh.ndh--transparent .ndh-quiet { color: rgba(255, 255, 255, 0.85); }
.ndh.ndh--dark .ndh-quiet:hover, .ndh.ndh--transparent .ndh-quiet:hover { color: #FFFFFF; }
.ndh.ndh--dark .ndh-divider, .ndh.ndh--transparent .ndh-divider { background: rgba(255, 255, 255, 0.25); }
.ndh.ndh--dark .ndh-actions .ndh-btn--outline,
.ndh.ndh--transparent .ndh-actions .ndh-btn--outline { background: transparent; border-color: #FFFFFF; color: #FFFFFF; }
.ndh.ndh--dark .ndh-actions .ndh-btn--outline:hover,
.ndh.ndh--transparent .ndh-actions .ndh-btn--outline:hover { background: #FFFFFF; color: var(--ndh-ink); }
.ndh.ndh--dark .ndh-actions .ndh-btn--solid:hover,
.ndh.ndh--transparent .ndh-actions .ndh-btn--solid:hover { background: #FFFFFF; border-color: #FFFFFF; color: var(--ndh-ink); }

/* ---- Top bar (sits above the header and scrolls away) ------------------ */
.ndh-util {
	position: relative; z-index: 1001; height: 36px; box-sizing: border-box;
	background: #F6F7F9; border-bottom: 1px solid #E3E5EA;
	font-family: 'DM Sans', system-ui, sans-serif;
}
.ndh-util .ndh-util-bar {
	box-sizing: border-box; max-width: calc(1150px + 96px); height: 100%; margin: 0 auto; padding: 0 48px;
	display: flex; align-items: center; justify-content: flex-end; gap: 24px;
}
.ndh-util .ndh-util-bar a { font-size: 13px; font-weight: 500; line-height: 1; color: #5B606B; text-decoration: none; }
.ndh-util .ndh-util-bar a:hover { color: #16181D; }
.ndh-util.ndh-util--transparent { background: transparent; border-bottom-color: transparent; }
.ndh-util.ndh-util--dark { background: #212938; border-bottom-color: transparent; } /* same as the dark header */
.ndh-util.ndh-util--transparent .ndh-util-bar a,
.ndh-util.ndh-util--dark .ndh-util-bar a { color: rgba(255, 255, 255, 0.78); }
.ndh-util.ndh-util--transparent .ndh-util-bar a:hover,
.ndh-util.ndh-util--dark .ndh-util-bar a:hover { color: #FFFFFF; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1280px) {
	.ndh { --ndh-gutter: 32px; }
	.ndh .ndh-bar { gap: 28px; }
	.ndh .ndh-trigger, .ndh .ndh-link { padding: 0 10px; }
	.ndh .ndh-quiet { padding: 0 8px; }
	.ndh .ndh-divider { margin: 0 8px; }
	.ndh-util .ndh-util-bar { max-width: calc(1150px + 64px); padding: 0 32px; }
}

@media (max-width: 1180px) {
	.ndh { --ndh-gutter: 20px; --ndh-bar-h: 64px; --ndh-util-h: 0px; }
	.ndh-util { display: none; }
	.ndh .ndh-nav, .ndh .ndh-actions { display: none; }
	.ndh .ndh-burger { display: flex; }
	.ndh .ndh-logo img { height: 28px; }
}

@media (min-width: 1181px) {
	.ndh .ndh-drawer { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.ndh * { transition: none !important; }
}
