/* אזור ההדרכה של עיצבתי לבד: אותם צבעים וגופנים כמו דף המכירה */
:root {
  --cream: #f8efe7; --warm-white: #fffaf5; --soft: #efe0d1; --brown: #5d4d39;
  --sand: #dec1a6; --ink: #29231e; --muted: #8a7664; --muted-text: #74604f;
  --ok: #4f7a4a; --danger: #a63d2f; --focus: #1f5fb4;
  --font-display: "Karantina", "Rubik", system-ui, sans-serif;
  --font-text: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --r1: 8px; --r2: 14px; --r3: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.7; -webkit-font-smoothing: antialiased; min-height: 100vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; color: var(--brown); line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: 20px; }
.display { font-family: var(--font-display); font-weight: 700; }
.muted { color: var(--muted-text); }
[hidden] { display: none !important; }

/* כפתורים */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 12px 26px; border: 0; border-radius: var(--r2); background: var(--brown); color: var(--warm-white); font-weight: 500; font-size: 1.05rem; text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.btn:hover { background: #4b3e2d; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--brown); box-shadow: inset 0 0 0 1.5px var(--brown); }
.btn-ghost:hover { background: var(--soft); }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--brown); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* כותרת עליונה */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(248, 239, 231, .94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(222, 193, 166, .6); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.topbar .logo img { width: 112px; }
.topbar .back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500; min-height: 44px; }

/* דף כניסה */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--warm-white); border-radius: var(--r3); padding: 36px 26px 28px; box-shadow: 0 24px 60px -36px rgba(41, 35, 30, .45); }
.auth-card .logo { width: 190px; margin: 0 auto 8px; }
.auth-card h1 { font-family: var(--font-text); font-weight: 500; font-size: 1.2rem; text-align: center; color: var(--ink); margin-bottom: 24px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: .95rem; }
.field input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--sand); border-radius: var(--r1); background: #fff; font: inherit; color: var(--ink); direction: ltr; text-align: right; }
.field input:focus { outline: none; border-color: var(--brown); box-shadow: 0 0 0 3px rgba(93, 77, 57, .15); }
.msg { border-radius: var(--r1); padding: 12px 14px; font-size: .95rem; margin-bottom: 16px; }
.msg.error { background: #f8e1dc; color: #7a2a1f; }
.msg.ok { background: #e3efdf; color: #2f5a2b; }
.auth-foot { display: flex; justify-content: center; margin-top: 14px; }

/* דף הקורס */
.hello { padding: 28px 0 8px; }
.hello h1 { font-family: var(--font-display); font-size: clamp(2.6rem, 11vw, 3.6rem); line-height: 1; }
.overall { margin-top: 18px; background: var(--warm-white); border-radius: var(--r2); padding: 16px 18px; }
.overall .row { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; }
.bar { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; background: var(--brown); border-radius: 99px; transition: width .6s var(--ease); }
.continue { margin-top: 16px; display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--brown); color: var(--warm-white); border-radius: var(--r2); text-decoration: none; }
.continue .play-big { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--warm-white); display: grid; place-items: center; }
.continue .play-big svg { width: 18px; height: 18px; fill: var(--brown); margin-inline-end: -3px; }
.continue small { display: block; opacity: .8; font-size: .85rem; }
.continue strong { display: block; font-weight: 500; font-size: 1.08rem; line-height: 1.35; }

.chapters { margin: 28px 0 60px; display: grid; gap: 10px; }
.chapter { background: var(--warm-white); border-radius: var(--r2); overflow: hidden; }
.chapter summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 18px; min-height: 64px; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter .num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--sand); line-height: 1; }
.chapter .ch-title { font-weight: 500; font-size: 1.08rem; }
.chapter .ch-count { font-size: .85rem; color: var(--muted-text); white-space: nowrap; }
.lessons { list-style: none; margin: 0; padding: 0 10px 10px; }
.lesson-link { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 10px; border-radius: var(--r1); text-decoration: none; color: var(--ink); min-height: 56px; }
.lesson-link:hover { background: var(--cream); }
.status { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); }
.status svg { width: 14px; height: 14px; }
.status.done { background: var(--ok); }
.status.done svg { stroke: #fff; fill: none; stroke-width: 3; }
.status.todo svg { fill: var(--brown); margin-inline-end: -2px; }
.status.soon svg { fill: none; stroke: var(--muted); stroke-width: 2; }
.lesson-link .meta { font-size: .82rem; color: var(--muted-text); }
.lesson-link.is-soon { color: var(--muted-text); }

/* דף שיעור */
.lesson-head { padding: 20px 0 14px; }
.lesson-head .chap { font-size: .9rem; color: var(--muted-text); }
.lesson-head h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 9vw, 3rem); line-height: 1.02; margin-top: 4px; }
.player-box { position: relative; border-radius: var(--r2); overflow: hidden; background: #1d1915; aspect-ratio: 16 / 9; }
.player-box mux-player { position: absolute; inset: 0; width: 100%; height: 100%; --media-object-fit: contain; }
.watermark { position: absolute; z-index: 5; pointer-events: none; user-select: none; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .55); text-shadow: 0 1px 2px rgba(0, 0, 0, .55); direction: ltr; transition: top 1.2s ease, left 1.2s ease; white-space: nowrap; }
.soon-box { display: grid; place-items: center; text-align: center; padding: 40px 20px; aspect-ratio: 16 / 9; background: var(--soft); border-radius: var(--r2); color: var(--brown); }
.soon-box .display { font-size: 2.2rem; }
.lesson-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 32px; font-weight: 500; }
.lesson-status.done { color: var(--ok); }
.lesson-body { margin-top: 18px; }
.lesson-body p + p { margin-top: 12px; }
.downloads { margin-top: 22px; display: grid; gap: 8px; }
.downloads a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--warm-white); border-radius: var(--r1); text-decoration: none; font-weight: 500; }
.nav-lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 28px 0 60px; }
.nav-lessons .btn { min-height: 56px; padding-inline: 14px; font-size: .98rem; }
.next-cta { grid-column: 1 / -1; }

/* שקופיות */
.slides { position: relative; background: var(--warm-white); border-radius: var(--r2); overflow: hidden; }
.slides img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.slides-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.slides-bar button { min-width: 48px; min-height: 48px; border-radius: 50%; border: 0; background: var(--soft); cursor: pointer; font-size: 1.3rem; }

/* חלון אישור דיוור */
.consent { position: fixed; inset: auto 12px 12px; z-index: 40; max-width: 520px; margin-inline: auto; background: var(--warm-white); border-radius: var(--r3); padding: 22px 20px; box-shadow: 0 24px 60px -20px rgba(41, 35, 30, .5), inset 0 0 0 1px var(--sand); }
.consent p { margin-bottom: 14px; }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }

.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted-text); }
.foot { text-align: center; padding: 24px 0 40px; font-size: .9rem; }

@media (min-width: 720px) {
  .hello { padding-top: 44px; }
  .chapter summary { padding: 18px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
