/* VanMeter Realty — base site styles */

:root {
    /* Brand palette taken from the live vanmeterrealty.com theme */
    --maroon: #8e3b33;
    --maroon-dark: #6e2825;
    --blue: #2b7bb9;
    --ink: #313131;
    --muted: #5f5f5f;
    --line: #e6e0de;
    --bg: #ffffff;
    --bg-alt: #faf8f7;
    --radius: 4px;
    --radius-lg: 10px;
    --wrap: 1160px;
    --shadow: 0 6px 24px rgba(110, 40, 37, 0.10);
    --shadow-lg: 0 20px 50px rgba(110, 40, 37, 0.18);
    /* Listing status accents (encode Active vs. Pending, not decoration) */
    --status-active: #2f7d55;
    --status-pending: #b0701f;
    --font: "Helvetica Neue", Helvetica, Verdana, Arial, sans-serif;
    --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    /* Label face: letterspaced caps for eyebrows, pills, buttons, fact labels. */
    --font-label: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
    /* Plat-map motif: section lines (solid) + quarter-section lines (dashed),
       the survey grid that describes Oklahoma land. Tiled over maroon bands. */
    --plat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='168'%3E%3Cpath d='M0 .5h168M.5 0v168' stroke='rgba(255,255,255,.11)' fill='none'/%3E%3Cpath d='M0 84.5h168M84.5 0v168' stroke='rgba(255,255,255,.055)' stroke-dasharray='5 7' fill='none'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--maroon); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
main { min-height: 50vh; }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--maroon);
    color: #fff;
    padding: .7rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-label);
    font-weight: 700;
    letter-spacing: .05em;
    border: 2px solid var(--maroon);
    transition: background .15s, color .15s;
}
.btn:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn--outline:hover { background: var(--maroon); color: #fff; }
.btn--light { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.85); color: #fff; }
.btn--light:hover { background: #fff; color: var(--maroon); border-color: #fff; }

/* Admin bar — fixed at the very top, always visible; JS offsets the header +
   body by its height so nothing hides behind it (fleet pattern, clearview). */
.admin-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1001; background: #141414; color: #fff; font-size: .85rem; }
.admin-bar-inner { max-width: var(--wrap); margin: 0 auto; padding: 7px 24px; display: flex; align-items: center; gap: 1.5rem; }
.admin-bar a { color: #e8e0de; text-decoration: none; }
.admin-bar a:hover { color: #fff; }
.admin-bar-title { font-weight: 700; }
.admin-bar-logout { margin-left: auto; }

/* Header / nav */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--maroon); border-bottom: 3px solid var(--maroon-dark);
    transition: background .2s;
}
.site-header.scrolled { background: var(--maroon-dark); }
/* Transparent overlay header on the home page (sits over the hero photo) */
.site-header--overlay { position: absolute; top: 0; left: 0; right: 0; background: transparent; border-bottom: 0; }
.site-header--overlay.scrolled { position: fixed; background: var(--maroon); border-bottom: 3px solid var(--maroon-dark); }
/* On the home hero the big logo lives in the hero, so hide the header logo
   until the user scrolls and the solid bar appears. */
.site-header--overlay .site-logo { opacity: 0; visibility: hidden; transition: opacity .2s; }
.site-header--overlay.scrolled .site-logo { opacity: 1; visibility: visible; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 86px; }
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 58px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { font-family: var(--font-label); font-weight: 600; color: #f3e7e5; font-size: .92rem; letter-spacing: .04em; }
.site-nav a:hover, .site-nav a.active { color: #fff; }
.site-nav__cta {
    background: rgba(255,255,255,.14); color: #fff !important; padding: .5rem 1rem; border-radius: var(--radius);
}
.site-nav__cta:hover { background: rgba(255,255,255,.26); }

.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 6px 0; transition: .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-scrim { display: none; }

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(rgba(30, 34, 45, 0.55), rgba(30, 22, 20, 0.72)), url('/img/vanmeter-building.jpg') center/cover no-repeat;
    color: #fff; padding: 9rem 0 6rem; text-align: center;
}
.hero__inner { max-width: 860px; margin: 0 auto; }
.hero__logo { height: 150px; width: auto; margin: 0 auto 1.25rem; }
.hero__title { color: #fff; font-size: clamp(2.3rem, 5.5vw, 3.9rem); margin-bottom: .4rem; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero__lead { font-size: 1.35rem; color: #f4ece0; font-style: italic; font-family: var(--font-head); max-width: 660px; margin: 0 auto 2rem; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hero .btn { font-size: 1.05rem; padding: .8rem 2rem; }

/* Home intro band (maroon) */
.home-intro { background: var(--maroon); color: #fff; padding: 3rem 0 5rem; text-align: center; }
.home-intro__inner { max-width: 820px; margin: 0 auto; }
.home-intro h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.home-intro p { color: #f2e4e2; font-size: 1.1rem; margin: 0; }

/* Property search card (overlaps the maroon band) */
.search-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: 1.75rem 2rem 1.5rem; margin: -3.5rem auto 0; max-width: 1080px;
}
.search-card__title { color: var(--maroon); text-transform: uppercase; letter-spacing: .08em; font-size: 1.3rem; margin-bottom: 1.25rem; text-align: center; font-family: var(--font-label); }
.search-card__row { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.search-card__row input {
    flex: 1; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); font-size: .98rem; min-width: 0;
}
.search-card__go { flex: 0 0 auto; padding: .8rem 1.75rem; text-transform: uppercase; letter-spacing: .04em; }
.search-card__to { color: var(--muted); flex: 0 0 auto; }
.search-card__links { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .9rem; }
@media (max-width: 700px) {
    .search-card__row { flex-wrap: wrap; }
    .search-card__row input { flex: 1 1 40%; }
}

/* Page hero (interior) */
.page-hero { background: var(--bg-alt); padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .25rem; }
.page-hero__lead { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Section head */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.section-head__link { font-weight: 600; }

/* Section titles */
.section-title { text-align: center; text-transform: uppercase; letter-spacing: .08em; color: var(--maroon); font-size: 1.5rem; margin: 0 0 1.75rem; }
.section-title--left { text-align: left; }

/* Listings page hero (maroon band, plat-grid signature) */
.listings-hero { background: var(--plat), linear-gradient(155deg, var(--maroon-dark) 0%, var(--maroon) 70%) var(--maroon); color: #fff; padding: 3.75rem 0 5.5rem; }
.listings-hero__eyebrow { margin: 0 0 .8rem; font-family: var(--font-label); text-transform: uppercase; letter-spacing: .22em; font-size: .74rem; font-weight: 700; color: rgba(255, 255, 255, .68); }
.listings-hero h1 { color: #fff; font-size: clamp(2.1rem, 4vw, 3.15rem); margin: 0 0 .6rem; }
.listings-hero__lead { color: rgba(255, 255, 255, .84); font-size: 1.12rem; line-height: 1.6; margin: 0; max-width: 48ch; }

/* Search card, lifted to overlap the hero band */
.listings-search { margin-top: -3rem; margin-bottom: 3.25rem; position: relative; z-index: 2; }
.listings-search__form { display: flex; align-items: flex-end; gap: .75rem; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.4rem 1.5rem; }
.listings-search__field { flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.listings-search__label { font-family: var(--font-label); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.listings-search__form input:not([type="range"]) { width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; }
.listings-search__form input:not([type="range"]):focus { outline: 2px solid var(--maroon); outline-offset: 1px; border-color: var(--maroon); }
.listings-search__form button[type="submit"] { padding: .95rem 1.6rem; border: 0; border-radius: var(--radius); background: var(--maroon); color: #fff; font-family: var(--font-label); font-weight: 700; letter-spacing: .05em; font-size: .95rem; cursor: pointer; white-space: nowrap; transition: background .15s; }
.listings-search__form button[type="submit"]:hover { background: var(--maroon-dark); }

/* Section eyebrow */
.section-eyebrow { margin: 0 0 .4rem; font-family: var(--font-label); text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 700; color: var(--maroon); }

/* Listings grid + cards */
.listings { padding: 0 0 3.5rem; }
.listings__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; margin-bottom: 1.75rem; }
.listings__head h2 { margin: 0; }
.listings__count { color: var(--muted); font-size: .95rem; }
.listings__sub { margin-top: 3rem; }
.listings__more { margin-top: 1.5rem; }
.home-featured { padding: 3.5rem 0; }
.home-featured__more { text-align: center; margin-top: 1.75rem; font-weight: 600; }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.75rem; }
.listing-grid--center { justify-content: center; }

.listing-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden; color: var(--ink);
    box-shadow: 0 1px 2px rgba(49, 49, 49, .04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--ink); }
.listing-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-alt); overflow: hidden; }
.listing-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.listing-card:hover .listing-card__media img { transform: scale(1.06); }
.listing-card__noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .9rem; }
.listing-card__status {
    position: absolute; top: .85rem; left: .85rem; background: var(--maroon); color: #fff;
    font-family: var(--font-label); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
    padding: .32rem .7rem; border-radius: 100px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.listing-card__status--active { background: var(--status-active); }
.listing-card__status--pending,
.listing-card__status--activeundercontract { background: var(--status-pending); }
.listing-card__body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.listing-card__price { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--maroon); letter-spacing: -.01em; }
.listing-card__address { font-weight: 600; margin-top: .15rem; }
.listing-card__location { color: var(--muted); font-size: .92rem; }
.listing-card__facts { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem .9rem; padding: .8rem 0 0; margin: .85rem 0 0; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); }
.listing-card__facts strong { color: var(--ink); }
.listing-card__cta { margin-top: auto; padding-top: .95rem; font-family: var(--font-label); font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--maroon); }
.listing-card__cta span { display: inline-block; transition: transform .18s ease; }
.listing-card:hover .listing-card__cta span { transform: translateX(4px); }
/* Centered variant used on the home "Featured Properties" grid */
.listing-grid--center .listing-card { text-align: center; }
.listing-grid--center .listing-card__facts { justify-content: center; }
.listing-grid--center .listing-card__facts li:not(:last-child)::after { content: "|"; margin-left: .9rem; color: var(--line); }
.listing-grid--center .listing-card__cta { text-align: center; }

@media (max-width: 560px) {
    .listings-search__form { flex-direction: column; align-items: stretch; }
    .listings-search__form button[type="submit"] { width: 100%; }
}

/* Search results */
.listings__count { color: var(--muted); font-size: .95rem; margin: 0 0 1.25rem; }
.listings-hero__qualifier { color: rgba(255, 255, 255, .75); font-style: italic; font-weight: 400; }
.listings-search__form--filters { display: grid; grid-template-columns: minmax(150px, 1.5fr) minmax(190px, 1.7fr) repeat(2, minmax(0, .85fr)) auto; align-items: end; }

/* Dual-handle price range slider */
.price-range { display: flex; flex-direction: column; gap: .35rem; }
.price-range__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.price-range__output { font-size: .82rem; font-weight: 700; color: var(--maroon); white-space: nowrap; }
.price-range__slider { position: relative; height: 36px; }
/* Inset the track by the handle radius so the thumbs never clip at 0% / 100%. */
.price-range__track { position: absolute; top: 0; bottom: 0; left: 11px; right: 11px; }
.price-range__rail { position: absolute; top: 50%; left: 0; right: 0; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--line); }
.price-range__fill { position: absolute; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--maroon); }
/* Input shrunk to the handle height and centered on the rail so the circles
   sit on the line (not below it). */
.price-range__thumb { position: absolute; top: 50%; left: 0; width: 100%; height: 20px; margin: -10px 0 0; padding: 0; border: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.price-range__thumb::-webkit-slider-runnable-track { height: 20px; background: none; border: none; }
.price-range__thumb::-moz-range-track { height: 20px; background: none; border: none; }
.price-range__thumb::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid #d9d0cd; box-shadow: 0 1px 4px rgba(49, 49, 49, .28); cursor: grab; margin-top: 0; transition: border-color .12s, box-shadow .12s; }
.price-range__thumb::-webkit-slider-thumb:active { cursor: grabbing; }
.price-range__thumb::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid #d9d0cd; box-shadow: 0 1px 4px rgba(49, 49, 49, .28); cursor: grab; }
.price-range__thumb:hover::-webkit-slider-thumb, .price-range__thumb:focus::-webkit-slider-thumb { border-color: var(--maroon); box-shadow: 0 2px 7px rgba(110, 40, 37, .35); }
.price-range__thumb:hover::-moz-range-thumb, .price-range__thumb:focus::-moz-range-thumb { border-color: var(--maroon); }
.price-range__thumb:focus-visible { outline: none; }

/* Beds/baths stepper */
.count-stepper { display: flex; flex-direction: column; gap: .35rem; }
.count-stepper__control { display: flex; align-items: center; justify-content: space-between; gap: .4rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem .4rem; height: 46px; background: #fff; }
.count-stepper__btn { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--maroon); font-size: 1.2rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .12s, background .12s, color .12s; }
.count-stepper__btn:hover:not(:disabled) { border-color: var(--maroon); background: var(--maroon); color: #fff; }
.count-stepper__btn:disabled { opacity: .35; cursor: default; }
.count-stepper__value { font-weight: 700; color: var(--ink); font-size: .95rem; white-space: nowrap; }
.listings-search__clear { grid-column: 1 / -1; justify-self: start; margin-top: .6rem; padding: 0; background: none; border: 0; font-family: var(--font-label); font-weight: 700; font-size: .8rem; letter-spacing: .03em; color: var(--muted); cursor: pointer; }
.listings-search__clear:hover { color: var(--maroon); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2.5rem; font-family: var(--font-label); font-weight: 700; letter-spacing: .03em; }
.pagination__status { color: var(--muted); font-family: var(--font); font-weight: 400; font-size: .9rem; }
@media (max-width: 860px) {
    .listings-search__form--filters { grid-template-columns: repeat(2, 1fr); }
    .listings-search__form--filters .listings-search__field--q,
    .listings-search__form--filters button[type="submit"] { grid-column: 1 / -1; }
}
.mls-disclaimer { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; line-height: 1.6; }

/* Listing detail */
.listing-detail { padding: 2.5rem 0 3.5rem; }
.listing-detail__back { margin: 0 0 1.25rem; font-weight: 600; font-size: .92rem; }
.listing-detail__header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.listing-detail__address { margin: 0; font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.listing-detail__location { color: var(--muted); margin: .25rem 0 0; font-size: 1.05rem; }
.listing-detail__price-block { text-align: right; }
.listing-detail__price { font-family: var(--font-head); font-size: 2.35rem; font-weight: 700; color: var(--maroon); line-height: 1; letter-spacing: -.01em; }
.listing-detail__status { display: inline-block; margin-top: .55rem; background: var(--maroon); color: #fff; font-family: var(--font-label); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; padding: .32rem .7rem; border-radius: 100px; }
.listing-detail__status--active { background: var(--status-active); }
.listing-detail__status--pending,
.listing-detail__status--activeundercontract { background: var(--status-pending); }

/* Detail body: main column + inquiry card */
.listing-detail__cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; margin-top: 2rem; }
.listing-detail__facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: 0; margin: 0; }
@media (max-width: 480px) { .listing-detail__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.listing-detail__facts li { display: flex; flex-direction: column; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .95rem 1.1rem; }
.listing-detail__fact-value { font-family: var(--font-head); font-size: 1.45rem; font-weight: 700; color: var(--maroon); line-height: 1.25; }
.listing-detail__fact-label { font-family: var(--font-label); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); margin-top: .3rem; }
.listing-detail__remarks { margin-top: 2.25rem; max-width: 70ch; }
.listing-detail__remarks p { color: var(--ink); line-height: 1.75; font-size: 1.02rem; }

/* Inquiry card */
.listing-inquiry { background: linear-gradient(155deg, var(--maroon-dark) 0%, var(--maroon) 80%); color: #fff; border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow); position: sticky; top: 1.5rem; }
.listing-inquiry__title { color: #fff; margin: 0 0 .5rem; font-size: 1.45rem; }
.listing-inquiry__agent-row { display: flex; align-items: center; gap: .85rem; margin: 0 0 1.2rem; }
.listing-inquiry__agent-row .listing-inquiry__agent { margin: 0; }
.listing-inquiry__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .65); flex-shrink: 0; }
.listing-inquiry__agent { color: rgba(255, 255, 255, .85); font-size: .92rem; margin: 0 0 1.2rem; }
.listing-inquiry__agent strong { color: #fff; }
.listing-inquiry__mls { display: block; margin-top: .15rem; font-family: var(--font-label); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.listing-inquiry__agent-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .45); }
.listing-inquiry__agent-link:hover { color: #fff; text-decoration-color: #fff; }
.listing-inquiry__phones { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.listing-inquiry__phones li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.listing-inquiry__phones li:last-child { border-bottom: 0; }
.listing-inquiry__phones span { font-family: var(--font-label); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .65); }
.listing-inquiry__phones a { color: #fff; font-weight: 700; }
.listing-inquiry__btn { display: block; text-align: center; background: #fff; color: var(--maroon); font-family: var(--font-label); font-size: .92rem; line-height: 1.3; font-weight: 700; letter-spacing: .04em; padding: .75rem 1rem; border-radius: var(--radius); transition: transform .15s, box-shadow .15s; }
.listing-inquiry__btn:hover { color: var(--maroon-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }

/* Listing gallery: lead photo + 2x2 thumb mosaic */
.listing-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 185px; gap: .65rem; }
.listing-gallery button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--bg-alt); border-radius: var(--radius-lg); overflow: hidden; cursor: zoom-in; position: relative; }
.listing-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.listing-gallery button:hover img { transform: scale(1.05); }
.listing-gallery__lead { grid-column: span 2; grid-row: span 2; }
.listing-gallery--single .listing-gallery__lead { grid-column: span 4; }
.listing-gallery__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; }

@media (max-width: 900px) {
    .listing-detail__cols { grid-template-columns: 1fr; }
    .listing-inquiry { position: static; }
}
@media (max-width: 640px) {
    .listing-gallery { grid-auto-rows: 110px; }
    .listing-detail__price-block { text-align: left; }
}

/* Lightbox overlay */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .92); align-items: center; justify-content: center; }
.lightbox:not([hidden]) { display: flex; }
.lightbox__stage { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lightbox__img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 2px; }
.lightbox__counter { color: rgba(255, 255, 255, .85); font-size: .85rem; margin-top: .75rem; letter-spacing: .03em; }
.lightbox__close { position: absolute; top: 1rem; right: 1.25rem; width: 2.75rem; height: 2.75rem; border: 0; background: transparent; color: #fff; font-size: 2.25rem; line-height: 1; cursor: pointer; opacity: .85; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3.25rem; height: 3.25rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; opacity: .85; transition: background .15s, opacity .15s; }
.lightbox__nav:hover, .lightbox__close:hover { opacity: 1; }
.lightbox__nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox__nav--prev { left: 1.25rem; }
.lightbox__nav--next { right: 1.25rem; }
@media (max-width: 640px) {
    .lightbox__nav { width: 2.75rem; height: 2.75rem; font-size: 1.6rem; }
    .lightbox__nav--prev { left: .5rem; }
    .lightbox__nav--next { right: .5rem; }
}

/* Home about */
.home-about { padding: 4rem 0; }
.home-about__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
.home-about__card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.home-about__card address { font-style: normal; color: var(--muted); margin-bottom: 1.25rem; }

/* Static content pages */
.content { padding: 3rem 0; }
.content .wrap { max-width: var(--wrap); }
.content h2 { margin-top: 2rem; }
.content li { margin-bottom: .35rem; }
.lead-quote { font-family: var(--font-head); font-size: 1.4rem; color: var(--maroon); font-style: italic; border-left: 4px solid var(--maroon); padding-left: 1.25rem; margin: 0 0 2rem; }
.feature-list { padding-left: 1.25rem; }
.feature-list li { margin-bottom: .4rem; }

/* Associates */
.associate { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.associate__role { color: var(--maroon-dark); font-weight: 600; margin-top: -.5rem; }
.associate__contact { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.associate__contact li { margin-bottom: .35rem; }

/* Associates roster (cards) */
.associate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.associate-grid--4 { grid-template-columns: repeat(4, 1fr); }
.associate-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .associate-grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .associate-grid--4, .associate-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .associate-grid--4, .associate-grid--3 { grid-template-columns: 1fr; } }
.associate-card__more { white-space: nowrap; font-weight: 700; color: var(--maroon); }
.associate-card__more:hover { color: var(--maroon-dark); text-decoration: underline; }
.associate-card { display: flex; flex-direction: column; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Portrait frame, uniform size. `cover` fills the frame; anchoring the top
   keeps heads in view (faces sit high in a headshot) instead of cropping them. */
.associate-card__photo { aspect-ratio: 4 / 5; background: #ece6e4; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.associate-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.associate-card__initials { font-family: var(--font-head); font-size: 2.75rem; font-weight: 700; color: var(--maroon); opacity: .7; }
.associate-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.associate-card__body h2 { margin: 0 0 .45rem; font-size: 1.35rem; }
.associate-card__body .associate__role { margin: 0 0 .8rem; padding-top: .45rem; border-top: 1px solid var(--line); font-family: var(--font-label); font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.associate-card__bio { color: var(--muted); margin: .75rem 0 1.25rem; }
.associate-card__listings { align-self: flex-start; margin-top: auto; }

/* Associate detail */
.associate-detail { display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; align-items: start; }
.associate-detail__photo { border-radius: var(--radius); overflow: hidden; background: #ece6e4; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; }
.associate-detail__photo img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__crumb { margin: 0 0 .5rem; font-size: .9rem; }
@media (max-width: 720px) { .associate-detail { grid-template-columns: 1fr; } .associate-detail__photo { max-width: 280px; } }

/* Contact */
.home-contact { padding: 3.5rem 0; }
.home-contact__grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 2rem; align-items: start; }
.home-contact__info h3 { color: var(--maroon); margin-bottom: .5rem; }
.home-contact__info address { font-style: normal; color: var(--muted); margin-bottom: .75rem; }
.home-contact__toll { margin-bottom: .75rem; }
.home-contact__tagline { color: var(--maroon); margin: 1rem 0 1.25rem; }
.home-contact__office h4 { color: var(--maroon); font-family: var(--font-head); font-size: 1.1rem; margin-bottom: .5rem; }
.home-contact__office iframe { width: 100%; height: 200px; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 820px) { .home-contact__grid { grid-template-columns: 1fr; } }

.office-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.office-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.office-card address { font-style: normal; color: var(--muted); margin: .5rem 0 1rem; }
.contact-cta { border-top: 1px solid var(--line); padding-top: 2rem; }
@media (max-width: 640px) { .office-grid { grid-template-columns: 1fr; } }

/* Contact page layout: form + offices side by side */
.contact-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; max-width: none; }
.contact-offices .office-card { margin-bottom: 1.5rem; }
.contact-offices address { font-style: normal; color: var(--muted); margin: .4rem 0 .75rem; }
.contact-offices iframe { width: 100%; height: 180px; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }

/* Forms (CakePHP FormHelper output) */
.contact-form .input { margin-bottom: 1.1rem; }
.contact-form label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 1rem; font-family: inherit; color: var(--ink); background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 0; border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(142,59,51,.12); }
.contact-form textarea { resize: vertical; }
.contact-form .error-message { color: #a12626; font-size: .85rem; margin-top: .3rem; }
.contact-form .error input, .contact-form .error textarea { border-color: #a12626; }
.contact-form button { margin-top: .5rem; cursor: pointer; }

/* Notices / flash */
.notice { color: var(--muted); }
.message {
    max-width: var(--wrap); margin: 1rem auto; padding: .9rem 1.25rem; border-radius: var(--radius);
    cursor: pointer; font-weight: 500;
}
.message.success { background: #e6f4ea; color: #1e6b3a; }
.message.error { background: #fbeaea; color: #a12626; }
.message.info, .message.warning { background: #fef6e6; color: #8a6d1f; }

/* Footer */
.site-footer { background: var(--maroon-dark); color: #cdd8e4; margin-top: 3rem; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 3rem 24px; }
.site-footer h4 { color: #fff; font-family: var(--font); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer a { color: #cdd8e4; display: block; margin-bottom: .4rem; }
.site-footer a:hover { color: #fff; }
.site-footer__logo { height: 64px; width: auto; margin-bottom: 1rem; }
.site-footer__brand p { color: #9fb0c2; max-width: 320px; }
.site-footer__col address { font-style: normal; }
.site-footer__col address a { display: inline; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.site-footer__bottom .wrap { display: flex; justify-content: space-between; align-items: center; padding: 1rem 24px; }
.site-footer__legal { display: inline-flex; align-items: center; }
.site-footer__legal a { display: inline; }
.site-footer__legal a + a { margin-left: 1rem; padding-left: 1rem; border-left: 1px solid rgba(255,255,255,.3); }

/* Responsive */
@media (max-width: 820px) {
    .nav-toggle { display: block; z-index: 60; }
    .site-nav {
        position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
        background: #fff; flex-direction: column; align-items: flex-start; gap: 1.25rem;
        padding: 6rem 2rem 2rem; transform: translateX(100%); transition: transform .25s; z-index: 55;
        box-shadow: -4px 0 24px rgba(0,0,0,.12);
    }
    .site-nav.open { transform: translateX(0); }
    .nav-scrim.visible { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 54; }
    .home-about__inner { grid-template-columns: 1fr; }
    .site-footer__inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .site-footer__bottom .wrap { flex-direction: column; gap: .5rem; text-align: center; }
    .hero { padding: 3.5rem 0; }
    .hero__search { flex-direction: column; }
}

/* Sitemap (human-readable) */
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2.5rem; }
.sitemap-col h2 { font-size: 1.25rem; margin: 0 0 .75rem; padding-bottom: .4rem; border-bottom: 2px solid var(--maroon); }
.sitemap-col h2 + ul { margin-bottom: 2rem; }
.sitemap-col ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.sitemap-col li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.sitemap-col li a { color: var(--ink); text-decoration: none; }
.sitemap-col li a:hover { color: var(--maroon); text-decoration: underline; }

/* About — intro with building photo */
.about-intro { display: flex; gap: 2.5rem; align-items: flex-start; margin-bottom: 2rem; }
.about-intro__text { flex: 1 1 60%; min-width: 0; }
.about-intro__photo { flex: 0 0 38%; margin: 0; }
.about-intro__photo img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
@media (max-width: 720px) {
    .about-intro { flex-direction: column; }
    .about-intro__photo { flex-basis: auto; max-width: 420px; }
}

/* Contact thank-you page */
.thanks { max-width: 640px; margin: 0 auto; text-align: center; }
.thanks__icon { fill: var(--maroon); margin-bottom: 1rem; }
.thanks__lead { font-size: 1.15rem; color: var(--ink); margin: 0 0 .5rem; }
.thanks__sub { color: var(--muted); margin: 0 0 2rem; }
.thanks__sub a { color: var(--maroon); }
.thanks__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Hero lead links render in the brand color */
.page-hero__lead a { color: var(--maroon); }

/* Offices */
.muted { color: var(--muted); }
.page-hero__eyebrow { margin: 0 0 .25rem; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.page-hero__eyebrow a { color: var(--maroon); text-decoration: none; }
.office-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.75rem; }
.office-card { display: flex; flex-direction: column; justify-content: space-between; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; text-decoration: none; color: var(--ink); transition: box-shadow .15s, border-color .15s, transform .15s; }
.office-card:hover { box-shadow: var(--shadow); border-color: var(--maroon); transform: translateY(-2px); }
.office-card h2 { margin: 0 0 .5rem; color: var(--maroon); font-size: 1.5rem; }
.office-card__addr { margin: 0 0 .5rem; color: var(--muted); line-height: 1.5; }
.office-card__phone { margin: 0 0 1rem; font-weight: 600; }
.office-card__count { display: inline-block; font-size: .85rem; color: var(--muted); }
.office-card__cta { margin-top: 1.25rem; font-weight: 600; color: var(--maroon); }
/* Office detail — the branch as a listing card: the map sits where the
   photo would, the street address takes the serif "price" slot. The card
   overlaps the plat band the way the search filters overlap theirs. */
.office-hero { padding-bottom: 7rem; }
.office-storefront-band { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.office-storefront {
    display: grid;
    grid-template-columns: 360px 1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-top: -4.25rem;
}
.office-storefront__map iframe { display: block; width: 100%; height: 100%; min-height: 250px; border: 0; }
.office-storefront__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem; padding: 2.25rem 2.5rem; }
.office-storefront__label {
    display: block;
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: .35rem;
}
.office-storefront__address { font-style: normal; font-family: var(--font-head); font-size: 1.4rem; line-height: 1.35; color: var(--ink); }
.office-storefront__phone { font-family: var(--font-head); font-size: 1.4rem; color: var(--maroon); white-space: nowrap; }
.office-storefront__phone:hover { color: var(--maroon-dark); }
.office-storefront__facts > .btn { margin-left: auto; }
.office-agents h2 { margin-bottom: 1.25rem; }

/* The town's live market, pulled by the office's city */
.office-market { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 3.25rem 0 4rem; }
.office-market__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.75rem; }
.office-market__head h2 { margin: 0 0 .2rem; }
.office-market__count { margin: 0; color: var(--muted); }

@media (max-width: 860px) {
    .office-hero { padding-bottom: 6rem; }
    .office-storefront { grid-template-columns: 1fr; }
    .office-storefront__map iframe { min-height: 200px; }
    .office-storefront__facts { padding: 1.5rem; gap: 1.5rem; }
    .office-storefront__facts > .btn { margin-left: 0; flex-basis: 100%; text-align: center; }
}

/* Accessibility floor */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--maroon); outline-offset: 2px;
}
.site-header :focus-visible, .listings-hero :focus-visible,
.listing-inquiry :focus-visible, .lightbox :focus-visible, .site-footer :focus-visible {
    outline-color: #fff;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .listing-card:hover { transform: none; }
    .listing-card:hover .listing-card__media img,
    .listing-gallery button:hover img { transform: none; }
}

/* Rich-text bios authored in the admin (Trix output) */
.trix-rendered div { margin: 0 0 1em; }
.trix-rendered a { color: var(--maroon); text-decoration: underline; }
.trix-rendered ul, .trix-rendered ol { margin: 0 0 1em; padding-left: 1.4em; }
.trix-rendered strong { font-weight: 700; }

/* Agent profile hero — circular photo + contact pills on the plat band */
.agent-hero { padding: 3.5rem 0 3.25rem; }
.agent-hero__layout { display: flex; align-items: center; gap: 2.5rem; }
.agent-hero__photo { width: 176px; height: 176px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 4px solid rgba(255, 255, 255, .55); background: #fff; box-shadow: 0 10px 30px rgba(20, 8, 6, .35); }
.agent-hero__photo--initials { display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 3rem; color: var(--maroon); }
.agent-hero h1 { margin-bottom: .2rem; }
.agent-hero__role { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .75); margin: 0 0 1.2rem; }
.agent-hero__pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.agent-pill { display: inline-flex; align-items: center; gap: .55rem; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .38); color: #fff; border-radius: 999px; padding: .5rem 1.15rem; font-family: var(--font-label); font-weight: 600; font-size: .9rem; transition: background .15s, color .15s; }
.agent-pill:hover { background: #fff; color: var(--maroon); }
.agent-pill svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.agent-pill__tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; opacity: .65; }

/* About section below the hero */
.agent-about { margin-bottom: 2.5rem; }
.agent-about__heading { padding-bottom: .6rem; border-bottom: 2px solid var(--line); margin-bottom: 1.25rem; }
.agent-about__bio { color: var(--ink); }

@media (max-width: 720px) {
    .agent-hero__layout { flex-direction: column; text-align: center; }
    .agent-hero__pills { justify-content: center; }
}

/* Roster card: name + photo link to the profile */
.associate-card__photo { display: block; }
.associate-card__name { color: inherit; }
.associate-card__name:hover { color: var(--maroon); }

/* Staff-only "email this listing to a lead" button */
.listing-sendlead { margin-top: 1.4rem; border-top: 1px dashed rgba(255, 255, 255, .35); padding-top: 1.2rem; }
.listing-sendlead .listing-inquiry__btn { width: 100%; border: 0; cursor: pointer; }

/* Inquiry page: form + listing summary card */
.inquire-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 820px) {
    .inquire-layout { grid-template-columns: 1fr; }
    /* On phones, show what you're asking about before the form. */
    .inquire-layout .inquire-listing { order: -1; }
}
.inquire-listing__card { display: block; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.inquire-listing__card img { width: 100%; display: block; }
.inquire-listing__body { padding: 1rem 1.25rem 1.25rem; }
