/* במושב הימני – מדריך להורים מלווים. Mobile-first, RTL. */

:root {
  --ink: #142033;
  --ink-soft: #4a5568;
  --bg: #f4f6f9;
  --card: #ffffff;
  --brand: #12355b;
  --brand-2: #1f5f99;
  --accent: #f2a33a;
  --line: #dfe4ec;
  --red: #c62828;
  --red-bg: #fdecec;
  --yellow: #a86b00;
  --yellow-bg: #fff4d6;
  --green: #2e7d32;
  --green-bg: #e7f5e8;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(20 32 51 / 6%), 0 4px 14px rgb(20 32 51 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding-inline-start: 1.25rem; }
li + li { margin-top: .35rem; }
strong { font-weight: 700; }
a { color: var(--brand-2); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  background: var(--card);
  padding: .5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* כותרת ראשית */
.hero {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  padding: calc(2.5rem + env(safe-area-inset-top)) 1.25rem 2.25rem;
}
.hero h1 { font-size: 2.5rem; margin-bottom: .75rem; }
.hero__eyebrow { color: var(--accent); font-weight: 700; margin-bottom: .25rem; }
.hero__lead { font-size: 1.125rem; opacity: .95; max-width: 32rem; }

.share {
  margin-top: 1.25rem;
  font: inherit;
  font-weight: 700;
  color: var(--brand);
  background: #fff;
  border: 0;
  border-radius: 999px;
  padding: .6rem 1.25rem;
  min-height: 44px;
  cursor: pointer;
}

/* תוכן עניינים */
.toc {
  background: var(--card);
  margin: -1rem 1rem 0;
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  scroll-margin-top: 1rem;
}
.toc ol { list-style: none; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; border-top: 1px solid var(--line); }
.toc li:first-child { border-top: 0; }
.toc a {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.toc a::before {
  content: counter(toc);
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--bg);
  color: var(--brand-2);
  font-weight: 700;
  font-size: .9375rem;
}

/* פרקים */
main { padding: 0 1rem; }

.chapter {
  padding-top: 2.5rem;
  scroll-margin-top: .5rem;
}
.chapter__num {
  display: inline-block;
  font-size: .875rem;
  font-weight: 700;
  color: var(--brand-2);
  background: #e3edf8;
  border-radius: 999px;
  padding: .1rem .75rem;
  margin-bottom: .5rem;
}
.chapter__num::before { content: "פרק "; }
.chapter__intro { color: var(--ink-soft); margin-bottom: 1rem; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-top: 1rem;
}
.card h3 + h3,
.card p + h3 { margin-top: 1rem; }
.card ul ul { margin-top: .35rem; }
.card--accent { border-inline-start: 5px solid var(--accent); }

.cite { font-size: .875rem; color: var(--ink-soft); margin-top: .75rem; }
.note { color: var(--ink-soft); margin-top: 1rem; font-weight: 600; }

/* נתון בולט */
.card--stat { background: var(--brand); color: #fff; text-align: center; }
.card--stat .cite { color: rgb(255 255 255 / 80%); }
.stat { font-size: 1.375rem; font-weight: 700; }
.stat strong { display: block; font-size: 2.75rem; color: var(--accent); line-height: 1.1; }

/* ציר זמן */
.timeline { list-style: none; padding: 0; margin-top: 1rem; }
.timeline__step {
  position: relative;
  margin: 0;
  padding-block: 0 1.25rem;
  padding-inline: 1.25rem 0;
  border-inline-start: 3px solid var(--line);
  margin-inline-start: .75rem;
}
.timeline__step::before {
  content: "";
  position: absolute;
  inset-inline-start: -.6rem;
  top: .25rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--brand-2);
}
.timeline__step:last-child { border-inline-start-color: transparent; padding-bottom: 0; }
.timeline__step--period { display: flex; flex-direction: column; }
.timeline__step--end::before { background: var(--green); border-color: var(--green); }
.timeline__duration { font-weight: 700; font-size: 1.25rem; color: var(--brand-2); }
.timeline__label { font-weight: 700; }

/* שעות */
.hours__total { text-align: center; font-size: 1.125rem; }
.hours { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.hours li { margin: 0; background: var(--bg); border-radius: 12px; padding: .75rem .25rem; }
.hours strong { display: block; font-size: 1.75rem; color: var(--brand-2); line-height: 1.2; }
.hours span { font-size: .875rem; }

/* כרטיס קישור */
.link-card {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  padding-inline-end: 2.75rem;
  background: var(--card);
  border: 2px solid var(--brand-2);
  border-radius: var(--radius);
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  position: relative;
  min-height: 48px;
}
.link-card::after {
  content: "←";
  position: absolute;
  inset-inline-end: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
}
.link-card__host { font-weight: 400; font-size: .875rem; color: var(--ink-soft); }
.link-card:active { background: #e3edf8; }

/* שלבים ממוספרים */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  padding-inline-start: 3.75rem;
  margin-top: .75rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-2);
  color: #fff;
  font-weight: 700;
}
.steps h3 { font-weight: 600; margin: .2rem 0 0; }
.steps ul { margin-top: .35rem; }


/* רמזור הערות */
.signal {
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
  border-inline-start: 6px solid;
}
.signal--red { background: var(--red-bg); border-color: var(--red); }
.signal--yellow { background: var(--yellow-bg); border-color: #e0a100; }
.signal--green { background: var(--green-bg); border-color: var(--green); }
.signal__tag {
  display: inline-block;
  font-weight: 700;
  font-size: .875rem;
  color: #fff;
  border-radius: 999px;
  padding: .05rem .75rem;
  margin-bottom: .5rem;
}
.signal--red .signal__tag { background: var(--red); }
.signal--yellow .signal__tag { background: var(--yellow); }
.signal--green .signal__tag { background: var(--green); }

blockquote {
  margin: .75rem 0 0;
  padding: .75rem 1rem;
  background: rgb(255 255 255 / 75%);
  border-radius: 12px;
  font-weight: 600;
}

/* רשימת וי */
.checks { list-style: none; padding: 0; margin-top: 1rem; }
.checks li {
  position: relative;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: .75rem 1rem;
  padding-inline-start: 2.75rem;
  margin-top: .5rem;
  font-weight: 600;
}
.checks li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 1rem;
  color: var(--green);
  font-weight: 700;
}

/* מצבים לתרגול */
.sim__case { border-radius: 12px; padding: 1rem; margin-top: .75rem; background: var(--yellow-bg); }
.sim__kind { font-weight: 700; margin-bottom: .25rem; color: var(--yellow); }

/* מקורות */
.source { font-size: .875rem; color: var(--ink-soft); margin-top: 1rem; }

/* שאלות לשיחה */
.talk-list { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.talk-list li { background: #e3edf8; border-radius: 14px; border-start-start-radius: 4px; padding: .6rem 1rem; font-weight: 600; }
.talk-list li + li { margin-top: .5rem; }

/* סולם קושי */
.ladder { list-style: none; padding: 0; counter-reset: ladder; margin: .5rem 0 1rem; }
.ladder li { counter-increment: ladder; display: flex; align-items: center; gap: .75rem; margin: 0; padding: .45rem 0; border-top: 1px dashed var(--line); }
.ladder li:first-child { border-top: 0; }
.ladder li::before {
  content: counter(ladder);
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--brand-2);
  color: #fff;
  font-weight: 700;
  font-size: .875rem;
}

/* רשימת וי בתוך כרטיס */
.checks--plain li { box-shadow: none; background: var(--bg); }

/* תחתית */
.footer {
  margin-top: 3rem;
  padding: 2rem 1.25rem calc(5.5rem + env(safe-area-inset-bottom));
  background: var(--brand);
  color: rgb(255 255 255 / 88%);
  font-size: .9375rem;
}
.footer a { color: #fff; font-weight: 700; display: inline-block; margin-top: .5rem; min-height: 44px; line-height: 44px; }

/* כפתור צף לפרקים */
.fab {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: .7rem 1.25rem;
  min-height: 48px;
  box-shadow: 0 4px 14px rgb(20 32 51 / 25%);
  z-index: 5;
}

/* מסכים רחבים יותר */
@media (min-width: 640px) {
  main, .toc { max-width: 40rem; margin-inline: auto; }
  .toc { margin-top: -1.5rem; }
  .hero { text-align: center; }
  .hero__lead { margin-inline: auto; }
  .footer { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
