/* ═══════════════════════════════════════════════════════════════════════
   נדל"ן יו"ש והגולן — מערכת עיצוב
   טוקנים לפי תפקיד, לא לפי גוון (ר' feedback "טוקן צבע לפי תפקיד"):
   --brand משמש לרקעים/כפתורים; טקסט על רקע בהיר משתמש ב---ink/--brand-ink.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --brand:        #2f5d3a;   /* ירוק זית עמוק - רקע כפתורים/כותרת */
  --brand-dark:   #234a2c;
  --brand-ink:    #24502f;   /* טקסט/קישור בצבע המותג על רקע בהיר (≥7:1) */
  --brand-soft:   #e7efe6;   /* רקע הדגשה עדין */
  --accent:       #c8873a;   /* אבן ירושלמית/טרקוטה - רקעים ודקורציה בלבד */
  --accent-ink:   #7f4c17;   /* טקסט בגוון האקסנט (≥5:1 על לבן) */
  --accent-soft:  #f6ead9;
  --bg:           #f7f5ef;   /* אבן גיר בהירה */
  --surface:      #ffffff;
  --ink:          #1d2420;
  --muted:        #59645c;   /* ≥5.5:1 על --bg */
  --line:         #e2ddd0;
  --danger:       #a32020;
  --danger-soft:  #fbe9e7;
  --ok:           #1f6b3a;
  --ok-soft:      #e3f1e7;
  --warn-ink:     #7a5200;
  --warn-soft:    #fff4d6;
  --radius:       14px;
  --radius-sm:    9px;
  --shadow:       0 1px 2px rgba(29,36,32,.05), 0 6px 18px rgba(29,36,32,.06);
  --shadow-lg:    0 10px 30px rgba(29,36,32,.12);
  --container:    1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Heebo', Arial, sans-serif; font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-ink); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 800; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.65rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -50px; right: 12px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { top: 10px; color: #fff; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
td.num, th.num { display: table-cell; text-align: right; }
[hidden] { display: none !important; }
.hp { position: absolute; right: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ─── header ─────────────────────────────────────────────────────────── */
.site-header { background: var(--brand-dark); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.nav-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.15rem; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand strong { font-weight: 800; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.main-nav a { color: rgba(255,255,255,.9); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.main-nav .nav-cta { margin-inline-start: 8px; color: #1d2420; }
.main-nav .nav-cta:hover { color: #1d2420; }
.nav-toggle { display: none; margin-inline-start: auto; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 10px; width: 44px; height: 44px; font-size: 1.15rem; cursor: pointer; }
@media (max-width: 1060px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav { display: none; position: absolute; top: 64px; inset-inline: 0; background: var(--brand-dark); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 2px; box-shadow: var(--shadow-lg); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; }
  .main-nav .nav-cta { margin: 8px 0 0; justify-content: center; }
}

/* ─── buttons ────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 11px 20px; font: 700 1rem 'Heebo', sans-serif; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; min-height: 44px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #1d2420; }
.btn-accent:hover { background: #b9772b; color: #1d2420; }
.btn-ghost { background: transparent; color: var(--brand-ink); border: 1.5px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sm { padding: 7px 14px; font-size: .92rem; min-height: 38px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ─── hero ───────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand) 55%, #4d7a4f 100%);
  color: #fff; padding: 56px 0 72px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 60px; background: var(--bg); clip-path: polygon(0 100%, 0 70%, 12% 40%, 22% 62%, 35% 25%, 48% 58%, 60% 30%, 72% 55%, 85% 20%, 100% 50%, 100% 100%); }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,.88); max-width: 680px; }
.hero-search { margin-top: 26px; max-width: 640px; position: relative; }
.search-box { display: flex; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-box input { flex: 1; border: 0; padding: 16px 18px; font: 400 1.08rem 'Heebo', sans-serif; min-width: 0; color: var(--ink); }
.search-box input:focus { outline: none; }
.search-box button { border-radius: 0; }
.ac-list { position: absolute; top: 100%; inset-inline: 0; background: #fff; border-radius: 0 0 12px 12px; box-shadow: var(--shadow-lg); list-style: none; margin: 4px 0 0; padding: 6px; z-index: 30; max-height: 340px; overflow: auto; }
.ac-list li a, .ac-list li button { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; font: inherit; text-align: right; cursor: pointer; }
.ac-list li a:hover, .ac-list li a.hl, .ac-list li button:hover, .ac-list li button.hl { background: var(--brand-soft); }
.ac-list .ac-meta { color: var(--muted); font-size: .85rem; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats div { font-size: .92rem; color: rgba(255,255,255,.8); }
.hero-stats strong { display: block; font-size: 1.6rem; color: #fff; font-weight: 800; }

/* ─── sections & cards ───────────────────────────────────────────────── */
.section { padding-block: 40px; }
.section-tight { padding-block: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; font-weight: 800; margin: 0 0 12px; }
.card-title i { color: var(--accent-ink); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .layout-side { grid-template-columns: minmax(0, 1fr); } }

.tool-card { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--ink); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--ink); }
.tool-card .ico { flex: 0 0 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.tool-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 1.55rem; font-weight: 800; margin-top: 2px; }
.kpi .sub { font-size: .85rem; color: var(--muted); }
.trend-up { color: var(--ok); }
.trend-down { color: var(--danger); }

/* breadcrumbs / page header */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 26px 0 20px; }
.page-head h1 { margin: 0 0 6px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; }
.tag-accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag-muted { background: #eeece6; color: var(--muted); }

/* tabs (כפתורים אמיתיים, לא hover) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: 999px; font: 600 .92rem 'Heebo', sans-serif; cursor: pointer; min-height: 38px; }
.tabs button[aria-pressed="true"], .tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .95rem; }
table.data th, table.data td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: #f1efe7; font-weight: 700; font-size: .88rem; color: #3b453e; position: sticky; top: 0; }
table.data tbody tr:hover { background: #faf8f2; }
table.data td.wrap { white-space: normal; }
table.data th button.sort { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: 6px; align-items: center; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .94rem; }
.field .hint { font-size: .84rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=number], input[type=email], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; border: 1.5px solid #cfc9b9; border-radius: 10px; padding: 10px 12px; font: 400 1rem 'Heebo', sans-serif; background: #fff; color: var(--ink); min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid rgba(47,93,58,.18); }
.input-suffix { position: relative; }
.input-suffix input { padding-inline-end: 42px; }
.input-suffix .sfx { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); }
input[type=range] { width: 100%; accent-color: var(--brand); }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: .93rem; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }

/* alerts */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert i { margin-top: 4px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warn { background: var(--warn-soft); color: var(--warn-ink); }
.alert-info { background: var(--brand-soft); color: var(--brand-ink); }

/* empty / data-gap state */
.gap-box { border: 2px dashed #d5cfbf; border-radius: var(--radius); padding: 22px; text-align: center; background: #fbfaf6; }
.gap-box h3 { margin-bottom: 6px; }
.gap-box p { color: var(--muted); max-width: 560px; margin: 0 auto 14px; }

/* result panel (calculators) */
.result { background: var(--brand-dark); color: #fff; border-radius: var(--radius); padding: 22px; position: sticky; top: 84px; }
.result h2, .result h3 { color: #fff; }
.result .big { font-size: 2.1rem; font-weight: 800; line-height: 1.15; }
.result .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: .96rem; }
.result .row:last-child { border-bottom: 0; }
.result .muted { color: rgba(255,255,255,.72); }
.result a { color: #f3d6ad; }
@media (max-width: 960px) { .result { position: static; } }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .st { flex: 0 0 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-warn { background: var(--warn-soft); color: var(--warn-ink); }
.st-bad { background: var(--danger-soft); color: var(--danger); }
.st-info { background: var(--brand-soft); color: var(--brand-ink); }
.checklist strong { display: block; }
.checklist p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }

/* listing cards */
.listing-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.listing-card:hover { color: var(--ink); box-shadow: var(--shadow-lg); }
.listing-card .ph { aspect-ratio: 4 / 3; background: #e9e5da center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #a49d8a; font-size: 2rem; }
.listing-card .bd { padding: 14px 16px; }
.listing-card .price { font-size: 1.25rem; font-weight: 800; }
.listing-card .meta { color: var(--muted); font-size: .9rem; }

/* chart */
.chart-box { position: relative; height: 300px; }
@media (max-width: 620px) { .chart-box { height: 240px; } }

/* map */
.map { height: 560px; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1; }
@media (max-width: 620px) { .map { height: 440px; } }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-top: 10px; }
.map-legend i { margin-inline-end: 4px; }

/* prose (guide/about) */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.3em; }
.prose li { margin-bottom: .4em; }
.toc { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.toc ol { margin: 0; padding-inline-start: 1.2em; }

/* footer */
.site-footer { background: #1b2a1f; color: rgba(255,255,255,.78); margin-top: 48px; padding: 40px 0 16px; font-size: .93rem; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.footer-h { color: #fff; font-size: 1rem; margin: 0 0 8px; }
.footer-note { font-size: .86rem; line-height: 1.6; color: rgba(255,255,255,.65); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .85rem; }
.site-footer .footer-bottom a { display: inline-flex; }

/* misc */
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-list a, .pill-list span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .88rem; text-decoration: none; color: var(--ink); }
.pill-list a:hover { border-color: var(--brand); color: var(--brand-ink); }
.source-note { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.badge-new { background: var(--accent); color: #1d2420; border-radius: 6px; padding: 1px 7px; font-size: .78rem; font-weight: 700; }
.stack > * + * { margin-top: 18px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters .field { min-width: 150px; flex: 1; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); padding: 0 10px; }
.pagination .cur { background: var(--brand); color: #fff; border-color: var(--brand); }

@media print {
  .site-header, .site-footer, .nav-toggle, .no-print, #ga-consent-banner { display: none !important; }
  body { background: #fff; }
  .card, .kpi { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .result { background: #fff; color: #000; border: 2px solid #000; position: static; }
  .result h2, .result h3, .result .muted { color: #000; }
}
