/*! CLAL CENTER — public portal stylesheet (W4).
    Contract: 11-CONTRACTS v12 §C4 · 15-W4-PUBLIC-SITE §1, §7.
    Zero dependencies, zero build. Version-stamped filename — bump on every change
    (README-DEPLOY §ז) or the 7-day assets cache will hide the fix from agents. */

/* ===================== tokens ===================== */
:root {
  --green:      #0B6E4F;
  --green-dark: #0a5a41;
  --green-deep: #084a36;
  --green-soft: #f2f7f4;
  --green-line: #cfe4d9;

  --ink:    #151b21;
  --muted:  #5b6b7b;
  --faint:  #64717e;
  --line:   #e3e8ee;
  --card:   #ffffff;
  --bg:     #f4f7f5;

  --hero-text: #d7eee3;
  --mark:      #ffe9a8;
  --focus:     #1976d2;

  --radius-card: 14px;
  --radius-row:  10px;
  --shadow: 0 1px 2px rgba(11, 110, 79, .05), 0 8px 24px rgba(21, 27, 33, .05);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  direction: rtl;
  background: var(--bg);
  color: var(--ink);
  font-family: "Assistant", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

a { color: inherit; }

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

/* ===================== skip link ===================== */
.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 20;
  background: #fff; color: var(--green); font-weight: 700;
  padding: 10px 16px; border-radius: 0 0 10px 10px; text-decoration: none;
  transition: top .15s;
}
.skip:focus { top: 0; }

/* ===================== hero ===================== */
.hero {
  background: linear-gradient(140deg, var(--green), var(--green-dark) 62%, var(--green-deep));
  color: #fff;
  border-radius: 0 0 22px 22px;
  padding: 40px 20px 30px;
}
.hero-in { max-width: 980px; margin: 0 auto; }

.eyebrow {
  font-size: 12.5px; letter-spacing: .14em; font-weight: 700;
  color: #9fd6bf; margin: 0 0 10px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4.4vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}
.hero .lede {
  margin: 0 0 20px;
  color: var(--hero-text);
  font-size: clamp(15px, 2.2vw, 17px);
  max-width: 52ch;
}

/* ---- search ---- */
.search { position: relative; max-width: 520px; }
.search-box {
  position: relative;
  display: flex; align-items: center;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(8, 74, 54, .18);
}
.search-box .mag {
  position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--green); pointer-events: none;
}
.search-box input {
  width: 100%;
  font: inherit; font-size: 16px; font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0; border-radius: 999px;
  padding: 14px 46px 14px 52px;
  min-height: 52px;
}
.search-box input::placeholder { color: var(--faint); font-weight: 400; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-box input:focus { outline: none; }
.search-box:focus-within { outline: 2px solid #fff; outline-offset: 2px; }

.clear-x {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; min-width: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: #eef1f4; color: var(--muted);
  font: inherit; font-size: 15px; line-height: 1; cursor: pointer;
}
.clear-x:hover { background: #e2e7ec; color: var(--ink); }

.count {
  font-size: 13.5px; color: var(--hero-text);
  margin-top: 12px; min-height: 20px;
}

/* ===================== page ===================== */
main { max-width: 980px; margin: 0 auto; padding: 22px 20px 60px; }

.note {
  font-size: 13px; color: var(--green);
  background: var(--green-soft); border: 1px solid var(--green-line);
  border-radius: 10px; padding: 9px 14px; margin: 0 0 6px;
}

/* ---- zero results ---- */
.empty {
  text-align: center; color: var(--muted);
  padding: 30px 12px 18px;
}
.empty .l1 { color: var(--ink); font-weight: 700; font-size: 17px; margin: 0 0 6px; }
.empty .l2 { margin: 0 0 16px; font-size: 14px; }
.btn-outline {
  font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--green); background: #fff;
  border: 1px solid var(--green); border-radius: 999px;
  padding: 10px 22px; min-height: 44px; cursor: pointer;
}
.btn-outline:hover { background: var(--green-soft); }

/* ---- "coming soon" — a product screen, not an error (15-W4 §2) ---- */
.soon {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 54px 26px; text-align: center; margin-top: 8px;
}
.soon .glyph {
  width: 54px; height: 54px; margin: 0 auto 18px;
  color: var(--green); opacity: .85;
}
.soon h2 { margin: 0 0 10px; font-size: 22px; font-weight: 700; color: var(--ink); }
.soon p  { margin: 0 auto; max-width: 44ch; color: var(--muted); font-size: 15px; }

/* ===================== category accordion ===================== */
.cat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  margin-top: 12px;
  overflow: hidden;
}
.cat h2 { margin: 0; font-size: inherit; font-weight: inherit; }

.cat-head {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  font: inherit; font-size: 16.5px; font-weight: 700;
  color: var(--ink); text-align: start;
  background: var(--card); border: 0;
  padding: 15px 18px; min-height: 56px;
  cursor: pointer;
}
.cat-head:hover { background: #f8fbf9; }
.cat-head .cat-ic {
  width: 22px; height: 22px; flex: 0 0 auto; color: var(--green);
}
.cat-head .cat-t { flex: 1 1 auto; }
.cat-head .cat-n {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: #f1f4f7; border-radius: 999px; padding: 2px 9px;
}
.chev {
  width: 20px; height: 20px; flex: 0 0 auto; color: var(--faint);
  transition: transform .18s ease;
}
.cat.open .chev { transform: rotate(180deg); color: var(--green); }

.cat-body { display: none; padding: 0 14px 14px; }
.cat.open .cat-body { display: block; }

/* ---- sub-group heading (omitted when the category holds exactly one — C4 §1) ---- */
.sub-t {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 4px 4px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
  color: var(--green);
}
.sub-t::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--green-line);
}

.items { list-style: none; margin: 0; padding: 0; }
.items:first-child { margin-top: 4px; }

/* ===================== item row ===================== */
.item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; min-height: 52px;
  border: 0; border-radius: var(--radius-row);
  background: transparent; color: var(--ink);
  font: inherit; text-align: start; text-decoration: none;
  cursor: pointer;
}
.item:hover { background: var(--green-soft); }
.item.no-link { cursor: default; }
.item.no-link:hover { background: transparent; }
.item.no-link .go { display: none; }

.item .ic {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--green-soft); color: var(--green);
}
.item .ic svg { width: 19px; height: 19px; }
.item:hover .ic { background: #e4efe9; }

.item .main { flex: 1 1 auto; min-width: 0; }
.item .txt { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.item .desc {
  display: block; font-size: 13px; color: var(--muted); line-height: 1.45;
  margin-top: 1px;
}
.item .via {
  display: block; font-size: 12px; color: var(--faint); margin-top: 2px;
}
.item .via:empty, .item .desc:empty { display: none; }

.item mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0; }

.badge {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--muted); background: #fff;
  border: 1px solid #cfd7df; border-radius: 5px;
  padding: 1px 8px; white-space: nowrap;
}
.item .go { width: 18px; height: 18px; flex: 0 0 auto; color: var(--green); }

/* ---- inline "info" expansion ---- */
.item.info-tog .go { transition: transform .18s ease; }
.item.info-tog[aria-expanded="true"] .go { transform: rotate(90deg); }

.info-body {
  margin: 2px 12px 10px;
  padding: 12px 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--green);
  border-radius: var(--radius-row);
  color: #2c3742; font-size: 14.5px; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ===================== footer ===================== */
footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--faint); font-size: 13px;
  padding: 20px;
}
.foot-in {
  max-width: 980px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
}

/* ===================== responsive ===================== */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hero { padding: 28px 16px 24px; border-radius: 0 0 18px 18px; }
  main { padding: 18px 14px 48px; }
  .cat-head { padding: 14px 14px; gap: 10px; font-size: 15.5px; }
  .cat-body { padding: 0 8px 12px; }
  .item { padding: 10px 8px; gap: 10px; }
  .item .txt { font-size: 15px; }
  .item .ic { width: 34px; height: 34px; }
  .search-box input { font-size: 16px; padding: 13px 44px 13px 48px; }
  /* badge stays visible on mobile (E4 §3.2 — mixed types is exactly when it earns its place) */
  .badge { font-size: 10.5px; padding: 1px 6px; }
  .soon { padding: 40px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .chev, .skip, .item.info-tog .go { transition: none; }
}
