/* ARISH — מערכת עיצוב משותפת: רגועה, קלה לעין */
:root {
  --bg: #f6f7fb;
  --ink: #232640;
  --muted: #636883;
  --card: #ffffff;
  --line: #e4e6f0;
  --soft: #eef0f8;

  --indigo: #4b58bd;
  --blue: #416fcb;
  --rose: #b94d6c;
  --teal: #2f8577;

  --grad-primary: linear-gradient(135deg, #4b58bd, #5b66c9);
  --grad-ktav: linear-gradient(135deg, #416fcb, #4f80d6);
  --grad-mail: linear-gradient(135deg, #b94d6c, #c75e6d);
  --grad-bus: linear-gradient(135deg, #2f8577, #3a9684);
  --grad-hero: linear-gradient(135deg, #eaedfb 0%, #f3eefb 100%);
  --tint-bus: #e8f3f0;
  --tint-bus-line: #cfe4de;
  --shadow: 0 1px 2px rgba(35, 38, 64, .06), 0 4px 14px -8px rgba(35, 38, 64, .12);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141f;
    --ink: #e9ebf6;
    --muted: #a2a7c0;
    --card: #1b1e2e;
    --line: #2b3045;
    --soft: #232740;
    --indigo: #8f9bf0;
    --grad-hero: linear-gradient(135deg, #1e2240 0%, #261f3f 100%);
    --tint-bus: #17302c;
    --tint-bus-line: #25483f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -10px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, "Heebo", Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
}
a { color: var(--indigo); }
img, svg { max-width: 100%; }
.wrap { width: min(960px, 100% - 32px); margin-inline: auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- ניווט עליון ---------- */
.nav, .topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav .wrap, .topbar .wrap { display: flex; align-items: center; gap: 12px; padding: 8px 0; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); text-decoration: none; }
.logo-img { width: 32px; height: 32px; display: block; flex: none; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; background: var(--grad-primary); }
.nav .links { margin-inline-start: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.nav .links a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; padding: 6px 12px; border-radius: 999px; }
.nav .links a:hover { background: var(--soft); }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .95rem;
  padding: 6px 14px 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
}
.back-btn:hover { background: var(--soft); }
.back-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.topbar-title { color: var(--muted); font-size: .92rem; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { margin-top: 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--grad-hero); padding: clamp(22px, 4vw, 38px); }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-text { min-width: 0; }
.hero-logo { width: clamp(72px, 15vw, 124px); height: auto; flex: none; filter: drop-shadow(0 6px 14px rgba(59, 127, 211, .35)); }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.25; font-weight: 800; }
.hero p { margin: 0 0 18px; font-size: 1.02rem; color: var(--muted); max-width: 48ch; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pill { background: var(--card); border: 1px solid var(--line); color: var(--muted); padding: 2px 12px; border-radius: 999px; font-size: .84rem; font-weight: 600; }

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--grad-primary); color: #fff !important; font: inherit; font-size: .95rem; font-weight: 700; text-decoration: none;
  box-shadow: var(--shadow); transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip input:focus-visible + span, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.light { background: var(--card); color: var(--indigo) !important; border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--indigo) !important; border: 1.5px solid var(--indigo); box-shadow: none; }
.btn.ktav { background: var(--grad-ktav); }
.btn.mail { background: var(--grad-mail); }
.btn.bus { background: var(--grad-bus); }
.btn.big { padding: 11px 24px; font-size: 1rem; }
.btn.small { padding: 6px 14px; font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- סעיפים וכרטיסים ---------- */
section { padding: clamp(26px, 4vw, 40px) 0 0; }
.kicker { color: var(--muted); font-weight: 700; letter-spacing: .3px; font-size: .85rem; margin-bottom: 2px; }
h2.title { margin: 0 0 4px; font-size: clamp(1.25rem, 2.6vw, 1.55rem); font-weight: 800; }
.lead { margin: 0 0 18px; color: var(--muted); font-size: 1rem; max-width: 58ch; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
        display: flex; flex-direction: column; gap: 8px; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 16px 16px 0 0; background: var(--accent, var(--grad-primary)); }
.card.ktav { --accent: var(--grad-ktav); } .card.mail { --accent: var(--grad-mail); } .card.bus { --accent: var(--grad-bus); }
.card h3 { margin: 4px 0 0; font-size: 1.08rem; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }
.card .spacer { flex: 1; }
.icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent, var(--grad-primary)); }
.icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { background: var(--soft); color: var(--muted); border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 600; }
.phone-line { font-weight: 700; color: var(--ink); font-size: .95rem; }
.phone-line a { direction: ltr; unicode-bidi: isolate; }

/* ---------- יצירת קשר ---------- */
.contact { display: grid; gap: 16px; align-items: center; grid-template-columns: 1.2fr 1fr; background: var(--card); border: 1px solid var(--line);
           border-radius: 20px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.contact h2 { margin: 0 0 6px; font-size: clamp(1.15rem, 2.4vw, 1.4rem); font-weight: 800; }
.contact p { margin: 0; color: var(--muted); font-size: .95rem; }
.contact .actions { flex-direction: column; align-items: stretch; }
.contact .mailaddr { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 680px) { .contact { grid-template-columns: 1fr; } }
.foot { margin-top: 40px; padding: 18px 0 32px; color: var(--muted); font-size: .88rem; text-align: center; border-top: 1px solid var(--line); }
.foot a { font-weight: 600; }

/* ---------- דפי טפסים ---------- */
.banner { border-radius: 16px; padding: clamp(16px, 3vw, 24px); background: var(--tint-bus); border: 1px solid var(--tint-bus-line); }
.banner h1 { margin: 0 0 6px; font-size: clamp(1.2rem, 2.8vw, 1.55rem); font-weight: 800; line-height: 1.3; }
.banner p { margin: 0; color: var(--muted); font-size: .95rem; max-width: 60ch; }
.banner .back { color: var(--indigo); font-weight: 600; text-decoration: none; font-size: .9rem; display: inline-block; margin-bottom: 6px; }
.tabs { display: flex; gap: 8px; margin: 16px 0 12px; flex-wrap: wrap; }
.tab { flex: 1 1 180px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
       font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; text-align: center; }
.tab[aria-selected="true"] { border-color: transparent; color: #fff; background: var(--grad-bus); }
.tab.alt[aria-selected="true"] { background: var(--grad-mail); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(14px, 2.5vw, 20px); margin-bottom: 12px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; font-size: 1.02rem; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel h2 .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .8rem; background: var(--grad-primary); }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field > label, .legend { font-weight: 700; font-size: .92rem; }
.req::after { content: " (חובה)"; color: var(--rose); font-weight: 600; font-size: .8rem; }
.rec { display: inline-block; margin-inline-start: 6px; padding: 0 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .74rem; font-weight: 700; vertical-align: middle; }
.hint { color: var(--muted); font-size: .84rem; font-weight: 400; }
input[type=text], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=password], input[type=email], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--indigo); }
input.ltr { direction: ltr; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 5px 14px; border-radius: 999px; background: var(--soft); border: 1.5px solid var(--line);
             font-size: .92rem; font-weight: 600; cursor: pointer; user-select: none; transition: background .12s, border-color .12s; }
.chip input:checked + span { background: var(--grad-primary); color: #fff; border-color: transparent; }
.chips.bad .chip input:checked + span { background: var(--grad-mail); }
.chips.ok .chip input:checked + span { background: var(--grad-bus); }
.sub-field { margin-top: 8px; display: none; }
.sub-field.show { display: block; }
details.more { border: 1.5px dashed var(--line); border-radius: 14px; padding: 2px 14px 6px; margin-bottom: 12px; background: var(--card); }
details.more > summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.alert { border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-weight: 600; font-size: .94rem; }
.alert.err { background: #fde8ec; color: #8a1230; border: 1px solid #f5b8c5; }
.alert.ok { background: #e1f5ea; color: #0b5c2e; border: 1px solid #a8e0c1; }
.alert.info { background: var(--soft); color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .alert.err { background: #4a1325; color: #ffd0da; border-color: #7d2740; }
  .alert.ok { background: #0f3a24; color: #c5f5d9; border-color: #1f6b44; }
}
.submit-bar { position: sticky; bottom: 0; padding: 10px 0 14px; background: linear-gradient(to top, var(--bg) 72%, transparent); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.honey { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.thanks { text-align: center; padding: 36px 0 6px; }
.thanks .check { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--grad-bus); }
.thanks .check svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.thanks h1 { margin: 12px 0 6px; font-size: clamp(1.3rem, 3.4vw, 1.7rem); font-weight: 800; }

/* ---------- טבלאות וניהול ---------- */
.page-head { padding: 18px 0 6px; }
.page-head h1 { margin: 6px 0; font-size: 1.5rem; font-weight: 800; }
.tbl-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 740px; }
.tbl th { background: var(--soft); text-align: right; padding: 9px 11px; font-weight: 800; }
.tbl td { padding: 8px 11px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: var(--soft); }
.chiplet { display: inline-block; background: var(--soft); border-radius: 999px; padding: 0 9px; margin: 1px; font-size: .78rem; font-weight: 600; }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); align-items: end; margin-bottom: 12px; }
.filters .field { margin: 0; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 5px 14px; }
.kv dt { font-weight: 800; color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.stat { display: inline-block; margin-inline-end: 8px; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } }

@media (max-width: 560px) {
  .nav .wrap { flex-wrap: wrap; gap: 6px; }
  .brand { font-size: .95rem; }
  .nav .links { margin-inline-start: 0; width: 100%; }
  .hero-logo { display: none; }
}
