/* ==========================================================================
   PERY – ערכה מקצועית
   שפה עיצובית זהה למצגת: כחול-נייבי, תכלת, כרטיסים מעוגלים בהירים
   ========================================================================== */

:root {
  --navy: #10163f;
  --ink: #1b2250;
  --blue: #46b3e3;
  --blue-deep: #1d93cf;      /* כותרות וכפתורים – ניגודיות טובה יותר מהתכלת המקורי */
  --blue-tint: #eaf6fc;
  --card: #f8f9fb;
  --line: #e6e9f0;
  --ok: #1f9d6b;
  --danger: #b3261e;
  --radius-lg: 24px;
  --radius-md: 16px;
  --topbar-h: 64px;
  --navbar-h: 68px;
  --font: "Heebo", "Rubik", "Assistant", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---------- כפתורים ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 2rem;
  background: var(--blue-deep); color: #fff;
  border: 0; border-radius: 14px;
  font-weight: 700; font-size: 1.2rem; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn-primary:hover { background: #1580b6; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-block { width: 100%; }

/* ---------- מסך טעינה ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: #fff; z-index: 50; }
.boot img { width: 140px; opacity: .85; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- זכוכית (כרטיס על רקע תמונה) ---------- */
.glass {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(8, 12, 40, .28);
}

/* ---------- מסך כניסה ---------- */
.screen { position: fixed; inset: 0; }
.login {
  display: grid; place-items: center; padding: 20px; overflow: auto;
  background:
    linear-gradient(rgba(16, 22, 63, .46), rgba(16, 22, 63, .6)),
    url("../img/bg-menu.jpg") center / cover no-repeat;
}
.login-card { width: min(480px, 100%); padding: clamp(24px, 4vw, 40px); text-align: center; }
.login-logo { width: 130px; margin: 0 auto 14px; }
.login-card h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; color: var(--navy); }
.login-lead { margin: 0 0 22px; color: var(--ink); }
.field { text-align: start; margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; color: var(--navy); }
.field input {
  width: 100%; min-height: 52px; padding: 0 16px;
  border: 2px solid #cfd6e6; border-radius: 14px; background: #fff;
  font: inherit; font-size: 1.05rem; color: var(--navy);
}
.field input:focus { border-color: var(--blue-deep); outline: none; box-shadow: 0 0 0 4px rgba(70, 179, 227, .3); }
.field input[dir="ltr"] { text-align: left; }
.form-error {
  margin: 0 0 14px; padding: 10px 14px; text-align: start;
  background: #fdecea; color: var(--danger); border-radius: 12px; font-weight: 500;
}
.login-note { margin: 18px 0 0; font-size: .85rem; color: #4a5278; }

/* ---------- מעטפת האפליקציה ---------- */
.app {
  position: fixed; inset: 0;
  display: grid; grid-template-rows: var(--topbar-h) minmax(0, 1fr) var(--navbar-h);
  background: #fff;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(14px, 2.4vw, 32px);
  border-bottom: 2px solid var(--navy);
  background: #fff; z-index: 5;
}
.top-logo { height: 36px; width: auto; }
.btn-menu {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 14px;
  border: 1.5px solid var(--navy); border-radius: 10px;
  background: #fff; color: var(--navy);
  font-weight: 500; text-decoration: none;
}
.btn-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-menu:hover { background: var(--blue-tint); }
.userbox { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 500; }
.userbox button {
  min-height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, .75); background: transparent; color: #fff; cursor: pointer;
}
.userbox button:hover { background: rgba(255, 255, 255, .16); }

.stage { overflow: auto; outline: none; position: relative; scroll-behavior: auto; }
.stage.is-entering { animation: stage-in .22s ease-out; }
@keyframes stage-in { from { opacity: 0; transform: translateY(6px); } }

.navbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(14px, 2.4vw, 32px);
  background: linear-gradient(#fff0, #fff 30%);
  border-top: 1px solid var(--line);
}
.nav-btn {
  display: inline-grid; place-items: center;
  min-width: 64px; height: 44px; padding: 0 16px;
  background: var(--blue-deep); color: #fff; border-radius: 12px;
  font-weight: 700; text-decoration: none; transition: background .15s;
}
.nav-btn:hover { background: #1580b6; }
.nav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn[aria-disabled="true"] { visibility: hidden; }
.nav-btn.is-finish { background: var(--ok); }
.pager { flex: 1; max-width: 360px; display: grid; gap: 6px; justify-items: center; font-size: .9rem; color: #4a5278; }
.pager-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pager-bar i { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .25s; }

/* מצבי תצוגה: תפריט וכריכות – מסך מלא עם תמונה, בלי פס עליון/תחתון */
body[data-mode="menu"] .app,
body[data-mode="cover"] .app { grid-template-rows: minmax(0, 1fr); }
body[data-mode="menu"] .topbar,
body[data-mode="cover"] .topbar {
  position: absolute; inset: 0 0 auto 0; border: 0; background: transparent; pointer-events: none;
}
body[data-mode="menu"] .topbar > *,
body[data-mode="cover"] .topbar > * { pointer-events: auto; }
body[data-mode="menu"] .navbar,
body[data-mode="cover"] .navbar { display: none; }
body[data-mode="cover"] .btn-menu { background: #fff; border-color: #fff; }
body[data-mode="menu"] .btn-menu { display: none; }
body[data-mode="menu"] .top-logo { display: none; }

/* ---------- כריכות תפקידים ---------- */
.cover {
  min-height: 100%; display: flex; align-items: center; justify-content: flex-end;
  padding: 84px clamp(16px, 5vw, 72px) 40px;
  background:
    linear-gradient(90deg, rgba(16, 22, 63, .62), rgba(16, 22, 63, .22) 60%),
    var(--bg) center / cover no-repeat;
}
.cover-card { width: min(540px, 100%); padding: clamp(28px, 4.5vw, 56px); text-align: center; }
.cover-card h1 { margin: 0 0 clamp(20px, 3vw, 36px); font-size: clamp(2.1rem, 4.8vw, 3.8rem); line-height: 1.12; font-weight: 900; color: var(--navy); }

/* ---------- תפריט ראשי ---------- */
.menu {
  min-height: 100%; display: grid; place-items: center;
  padding: 76px clamp(14px, 4vw, 60px) 32px;
  background:
    linear-gradient(rgba(16, 22, 63, .4), rgba(16, 22, 63, .55)),
    url("../img/bg-menu.jpg") center / cover no-repeat;
}
.menu-card { width: min(960px, 100%); padding: clamp(24px, 4vw, 52px); text-align: center; }
.menu-logo { width: clamp(100px, 12vw, 130px); margin: 0 auto 6px; }
.menu-card h1 { margin: 0 0 14px; font-size: clamp(1.9rem, 5vw, 3.7rem); line-height: 1.1; font-weight: 900; color: var(--navy); }
.menu-lead { margin: 0 0 24px; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.menu-lead b { color: var(--blue-deep); }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 24px; padding: 0; list-style: none; }
.role-btn {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: 74px; padding: 10px 14px;
  background: var(--blue-deep); color: #fff; border-radius: 14px;
  font-size: 1.15rem; font-weight: 500; text-decoration: none; line-height: 1.25;
  transition: background .15s, transform .15s;
}
.role-btn:hover { background: #1580b6; transform: translateY(-2px); }
.role-btn.is-done { background: #17785a; }
.role-btn .tick {
  position: absolute; inset-block-start: 8px; inset-inline-end: 10px;
  display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700;
  background: rgba(255, 255, 255, .22); padding: 2px 8px; border-radius: 99px;
}
.role-btn .tick svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.menu-foot { margin: 0; color: var(--navy); }
.menu-foot small { display: block; margin-top: 8px; font-size: .88rem; }
.menu-done {
  margin: 0 0 20px; padding: 12px 16px; border-radius: 14px;
  background: #e5f5ee; color: #0f5c42; font-weight: 700;
}

/* ==========================================================================
   שקפי תוכן
   ========================================================================== */
.slide {
  --fs: clamp(.98rem, .55rem + .72vw, 1.22rem);
  max-width: 1280px; margin: 0 auto;
  padding: clamp(16px, 2.6vw, 34px) clamp(16px, 4vw, 56px) 40px;
  font-size: var(--fs);
}
.slide.is-dense { --fs: clamp(.92rem, .5rem + .6vw, 1.08rem); }
.slide b, .slide strong { color: var(--navy); font-weight: 800; }

.slide-head { margin-bottom: clamp(12px, 1.8vw, 24px); }
.kicker { margin: 0; font-weight: 800; font-size: 1.05em; color: var(--navy); }
.h1 { margin: 0; font-weight: 800; font-size: clamp(1.7rem, 1rem + 2.4vw, 3.1rem); line-height: 1.12; color: var(--blue-deep); }
.h2 { margin: 1em 0 .6em; font-weight: 700; font-size: 1.3em; color: var(--blue-deep); }
.lead { margin: .4em 0 0; font-size: 1.12em; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 12px;
  border: 1.5px solid var(--navy); border-radius: 99px; background: #fff;
  font-weight: 700; font-size: .92em; color: var(--navy);
}
.chip .ico { width: 24px; height: 24px; color: var(--blue-deep); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(14px, 1.6vw, 22px) clamp(16px, 2vw, 28px);
}
.card h3 { margin: 0 0 .45em; font-size: 1.12em; font-weight: 800; color: var(--navy); }
.card p { margin: 0 0 .6em; }
.card p:last-child { margin-bottom: 0; }
.card--plain { background: #fff; }
.card--accent { background: var(--blue-tint); border-color: #cfe9f6; }
.card .row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .row-head h3 { margin: 0; }
.stack { display: grid; gap: clamp(10px, 1.2vw, 16px); align-content: start; }
.note { color: var(--blue-deep); font-weight: 500; margin: .4em 0 0; }
.foot-note { margin: 1.2em 0 0; font-weight: 800; color: var(--navy); }

.list { margin: .3em 0; padding: 0; list-style: none; }
.list > li { position: relative; padding-inline-start: 1.15em; margin: .5em 0; }
.list > li::before { content: ""; position: absolute; inset-inline-start: .1em; top: .62em; width: .42em; height: .42em; border-radius: 50%; background: var(--blue); }
.list .list { margin: .3em 0 .2em; }
.list .list > li::before { background: transparent; border: 2px solid var(--blue); }

.callout {
  margin-top: 1em; padding: .8em 1.1em; border-radius: var(--radius-md);
  background: var(--blue-tint); border-inline-start: 6px solid var(--blue); font-weight: 700; color: var(--navy);
}

/* פריסות */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(20px, 3.4vw, 52px); align-items: center; }
.split > .photo { margin: 0; align-self: stretch; min-height: 260px; }
.photo img { width: 100%; height: 100%; max-height: 72vh; object-fit: cover; border-radius: 28px; }
.phone { margin: 0; justify-self: center; }
.phone img { width: min(250px, 58vw); border-radius: 32px; box-shadow: 0 0 0 5px #11142e, 0 18px 40px rgba(16, 22, 63, .28); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.8vw, 24px); align-items: start; }
.two--lead { grid-template-columns: .8fr 1.2fr; }
.two--side { grid-template-columns: 1fr 1.6fr; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); align-items: stretch; }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 20px); align-items: stretch; }
.span-2 { grid-column: span 2; }

.icon-line { display: flex; align-items: flex-start; gap: 14px; }
.icon-line .ico { flex: none; width: 2em; height: 2em; color: var(--blue-deep); }
.icon-line p { margin: 0; align-self: center; }

.ico { width: 1.6em; height: 1.6em; flex: none; }
.ico-lg { width: 2.4em; height: 2.4em; color: var(--blue); }

/* אנשי קשר */
.contact { display: flex; flex-direction: column; gap: .4em; }
.contact .row-head { align-items: flex-start; }
.contact .duty { margin-top: auto; padding-top: .3em; }

/* מערכות */
.tool { display: grid; gap: .35em; align-content: start; }
.tool-logo { min-height: 62px; display: flex; align-items: center; }
.tool-logo img { height: 58px; width: auto; border-radius: 10px; }
.crm-mark { font-weight: 900; font-size: 2.4em; letter-spacing: .01em; color: var(--navy); line-height: 1; }
.tool h3 { font-size: 1.3em; }

/* טיפים של אלופים */
.tips { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: clamp(14px, 2.2vw, 30px); margin-top: clamp(10px, 2vw, 28px); align-items: start; }
.tip { display: grid; gap: .7em; justify-items: center; text-align: center; }
.tip .ico-trophy { width: 3.1em; height: 3.1em; color: var(--blue); }
.tip h3 { margin: 0; font-size: 1.1em; font-weight: 800; color: var(--navy); line-height: 1.3; }
.bubble {
  position: relative; margin: .9em 0 0; padding: 1.1em 1.2em; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
}
.bubble::before {
  content: ""; position: absolute; top: -9px; inset-inline-start: 14%; width: 18px; height: 18px;
  background: var(--card); border: solid var(--line); border-width: 1px 0 0 1px; transform: rotate(45deg);
}
.tip--quiet h3 { font-weight: 700; }
.tips-foot { margin: clamp(14px, 2.4vw, 32px) 0 0; text-align: center; font-weight: 800; color: var(--navy); font-size: 1.1em; }

/* שלבים (שלבי השכרה – רצף אמיתי) */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(16px, 3vw, 44px); counter-reset: step; }
.steps-col { display: grid; gap: 12px; align-content: start; }
.step { display: grid; grid-template-columns: 2.6em 1fr; gap: 10px; align-items: start; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); }
.step-n { font-weight: 900; font-size: 1.5em; line-height: 1.1; color: var(--blue); }
.step p { margin: 0; }
.step .list { margin-bottom: 0; }

/* שעות פעילות ותחומים עם שני אזורים */
.role-banner { display: grid; gap: 10px; justify-items: start; align-content: start; }
.role-banner .ico { width: 5em; height: 5em; color: var(--blue); }
.role-banner h2 { margin: 0; font-size: 2.2em; font-weight: 900; line-height: 1.1; color: var(--navy); }
.section-label { margin: 1.1em 0 .2em; font-weight: 800; color: var(--navy); }
.section-label:first-child { margin-top: 0; }

/* התראות */
.toast {
  position: fixed; z-index: 60; inset-inline: 16px; bottom: calc(var(--navbar-h) + 14px);
  max-width: 460px; margin-inline: auto; padding: 14px 18px; text-align: center;
  background: var(--navy); color: #fff; border-radius: 14px; font-weight: 700;
  box-shadow: 0 16px 40px rgba(8, 12, 40, .35); animation: toast-in .25s ease-out;
}
.toast.is-success { background: #17785a; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

.noscript { position: fixed; inset: 0; margin: 0; display: grid; place-items: center; background: #fff; z-index: 99; font-size: 1.2rem; }

/* ==========================================================================
   רספונסיביות
   ========================================================================== */
@media (max-width: 1000px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; }
  .tips[style*="--n:4"] { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --topbar-h: 58px; --navbar-h: 62px; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .two, .two--lead, .two--side, .steps { grid-template-columns: 1fr; }
  .split > .photo { min-height: 0; order: -1; }
  .photo img { max-height: 240px; }
  .cols-3 { grid-template-columns: 1fr; }
  .cover { justify-content: center; background-position: 70% center; }
  .tips { grid-template-columns: 1fr; }
  .tips[style*="--n:4"] { grid-template-columns: 1fr; }
  .bubble::before { inset-inline-start: 50%; margin-inline-start: -9px; }
  .userbox span { display: none; }
}

@media (max-width: 520px) {
  .role-grid { grid-template-columns: 1fr; }
  .cols-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .btn-menu span { font-size: .92rem; }
  .top-logo { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* מספור שגרות (עמוד 8) */
.routine-n { margin: 0 0 .2em !important; font-weight: 900; font-size: 2em; line-height: 1; color: var(--blue); }

/* קריאות: כרטיס טקסט בודד לא נמתח לכל הרוחב */
.slide > .card { max-width: 62rem; }

/* טיפים: בועות בגובה אחיד */
.tips { align-items: stretch; }
.tip { grid-template-rows: auto auto 1fr; align-content: start; }
.bubble { align-self: stretch; margin-top: .6em; }
