/*
 * AgentSpotlight IDX — listing pages and hero search.
 * Colours are Mike Pastor's brand palette only; the theme already loads Barlow / Barlow Condensed.
 */
/* The hero search is used on the homepage, outside any .idx wrapper, so it needs the same
   custom properties or its borders and text colours fall back to browser defaults. */
.idx,
.idx-hero-search {
	--idx-gold: #C5A95F;
	--idx-gold-ink: #8a7433;
	--idx-ink: #110E0C;
	--idx-body: #6B6B6B;
	--idx-line: #dfdfdf;
	--idx-panel: #FBFBFB;
	--idx-radius: 13px;
	color: var(--idx-body);
	font-size: 16px;
	line-height: 1.55;
}
.idx-wrap { max-width: 1280px; margin: 0 auto; padding: 40px; }
.idx h1, .idx h2, .idx .idx-price { font-family: 'Barlow Condensed', Arial, sans-serif; color: var(--idx-ink); line-height: 1.1; }
.idx a { color: var(--idx-gold-ink); text-decoration: none; }
.idx a:hover { text-decoration: underline; }

/* --- preview banner (gated builds only) ------------------------------- */
.idx-preview-banner {
	background: #fffbe8; border-left: 4px solid var(--idx-gold); color: var(--idx-gold-ink);
	padding: 12px 18px; border-radius: 6px; font-size: 13.5px; margin-bottom: 24px;
}

/* --- page head -------------------------------------------------------- */
.idx-pagehead h1 { font-size: 44px; font-weight: 600; margin: 0; }
.idx-pagehead p { margin: 6px 0 0; font-size: 18px; }

/* --- search form ------------------------------------------------------ */
.idx-search {
	background: var(--idx-panel); border: 1px solid var(--idx-line); border-radius: var(--idx-radius);
	padding: 22px; margin: 26px 0 10px;
}
/* Seven filters plus the button: four across, wrapping to a second row, rather than one
   cramped line that squeezes the county and city names. */
.idx-search__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.idx-search__grid .idx-btn { align-self: end; }
.idx-field label {
	display: block; font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 14px; letter-spacing: 1px;
	text-transform: uppercase; color: var(--idx-ink); margin-bottom: 5px;
}
.idx-field select {
	width: 100%; padding: 11px 12px; border: 1px solid var(--idx-line); border-radius: 8px;
	font-size: 15px; color: var(--idx-ink); background: #fff;
}
.idx-btn {
	background: var(--idx-gold); color: #fff; border: none; padding: 12px 26px; border-radius: 10px;
	font-weight: 700; font-size: 16px; cursor: pointer; white-space: nowrap; display: inline-block; text-align: center;
}
.idx-btn:hover { background: #b39852; color: #fff; text-decoration: none; }
.idx-btn--dark { background: var(--idx-ink); }
.idx-btn--small { padding: 8px 16px; font-size: 14px; }
.idx-types { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 14px; margin-top: 14px; }
.idx-types span {
	font-family: 'Barlow Condensed', Arial, sans-serif; letter-spacing: 1.5px; text-transform: uppercase;
	font-size: 12px; color: var(--idx-gold-ink); font-weight: 700;
}
.idx-types input { accent-color: var(--idx-gold); }

/* --- results meta ----------------------------------------------------- */
.idx-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0 10px; font-size: 15px; flex-wrap: wrap; }
.idx-meta p { margin: 0; }
.idx-meta b { color: var(--idx-ink); }
.idx-sort { display: flex; align-items: center; gap: 8px; }
.idx-sort label { font-family: 'Barlow Condensed', Arial, sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: 13px; }
.idx-sort select { padding: 8px 10px; border: 1px solid var(--idx-line); border-radius: 8px; background: #fff; color: var(--idx-ink); }
.idx-empty { background: var(--idx-panel); border: 1px solid var(--idx-line); border-radius: var(--idx-radius); padding: 28px; font-size: 17px; }

/* --- results grid ----------------------------------------------------- */
.idx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.idx-card { background: #fff; border: 1px solid var(--idx-line); border-radius: var(--idx-radius); overflow: hidden; transition: transform .15s; }
.idx-card:hover { transform: translateY(-3px); }
.idx-card__media { position: relative; display: block; background: #f0f0f0; }
.idx-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.idx-card__nophoto {
	display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
	font-family: 'Barlow Condensed', Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase; font-size: 13px;
}
.idx-badge {
	position: absolute; margin: 12px; background: var(--idx-gold); color: #fff;
	font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 13px; letter-spacing: 1px;
	padding: 3px 10px; border-radius: 6px; text-transform: uppercase;
}
.idx-badge--inline { position: static; margin: 16px 0 0; display: inline-block; }
.idx-card__body { padding: 16px 18px 18px; }
.idx-price { font-size: 30px; font-weight: 700; margin: 0; }
.idx-price--lg { font-size: 46px; margin: 8px 0 0; }
.idx-facts { color: var(--idx-ink); font-weight: 600; font-size: 15px; margin: 4px 0; }
.idx-addr { margin: 4px 0 0; }
.idx-addr a { color: var(--idx-body); }
.idx-addr b { color: var(--idx-ink); font-weight: 600; }
.idx-cta { color: var(--idx-gold); font-weight: 700; display: inline-block; margin-top: 8px; }
.idx-attr { font-size: 12.5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee; line-height: 1.4; }
.idx-attr--detail { font-size: 14px; margin-top: 22px; }
/* Shown only on the participant's own brokerage's listings, where the MLS permits agent contact. */
.idx-ours { color: var(--idx-gold-ink); font-weight: 600; }

/* --- pagination ------------------------------------------------------- */
.idx-pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 34px 0 0; flex-wrap: wrap; }
.idx-pagination a, .idx-pagination span {
	padding: 9px 15px; border: 1px solid var(--idx-line); border-radius: 8px;
	font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 16px; letter-spacing: .5px;
}
.idx-pagination .is-current { background: var(--idx-gold); border-color: var(--idx-gold); color: #fff; }

/* --- listing detail --------------------------------------------------- */
.idx-back { margin: 0 0 6px; }
.idx-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: 440px; margin-top: 14px; }
.idx-gallery img { width: 100%; height: 100%; min-height: 0; min-width: 0; object-fit: cover; border-radius: var(--idx-radius); display: block; }
.idx-gallery img:first-child { grid-row: 1 / 3; }
.idx-gallery--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.idx-gallery--2 { grid-template-rows: 1fr; }
.idx-gallery--2 img:first-child { grid-row: auto; }
.idx-gallery__rest { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.idx-gallery__rest img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; display: block; }
.idx-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 34px; margin-top: 26px; align-items: start; }
.idx-detail__address { font-size: 28px; font-weight: 500; margin: 0; }
.idx-dfacts { display: flex; gap: 22px; list-style: none; padding: 0; font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 22px; color: var(--idx-ink); margin: 10px 0 16px; flex-wrap: wrap; }
.idx-dfacts b { font-size: 28px; }
.idx-kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 20px; margin: 22px 0; font-size: 15px; }
.idx-kv dt { color: var(--idx-ink); font-weight: 600; }
.idx-kv dd { margin: 0; }
.idx-h2 { font-size: 28px; margin: 24px 0 8px; }
.idx-remarks { font-size: 17px; line-height: 1.7; }
.idx-map { width: 100%; height: 300px; border: 1px solid var(--idx-line); border-radius: var(--idx-radius); }
.idx-ask { background: var(--idx-panel); border: 1px solid var(--idx-line); border-radius: var(--idx-radius); padding: 24px; position: sticky; top: 90px; }
.idx-ask__title { font-size: 26px; margin: 0 0 4px; }
.idx-ask__who { margin: 0 0 14px; }
.idx-ask__phones { font-size: 13px; margin-top: 12px; }
.idx-ask .idx-btn--dark { width: 100%; margin-top: 8px; }

/* --- compliance block ------------------------------------------------- */
.idx-compliance {
	background: var(--idx-panel); border-top: 1px solid var(--idx-line);
	padding: 26px 40px; font-size: 13px; line-height: 1.7; color: var(--idx-body);
}
.idx-compliance p { margin: 0 0 6px; }
.idx-compliance b { color: var(--idx-ink); }
/* The Mark renders at the exact size West Penn supplied. Agreement §2 requires it be used in the
   form provided, so it is never scaled up — width/height come from the file itself. */
.idx-mark { display: inline-block; margin-right: 14px; vertical-align: middle; }
.idx-updated { display: inline-block; margin-left: 10px; }

/* --- homepage hero search --------------------------------------------- */
.idx-hero-search {
	background: #0f0f0f; border: 1px solid #2a2a2a; border-radius: 13px; padding: 22px 24px; max-width: 640px;
}
/* Six columns so seven filters sit in three even rows: the two long place names take half a row
   each, the three numeric ranges share the middle, and beds/baths share the last. */
.idx-hero-search__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.idx-hero-search .idx-field--county,
.idx-hero-search .idx-field--city   { grid-column: span 3; }
.idx-hero-search .idx-field--price-min,
.idx-hero-search .idx-field--price-max { grid-column: span 3; }
.idx-hero-search .idx-field--beds,
.idx-hero-search .idx-field--baths,
.idx-hero-search .idx-field--acres  { grid-column: span 2; }
.idx-hero-search .idx-field label { color: var(--idx-gold); font-weight: 600; letter-spacing: 1.5px; font-size: 13px; }
.idx-hero-search .idx-field select { background: #1a1a1a; border-color: #333; color: #fff; }
.idx-hero-search .idx-types { color: #fff; margin: 14px 0 16px; }
.idx-hero-search__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.idx-hero-search__all { color: var(--idx-gold); font-weight: 600; border-bottom: 1px solid rgba(197, 169, 95, .6); }
.idx-hero-search__live { margin-left: auto; font-size: 12px; color: #8a8a8a; }

/* --- responsive ------------------------------------------------------- */
@media (max-width: 1100px) {
	.idx-search__grid { grid-template-columns: repeat(3, 1fr); }
	.idx-search__grid .idx-btn { grid-column: 1 / -1; }
	.idx-grid { grid-template-columns: repeat(2, 1fr); }
	.idx-detail { grid-template-columns: 1fr; }
	.idx-ask { position: static; }
}
@media (max-width: 782px) {
	.idx-wrap { padding: 24px 16px; }
	.idx-compliance { padding: 22px 16px; }
	.idx-pagehead h1 { font-size: 32px; }
	.idx-search__grid { grid-template-columns: repeat(2, 1fr); }
	.idx-grid { grid-template-columns: 1fr; }
	.idx-gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 260px; }
	.idx-gallery img:first-child { grid-row: auto; }
	.idx-gallery img:not(:first-child) { display: none; }
	.idx-gallery__rest { grid-template-columns: repeat(3, 1fr); }
	.idx-kv { grid-template-columns: repeat(2, 1fr); }
	.idx-price--lg { font-size: 36px; }
	.idx-hero-search { max-width: 100%; }
	.idx-hero-search__grid { grid-template-columns: repeat(2, 1fr); }
	.idx-hero-search .idx-field { grid-column: span 1; }
	.idx-hero-search .idx-field--county,
	.idx-hero-search .idx-field--city { grid-column: span 2; }
}
