/* ==========================================================================
   NJ Real Estate Licensing School: layout (header, navigation, sections, page hero, footer,
   mobile action bar). Loaded on every page.
   ========================================================================== */

.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block: 0; }
.nj-main { margin: 0; }
.nj-main > .wp-block-post-content > * + * { margin-block-start: 0; }

/* --------------------------------------------------------------------------
   Sections: children centred in the wide container with the site gutter.
   -------------------------------------------------------------------------- */
.nj-section { padding: calc(var(--nj-section) / 2) var(--nj-gutter); position: relative; }
.nj-section > * { max-width: var(--nj-wide); margin-inline: auto; }
.nj-section > * + * { margin-top: 44px; }
.nj-section--tight { padding-block: 32px; }
.nj-section--flush { padding-top: 32px; }
.nj-section--first { padding-top: 48px; }
.nj-page-hero + .nj-section { padding-top: 40px; }
@media (max-width: 781px) {
	.nj-section--tight { padding-block: 24px; }
	.nj-section > * + * { margin-top: 28px; }
}

/* Section heading row: title left, supporting copy right, on a heavy rule (like a chapter opener). */
.nj-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 20px 64px; align-items: end; padding-top: 28px; border-top: var(--nj-rule); }
.nj-head > * { margin: 0; }
.nj-head > .nj-eyebrow { grid-column: 1 / -1; justify-self: start; }
.nj-head--dark { border-top-color: rgb(255 255 255 / .9); }
@media (max-width: 900px) { .nj-head { grid-template-columns: 1fr; align-items: start; padding-top: 20px; } }

/* --------------------------------------------------------------------------
   Header. Two rows: an ink utility line (tagline, phone, email) that scrolls away, and a white bar
   (logo, navigation, Enroll) that stays. The wrapper is sticky with a negative top equal to the
   utility line, so no script is needed for the stick.
   -------------------------------------------------------------------------- */
.nj-header-wrap { --nj-topline-h: 38px; --nj-admin: 0px; position: sticky; top: calc(var(--nj-admin) - var(--nj-topline-h)); z-index: 50; }
.admin-bar .nj-header-wrap { --nj-admin: 32px; }
@media (max-width: 782px) { .admin-bar .nj-header-wrap { --nj-admin: 46px; } }
@media (max-width: 600px) { .admin-bar .nj-header-wrap { --nj-admin: 0px; } }

.nj-header { --nj-bleed: max(var(--nj-gutter), calc((100% - var(--nj-wide)) / 2)); }
.nj-header > * { margin: 0 !important; }

.nj-topline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--nj-topline-h);
	padding: 0 var(--nj-bleed);
	background: var(--nj-ink);
	color: #fff;
}
.nj-topline > * { margin: 0 !important; }
.nj-topline__tag {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--nj-body);
	font-size: 12px !important;
	font-weight: 600;
	line-height: 1.2 !important;
	letter-spacing: .12em !important;
	text-transform: uppercase;
	color: #fff;
}
.nj-topline__tag::before {
	content: "";
	width: 11px;
	height: 11px;
	flex: none;
	color: var(--nj-red);
	background: var(--nj-pane) 0 0 / 5px 5px no-repeat, var(--nj-pane) 100% 0 / 5px 5px no-repeat, var(--nj-pane) 0 100% / 5px 5px no-repeat, var(--nj-pane) 100% 100% / 5px 5px no-repeat;
}
.nj-topline__links { display: flex; align-items: center; gap: 0; font-size: 13px; font-weight: 500; }
.nj-topline__links a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--nj-topline-h); padding: 0 0 0 18px; margin-left: 18px; color: #fff; text-decoration: none; border-left: 1px solid rgb(255 255 255 / .2); }
.nj-topline__links a:first-child { border-left: 0; margin-left: 0; padding-left: 0; }
.nj-topline__links a:hover { color: var(--nj-red-300); }
.nj-topline__phone { font-weight: 600; font-feature-settings: "tnum"; }
.nj-topline__phone::before { content: ""; width: 13px; height: 13px; background: var(--nj-red-300); -webkit-mask: var(--nj-phone) center / contain no-repeat; mask: var(--nj-phone) center / contain no-repeat; }

.nj-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: var(--wp--custom--header--height);
	padding: 0 var(--nj-bleed);
	background: #fff;
	border-bottom: var(--nj-hair);
	transition: box-shadow .25s var(--nj-ease-io);
}
.nj-header.is-scrolled .nj-header__bar { box-shadow: 0 10px 24px -18px rgb(26 28 31 / .45); }
.nj-header__bar > * { margin: 0 !important; }
.nj-logo { flex-shrink: 0; line-height: 0; }
.nj-logo img { width: 138px; height: auto; }

/* Navigation: right-aligned, set tight to the Enroll button. */
.nj-nav { margin-left: auto !important; }
.nj-nav .wp-block-navigation__container { gap: 0; }
.nj-nav .wp-block-navigation-item__content {
	color: var(--nj-ink);
	text-decoration: none;
	font-family: var(--nj-body);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -.003em;
	padding: 10px 12px;
	transition: color .18s var(--nj-ease-io);
}

@media (min-width: 1180px) {
	/* top-level links are as tall as the bar, so the roof marker and the dropdown hang from its bottom rule */
	.nj-nav .wp-block-navigation__container > .wp-block-navigation-item { position: relative; display: flex; align-items: center; }
	.nj-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { display: flex; align-items: center; min-height: var(--wp--custom--header--height); }
	/* links that only belong in the phone menu */
	.nj-nav .nj-nav__home, .nj-nav .nj-nav__enroll, .nj-nav .nj-nav__call { display: none !important; }

	/* the marker under the current / hovered item is a small roof peak rising out of the bar's bottom rule */
	.nj-nav .wp-block-navigation__container > .wp-block-navigation-item::after {
		content: "";
		position: absolute;
		left: 50%;
		bottom: -1px;
		width: 22px;
		height: 9px;
		margin-left: -11px;
		background: var(--nj-red);
		clip-path: polygon(0 100%, 50% 0, 100% 100%, calc(100% - 4px) 100%, 50% 4px, 4px 100%);
		opacity: 0;
		transform: translateY(5px);
		transition: opacity .2s var(--nj-ease-io), transform .3s var(--nj-ease);
		pointer-events: none;
	}
	.nj-nav .wp-block-navigation__container > .wp-block-navigation-item:where(:hover, :focus-within, .current-menu-item, .current-menu-ancestor)::after,
	.nj-nav .wp-block-navigation__container > .wp-block-navigation-item:has([aria-current="page"])::after { opacity: 1; transform: none; }
	.nj-nav .wp-block-navigation__container > .wp-block-navigation-item:where(:hover, :focus-within) > .wp-block-navigation-item__content { color: var(--nj-red-700); }

	/* chevron inside the item, right of the label */
	.nj-nav .has-child > .wp-block-navigation-item__content { padding-right: 28px; }
	.nj-nav .has-child > .wp-block-navigation-submenu__toggle {
		position: absolute; right: 9px; top: 50%; translate: 0 -50%;
		width: 14px; height: 14px; margin: 0; padding: 0;
		display: flex; align-items: center; justify-content: center;
		color: var(--nj-ink); z-index: 1;
	}
	.nj-nav .has-child > .wp-block-navigation-submenu__toggle svg { width: 11px; height: 11px; margin: 0; stroke-width: 2.2; transition: rotate .3s var(--nj-ease); }
	.nj-nav .wp-block-navigation__container > .has-child:where(:hover, :focus-within) > .wp-block-navigation-submenu__toggle svg,
	.nj-nav .wp-block-navigation__container > .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"] svg { rotate: 180deg; }
	.nj-nav .wp-block-navigation__container > .has-child:where(:hover, :focus-within) > .wp-block-navigation-submenu__toggle { color: var(--nj-red-700); }

	/* dropdown: a ruled sheet hanging from the bar */
	.nj-nav .wp-block-navigation__submenu-container {
		top: 100% !important;
		left: 0 !important;
		min-width: 280px !important;
		white-space: nowrap;
		padding: 10px !important;
		border: 0 !important;
		border-top: var(--nj-rule) !important;
		border-radius: 0 0 var(--nj-r-card) var(--nj-r-card);
		background: #fff !important;
		box-shadow: 0 0 0 1px var(--nj-line), 0 24px 40px -20px rgb(26 28 31 / .35);
		translate: 0 6px;
		transition: opacity .18s var(--nj-ease-io), translate .28s var(--nj-ease), visibility .18s;
	}
	.nj-nav .has-child:where(:hover, :focus-within) > .wp-block-navigation__submenu-container,
	.nj-nav .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container { translate: 0 0; }
	.nj-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { display: block; width: 100%; padding: 10px 12px !important; border-radius: 2px; font-size: 15px; font-weight: 500; }
	.nj-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
	.nj-nav .wp-block-navigation__submenu-container [aria-current="page"] { background: var(--nj-paper); color: var(--nj-red-700); }
	/* long list (Student Resources): two columns, read top to bottom */
	.nj-nav .nj-nav-resources:where(:hover, :focus-within) > .wp-block-navigation__submenu-container,
	.nj-nav .nj-nav-resources > .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container { display: block !important; columns: 2; column-gap: 10px; min-width: 500px !important; }
	.nj-nav .nj-nav-resources > .wp-block-navigation__submenu-container > .wp-block-navigation-item { break-inside: avoid; }
	/* last dropdown opens leftwards so it never leaves the viewport */
	.nj-nav .wp-block-navigation__container > .has-child:nth-last-child(-n+4) > .wp-block-navigation__submenu-container { left: auto !important; right: 0 !important; }

	/* nested (level 3+) */
	.nj-nav .wp-block-navigation__submenu-container .has-child > .wp-block-navigation-submenu__toggle svg { rotate: 0deg; }
	.nj-nav .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container { top: -10px !important; left: calc(100% + 8px) !important; right: auto !important; translate: -6px 0; }
	.nj-nav .wp-block-navigation__submenu-container .has-child:where(:hover, :focus-within) > .wp-block-navigation__submenu-container { translate: 0 0; }
	.nj-nav .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container::before { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 12px; }

	.nj-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: none !important; }
}
/* laptop widths: tighter items so the full menu still fits */
@media (min-width: 1180px) and (max-width: 1339px) {
	.nj-header__bar { gap: 16px; }
	.nj-logo img { width: 124px; }
	.nj-nav .wp-block-navigation-item__content { font-size: 14px; padding-inline: 9px; }
	.nj-nav .has-child > .wp-block-navigation-item__content { padding-right: 24px; }
	.nj-nav .has-child > .wp-block-navigation-submenu__toggle { right: 7px; }
	.nj-header__cta .wp-block-button__link.nj-btn { padding-inline: 16px; }
}

/* Right side of the bar: call (icon on small screens) + Enroll */
.nj-header__cta { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.nj-header__cta > * { margin: 0 !important; }
.nj-header__cta .wp-block-button__link.nj-btn { min-height: 46px; }
.nj-header__tel { line-height: 0; }
.nj-header__tel a { display: none; }

/* Phone / tablet navigation: collapses below 1180px. */
.nj-nav .wp-block-navigation__responsive-container-open,
.nj-nav .wp-block-navigation__responsive-container-close { width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: var(--nj-r-btn); }
.nj-nav .wp-block-navigation__responsive-container-open { background: var(--nj-ink); color: #fff; }
@media (max-width: 1179px) {
	.nj-header__bar { gap: 10px; min-height: 68px; }
	.nj-logo img { width: 124px; }
	.nj-nav { margin-left: 0 !important; order: 3; align-self: center; }
	.nj-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.nj-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
	.nj-header__cta { margin-left: auto !important; }
	.nj-header__tel a {
		display: inline-flex; align-items: center; justify-content: center;
		width: 46px; height: 46px; border-radius: var(--nj-r-btn);
		box-shadow: inset 0 0 0 1.5px var(--nj-ink); color: var(--nj-ink); font-size: 0; text-decoration: none;
	}
	.nj-header__tel a::before { content: ""; width: 19px; height: 19px; background: currentColor; -webkit-mask: var(--nj-phone) center / contain no-repeat; mask: var(--nj-phone) center / contain no-repeat; }
	.nj-topline__links a + a { display: none; }
}
@media (max-width: 600px) {
	.nj-header-wrap { --nj-topline-h: 32px; }
	.nj-header__bar { min-height: 64px; }
	.nj-logo img { width: 112px; }
	.nj-header__enroll { display: none !important; }
	.nj-topline { justify-content: center; }
	.nj-topline__links { display: none; }
	.nj-topline__tag { font-size: 11px !important; }
}

/* Open menu: full sheet. The close button sits exactly where the hamburger was (site.js measures it). */
.nj-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: #fff !important;
	color: var(--nj-ink) !important;
	padding: 0 var(--nj-gutter) 32px;
	overflow-y: auto;
	animation: nj-menu-in .18s ease-out both !important;
	transform: none !important;
}
@keyframes nj-menu-in { from { opacity: 0; } to { opacity: 1; } }
.nj-nav .is-menu-open .wp-block-navigation__responsive-dialog::before {
	content: "Menu";
	position: fixed;
	inset: 0 0 auto 0;
	display: flex;
	align-items: center;
	height: calc(var(--nj-toggle-top, 18px) + var(--nj-toggle-size, 46px) + 12px);
	padding: calc(var(--nj-toggle-top, 18px) - 12px) var(--nj-gutter) 0;
	background: #fff;
	border-bottom: var(--nj-rule);
	font-family: var(--nj-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--nj-ink);
	z-index: 9;
	pointer-events: none;
}
.nj-nav .is-menu-open .wp-block-navigation__responsive-container-close {
	position: fixed !important;
	top: var(--nj-toggle-top, 18px) !important;
	left: var(--nj-toggle-left, auto) !important;
	right: auto !important;
	width: var(--nj-toggle-size, 46px);
	height: var(--nj-toggle-size, 46px);
	background: var(--nj-ink);
	color: #fff;
	z-index: 10;
}
.nj-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: calc(var(--nj-toggle-top, 18px) + var(--nj-toggle-size, 46px) + 20px) !important; align-items: stretch !important; }
.nj-nav .is-menu-open .wp-block-navigation__container { width: 100%; margin: 0 !important; gap: 0 !important; align-items: stretch !important; }
.nj-nav .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: var(--nj-hair); }
.nj-nav .is-menu-open .wp-block-navigation-item__content {
	display: flex !important;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	font-family: var(--nj-display);
	font-size: 22px;
	font-weight: 500;
	letter-spacing: -.01em;
	padding: 17px 0 !important;
	background: none !important;
}
.nj-nav .is-menu-open .wp-block-navigation-item__content::after {
	content: "";
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	background: var(--nj-red);
	-webkit-mask: var(--nj-arrow) center / contain no-repeat;
	mask: var(--nj-arrow) center / contain no-repeat;
}

/* Close + open buttons: icon centred */
.nj-nav .is-menu-open .wp-block-navigation__responsive-container-close,
.nj-nav .wp-block-navigation__responsive-container-open { display: flex; align-items: center; justify-content: center; padding: 0 !important; line-height: 0; }
.nj-nav .wp-block-navigation__responsive-container-close svg,
.nj-nav .wp-block-navigation__responsive-container-open svg { width: 24px; height: 24px; margin: 0; flex: none; }

/* Phone menu: submenus are an accordion (site.js) */
.nj-nav .is-menu-open .wp-block-navigation-item.has-child { display: grid !important; grid-template-columns: minmax(0, 1fr) 46px; align-items: center; column-gap: 12px; }
.nj-nav .is-menu-open .has-child > .wp-block-navigation-item__content { grid-column: 1; }
.nj-nav .is-menu-open .has-child > .wp-block-navigation-item__content::after { display: none; }
.nj-nav .is-menu-open .has-child > .wp-block-navigation-submenu__toggle {
	display: flex !important;
	grid-column: 2;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--nj-r-btn);
	background: var(--nj-paper);
	color: var(--nj-ink);
	cursor: pointer;
}
.nj-nav .is-menu-open .has-child > .wp-block-navigation-submenu__toggle svg { width: 14px; height: 14px; margin: 0; transform: none !important; transition: transform .25s var(--nj-ease); }
.nj-nav .is-menu-open .has-child.is-open > .wp-block-navigation-submenu__toggle { background: var(--nj-red-600); color: #fff; }
.nj-nav .is-menu-open .has-child.is-open > .wp-block-navigation-submenu__toggle svg { transform: rotate(180deg) !important; }
.nj-nav .is-menu-open .has-child > .wp-block-navigation__submenu-container {
	display: none !important;
	grid-column: 1 / -1;
	position: static !important;
	width: 100% !important;
	min-width: 0 !important;
	padding: 0 0 14px 14px !important;
	margin: 0 !important;
	border: 0 !important;
	border-left: 2px solid var(--nj-red) !important;
	opacity: 1 !important;
	visibility: visible !important;
	height: auto !important;
	background: transparent !important;
	box-shadow: none;
}
.nj-nav .is-menu-open .has-child.is-open > .wp-block-navigation__submenu-container { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 0; margin-bottom: 16px !important; }
.nj-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { border-bottom: 0; }
.nj-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-family: var(--nj-body);
	font-size: 17px !important;
	font-weight: 500;
	letter-spacing: 0;
	padding: 11px 0 !important;
	color: var(--nj-stone);
}
.nj-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after { display: none; }
.nj-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { color: var(--nj-ink); }
.nj-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container { margin: 0 0 8px 8px !important; }
/* Enroll / Call close the phone menu as two full-width buttons */
.nj-nav .is-menu-open :is(.nj-nav__enroll, .nj-nav__call) { border-bottom: 0; margin-top: 12px; }
.nj-nav .is-menu-open .nj-nav__enroll { margin-top: 28px; }
.nj-nav .is-menu-open :is(.nj-nav__enroll, .nj-nav__call) > .wp-block-navigation-item__content {
	justify-content: center;
	gap: 12px;
	min-height: 54px;
	padding: 0 20px !important;
	border-radius: var(--nj-r-btn);
	font-family: var(--nj-body);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .01em;
}
.nj-nav .is-menu-open .nj-nav__enroll > .wp-block-navigation-item__content { background: var(--nj-red-600) !important; color: #fff; }
.nj-nav .is-menu-open .nj-nav__enroll > .wp-block-navigation-item__content::after { background: #fff; }
.nj-nav .is-menu-open .nj-nav__call > .wp-block-navigation-item__content { box-shadow: inset 0 0 0 1.5px var(--nj-ink); }
.nj-nav .is-menu-open .nj-nav__call > .wp-block-navigation-item__content::after { order: -1; background: var(--nj-ink); -webkit-mask-image: var(--nj-phone); mask-image: var(--nj-phone); }

/* Landing header: logo + call link only */
.nj-header--lp .nj-header__bar { justify-content: space-between; }
.nj-header__call a { display: grid; grid-template-columns: auto auto; column-gap: 14px; align-items: center; text-decoration: none; color: var(--nj-stone); font-size: 13px; font-weight: 500; line-height: 1.25; text-align: right; }
.nj-header__call a br { display: none; }
.nj-header__call strong { grid-row: 1 / span 2; grid-column: 2; font-family: var(--nj-body); font-size: 17px; font-weight: 700; font-feature-settings: "tnum"; color: #fff; background: var(--nj-red-600); padding: 13px 16px; border-radius: var(--nj-r-btn); transition: background-color .2s; }
.nj-header__call a:hover strong { background: var(--nj-ink); }
@media (max-width: 600px) { .nj-header__call a { font-size: 0; } .nj-header__call strong { font-size: 15px; } }

/* --------------------------------------------------------------------------
   Page hero (inner pages): big slab H1 on paper, optional photo on the right.
   -------------------------------------------------------------------------- */
.nj-page-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px 64px;
	align-items: center;
	max-width: calc(var(--nj-wide) + 2 * var(--nj-gutter));
	margin: 0 auto;
	padding: 72px var(--nj-gutter) 32px;
}
.nj-page-hero > * { margin: 0 !important; }
.nj-page-hero--media { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); padding-bottom: 0; }
.nj-page-hero__body { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 860px; }
.nj-page-hero__body > * { margin: 0 !important; }
.nj-page-hero h1 { font-size: 56px; line-height: 1.06; letter-spacing: -.02em; }
/* the ridge: a short roof line under the page title */
.nj-page-hero:not(.nj-page-hero--media):not(.nj-suburb-hero) .nj-page-hero__body > h1:first-child::after,
.nj-page-hero:not(.nj-page-hero--media):not(.nj-suburb-hero) .nj-page-hero__body > .nj-eyebrow + h1::after { content: ""; display: block; width: 72px; height: 18px; margin-top: 22px; background: var(--nj-ridge) left center / contain no-repeat; }
.nj-page-hero__media { border-radius: var(--nj-r-card); overflow: hidden; background: var(--nj-sand); aspect-ratio: 4 / 3; }
.nj-page-hero__media img, .nj-page-hero__media .wp-block-image { width: 100%; height: 100%; object-fit: cover; }
.nj-page-hero__media .wp-block-image { height: 100%; }
@media (max-width: 900px) {
	.nj-page-hero, .nj-page-hero--media { grid-template-columns: 1fr; padding-top: 44px; }
	.nj-page-hero h1 { font-size: 36px; }
}

/* --------------------------------------------------------------------------
   Footer: full-width ink, link columns on rules, the logo's three roofs as sign-off.
   -------------------------------------------------------------------------- */
.nj-footer-wrap { padding: calc(var(--nj-section) / 2) 0 0; }

.nj-footer {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--nj-ink);
	color: rgb(255 255 255 / .72);
	padding: 72px var(--nj-gutter) 0;
}
.nj-footer > * { max-width: var(--nj-wide); margin-inline: auto; }
.nj-footer__grid { display: grid; grid-template-columns: 1.35fr 1fr 1.1fr .9fr; gap: 48px 40px; }
.nj-footer__grid > * > * { margin: 0 !important; }
.nj-footer__brand { display: flex; flex-direction: column; gap: 16px; }
.nj-footer__logo img { width: 168px; height: auto; }
.nj-footer__name { font-family: var(--nj-display); font-size: 20px; font-weight: 500; color: #fff; letter-spacing: -.005em; }
.nj-footer__contact { font-size: 16px; line-height: 1.75; }
.nj-footer a { color: rgb(255 255 255 / .88); text-decoration: none; }
.nj-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--nj-red); text-decoration-thickness: 1.5px; }
.nj-footer__head { font-family: var(--nj-body); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; padding-bottom: 14px; margin-bottom: 16px !important; border-bottom: 1px solid rgb(255 255 255 / .22); }
.nj-footer__links { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.nj-footer__links li + li { margin-top: 10px; }
.nj-footer__col--cta .wp-block-buttons { flex-direction: column; align-items: stretch; }
.nj-footer__col--cta .wp-block-button, .nj-footer__col--cta .wp-block-button__link { width: 100%; }
.nj-footer__social { gap: 8px !important; }
.nj-footer__social .wp-social-link { background: transparent !important; color: #fff !important; border-radius: var(--nj-r-btn) !important; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); transition: background-color .2s, box-shadow .2s; }
.nj-footer__social .wp-social-link a { padding: 10px; }
.nj-footer__social .wp-social-link:hover { background: var(--nj-red-600) !important; box-shadow: none; transform: none; }
.nj-footer__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px !important; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .22); font-size: 13px; }
.nj-footer__roofs {
	/* the logo's three roofs as a giant sign-off, cropped by the footer edge like a horizon */
	width: 100%;
	max-width: 1120px !important;
	aspect-ratio: 1260 / 312;
	margin: 36px auto -6px !important;
	background: linear-gradient(180deg, rgb(230 76 80 / .55), rgb(230 76 80 / .1) 92%);
	-webkit-mask: url(../img/roofs.svg) center bottom / 100% auto no-repeat;
	mask: url(../img/roofs.svg) center bottom / 100% auto no-repeat;
	pointer-events: none;
}
@media (max-width: 1024px) { .nj-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
	.nj-footer { padding-top: 48px; }
	.nj-footer__grid { grid-template-columns: 1fr; gap: 36px; }
	.nj-footer__bottom { flex-direction: column; margin-top: 36px !important; }
}
/* Landing footer */
.nj-footer--lp { padding-top: 40px; padding-bottom: 40px; }
.nj-footer__lp-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; font-size: 14px; }
.nj-footer__lp-row strong { display: block; color: #fff; font-size: 16px; }
.nj-footer__lp-row a + a { margin-left: 16px; }

/* --------------------------------------------------------------------------
   Mobile action bar (touch widths, after the first screen): docked to the bottom edge
   -------------------------------------------------------------------------- */
.nj-mobile-actions { display: none; }
@media (max-width: 1023px) {
	.nj-mobile-actions {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: var(--nj-rule);
		transform: translateY(110%);
		transition: transform .35s var(--nj-ease);
	}
	.nj-mobile-actions.is-visible { transform: none; }
	.nj-mobile-actions .wp-block-buttons { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
	.nj-mobile-actions .wp-block-button { min-width: 0; }
	.nj-mobile-actions .wp-block-button__link.nj-btn { width: 100%; min-height: 46px; font-size: 14px; padding: 0 10px; gap: 8px; }
	.nj-footer { padding-bottom: 66px; }
	.nj-footer--lp { padding-bottom: 106px; }
}

/* --------------------------------------------------------------------------
   Grid/flex children must not inherit WordPress flow-layout block gaps.
   -------------------------------------------------------------------------- */
:where(.nj-head, .nj-page-hero, .nj-page-hero__body, .nj-hero-home, .nj-hero-home__copy, .nj-hero-home__media, .nj-intro__grid,
	.nj-plans, .nj-plan, .nj-products, .nj-product, .nj-product__body, .nj-includes, .nj-includes__card, .nj-rules, .nj-steps,
	.nj-path__card, .nj-teacher, .nj-teacher__body, .nj-features, .nj-feature, .nj-local, .nj-faq-split, .nj-faq, .nj-faq__item,
	.nj-cta__card, .nj-cta__body, .nj-contact, .nj-contact__map, .nj-contact__form, .nj-contact__info, .nj-cards, .nj-card,
	.nj-schedules, .nj-schedule, .nj-schedule__body, .nj-stats, .nj-stat, .nj-step-cards, .nj-step-card, .nj-quotes, .nj-quote,
	.nj-lp-hero, .nj-lp-hero__copy, .nj-lp-form, .nj-footer__grid, .nj-post__layout, .nj-post__head, .nj-price, .nj-next,
	.nj-flyers, .nj-videos, .nj-prose, .nj-faq-wrap, .nj-rating, .nj-mini-cta, .nj-contact__lines, .nj-areas, .nj-header__cta) > * { margin-block: 0 !important; }
