/* Public search (index.html): filters, results with a side column, and Find a REalPro. */
.hero-search { padding-top: 48px; }
.hero-search h1 { font-size: clamp(2rem, 1.1rem + 3.6vw, 4rem); max-width: 16ch; }
.hero-search p.lede { margin-bottom: 28px; }
.search-panel { grid-template-columns: 1.4fr 1.4fr repeat(3, minmax(0, .8fr)) auto; }
.search-panel .field-keywords { grid-column: auto; }
.quick-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.type-chips, .check-chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.type-chips label, .check-chips label { position: relative; cursor: pointer; }
.type-chips input, .check-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-chips span, .check-chips span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 19px; font-weight: 600; font-size: .88rem; border: 1.5px solid rgba(255, 255, 255, .55); color: #fff; }
.type-chips input:checked + span { background: #fff; color: var(--ink); border-color: #fff; }
.type-chips input:checked + span::before, .check-chips input:checked + span::before { content: "✓"; margin-right: 6px; }
.type-chips input:focus-visible + span, .check-chips input:focus-visible + span { outline: 3px solid var(--purple); outline-offset: 2px; }
.filters-btn { font: 700 .92rem var(--font); display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 0; background: #fff; color: var(--ink); cursor: pointer; }
.filters-btn::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 5px / 70% 2px no-repeat, linear-gradient(currentColor 0 0) 0 10px / 40% 2px no-repeat; }
.filters-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red-strong); color: #fff; font-size: .78rem; }
.filters-count[hidden] { display: none; }
.kw-try { grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; font-weight: 600; opacity: .95; }
.kw-try button { font: 500 .85rem var(--font); background: rgba(255, 255, 255, .14); color: inherit; border: 1px solid rgba(255, 255, 255, .35); border-radius: 14px; min-height: 30px; padding: 0 10px; cursor: pointer; }
.kw-try button:hover { background: rgba(255, 255, 255, .26); }
@media (max-width: 960px) {
  .search-panel { grid-template-columns: 1fr 1fr; }
  .search-panel .field-location, .search-panel .field-keywords { grid-column: 1 / -1; }
}

/* All filters: a panel on computers, a full-height sheet on phones. */
.filters-panel { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 20px 60px rgba(27, 37, 80, .35); }
.filters-panel[open] { display: flex; flex-direction: column; }
.filters-panel::backdrop { background: rgba(20, 26, 56, .55); }
.filters-head, .filters-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.filters-head h2 { margin: 0; font-size: 1.25rem; }
.filters-head .close { position: static; width: 44px; height: 44px; font-size: 1.6rem; border: 0; background: none; cursor: pointer; }
.filters-foot { border-bottom: 0; border-top: 1px solid var(--line); }
.filters-body { overflow: auto; padding: 4px 20px 16px; overscroll-behavior: contain; }
.filters-body section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.filters-body section:last-child { border-bottom: 0; }
.filters-body h3 { margin: 0 0 10px; font-size: 1.05rem; }
.filters-body .hint { margin: 0 0 10px; }
.filters-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.filters-grid .field label { color: var(--ink); }
.filters-grid select, .filters-grid input { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); }
.check-line { display: inline-flex; align-items: center; gap: 8px; margin: 12px 18px 0 0; min-height: 36px; font-weight: 600; cursor: pointer; }
.check-line input { width: 20px; height: 20px; accent-color: var(--blue); }
.feat-group { border: 0; margin: 0 0 12px; padding: 0; }
.feat-group legend { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.check-chips span { border-color: var(--line); color: var(--ink); background: #fff; min-height: 36px; font-size: .85rem; }
.check-chips input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (max-width: 600px) {
  .filters-panel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .filters-grid { grid-template-columns: 1fr 1fr; }
  .filters-head, .filters-foot { padding: 10px 16px; }
  .filters-body { padding: 0 16px 12px; }
  .filters-foot .btn { flex: 1; }
}

/* Words in the description, shown on result cards */
.listing .snippet mark { background: #ffe066; color: inherit; padding: 0 1px; border-radius: 2px; }
.listing .feat-hit { margin: 4px 0 0; font-size: .85rem; color: var(--blue-deep); font-weight: 600; }

/* One offering: branded cover, the same photo, 4 more, then the description */
.public-detail .gallery-main { position: relative; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.gal-nav:disabled { opacity: 0; pointer-events: none; }
.gallery-main.is-about { aspect-ratio: auto; min-height: 0; background: var(--mist); overflow: visible; }
.about-frame { padding: 22px 60px 22px 22px; }
.about-frame h3 { margin: 0 0 8px; }
.about-frame p { margin: 0 0 12px; line-height: 1.55; }
.feat-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.feat-list li { background: #fff; border-radius: 12px; padding: 4px 10px; font-size: .82rem; font-weight: 600; }
.public-detail .gallery-thumbs { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.public-detail .gallery-thumbs .locked { font-size: .68rem; line-height: 1.2; padding: 2px; }
.is-about .gal-nav { top: 14px; transform: none; }
.is-about .gal-nav.prev { left: auto; right: 12px; }
.public-detail .gallery-thumbs button { position: relative; }
.thumb-text { display: grid; place-items: center; width: 100%; height: 100%; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 700; }
.thumb-brand { position: absolute; left: 3px; bottom: 3px; background: var(--purple); color: #fff; font-size: .6rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.public-detail .schools h3 { font-size: 1rem; margin: 16px 0 4px; }
.public-detail .schools p { margin: 0 0 6px; }
.read-about { margin: 8px 0 12px; }
.read-about[hidden] { display: none; }
@media (max-width: 600px) { .about-frame { padding: 18px; } }

/* Top banner: space is held so the page doesn't jump when the ad loads. */
.ad-top-wrap { padding-top: 24px; }
.ad-slot-top { min-height: 90px; display: flex; justify-content: center; }
@media (max-width: 727px) { .ad-slot-top { min-height: 100px; } }

.results-block { padding-top: 32px; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1100px) { .results-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.results-rail { display: none; }
@media (min-width: 1100px) { .results-rail { display: flex; flex-direction: column; gap: 20px; } .ad-slot-rail { position: sticky; top: 16px; min-height: 250px; } }
.results-head { align-items: flex-end; margin-bottom: 8px; }
.results-head h2 { margin-bottom: 4px; }
.results-head .results-count { margin: 0; }
.results-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sort-field { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.sort-field select { font: inherit; min-height: 40px; padding: 0 32px 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231b2550' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; color: var(--ink); }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chips:empty { display: none; }
.chip { font: 600 .85rem var(--font); display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--mist); color: var(--ink); cursor: pointer; }
.chip span { font-size: 1.1rem; line-height: 1; color: var(--muted); }
.chip-clear { background: transparent; color: var(--blue); }
.search-map[hidden], .map-note[hidden] { display: none; }
.listing .rec-line { line-height: 1.4; }
.offered-by { font-size: .9rem; color: var(--muted); }
.save-search { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.save-search[hidden] { display: none; }
.save-search .hint { margin: 4px 0 0; }

.rail-pros h3 { margin: 0 0 4px; font-size: 1.05rem; }
.rail-pros ul { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.rail-pros li { display: flex; gap: 10px; align-items: center; }
.rail-pros li small { display: block; color: var(--muted); font-size: .8rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--blue); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
.avatar.big { width: 56px; height: 56px; font-size: 1.1rem; }

/* Find a REalPro */
.pro-search { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr) 1.2fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.pro-search .field input, .pro-search .field select { border: 1.5px solid var(--line); }
@media (max-width: 960px) { .pro-search { grid-template-columns: 1fr 1fr; } .pro-search .btn { grid-column: 1 / -1; } }
@media (max-width: 480px) { .pro-search { grid-template-columns: minmax(0, 1fr); } }
.pro-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pro-card { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pro-card-head { display: flex; gap: 12px; align-items: center; }
.pro-card h3 { margin: 0; font-size: 1.1rem; }
.pro-card-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.pro-card .pro-no { color: var(--purple); font-weight: 700; font-size: .8rem; letter-spacing: .04em; }
.pro-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0; }
.pro-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.pro-facts dd { margin: 0; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.pro-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pro-tags span { font-size: .78rem; font-weight: 600; background: var(--mist); border-radius: 12px; padding: 3px 10px; }
.pro-why { font-size: .85rem; color: var(--blue-deep); margin: 0; }
.pro-card .hint { margin: 0; }
.pro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.want-pro { border-left: 4px solid var(--blue); }

/* ---------- Map search ---------- */
.view-toggle { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--radius-s); overflow: hidden; }
.view-toggle button { font: 600 .9rem var(--font); min-height: 40px; padding: 0 16px; border: 0; background: #fff; color: var(--ink); cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.map-wrap { position: relative; margin: 0 0 12px; isolation: isolate; z-index: 0; }   /* map layers stay under the site header */
.map-wrap .search-map { margin: 0; }
.map-tools { position: absolute; top: 10px; left: 56px; right: 10px; z-index: 500; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.map-check { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 18px; padding: 6px 12px; font-size: .85rem; font-weight: 600; box-shadow: 0 1px 6px rgba(27, 37, 80, .25); cursor: pointer; min-height: 36px; box-sizing: border-box; }
.map-check input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.map-btn { font: 600 .85rem var(--font); background: #fff; color: var(--ink); border: 0; border-radius: 18px; padding: 0 14px; min-height: 36px; box-shadow: 0 1px 6px rgba(27, 37, 80, .25); cursor: pointer; }
.map-btn:disabled { opacity: .6; cursor: default; }
.map-here { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 500; background: var(--ink); color: #fff; }
.map-drawbar { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 2px 10px rgba(27, 37, 80, .3); font-size: .9rem; }
.map-drawbar span { flex: 1 1 200px; }
.search-map.drawing, .search-map.drawing .leaflet-interactive { cursor: crosshair !important; }
.leaflet-tooltip.price-tip.on { background: var(--red-strong); color: #fff; border-color: var(--red-strong); }
.listing.is-hl { outline: 3px solid var(--red-strong); outline-offset: 6px; border-radius: var(--radius-m); }
.map-card { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 600; background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 4px 18px rgba(27, 37, 80, .35); max-height: 60%; overflow: auto; }
.map-card .listings { grid-template-columns: minmax(0, 1fr); }
.map-card-x { position: absolute; right: 6px; top: 6px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 1.5rem; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.view-fab { display: none; }
.view-list .map-wrap, .view-list .map-note { display: none; }

/* Computers: the map stays beside the list while it scrolls. */
@media (min-width: 900px) {
  .view-map .results-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .view-map .results-main > .results-head, .view-map .results-main > .chips, .view-map .results-main > .save-search { grid-column: 1 / -1; }
  .view-map .map-wrap { grid-column: 1; grid-row: span 3; position: sticky; top: 88px; }
  .view-map .map-wrap .search-map { height: calc(100vh - 120px); min-height: 420px; }
  .view-map .map-note { grid-column: 2; margin: 0 0 12px; }
  .view-map .listings { grid-column: 2; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .view-map .results-layout { grid-template-columns: minmax(0, 1fr); }
  .view-map .results-rail { display: none; }
}
/* Phones and the apps: Map or List, switched with a floating button. */
@media (max-width: 720px) {
  .view-fab { display: inline-flex; align-items: center; justify-content: center; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 700; min-height: 48px; padding: 0 26px; border: 0; border-radius: 24px; background: var(--ink); color: #fff; font: 700 1rem var(--font); box-shadow: 0 6px 18px rgba(27, 37, 80, .35); cursor: pointer; }
  .view-map .map-wrap .search-map { height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 360px; }
  .view-map .results-main > .listings, .view-map .save-search, .view-map .map-note { display: none; }
  .map-tools { left: 52px; }
  .map-check, .map-btn { font-size: .8rem; padding: 4px 10px; min-height: 34px; }
  .map-tools { gap: 6px; }
}
