/* =========================================================
   Home Listings
   All colours and type live in these variables — override
   them in your theme stylesheet to re-skin the whole plugin.
   ========================================================= */

.hl-grid,
.hl-single,
.hl-archive {
	--hl-navy:      #2c4a63;
	--hl-navy-deep: #22384b;
	--hl-gold:      #d6a03c;
	--hl-gold-ink:  #c08d2c;
	--hl-body:      #4a4a4a;
	--hl-muted:     #6b6b6b;
	--hl-rule:      #e6e1d9;
	--hl-card:      #ffffff;
	--hl-page:      #ece5db;
	--hl-radius:    10px;
	--hl-shadow:    0 1px 3px rgba(31, 26, 18, .09), 0 8px 24px rgba(31, 26, 18, .05);
	--hl-serif:     "Playfair Display", "Iowan Old Style", Georgia, serif;
	--hl-sans:      "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

/* ---------- grid ---------- */
.hl-grid {
	display: grid;
	grid-template-columns: repeat(var(--hl-cols, 3), minmax(0, 1fr));
	gap: 30px;
	align-items: stretch;
}
.hl-grid--1 { --hl-cols: 1; }
.hl-grid--2 { --hl-cols: 2; }
.hl-grid--3 { --hl-cols: 3; }
.hl-grid--4 { --hl-cols: 4; }

/* Modifier classes set --hl-cols, so the responsive rules must match that
   specificity or they get ignored. */
@media (max-width: 980px) {
	.hl-grid.hl-grid--3,
	.hl-grid.hl-grid--4 { --hl-cols: 2; }
}
@media (max-width: 640px) {
	.hl-grid.hl-grid--2,
	.hl-grid.hl-grid--3,
	.hl-grid.hl-grid--4 { --hl-cols: 1; }
	.hl-grid { gap: 22px; }
}

/* ---------- card ---------- */
.hl-card {
	display: flex;
	flex-direction: column;
	background: var(--hl-card);
	border-radius: var(--hl-radius);
	box-shadow: var(--hl-shadow);
	overflow: hidden;
	font-family: var(--hl-sans);
	color: var(--hl-body);
}

.hl-card__media {
	position: relative;
	height: 260px;
	background: #e9e4dc;
}

.hl-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 640px) {
	.hl-card__media { height: 220px; }
}

.hl-card__badge {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 7px 14px;
	border-radius: 6px;
	background: var(--hl-gold);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.hl-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 26px 24px;
}

/* ---------- titles ---------- */
.hl-card__title {
	margin: 0 0 8px;
	font-family: var(--hl-serif);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.25;
}

.hl-card__title a {
	color: var(--hl-navy);
	text-decoration: none;
}
.hl-card__title a:hover .hl-card__plan,
.hl-card__title a:hover .hl-card__community { text-decoration: underline; }

.hl-card__divider {
	color: #b9c4cd;
	font-weight: 400;
	padding: 0 2px;
}

.hl-card__location {
	margin: 0 0 16px;
	font-size: 1rem;
	color: #3d3d3d;
}

/* ---------- specs ---------- */
.hl-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.hl-specs__item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.95rem;
	color: var(--hl-muted);
	white-space: nowrap;
}

.hl-icon {
	width: 19px;
	height: 19px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
img.hl-icon {
	object-fit: contain;
	stroke: none;
}

.hl-specs--large .hl-specs__item { font-size: 1.05rem; }

/* ---------- blurb + footer ---------- */
.hl-card__blurb {
	margin: 0 0 18px;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--hl-body);
}

.hl-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--hl-rule);
}

.hl-card__price {
	font-family: var(--hl-serif);
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--hl-gold-ink);
}

.hl-card__link {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--hl-navy);
	text-decoration: none;
}

.hl-card__arrow { transition: transform .18s ease; }
.hl-card__link:hover .hl-card__arrow { transform: translateX(4px); }
.hl-card__link:focus-visible,
.hl-card__title a:focus-visible {
	outline: 2px solid var(--hl-navy);
	outline-offset: 3px;
	border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.hl-card__arrow { transition: none; }
}

/* ---------- detail page ---------- */
.hl-single,
.hl-archive {
	max-width: 1120px;
	margin: 0 auto;
	padding: 40px 20px 72px;
	font-family: var(--hl-sans);
	color: var(--hl-body);
}

.hl-breadcrumb {
	display: flex;
	gap: 8px;
	font-size: .9rem;
	color: var(--hl-muted);
	margin-bottom: 20px;
}
.hl-breadcrumb a { color: var(--hl-navy); }

.hl-single__badge {
	display: inline-block;
	padding: 7px 14px;
	border-radius: 6px;
	background: var(--hl-gold);
	color: #fff;
	font-size: .875rem;
	font-weight: 600;
	margin-bottom: 14px;
}

.hl-single__title {
	margin: 0 0 6px;
	font-family: var(--hl-serif);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
	color: var(--hl-navy);
}

.hl-single__location {
	margin: 0 0 26px;
	font-size: 1.1rem;
	color: #3d3d3d;
}

.hl-single__hero img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--hl-radius);
}

.hl-single__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 44px;
	margin-top: 34px;
}

.hl-single__price {
	font-family: var(--hl-serif);
	font-weight: 700;
	color: var(--hl-gold-ink);
}

.hl-single__body { line-height: 1.75; max-width: 70ch; }

.hl-gallery-section { margin-top: 40px; }
.hl-gallery-section h2,
.hl-related h2,
.hl-cta-box h2 {
	font-family: var(--hl-serif);
	color: var(--hl-navy);
	margin: 0 0 16px;
}

.hl-cta-box {
	position: sticky;
	top: 24px;
	padding: 26px;
	border-radius: var(--hl-radius);
	background: var(--hl-page);
}
.hl-cta-box h2 { font-size: 1.35rem; }

.hl-button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 14px 24px;
	border-radius: 6px;
	background: var(--hl-navy);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.hl-button:hover { background: var(--hl-navy-deep); color: #fff; }

.hl-related { margin-top: 64px; }

@media (max-width: 860px) {
	.hl-single__grid { grid-template-columns: 1fr; gap: 32px; }
	.hl-cta-box { position: static; }
}

/* ---------- archive ---------- */
.hl-archive__header { margin-bottom: 32px; }
.hl-archive__header h1 {
	font-family: var(--hl-serif);
	color: var(--hl-navy);
	margin: 0 0 8px;
}
.hl-pagination { margin-top: 40px; }

/* =========================================================
   Photo gallery + lightbox (Homes and Floor Plans detail pages)
   ========================================================= */

.hl-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.hl-gallery__item {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
	background: #f0ede7;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	cursor: pointer;
	appearance: none;
}
.hl-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .25s ease;
}
.hl-gallery__item:hover img { transform: scale(1.04); }
.hl-gallery__item:focus-visible {
	outline: 2px solid var(--hl-navy);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.hl-gallery__item img { transition: none; }
}

@media (max-width: 760px) {
	.hl-gallery { grid-template-columns: repeat(2, 1fr); }
}

.hl-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(15, 13, 10, .92);
	padding: 24px;
}
.hl-lightbox.is-open { display: flex; }
body.hl-lightbox-open { overflow: hidden; }

.hl-lightbox__img {
	max-width: min(92vw, 1200px);
	max-height: 88vh;
	width: auto;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.hl-lightbox__close,
.hl-lightbox__prev,
.hl-lightbox__next {
	position: absolute;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.hl-lightbox__close:hover,
.hl-lightbox__prev:hover,
.hl-lightbox__next:hover { background: rgba(255, 255, 255, .24); }

.hl-lightbox__close { top: 20px; right: 20px; }
.hl-lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.hl-lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
	.hl-lightbox__prev { left: 8px; }
	.hl-lightbox__next { right: 8px; }
	.hl-lightbox__close { top: 8px; right: 8px; }
}
