/* ==========================================================================
   Town pages (posts in the "Suburb" category) + their archive.
   Local landing pages, not blog articles: hero with the gabled featured photo, H1 (+ excerpt as
   lead when one is written) + Enroll / Call; content beside a sticky contact sheet; Google reviews,
   closing CTA, "Students also join us from" town links. Content blocks are styled in content.css.
   ========================================================================== */
.nj-suburb { --nj-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7.5 7.5 0 0 0-7.5 7.5C4.5 15 12 22 12 22s7.5-7 7.5-12.5A7.5 7.5 0 0 0 12 2zm0 10.3a2.8 2.8 0 1 1 0-5.6 2.8 2.8 0 0 1 0 5.6z'/%3E%3C/svg%3E"); }

/* Hero */
.nj-suburb-hero { padding-bottom: 0; }
.nj-suburb-hero.nj-page-hero--media { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px 80px; padding-top: 56px; }
.nj-suburb-hero h1 { font-size: 52px; }
.nj-suburb-hero__lead p { margin: 0; }
.nj-suburb-hero__lead .wp-block-post-excerpt__more-text { display: none; }
.nj-suburb-hero__media-wrap { position: relative; overflow: visible; aspect-ratio: auto; background: none; border-radius: 0; }
.nj-suburb-hero__media-wrap > .wp-block-post-featured-image { aspect-ratio: 4 / 3.7; overflow: hidden; background: var(--nj-sand); border-radius: var(--nj-r-card); }
.nj-suburb-hero__media, .nj-suburb-hero__media img { width: 100%; height: 100% !important; margin: 0 !important; object-fit: cover; }
@media (max-width: 900px) {
	.nj-suburb-hero.nj-page-hero--media { grid-template-columns: 1fr; padding-top: 40px; }
	.nj-suburb-hero h1 { font-size: 36px; }
	.nj-suburb-hero__media-wrap { max-width: 520px; width: 100%; margin-inline: auto !important; }
	.nj-suburb-hero__media-wrap > .wp-block-post-featured-image { aspect-ratio: 4 / 3; }
}

/* Body: content + sticky contact sheet (the aside stretches so the sheet can stick) */
.nj-suburb__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
	gap: 48px 88px;
	align-items: start;
	max-width: calc(var(--nj-wide) + 2 * var(--nj-gutter));
	margin: 0 auto;
	padding: 72px var(--nj-gutter) calc(var(--nj-section) / 2);
}
.nj-suburb__body > * { margin: 0 !important; max-width: none !important; }
.nj-suburb__content { font-size: 18px; line-height: 1.7; color: var(--nj-stone); }
.nj-suburb__content > * { margin-block: 0 20px; }
.nj-suburb__content > :last-child { margin-bottom: 0; }
.nj-suburb__content > .nj-section { padding: 0 !important; background: none !important; }
.nj-suburb__content > .nj-section + .nj-section { margin-top: 56px !important; }
.nj-suburb__content h2 { font-size: 34px; line-height: 1.14; letter-spacing: -.015em; margin: 0 0 16px; }
.nj-suburb__content h3 { font-size: 24px; line-height: 1.25; margin: 32px 0 12px; }
.nj-suburb__content > h2 { margin-top: 48px; padding-top: 28px; border-top: var(--nj-hair); }
.nj-suburb__content > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.nj-suburb__content > h3 { margin-top: 36px; }
.nj-suburb__content p { margin-bottom: 16px; }
.nj-suburb__content :is(p, ul, figure, .nj-faq) + h2 { margin-top: 48px; }
.nj-suburb__content .is-style-nj-check { margin-top: 24px; }
.nj-suburb__content > :is(.wp-block-table, .wp-block-quote, .wp-block-image, .nj-embed-map, .wp-block-embed, .wp-block-group, .wp-block-separator) { margin-block: 32px; }
.nj-suburb__content .nj-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.nj-suburb__content .nj-head { display: block; padding-top: 0; border-top: 0; }
.nj-suburb__aside { align-self: stretch; scroll-margin-top: 104px; }
.nj-suburb__card {
	position: sticky; top: 104px;
	display: grid; gap: 12px;
	padding: 30px 32px 32px;
	background: #fff;
	border: 1.5px solid var(--nj-ink);
	border-top: 5px solid var(--nj-red);
	border-radius: var(--nj-r-card);
}
.nj-suburb__card > * { margin: 0 !important; }
.nj-suburb__card-title { font-size: 30px; line-height: 1.12; letter-spacing: -.015em; margin-bottom: 12px !important; }
.nj-suburb__card .frm-fluent-form .ff-btn-submit { width: 100%; }

/* Reviews band */
.nj-suburb-reviews .nj-head { margin-bottom: 32px; }
.nj-suburb-reviews .nj-reviews { margin-top: 0 !important; }

/* Town links (related on single pages, A–Z grid on the archive, and the static .nj-areas list) */
.nj-suburb-related, .nj-suburb-list { max-width: calc(var(--nj-wide) + 2 * var(--nj-gutter)); margin: 0 auto; padding-inline: var(--nj-gutter); }
.nj-suburb-list { padding-block: 56px calc(var(--nj-section) / 2); }
.nj-suburb-related:not(:has(.wp-block-post)) { display: none; }
.nj-suburb-related__title { margin: 0 0 24px !important; padding-top: 24px; border-top: var(--nj-rule); }
.nj-suburb-cards { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; list-style: none; margin: 0 !important; padding: 0 !important; }
.nj-suburb-cards > li { margin: 0 !important; }
.nj-suburb-card {
	position: relative;
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) 18px;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 18px 20px;
	background: #fff;
	border: var(--nj-hair);
	border-radius: var(--nj-r-card);
	transition: border-color .2s var(--nj-ease-io);
}
.nj-suburb-card > * { margin: 0 !important; }
.nj-suburb-card::before { content: ""; grid-column: 1; grid-row: 1; width: 20px; height: 20px; background: var(--nj-red-600); -webkit-mask: var(--nj-pin) center / contain no-repeat; mask: var(--nj-pin) center / contain no-repeat; }
.nj-suburb-card::after { content: ""; grid-column: 3; grid-row: 1; width: 16px; height: 16px; background: var(--nj-ink); -webkit-mask: var(--nj-arrow) center / contain no-repeat; mask: var(--nj-arrow) center / contain no-repeat; transition: transform .3s var(--nj-ease), background-color .2s; }
.nj-suburb-card__title { grid-column: 2; font-family: var(--nj-display); font-size: 19px !important; line-height: 1.3 !important; font-weight: 500 !important; letter-spacing: -.005em !important; }
.nj-suburb-card__title a { color: inherit; text-decoration: none; }
.nj-suburb-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.nj-suburb-card__excerpt { grid-column: 2 / -1; font-size: 15px; color: var(--nj-stone); }
.nj-suburb-card__excerpt p { margin: 0; }
.nj-suburb-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.nj-suburb-card:hover { border-color: var(--nj-ink); }
.nj-suburb-card:hover::after { transform: translateX(4px); background: var(--nj-red-600); }
.nj-suburb-card:has(a:focus-visible) { outline: 2px solid var(--nj-red-600); outline-offset: 2px; }
.nj-suburb-cards--archive .nj-suburb-card { align-items: start; row-gap: 8px; }

/* Static list of towns (Group "nj-areas" holding a List): linked towns are links, the rest plain labels */
.nj-areas ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.nj-areas li { margin: 0 !important; position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 16px; background: #fff; border: var(--nj-hair); border-radius: var(--nj-r-card); font-family: var(--nj-display); font-size: 17px; font-weight: 500; color: var(--nj-ink); line-height: 1.3; }
.nj-areas li::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--nj-line); -webkit-mask: var(--nj-pin, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7.5 7.5 0 0 0-7.5 7.5C4.5 15 12 22 12 22s7.5-7 7.5-12.5A7.5 7.5 0 0 0 12 2zm0 10.3a2.8 2.8 0 1 1 0-5.6 2.8 2.8 0 0 1 0 5.6z'/%3E%3C/svg%3E")) center / contain no-repeat; mask: var(--nj-pin, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7.5 7.5 0 0 0-7.5 7.5C4.5 15 12 22 12 22s7.5-7 7.5-12.5A7.5 7.5 0 0 0 12 2zm0 10.3a2.8 2.8 0 1 1 0-5.6 2.8 2.8 0 0 1 0 5.6z'/%3E%3C/svg%3E")) center / contain no-repeat; }
.nj-areas li:has(a) { transition: border-color .2s; }
.nj-areas li:has(a)::before { background: var(--nj-red-600); }
.nj-areas li:has(a):hover { border-color: var(--nj-ink); }
.nj-areas li a { color: inherit; text-decoration: none; }
.nj-areas li a::after { content: ""; position: absolute; inset: 0; }

@media (max-width: 1024px) {
	.nj-suburb__body { grid-template-columns: 1fr; padding-top: 48px; }
	.nj-suburb__card { position: static; }
}
@media (max-width: 600px) {
	.nj-suburb__content { font-size: 17px; }
	.nj-suburb__content h2 { font-size: 28px; }
	.nj-suburb__content .nj-split { grid-template-columns: 1fr; }
	.nj-suburb__card { padding: 24px 20px; }
}
