/**
 * nc/search — front-end styles. A search bar (input + orange Search button) with a
 * lightweight autocomplete dropdown, and — on the search results page — a grid of
 * theme cards plus pagination. Brand navy #062537 / orange #ff6900.
 */
.nc-search {
	width: 100%;
	box-sizing: border-box;
	/* Ride the site's centered content column instead of running edge-to-edge. */
	padding: 44px var( --nc-content-gutter, 60px );
}

/* ONE centred column that the page title, search bar, tabs and results all share, so
   their left edges line up (the title used to hang at the far page edge). */
.nc-search__inner {
	max-width: 1180px;
	margin: 0 auto;
}

/* The "Search results for ..." page title — rendered inside the block so it aligns
   with the search input + cards (not the full-width template main). */
.nc-search__page-title {
	margin: 0 0 30px;
	font-family: "Vollkorn", Georgia, serif;
	font-size: clamp( 30px, 4vw, 46px );
	font-weight: 600;
	line-height: 1.1;
	color: #062537;
}

/* Heading on the left, the search bar on the right (one line), with a rule below —
   matching the legacy "Find Your Dream Home" band. Wraps on narrow screens. */
.nc-search__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 22px 40px;
	padding-bottom: 26px;
	border-bottom: 1px solid #d7dde2;
}

.nc-search__heading {
	margin: 0;
	font-family: "Vollkorn", Georgia, serif;
	/* Match the legacy band: 32px, regular weight (not bold) — the heavier 36px/600
	   read as oversized. */
	font-size: clamp( 22px, 2.4vw, 32px );
	font-weight: 400;
	line-height: 1.2;
	color: #062537;
}

.nc-search__form {
	display: flex;
	gap: 0;
	align-items: stretch;
	flex: 1 1 420px;
	max-width: 620px;
}

.nc-search__field {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

/* Scoped with .nc-search to beat the theme's global input[type="search"] border. */
.nc-search .nc-search__input {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	font-size: 16px;
	color: #062537;
	background: #fff;
	border: 1px solid #062537; /* navy border, matching the legacy input */
	border-radius: 0;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nc-search .nc-search__input:focus {
	border-color: #0067b1;
	box-shadow: 0 0 0 3px rgba( 0, 103, 177, 0.15 );
}

.nc-search__btn {
	flex: 0 0 auto;
	min-width: 120px;
	padding: 0 24px;
	height: 48px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #fff;
	background: #ff6900;
	border: 1px solid #ff6900;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nc-search__btn:hover,
.nc-search__btn:focus-visible {
	background: #e05e00;
	border-color: #e05e00;
	outline: none;
}

.nc-search__btn:focus-visible {
	box-shadow: 0 0 0 3px rgba( 255, 105, 0, 0.35 );
}

/* Autocomplete dropdown */
.nc-search__suggest {
	position: absolute;
	top: calc( 100% + 4px );
	left: 0;
	right: 0;
	z-index: 30;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #d7dde3;
	border-radius: 2px;
	box-shadow: 0 12px 28px rgba( 6, 37, 55, 0.16 );
	max-height: 360px;
	overflow-y: auto;
}

/* Type heading (Communities / Homes / Floor Plans / ...) above each group, like the
   legacy global-search dropdown. */
.nc-search__suggest-group {
	padding: 12px 16px 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5a6671;
}

.nc-search__suggest-item {
	margin: 0;
}

/* Each suggestion: a thumbnail, then the name and (for a home/plan) its community. */
.nc-search__suggest-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px;
	color: #062537;
	text-decoration: none;
}

.nc-search__suggest-link:hover,
.nc-search__suggest-link:focus {
	background: #eef3fa;
}

.nc-search__suggest-thumb {
	flex: 0 0 auto;
	display: block;
	width: 48px;
	height: 48px;
	background: #e9eef3;
	overflow: hidden;
}

.nc-search__suggest-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nc-search__suggest-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nc-search__suggest-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
}

.nc-search__suggest-sub {
	font-size: 12px;
	line-height: 1.2;
	color: #5a6671;
}

/* Results sit in the shared inner column (.nc-search__inner caps + centres). */
.nc-search__results {
	margin-top: 36px;
}

/* Category tabs: All / Communities / Homes / Floor Plans / Areas / Promotions / Blog.
   Clean underline tabs (uppercase, muted count, orange underline on the active one) —
   the same nav idiom as the area bar, not boxed chips. */
.nc-search__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 30px;
	margin: 0 0 24px;
	border-bottom: 1px solid #d7dde2;
}

.nc-search__tab {
	position: relative;
	display: inline-flex;
	align-items: baseline;
	gap: 7px;
	padding: 0 2px 14px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #5a6671;
	text-decoration: none;
	border: 0;
	transition: color 0.15s ease;
}

.nc-search__tab:hover,
.nc-search__tab:focus-visible {
	color: #062537;
	outline: none;
}

.nc-search__tab.is-active {
	color: #062537;
}

/* Orange underline that sits on the tab strip's bottom rule. */
.nc-search__tab.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	background: #ff6900;
}

.nc-search__tab-count {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0;
	color: #9aa4ad;
}

.nc-search__tab.is-active .nc-search__tab-count {
	color: #ff6900;
}

.nc-search__count {
	margin: 0 0 22px;
	font-size: 15px;
	color: #5a6671;
}

/* Empty-search prompt (no term yet). */
.nc-search__prompt {
	margin: 8px 0 0;
	padding: 28px 0;
	text-align: center;
	font-size: 16px;
	color: #5a6671;
}

/* Three columns like the communities grid (down to 2, then 1). */
.nc-search__grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 30px;
}

@media ( max-width: 900px ) {
	.nc-search__grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 560px ) {
	.nc-search__grid {
		grid-template-columns: 1fr;
	}
}

/* ONE uniform result card (legacy global-search card) — boxy, centred text, the
   community logo on a white plate over the lower edge of the photo. */
.nc-scard {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e4e8ec;
	text-align: center;
}

.nc-scard__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.nc-scard__photo-wrap {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #062537;
	overflow: hidden;
}

.nc-scard__photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nc-scard__photo--empty {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient( 135deg, #062537, #0a3a57 );
}

/* White logo plate, centred over the lower edge of the photo (boxy, no radius). */
.nc-scard__plate {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX( -50% );
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60%;
	max-width: 220px;
	min-height: 62px;
	padding: 12px 16px;
	background: #fff;
	box-shadow: 0 6px 18px rgba( 6, 37, 55, 0.18 );
}

.nc-scard__logo {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 54px;
	object-fit: contain;
}

.nc-scard__plate--text {
	font-family: "Vollkorn", Georgia, serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: #062537;
}

.nc-scard__box {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 20px 24px;
}

.nc-scard__title {
	margin: 0;
	font-family: "Vollkorn", Georgia, serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	text-transform: uppercase;
	color: #062537;
}

.nc-scard__type {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #0067b1;
}

/* Pagination */
.nc-search__pagination {
	margin-top: 34px;
}

.nc-search__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	margin: 0 4px;
	padding: 0 10px;
	font-size: 15px;
	color: #062537;
	text-decoration: none;
	border: 1px solid #cfd6dd;
	border-radius: 2px;
}

.nc-search__pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nc-search__pagination .page-numbers.current {
	color: #fff;
	background: #062537;
	border-color: #062537;
}

.nc-search__pagination a.page-numbers:hover {
	border-color: #0067b1;
	color: #0067b1;
}

@media ( max-width: 560px ) {
	.nc-search__form {
		flex-direction: column;
	}
	.nc-search__btn {
		width: 100%;
	}
}
