/*
 * The Aspen Realtor MLS styles.
 * Brand: Midnight #141414, Charcoal #1E1E1E, Aspen Gold #C4A882, Stone #A0A0A0.
 * Playfair Display for prices and headings, Jost for UI text.
 * Layout patterns follow the reference IDX site Sam approved, rendered in
 * brand colors. Attribution and disclaimer treatments are compliance items:
 * do not shrink, hide, or de-emphasize them.
 */

:root {
	--tar-midnight: #141414;
	--tar-charcoal: #1E1E1E;
	--tar-gold: #C4A882;
	--tar-stone: #A0A0A0;
	--tar-line: #E8E8E8;
	--tar-bg-soft: #F7F6F4;
	--tar-serif: 'Playfair Display', Georgia, serif;
	--tar-sans: 'Jost', system-ui, sans-serif;
}

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

.tar-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}

.tar-card {
	display: block;
	text-decoration: none;
	color: var(--tar-midnight);
	background: #fff;
	border: 1px solid var(--tar-line);
	transition: box-shadow .18s ease, transform .18s ease;
}
.tar-card:hover {
	box-shadow: 0 10px 28px rgba(20, 20, 20, .12);
	transform: translateY(-2px);
}

.tar-card-image {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--tar-bg-soft);
}
.tar-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.tar-card:hover .tar-card-image img { transform: scale(1.04); }

.tar-badge {
	font-family: var(--tar-sans);
	font-weight: 500;
	font-size: 0.6875rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 4px 10px;
	display: inline-block;
}
.tar-badge-status {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--tar-gold);
	color: var(--tar-midnight);
}
.tar-badge-photos {
	position: absolute;
	bottom: 12px;
	right: 12px;
	background: rgba(20, 20, 20, .78);
	color: #fff;
	letter-spacing: .02em;
	text-transform: none;
	font-weight: 400;
	font-size: 0.75rem;
}
.tar-badge-type {
	background: var(--tar-bg-soft);
	color: var(--tar-charcoal);
	border: 1px solid var(--tar-line);
}

.tar-card-body { display: block; padding: 16px 18px 18px; }

.tar-card-price {
	display: block;
	font-family: var(--tar-serif);
	font-size: 1.5rem;
	letter-spacing: .01em;
	color: var(--tar-midnight);
}
.tar-card:hover .tar-card-price { color: var(--tar-gold); }

.tar-card-address {
	display: block;
	font-family: var(--tar-sans);
	font-weight: 400;
	font-size: 1rem;
	margin-top: 4px;
}

.tar-card-facts {
	display: flex;
	gap: 16px;
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.875rem;
	color: var(--tar-charcoal);
	margin-top: 10px;
	align-items: center;
}
.tar-card-facts .tar-fact { display: inline-flex; align-items: center; gap: 6px; }
.tar-fact svg { width: 17px; height: 17px; stroke: var(--tar-stone); flex: none; }

.tar-card-office {
	display: block;
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.8125rem;
	color: var(--tar-stone);
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--tar-line);
}

/* ------------------------------------------------------------------ */
/* Detail page                                                         */
/* ------------------------------------------------------------------ */

.tar-listing { container-type: inline-size; font-family: var(--tar-sans); }

.tar-single-header { margin: 0 0 18px; }
.tar-single-address {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 14px;
	font-family: var(--tar-serif);
	font-size: 2.125rem;
	line-height: 1.2;
	color: var(--tar-midnight);
	margin: 0 0 8px;
}
.tar-single-street { font-weight: 500; }
.tar-single-locale { font-weight: 400; font-size: 1.5rem; color: var(--tar-charcoal); }
.tar-single-address .tar-badge { position: static; align-self: center; background: var(--tar-gold); color: var(--tar-midnight); }

.tar-single-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	align-items: center;
	font-family: var(--tar-sans);
	font-weight: 400;
	font-size: 0.8125rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tar-stone);
}

/* Hero photo strip: three across with a see-all button, like the reference. */
.tar-hero {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	position: relative;
	margin: 0 0 22px;
}
/* Height in container-width units keeps the strip proportionally tall at
   any content width. 30cqw per image is about 20 percent taller than the
   old 4/3 crop. */
.tar-hero a { display: block; position: relative; height: clamp(240px, 30cqw, 560px); overflow: hidden; background: var(--tar-bg-soft); }
.tar-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tar-hero-more {
	position: absolute;
	right: 14px;
	bottom: 14px;
	font-family: var(--tar-sans);
	font-weight: 400;
	font-size: 0.875rem;
	background: rgba(20, 20, 20, .82);
	color: #fff;
	padding: 9px 16px;
	border: none;
	cursor: pointer;
}
.tar-hero-more:hover { background: var(--tar-gold); color: var(--tar-midnight); }
@container (max-width: 700px) {
	.tar-hero { grid-template-columns: repeat(2, 1fr); }
	.tar-hero a:nth-child(3) { display: none; }
}

.tar-single-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 0 52px;
	align-items: start;
}
.tar-single-rail { position: sticky; top: 32px; }
@container (max-width: 920px) {
	.tar-single-columns { grid-template-columns: 1fr; }
	.tar-single-rail { position: static; margin-top: 36px; }
}

.tar-attribution {
	font-family: var(--tar-sans);
	font-size: 0.9375rem;
	color: var(--tar-charcoal);
	margin: 0 0 10px;
}
.tar-attribution-phone { color: var(--tar-stone); }

.tar-price-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 0 0 14px; }
.tar-price {
	font-family: var(--tar-serif);
	font-size: 2.5rem;
	margin: 0;
	color: var(--tar-midnight);
}
.tar-est-payment {
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.875rem;
	color: var(--tar-stone);
	border: 1px solid var(--tar-line);
	padding: 5px 12px;
	cursor: help;
}

.tar-facts {
	list-style: none;
	display: flex;
	gap: 30px;
	padding: 0 0 22px;
	margin: 0 0 28px;
	border-bottom: 1px solid var(--tar-line);
}
.tar-facts li { font-family: var(--tar-sans); font-weight: 300; color: var(--tar-stone); display: flex; align-items: center; gap: 8px; }
.tar-facts li svg { width: 20px; height: 20px; stroke: var(--tar-stone); }
.tar-facts strong { color: var(--tar-midnight); font-weight: 500; font-size: 1.125rem; }

.tar-section-title {
	font-family: var(--tar-serif);
	font-weight: 400;
	font-size: 1.5rem;
	color: var(--tar-midnight);
	margin: 0 0 18px;
}

.tar-detail-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 0 48px;
	margin-bottom: 36px;
}
.tar-detail-row {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	padding: 11px 0;
	border-bottom: 1px solid var(--tar-line);
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.9375rem;
}
.tar-detail-label { color: var(--tar-stone); }
.tar-detail-value { text-align: right; color: var(--tar-charcoal); }

.tar-remarks { margin: 0 0 36px; max-width: 72ch; }
.tar-remarks p { font-family: var(--tar-sans); font-weight: 300; line-height: 1.75; }

.tar-detail-map { height: 380px; margin: 0 0 36px; background: var(--tar-bg-soft); }

/* Similar homes */
.tar-similar { margin-top: 8px; }
.tar-similar-sub {
	font-family: var(--tar-sans);
	font-weight: 300;
	color: var(--tar-stone);
	margin: -8px 0 20px;
}

/* Agent card */
.tar-agent-card {
	border: 1px solid var(--tar-line);
	padding: 28px 26px;
	background: #fff;
	text-align: left;
}
.tar-agent-photo {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 14px;
}
.tar-agent-heading {
	font-family: var(--tar-serif);
	font-size: 1.25rem;
	margin: 0 0 14px;
	color: var(--tar-midnight);
}
.tar-agent-name { font-family: var(--tar-sans); font-weight: 500; margin: 0; color: var(--tar-midnight); }
.tar-agent-title,
.tar-agent-license {
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.875rem;
	color: var(--tar-stone);
	margin: 2px 0 0;
}
.tar-agent-phone {
	display: block;
	font-family: var(--tar-sans);
	font-weight: 400;
	color: var(--tar-midnight);
	text-decoration: none;
	margin: 14px 0 0;
}
.tar-agent-phone:hover { color: var(--tar-gold); }
.tar-agent-cta {
	display: block;
	text-align: center;
	font-family: var(--tar-sans);
	font-weight: 500;
	font-size: 0.875rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	background: var(--tar-midnight);
	text-decoration: none;
	padding: 13px 20px;
	margin: 18px 0 0;
}
.tar-agent-cta:hover { background: var(--tar-gold); color: #fff; }
.tar-agent-courtesy {
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--tar-stone);
	margin: 16px 0 0;
}

/* ------------------------------------------------------------------ */
/* Lightbox                                                            */
/* ------------------------------------------------------------------ */

.tar-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(10, 10, 10, .94);
	display: none;
	align-items: center;
	justify-content: center;
}
.tar-lightbox.open { display: flex; }
.tar-lightbox img {
	max-width: min(92vw, 1400px);
	max-height: 86vh;
	object-fit: contain;
	display: block;
}
.tar-lightbox button {
	position: absolute;
	background: rgba(255, 255, 255, .08);
	border: none;
	color: #fff;
	font-family: var(--tar-sans);
	font-size: 1.5rem;
	line-height: 1;
	width: 52px;
	height: 52px;
	cursor: pointer;
}
.tar-lightbox button:hover { background: var(--tar-gold); color: var(--tar-midnight); }
.tar-lightbox .tar-lb-close { top: 20px; right: 20px; }
.tar-lightbox .tar-lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.tar-lightbox .tar-lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.tar-lightbox .tar-lb-count {
	position: absolute;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.875rem;
	letter-spacing: .08em;
}

/* ------------------------------------------------------------------ */
/* Search page: filters bar, split list and map                        */
/* ------------------------------------------------------------------ */

.tar-search { container-type: inline-size; font-family: var(--tar-sans); }

/* Filter strip: spans the list and the map, auto-applies with JS. */
.tar-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 14px;
	align-items: flex-end;
	margin: 0 0 22px;
	padding: 16px 0;
	border-top: 1px solid var(--tar-line);
	border-bottom: 1px solid var(--tar-line);
	background: #fff;
}
.tar-search-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-family: var(--tar-sans);
	font-weight: 400;
	font-size: 0.6875rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--tar-stone);
}
.tar-search-form .tar-search-sort { margin-left: auto; }
.tar-search-form select {
	font-family: var(--tar-sans);
	font-weight: 300;
	font-size: 0.9375rem;
	color: var(--tar-midnight);
	background: #fff;
	border: 1px solid #DDDDDD;
	border-radius: 0;
	padding: 9px 12px;
	min-width: 118px;
	cursor: pointer;
}
.tar-search-form select:focus { outline: none; border-color: var(--tar-gold); }
.tar-js .tar-search-submit { display: none; }
.tar-search-submit {
	font-family: var(--tar-sans);
	font-weight: 500;
	font-size: 0.875rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	background: var(--tar-midnight);
	border: none;
	border-radius: 0;
	padding: 12px 28px;
	cursor: pointer;
}
.tar-search-submit:hover { background: var(--tar-gold); }

.tar-result-count {
	font-family: var(--tar-serif);
	font-size: 1.25rem;
	color: var(--tar-midnight);
	margin: 0 0 14px;
}

.tar-search-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 44%);
	gap: 24px;
	align-items: start;
}

/* Compact horizontal cards in the list column: photo left, facts right,
   so more homes fit beside the map than the tile grid allows. */
.tar-search-results .tar-grid { grid-template-columns: 1fr; gap: 14px; }
.tar-search-results .tar-card {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	align-items: stretch;
}
.tar-search-results .tar-card-image { aspect-ratio: 4 / 3; height: 100%; }
.tar-search-results .tar-badge-status { top: 10px; left: 10px; }
.tar-search-results .tar-badge-photos { bottom: 10px; right: 10px; }
.tar-search-results .tar-card-body {
	padding: 14px 18px 12px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.tar-search-results .tar-card-price { font-size: 1.375rem; }
.tar-search-results .tar-card-address { font-size: 0.9375rem; margin-top: 2px; }
.tar-search-results .tar-card-facts { margin-top: 8px; font-size: 0.8125rem; }
.tar-search-results .tar-card-office { margin-top: 10px; padding-top: 8px; }
.tar-search-results.is-loading { opacity: .45; pointer-events: none; }
.tar-search-results { transition: opacity .15s ease; }

.tar-card.is-hot { border-color: var(--tar-gold); box-shadow: 0 10px 28px rgba(20, 20, 20, .12); }
.tar-card.is-hot .tar-card-price { color: var(--tar-gold); }

.tar-search-map-col { position: sticky; top: 24px; }
#tar-search-map { height: calc(100vh - 120px); min-height: 460px; background: var(--tar-bg-soft); border: 1px solid var(--tar-line); }

/* Map tools sit over the map, top right, only once JS has taken over. */
.tar-map-tools {
	display: none;
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1001;
	gap: 8px;
	align-items: center;
	font-family: var(--tar-sans);
	font-size: 0.8125rem;
}
.tar-js .tar-map-tools { display: flex; }
.tar-map-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	color: var(--tar-midnight);
	padding: 7px 12px;
	border: 1px solid var(--tar-line);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	cursor: pointer;
	white-space: nowrap;
}
.tar-map-toggle input { margin: 0; accent-color: var(--tar-gold); }
.tar-map-redo {
	font-family: var(--tar-sans);
	font-weight: 500;
	font-size: 0.75rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--tar-midnight);
	border: none;
	border-radius: 0;
	padding: 8px 14px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.tar-map-redo:hover { background: var(--tar-gold); color: var(--tar-midnight); }
.tar-map-redo[hidden] { display: none; }

@container (max-width: 980px) {
	.tar-search-split { grid-template-columns: 1fr; }
	.tar-search-map-col { position: relative; order: -1; }
	#tar-search-map { height: 340px; min-height: 0; }
}
@container (max-width: 560px) {
	.tar-search-results .tar-card { grid-template-columns: 140px minmax(0, 1fr); }
	.tar-search-results .tar-card-body { padding: 10px 12px; }
	.tar-search-results .tar-card-price { font-size: 1.125rem; }
	.tar-search-results .tar-card-facts { gap: 10px; }
	.tar-search-results .tar-badge-photos { display: none; }
	.tar-map-toggle { font-size: 0.75rem; padding: 6px 10px; }
}

/* Map price pins */
.tar-pin {
	background: var(--tar-midnight);
	color: #fff;
	font-family: var(--tar-sans);
	font-weight: 500;
	font-size: 0.75rem;
	padding: 5px 10px;
	border-radius: 14px;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
	border: 1px solid rgba(255, 255, 255, .35);
	transform: translate(-50%, -50%);
	display: inline-block;
}
.tar-pin:hover,
.leaflet-marker-icon.is-hot .tar-pin { background: var(--tar-gold); color: var(--tar-midnight); }
.leaflet-popup-content { margin: 0; width: 240px !important; }
.leaflet-popup-content-wrapper { border-radius: 0; padding: 0; overflow: hidden; }
.tar-pop { display: block; text-decoration: none; color: var(--tar-midnight); font-family: var(--tar-sans); }
.tar-pop img { width: 100%; height: 140px; object-fit: cover; display: block; }
.tar-pop-body { padding: 10px 12px 12px; }
.tar-pop-price { font-family: var(--tar-serif); font-size: 1.125rem; display: block; }
.tar-pop-title { font-weight: 300; font-size: 0.8125rem; display: block; margin-top: 2px; }

/* ------------------------------------------------------------------ */
/* Archive, pagination, shared                                         */
/* ------------------------------------------------------------------ */

.tar-archive { max-width: none; margin: 0; padding: 40px clamp(16px, 3vw, 48px) 60px; }
.tar-archive-title {
	font-family: var(--tar-serif);
	font-weight: 400;
	color: var(--tar-midnight);
	margin: 0 0 18px;
}
.tar-archive-intro {
	font-family: var(--tar-sans);
	font-weight: 300;
	line-height: 1.7;
	max-width: 72ch;
	margin: 0 0 36px;
}

.tar-pagination { margin-top: 36px; }
.tar-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.tar-pagination a,
.tar-pagination span {
	font-family: var(--tar-sans);
	font-weight: 300;
	display: block;
	padding: 8px 14px;
	border: 1px solid var(--tar-line);
	color: var(--tar-midnight);
	text-decoration: none;
}
.tar-pagination .current { background: var(--tar-midnight); border-color: var(--tar-midnight); color: #fff; }
.tar-pagination a:hover { border-color: var(--tar-gold); color: var(--tar-gold); }
.tar-pagination .tar-page-gap { border: none; padding: 8px 4px; color: var(--tar-stone); }

/* Core the_posts_pagination markup on the archive template. */
.tar-archive .navigation.pagination { margin-top: 36px; }
.tar-archive .navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tar-archive .navigation.pagination .page-numbers {
	font-family: var(--tar-sans);
	font-weight: 300;
	display: block;
	padding: 8px 14px;
	border: 1px solid var(--tar-line);
	color: var(--tar-midnight);
	text-decoration: none;
}
.tar-archive .navigation.pagination .page-numbers.current {
	background: var(--tar-midnight);
	border-color: var(--tar-midnight);
	color: #fff;
}
.tar-archive .navigation.pagination a.page-numbers:hover { border-color: var(--tar-gold); color: var(--tar-gold); }
.tar-archive .navigation.pagination .screen-reader-text { position: absolute; clip: rect(0 0 0 0); }

.tar-disclaimer {
	font-family: var(--tar-sans);
	font-size: 0.75rem;
	font-weight: 300;
	color: var(--tar-stone);
	line-height: 1.6;
	margin-top: 44px;
	max-width: 78ch;
}
.tar-empty { font-family: var(--tar-sans); color: var(--tar-stone); }

@media (max-width: 640px) {
	.tar-price { font-size: 1.875rem; }
	.tar-facts { gap: 18px; }
}
