/* /resale: every listing on one page (layout of the "נכסים למכירה" artifact). Builds on properties.css (.pr-page base,
   .pr-num, .pr-crumbs, .pr-rich, .pr-legal). Prefix .rs-. RTL. Tokens are the erra.co.il ones from the artifact. */
.rs-page {
  --rs-blue: #0050c9; --rs-blue-hover: #0065ff; --rs-moon: #2abdd5; --rs-ink: #0b0c18;
  --rs-bg: #f7f7f7; --rs-band: #eeeeee; --rs-900: #1f1f1f; --rs-700: #353535; --rs-500: #4a4a4a; --rs-400: #6e6e6e; --rs-line: #d9d9d9;
  --rs-pad: clamp(16px, 7vw, 96px);
  background: var(--rs-bg); padding-bottom: 0;
}

/* ---------- Hero: drawing on the left, text on the right, fading into the page grey ---------- */
.rs-hero { position: relative; overflow: hidden; padding: 72px var(--rs-pad) 64px; min-height: min(35vw, 440px);
  background: var(--rs-bg) var(--rs-hero) center / cover no-repeat; }
.rs-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to left, rgba(247,247,247,.94) 0%, rgba(247,247,247,.78) 32%, rgba(247,247,247,0) 58%); }
.rs-hero__in { position: relative; z-index: 1; max-width: 540px; }
.rs-h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.15; font-weight: 600; color: var(--rs-ink); text-wrap: balance; margin-bottom: 18px; }
.rs-h1 span { font-weight: 400; color: var(--rs-700); }
.rs-lead { font-size: 16px; line-height: 1.55; color: var(--rs-700); max-width: 46ch; font-weight: 500; }

/* ---------- Band with filters and rows ---------- */
.rs-band { background: var(--rs-band); padding: 48px 0 64px; }
.rs-shell { max-width: 1440px; margin-inline: auto; padding-inline: var(--rs-pad); }
.rs-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 40px; }
.rs-filters[hidden] { display: none; }
.rs-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-seg button { background: transparent; border: 1.5px solid #868686; color: var(--rs-700); border-radius: 8px; padding: 8px 18px; cursor: pointer; font-size: 15px; }
.rs-seg button[aria-pressed="true"] { border-color: var(--rs-blue); background: var(--rs-blue); color: #fdfdfd; }
.rs-filters select, .rs-filters input { background: #fdfdfd; color: var(--rs-900); border: 1px solid #e6e6e6; border-radius: 8px; padding: 9px 12px; min-width: 150px; font-size: 15px; }
.rs-count { margin-inline-start: auto; font-size: 14px; color: var(--rs-400); }

.rs-rows { display: flex; flex-direction: column; gap: 72px; }
.rs-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; scroll-margin-top: 100px; }
.rs-row[hidden] { display: none; }

/* card (right column in RTL) */
.rs-card { min-width: 0; display: flex; flex-direction: column; }
.rs-title { font-size: 26px; line-height: 1.2; font-weight: 400; color: var(--rs-900); margin-bottom: 16px; }
.rs-title a:hover { color: var(--rs-blue); }
.rs-media { position: relative; aspect-ratio: 21 / 10; border-radius: 12px; overflow: hidden; background: #dfe5e9; }
.rs-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: linear-gradient(to top, rgba(11,12,24,.72), rgba(11,12,24,0)); }
.rs-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none !important; }
.rs-photo--ph { object-fit: contain; padding: 10%; }
.rs-badge { position: absolute; top: 12px; right: 12px; z-index: 2; background: #fff; color: var(--rs-900); border-radius: 5px; padding: 3px 10px; font-size: 15px; }
.rs-badge.is-offer { background: var(--rs-blue); color: #fff; }
.rs-ex { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(11,12,24,.6); color: #fff; border-radius: 5px; padding: 3px 10px; font-size: 13px; }
.rs-stats { position: absolute; inset: auto 0 0 0; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); color: #fff; padding: 0 4px 8px; }
.rs-stats > div { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 8px 0; min-width: 0; }
.rs-stats > div + div { border-right: 1px solid rgba(255,255,255,.55); }
.rs-stats dt { font-size: 12px; opacity: .85; }
.rs-stats dd { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rs-gal { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.rs-gal::-webkit-scrollbar { display: none; }
.rs-th { flex: 0 0 calc((100% - 24px) / 4); padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; background: #ddd; opacity: .75; }
.rs-th.is-on { border-color: var(--rs-blue); opacity: 1; }
.rs-th img { width: 100%; height: 100%; object-fit: cover; }
.rs-desc { margin: 14px 0 18px; font-size: 15px; line-height: 1.45; color: var(--rs-500); max-width: 52ch; }
.rs-more { align-self: flex-start; border: 1.5px solid var(--rs-blue); color: var(--rs-blue); border-radius: 8px; padding: 12px 0; width: 170px; text-align: center; font-size: 15px; transition: background .2s, color .2s; }
.rs-more:hover { background: var(--rs-blue); color: #fdfdfd; }

/* about (left column) */
.rs-about { min-width: 0; padding-top: 42px; display: flex; flex-direction: column; gap: 18px; }
.rs-label { font-size: 14px; font-weight: 400; color: var(--rs-400); letter-spacing: .02em; }
.rs-full { font-size: 16px; line-height: 1.65; color: var(--rs-700); max-width: 60ch; position: relative; }
.rs-js .rs-row:not(.is-open) .rs-full { max-height: 80px; overflow: hidden; }
.rs-js .rs-row:not(.is-open) .rs-full::after { content: ""; position: absolute; inset: auto 0 0 0; height: 44px; background: linear-gradient(to top, var(--rs-band), rgba(238,238,238,0)); }
.rs-js .rs-row:not(.is-open) .rs-extra { display: none; }
.rs-toggle { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--rs-blue); font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.rs-toggle[hidden] { display: none; }
.rs-toggle::after { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg) translateY(-2px); transition: transform .2s; }
.rs-toggle[aria-expanded="true"]::after { transform: rotate(135deg) translate(-2px, 0); }
.rs-extra { display: flex; flex-direction: column; gap: 6px; }
.rs-hl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 14px; }
.rs-hl li { background: #fff; border: 1px solid #e3e7ee; border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.4; color: var(--rs-900); }
.rs-facts { display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--rs-line); }
.rs-facts > div { display: contents; }
.rs-facts dt, .rs-facts dd { padding: 11px 0; border-bottom: 1px solid var(--rs-line); font-size: 15px; }
.rs-facts dt { color: var(--rs-400); padding-inline-end: 28px; white-space: nowrap; }
.rs-facts dd { color: var(--rs-900); }
.rs-sec__title { margin: 26px 0 8px; padding-bottom: 7px; border-bottom: 2px solid var(--rs-moon); font-size: 17px; font-weight: 700; color: var(--rs-blue); }
.rs-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.rs-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 8px; border: 1.5px solid var(--rs-blue); color: var(--rs-blue); font-size: 15px; transition: background .2s, color .2s; }
.rs-btn:hover { background: var(--rs-blue); color: #fff; }
.rs-btn--solid { background: var(--rs-blue); color: #fff; }
.rs-btn--solid:hover { background: var(--rs-blue-hover); border-color: var(--rs-blue-hover); }
.rs-link { color: var(--rs-blue); text-decoration: underline; font-size: 15px; padding: 12px 4px; }
.rs-empty { padding: 32px 0; color: var(--rs-500); font-size: 16px; }
.rs-empty[hidden] { display: none; }
.rs-legal { margin-top: 56px; border-top-color: #d9d9d9; }

@media (max-width: 900px) {
  .rs-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rs-about { padding-top: 0; gap: 14px; }
}
@media (max-width: 700px) {
  .rs-hero { padding-top: 250px; min-height: 0; background-size: auto 240px; background-position: center top; }
  .rs-hero::after { inset: auto 0 0 0; height: calc(100% - 240px); background: var(--rs-bg); }
  .rs-filters { margin-bottom: 28px; }
  .rs-filters select, .rs-filters input { flex: 1 1 140px; min-width: 0; }
  .rs-count { flex-basis: 100%; margin: 0; }
  .rs-rows { gap: 56px; }
  .rs-media { aspect-ratio: auto; overflow: visible; background: none; border-radius: 0; display: flex; flex-direction: column; }
  .rs-media::after { display: none; }
  .rs-photo { position: relative; height: auto; aspect-ratio: 4 / 3; border-radius: 12px; }
  .rs-stats { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); color: var(--rs-900); background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; padding: 4px; margin-top: 8px; }
  .rs-stats > div { align-items: flex-start; text-align: right; padding: 8px 10px; border: 0 !important; }
  .rs-stats > div:nth-child(-n+2) { border-bottom: 1px solid #eef0f4 !important; }
  .rs-stats dt { color: var(--rs-400); opacity: 1; }
  .rs-th { flex-basis: calc((100% - 16px) / 3.4); }
  .rs-title { font-size: 22px; }
  .rs-facts dt { padding-inline-end: 16px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .rs-page * { transition: none !important; } }

/* ---------- List on the right, picked listing or map on the left ---------- */
.rs-list[hidden], .rs-view[hidden], .rs-map[hidden], .rs-item[hidden] { display: none; }
.rs-split.is-on { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 40px; align-items: start; }
.rs-split.is-on .rs-row:not(.is-sel), .rs-split.is-map .rs-rows { display: none; }
.rs-list { display: flex; flex-direction: column; gap: 10px; position: sticky; top: calc(var(--pr-nav, 82px) + 16px); max-height: calc(100vh - var(--pr-nav, 82px) - 32px); overflow: auto; padding: 2px; }
.rs-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; text-align: right; background: #fff; border: 1.5px solid #e3e7ee; border-radius: 12px; padding: 8px; cursor: pointer; color: var(--rs-900); font: inherit; }
.rs-item:hover { border-color: #b9c6da; }
.rs-item.is-on { border-color: var(--rs-blue); box-shadow: 0 0 0 3px #e8eff9; }
.rs-item__img { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #dfe5e9; }
.rs-item__img img { width: 100%; height: 100%; object-fit: cover; }
.rs-item__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rs-item__meta { font-size: 12px; color: var(--rs-400); }
.rs-item__title { font-size: 15px; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rs-item.is-on .rs-item__title { color: var(--rs-blue); }
.rs-item__nums { display: flex; gap: 10px; font-size: 13px; color: var(--rs-500); white-space: nowrap; }
.rs-item__nums b { color: var(--rs-900); }
.rs-pane { min-width: 0; container-type: inline-size; }
.rs-view { display: inline-flex; gap: 6px; margin-bottom: 18px; background: #fff; border: 1px solid #e3e7ee; border-radius: 10px; padding: 4px; }
.rs-view button { border: 0; background: transparent; border-radius: 7px; padding: 7px 18px; font-size: 15px; color: var(--rs-700); cursor: pointer; }
.rs-view button[aria-pressed="true"] { background: var(--rs-blue); color: #fff; }
.rs-map { position: relative; height: min(72vh, 680px); border-radius: 12px; overflow: hidden; background: #e9edf2; border: 1px solid #e3e7ee; }
.rs-map.is-failed::after { content: "המפה לא נטענה. נסו לרענן את העמוד."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--rs-500); }
@container (max-width: 860px) { .rs-split.is-on .rs-row { grid-template-columns: minmax(0, 1fr); gap: 20px; } .rs-split.is-on .rs-about { padding-top: 0; } }
@media (max-width: 900px) {
  .rs-split.is-on { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rs-list { position: static; max-height: none; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; }
  .rs-item { flex: 0 0 min(78vw, 300px); scroll-snap-align: start; }
  .rs-map { height: 60vh; }
}
.rs-base { display: flex; gap: 4px; background: #fff; border-radius: 8px; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.rs-map .rs-base button { width: auto; height: auto; border: 0; background: transparent; border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; color: #353535; cursor: pointer; }
.rs-map .rs-base button[aria-pressed="true"], .rs-map .rs-base button[aria-pressed="true"]:hover { background: #0050c9; color: #fff; opacity: 1; }
.rs-split.is-3d .rs-rows { display: none; }
.rs-3d[hidden], .rs-3d [hidden] { display: none; }
.rs-3d__frame { position: relative; height: min(72vh, 680px); border-radius: 12px; overflow: hidden; background: #e9edf2; border: 1px solid #e3e7ee; }
.rs-3d__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rs-3d__foot { margin-top: 10px; font-size: 14px; }
.rs-3d__foot a { color: var(--rs-blue); text-decoration: underline; }
.rs-3d__none { padding: 48px 24px; text-align: center; background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; color: var(--rs-500); }
@media (max-width: 900px) { .rs-3d__frame { height: 70vh; } }

/* Phones: the five category buttons and the three actions each stay on one line. */
@media (max-width: 700px) {
  .rs-seg { flex-wrap: nowrap; gap: 6px; width: 100%; overflow-x: auto; }
  .rs-seg button { flex: 1 0 auto; padding: 8px 10px; font-size: 14px; white-space: nowrap; }
  .rs-cta { flex-wrap: nowrap; gap: 8px; }
  .rs-btn { flex: 1 1 0; justify-content: center; padding: 0 8px; font-size: 14px; white-space: nowrap; }
}
