/* רודפים · התצוגה הפשוטה
   הצבעים הראשיים כאן. צבעי ארבע הרמות והצבע הראשי (--accent) נקבעים בממשק הניהול, לשונית "האתר",
   ונטענים אוטומטית ע"י simple.js. */
:root {
  /* פלטת רודפים */
  --accent: #2C4150;      /* כחול-אפור, הצבע הראשי */
  --accent-soft: #DDE3E8;
  --water: #0F7E87;       /* טורקיז, מים */
  --cta: #C74C18;         /* כתום, כפתור ההתראות */
  --danger: #CC3333;      /* אדום, לחירום בלבד */
  --ink: #1C252B;
  --ink-2: #3A474B;
  --ink-3: #5C6A6E;
  --bg: #E8E9EB;          /* אבן */
  --card: #FFFFFF;
  --line: #D5D8DC;
  --line-2: #E4E6E9;
  --display: "Secular One", "Heebo", sans-serif;
  --body: "Heebo", "Segoe UI", "Arial Hebrew", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--accent); }
button { font-family: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 76px; }

/* כותרת: לוגו, שם, תפריט (במחשב) וכפתור התראות כתום */
.hdr { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line); }
.hdr .logo img { display: block; width: 62px; height: 62px; }
.hdr .titles { flex: 1; min-width: 0; }
.hdr h1 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr p { font-size: 14px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back[hidden] { display: none; }
.back { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); display: grid; place-items: center; }
.hdr .cta { flex: none; width: 50px; height: 50px; border-radius: 14px; background: var(--cta); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 17px; }
.hdr .cta span { display: none; }
.hdr .cta:hover { filter: brightness(1.08); }
.hdr .cta[aria-current] { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--cta); }

/* דף הבית: תמונת פתיחה (עם דבר החזאי במחשב) ושלושה כרטיסים */
.cover { margin: 0; position: relative; border-radius: 16px; overflow: hidden; }
.cover img { display: block; width: 100%; height: 130px; object-fit: cover; object-position: 72% 42%; }
.cover figcaption { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(28,37,43,.78); color: #fff; font-family: var(--display); font-size: 18px; padding: 4px 12px; border-radius: 10px; }
.cover .note { display: none; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.box { display: flex; flex-direction: column; gap: 10px; }
.box h2 { font-size: 18px; font-weight: 800; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.box .dayheads { padding-inline-end: 0; gap: 6px; }
.box .dayheads span, .rrow .lights .cell { width: 44px; }
.rrow { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); min-height: 56px; }
.rrow:hover b { color: var(--accent); text-decoration: underline; }
.rrow .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rrow .txt b { font-size: 16px; }
.rrow .txt small { font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.rrow .lights { gap: 6px; }
.rep { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.rep img { width: 92px; height: 70px; border-radius: 10px; object-fit: cover; flex: none; }
.rep b { font-size: 15px; }
.rep p { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.rep small { font-size: 12px; color: var(--ink-3); }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.empty { font-size: 14px; color: var(--ink-3); padding: 6px 0; border-top: 1px solid var(--line-2); }
.more { font-size: 15px; font-weight: 700; color: var(--water); }
.live { font-size: 12px; font-weight: 700; color: #fff; background: var(--water); padding: 3px 9px; border-radius: 999px; }
.mini-radar { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
#hRadar { height: 250px; background: #EEF2F2; }
#hRadar .leaflet-container, #hRadar { cursor: pointer; }
.btn.water { border-color: var(--water); color: var(--water); min-height: 46px; }

main { flex: 1; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 12px; outline: none; }
.loading { color: var(--ink-3); padding: 30px 0; text-align: center; }

/* כרטיסים */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.note { display: flex; flex-direction: column; gap: 6px; }
.note .who { display: flex; align-items: center; gap: 8px; }
.note .av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.note .who b { font-size: 15px; }
.note .who small { margin-inline-start: auto; color: var(--ink-3); font-size: 12px; }
.note p { font-size: 15px; line-height: 1.6; white-space: pre-line; }

.sec-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0; }
.sec-head h2 { font-size: 18px; font-weight: 800; }
.dayheads { padding-inline-end: 17px; display: flex; gap: 10px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.dayheads span, .lights span.cell { width: 40px; text-align: center; display: flex; justify-content: center; }

.region { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.region:hover, .srow:hover, .tool:hover { border-color: var(--accent); }
.region .top { display: flex; align-items: center; gap: 10px; }
.region .name { font-size: 18px; font-weight: 800; flex: 1; }
.region .line { font-size: 14px; color: var(--ink-2); }
.lights { display: flex; gap: 10px; }
.dot { display: inline-block; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); flex: none; }
.dot.sm { width: 12px; height: 12px; }
.dot.md { width: 22px; height: 22px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); padding: 2px; }
.legend span { display: flex; align-items: center; gap: 5px; }

.btn { min-height: 52px; border-radius: 14px; border: 2px solid var(--accent); background: transparent; color: var(--accent); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 0 16px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }

/* בחירת יום */
.days { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.days button { min-height: 54px; border-radius: 12px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; }
.days button b { font-size: 15px; }
.days button small { font-size: 12px; color: var(--ink-3); }
.days button[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: none; }
.days button[aria-pressed="true"] small { color: rgba(255,255,255,.85); }
.days button i { position: absolute; top: 6px; inset-inline-start: 6px; width: 10px; height: 10px; border-radius: 50%; }

.lead { font-size: 15px; color: var(--ink-2); line-height: 1.55; }

/* שורת נחל */
.srow { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 12px 14px; min-height: 60px; }
.srow .txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.srow .txt b { font-size: 16px; }
.srow .txt small { font-size: 13px; color: var(--ink-3); }
.word { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }

/* כרטיס נחל */
.hero { border-radius: 18px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.hero .big { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 0 8px rgba(255,255,255,.6); }
.hero .w { font-family: var(--display); font-size: 30px; line-height: 1.15; }
.hero .when { font-size: 15px; font-weight: 700; }
.hero p { font-size: 15px; line-height: 1.6; color: var(--ink); }
.agree { display: flex; flex-direction: column; gap: 10px; }
.agree b { font-size: 15px; }
.agree .dots { display: flex; flex-wrap: wrap; gap: 8px; }
.agree .m { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--ink-3); width: 46px; text-align: center; }
.agree small { font-size: 13px; color: var(--ink-3); }
.facts { padding: 4px 16px; }
.fact { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.fact:last-child { border-bottom: 0; }
.fact svg { flex: none; }
.fact div { display: flex; flex-direction: column; }
.fact span { font-size: 13px; color: var(--ink-3); }
.fact b { font-size: 15px; }
details.why summary { cursor: pointer; font-weight: 700; font-size: 15px; min-height: 28px; }
details.why p { margin-top: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* טפסים */
.h2 { font-size: 18px; font-weight: 800; margin-top: 4px; }
.choices { display: grid; gap: 8px; }
.choices.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { min-height: 54px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; padding: 4px 14px; justify-content: center; text-align: center; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.choices.list .choice { justify-content: flex-start; text-align: start; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); width: 100%; }
.toggles { padding: 0 14px; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line-2); font-size: 16px; font-weight: 700; cursor: pointer; }
.toggle:last-child { border-bottom: 0; }
.toggle span { flex: 1; }
.toggle input { width: 24px; height: 24px; accent-color: var(--accent); }
.reghead { font-size: 13px; color: var(--ink-3); font-weight: 700; padding: 10px 0 0; }
.msg { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 15px; }
.msg.err { background: #F6D5D2; color: #7E1610; }

/* מכ״ם */
.radar-box .leaflet-container { background: #fff; }
.radar-box { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #DCD3C2; }
.radar-box #rmap { height: min(62vh, 560px); }
.radar-box img { display: block; width: 100%; }
.radar-box .ts { position: absolute; top: 10px; right: 10px; z-index: 500; background: rgba(255,255,255,.92); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.layers { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.layers label { display: flex; align-items: center; gap: 6px; min-height: 36px; cursor: pointer; }
.layers input { width: 20px; height: 20px; accent-color: var(--accent); }
.radar-ctl { display: flex; align-items: center; gap: 10px; }
.radar-ctl input { flex: 1; accent-color: var(--accent); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.tiny { font-size: 12px; color: var(--ink-3); }

/* תחתית */
.foot { padding: 6px 16px 18px; font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; gap: 6px; }
.foot p:first-child { font-weight: 500; color: var(--ink-2); }
/* מפות Leaflet לא עולות מעל הכותרת והתפריט */
.leaflet-container { isolation: isolate; z-index: 0; }

/* לשוניות עמוד הנחל */
.stabs { display: flex; gap: 4px; background: #DDDFE2; padding: 4px; border-radius: 12px; align-self: flex-start; max-width: 100%; overflow-x: auto; }
.stabs a { padding: 10px 16px; font-size: 16px; font-weight: 500; color: var(--ink-2); text-decoration: none; border-radius: 10px; white-space: nowrap; }
.stabs a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 800; box-shadow: 0 0 0 1px var(--line); }

/* תפריט: בטלפון בתחתית המסך */
.nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
.nav a { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; font-weight: 500; color: var(--ink-3); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 800; }

/* מחשב: אתר רחב יותר, התפריט עובר לכותרת, לוגו גדול וכפתור התראות עם טקסט */
@media (min-width: 900px) {
  .app { max-width: 1200px; padding-bottom: 0; }
  .hdr { padding: 16px 24px; gap: 16px 28px; }
  .hdr .logo img { width: 88px; height: 88px; }
  .hdr h1 { font-size: 44px; }
  .hdr p { font-size: 17px; }
  .hdr .titles { flex: 0 1 auto; min-width: 0; }
  .hdr .nav { flex: none; }
  .nav { position: static; display: flex; gap: 4px; flex: 1; border: 0; padding: 0; max-width: none; margin: 0; background: transparent; }
  .nav a { flex-direction: row; min-height: 48px; padding: 0 12px; font-size: 18px; border-radius: 10px; }
  .nav a svg { display: none; }   /* במחשב: תפריט טקסט בלבד, כמו בהדמיה */
  .nav a:hover { background: var(--bg); }
  .nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 10px 10px 0 0; }
  .hdr .cta { width: auto; height: 52px; padding: 0 22px; border-radius: 12px; margin-inline-start: auto; }
  .hdr .cta span { display: inline; }
  main { padding: 20px 24px 28px; }
  .cover img { height: 380px; object-position: 60% 45%; }
  .cover figcaption { font-size: 26px; bottom: 18px; inset-inline-start: 18px; padding: 6px 16px; }
  .cover .note { display: flex; position: absolute; bottom: 18px; left: 18px; max-width: 480px; background: rgba(255,255,255,.95); border-radius: 14px; padding: 14px 18px; }
  .note-m { display: none; }
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .foot { padding: 6px 24px 24px; }
}
/* מחשב צר: מסתירים אייקונים בתפריט ואת טקסט כפתור ההתראות כדי שהכול ייכנס בשורה אחת */
@media (min-width: 900px) and (max-width: 1180px) {
  .hdr .cta { width: 52px; padding: 0; }
  .hdr .cta span { display: none; }
  .hdr h1 { font-size: 36px; }
}
