/* ביטוח עובדים זרים — חנן ביטוחים
   RTL-first, logical properties throughout. WCAG 2.1 AA / SI 5568. */

:root {
  /* Brand colours (from the Stitch design) */
  --pink: #ff0080;          /* brand pink — decorative use, and text/graphics on dark surfaces (4.7:1 on navy) */
  --pink-action: #d1006a;   /* brand pink darkened for white-on-pink text: 5.4:1 (the original #ff0080 is 3.8:1) */
  --pink-action-hover: #b3005a;
  --teal: #169299;          /* brand teal — on dark surfaces / graphics */
  --teal-hover: #2d7a7f;    /* faded teal for link hover: 4.7:1 on white */
  --teal-text: #0f7177;     /* brand teal-dark — text on light surfaces: 5.8:1 */
  --orange: #ef7d27;

  --ink: #111827;
  --ink-strong: #0b0f19;
  --text: #111827;
  --text-muted: #4b5563;    /* replaces #6b7280/#9ca3af greys: 7.2:1 on #f8f9fa */
  --surface: #ffffff;
  --surface-alt: #f8f9fa;
  --border: #d1d5db;        /* 1.5:1 decorative card borders; form controls use --control-border */
  --control-border: #6b7280;/* 4.8:1 on white, meets 1.4.11 non-text contrast */
  --error: #b42318;         /* 6.5:1 on white */
  --success-bg: #ecfdf3;
  --success-text: #05603a;
  --focus: #0f2042;         /* navy ring + white halo works on every light surface */
  --on-dark-muted: #cbd5e1;

  --radius: 1rem;
  --header-h: 5rem;
  --font: "Assistant", "Rubik", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  --font-display: "Rubik", "Assistant", "Segoe UI", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + 1rem); /* sticky header must not cover focused/anchored content */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; color: var(--ink); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* Links are never underlined: hover shows a fainter shade of the link colour.
   Links inside running text are bold so they stay distinguishable without relying on colour alone (WCAG 1.4.1). */
a { color: var(--teal-text); text-decoration: none; }
a:hover { color: var(--teal-hover); }
p a { font-weight: 700; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
  border-radius: 0.25rem;
}
.on-dark :focus-visible,
.btn--on-dark:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 6px var(--ink);
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- Utilities ---------- */
.container { max-inline-size: 72rem; margin-inline: auto; padding-inline: 1.5rem; }
.container--narrow { max-inline-size: 56rem; }
.visually-hidden {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.skip-link {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  border-radius: 0.5rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-block-size: 3rem;
  padding: 0.75rem 2rem;
  font: inherit; font-weight: 700; font-size: 1.125rem;
  line-height: 1.2;
  color: #fff;
  background: var(--pink-action);
  border: 2px solid var(--pink-action);
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--pink-action-hover); border-color: var(--pink-action-hover); }
.btn:active { transform: scale(0.98); }
.btn--lg { min-block-size: 3.5rem; padding-inline: 2.5rem; font-size: 1.25rem; box-shadow: 0 10px 25px -8px rgba(209, 0, 106, 0.5); }
.btn--sm { min-block-size: 2.75rem; padding: 0.5rem 1.25rem; font-size: 1rem; }
.btn--block { inline-size: 100%; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn .arrow { inline-size: 1.25rem; block-size: 1.25rem; flex: none; } /* arrow points to inline-end = left in RTL */

/* ---------- Header ----------
   Home page: fixed + transparent over the hero (large logo, only "אזור מעסיקים").
   After scrolling (.is-scrolled, set in app.js) the logo shrinks, the bottom border appears
   and the menu + quote button are revealed. Other pages use .site-header--solid (always scrolled). */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  background: transparent;
  border-block-end: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header--solid { position: sticky; }
.site-header.is-scrolled { background: rgba(255, 255, 255, 0.97); border-block-end-color: #e5e7eb; }
.site-header__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  min-block-size: 8.25rem;
  transition: min-block-size 0.3s;
}
.is-scrolled .site-header__inner { min-block-size: var(--header-h); }
.site-nav { grid-column: 1; grid-row: 1; justify-self: start; }
.brand { grid-column: 2; grid-row: 1; justify-self: center; display: inline-flex; padding-block: 0.25rem; }
.brand img { block-size: 6.75rem; inline-size: auto; transition: block-size 0.3s; }   /* 3.75rem x 1.8 */
.is-scrolled .brand img { block-size: 3.75rem; }
.header-actions { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 1rem; }
.site-nav ul { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.site-nav a, .employers-link {
  display: inline-flex; align-items: center; min-block-size: 2.75rem;
  color: var(--ink); font-weight: 600; text-decoration: none; padding-inline: 0.25rem;
}
.employers-link { font-weight: 700; font-size: 1.1875rem; }
.site-nav a:hover, .employers-link:hover { color: #4b5563; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--pink-action); }

/* Menu + quote button only appear once scrolled; visibility:hidden also removes them from the tab order while invisible */
.site-header:not(.is-scrolled) .site-nav,
.site-header:not(.is-scrolled) .header-cta { visibility: hidden; opacity: 0; }
.site-nav, .header-cta { transition: opacity 0.3s, visibility 0.3s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; text-align: center; padding-block: 9rem 4rem; background: var(--surface); }
.hero .cloud { position: absolute; color: #d1d5db; fill: none; stroke: currentColor; stroke-width: 1; pointer-events: none; }
.hero .cloud--1 { inset-block-start: -1rem; inset-inline-start: 2.5rem; inline-size: 16rem; }
.hero .cloud--2 { inset-block-start: 11rem; inset-inline-end: 2rem; inline-size: 18rem; }
.hero__inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 600; letter-spacing: -0.01em; margin-block-end: 1.25rem; }
.hero__lead { font-size: clamp(1.125rem, 2.4vw, 1.375rem); color: var(--text-muted); max-inline-size: 38rem; margin-inline: auto; margin-block-end: 2rem; }
.hero__note { margin-block-start: 0.875rem; color: var(--text-muted); font-size: 1rem; }

.sectors { margin-block-start: 3rem; padding-block-start: 2rem; border-block-start: 1px solid #e5e7eb; }
.sectors h2 { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin-block-end: 1.25rem; font-family: var(--font); }
.sector-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-inline-size: 56rem; margin-inline: auto; }
@media (min-width: 48rem) { .sector-grid { grid-template-columns: repeat(3, 1fr); } }

.sector-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.625rem;
  inline-size: 100%;
  padding: 0.75rem;
  font-weight: 700; font-size: 1rem; color: var(--ink);
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sector-card:hover { border-color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
.sector-card__img { position: relative; inline-size: 100%; block-size: 6rem; overflow: hidden; border-radius: 0.75rem; background: #e5e7eb; }
.sector-card__img img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 0.3s, opacity 0.3s; }
.sector-card__img .img-hover { position: absolute; inset: 0; opacity: 0; }   /* "half colour" variant shown on hover */
.sector-card:hover .img-hover { opacity: 1; }
.sector-card:hover img { transform: scale(1.05); }

/* ---------- Sections ---------- */
.section { padding-block: 5rem; text-align: center; border-block-start: 1px solid #e5e7eb; }
.section--alt { background: var(--surface-alt); }
.section h2 { font-size: clamp(1.875rem, 4.5vw, 2.625rem); font-weight: 600; margin-block-end: 0.875rem; }
.section__lead { color: var(--text-muted); font-size: 1.125rem; max-inline-size: 40rem; margin-inline: auto; margin-block-end: 3.5rem; }

.metrics { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.metric { display: flex; flex-direction: column; align-items: center; }
.metric__icon {
  display: grid; place-items: center;
  inline-size: 7rem; block-size: 7rem; margin-block-end: 1rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.metric__icon img { inline-size: 5rem; block-size: 5rem; object-fit: contain; }
.metric h3 { font-size: 1.5rem; font-weight: 700; margin-block-end: 0.375rem; }
.metric p { color: var(--text-muted); max-inline-size: 16rem; font-size: 1rem; }

.partners { margin-block-start: 3.5rem; padding-block-start: 2rem; }
.partners + .partners { border-block-start: 1px solid #e5e7eb; margin-block-start: 2.5rem; }
.partners h3 { font-family: var(--font); font-size: 1rem; font-weight: 600; color: var(--text-muted); margin-block-end: 1.5rem; }
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem 3rem; }
.logo-row img { block-size: 2.5rem; inline-size: auto; max-inline-size: 9.5rem; object-fit: contain; }
.logo-row li { display: flex; align-items: center; }

.features { display: grid; gap: 2.5rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { display: flex; flex-direction: column; align-items: center; }
.feature__icon {
  display: grid; place-items: center;
  inline-size: 5rem; block-size: 5rem; margin-block-end: 1rem;
  background: #f3f4f6; border: 1px solid var(--border); border-radius: 50%;
}
.feature__icon img, .feature__icon svg { inline-size: 3.75rem; block-size: 3.75rem; object-fit: contain; padding: 0.25rem; }
.feature h3 { font-size: 1.25rem; font-weight: 700; margin-block-end: 0.375rem; }
.feature p { color: var(--text-muted); font-size: 1rem; max-inline-size: 18rem; }

.faq-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; text-align: start; max-inline-size: 64rem; margin-inline: auto; }
@media (min-width: 48rem) { .faq-grid { grid-template-columns: repeat(3, 1fr); } }
.faq-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 1px 3px rgba(15, 32, 66, 0.06); }
.faq-card h3 { font-size: 1.1875rem; font-weight: 700; margin-block-end: 0.75rem; line-height: 1.35; }
.faq-card p { font-size: 1rem; color: #374151; }

/* ---------- Closing CTA (dark) ---------- */
.cta-band { background: var(--ink); color: #fff; text-align: center; padding-block: 5rem 0; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: clamp(2rem, 5vw, 3.125rem); font-weight: 600; margin-block-end: 1rem; }
.cta-band p { color: var(--on-dark-muted); font-size: 1.125rem; max-inline-size: 34rem; margin-inline: auto; margin-block-end: 2rem; }
.cta-band__art { max-inline-size: 56rem; margin-inline: auto; margin-block-start: 3.5rem; padding-inline: 1.5rem; }
.cta-band__art svg { inline-size: 100%; block-size: auto; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-strong); color: var(--on-dark-muted); font-size: 1rem; }
.site-footer a { color: var(--on-dark-muted); }
.site-footer a:hover { color: #94a3b8; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; padding-block: 4rem 3.5rem; border-block-end: 1px solid #374151; }
@media (min-width: 56rem) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }
.footer-col h2 { font-family: var(--font); font-size: 1rem; font-weight: 700; color: #fff; margin-block-end: 0.75rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.125rem; }
.footer-col li a { display: inline-flex; align-items: center; gap: 0.35em; min-block-size: 2.25rem; }
.footer-col--brand { grid-column: span 2; }
@media (min-width: 56rem) { .footer-col--brand { grid-column: auto; } }
.footer-col--brand img { block-size: 3.5rem; inline-size: auto; background: #fff; padding: 0.375rem 0.625rem; border-radius: 0.5rem; margin-block-end: 0.75rem; }
.footer-col--brand p { font-size: 0.9375rem; margin-block-end: 0.75rem; }
.footer-contact { color: #5eead4 !important; font-weight: 600; }
.site-footer a.footer-contact:hover { color: #7fb8af !important; }
.footer-legal { padding-block: 2rem; font-size: 0.9375rem; }
.footer-legal__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-block-start: 1.25rem; padding-block-start: 1.25rem; border-block-start: 1px solid #1f2937; }
.footer-legal__bar ul { display: flex; gap: 1.5rem; }

/* ---------- Dialog + form ---------- */
.quote-dialog {
  inline-size: min(28rem, 100vw);
  max-inline-size: 100vw; max-block-size: 100dvh;
  block-size: 100dvh;
  margin: 0; margin-inline-start: auto; /* docks to the physical left (inline-end in RTL), like the Stitch drawer */
  padding: 0;
  border: 0;
  background: #fff; color: var(--text);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}
.quote-dialog::backdrop { background: rgba(17, 24, 39, 0.65); }
.quote-dialog[open] { display: flex; flex-direction: column; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--surface-alt); border-block-end: 1px solid #e5e7eb; }
.dialog-head h2 { font-size: 1.25rem; font-weight: 700; }
.dialog-head p { font-size: 0.9375rem; color: var(--text-muted); }
.dialog-close {
  flex: none; display: grid; place-items: center;
  inline-size: 2.75rem; block-size: 2.75rem;
  font: inherit; font-size: 1.5rem; line-height: 1; color: var(--ink);
  background: #fff; border: 2px solid var(--control-border); border-radius: 50%; cursor: pointer;
}
.dialog-close:hover { background: #f3f4f6; }
.dialog-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.dialog-foot { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; background: var(--surface-alt); border-block-start: 1px solid #e5e7eb; font-size: 1rem; }
.dialog-foot a { font-weight: 700; color: var(--ink); }
.dialog-foot a:hover { color: #4b5563; }

.form-intro { font-size: 1rem; color: var(--text-muted); margin-block-end: 1.25rem; }
.field { margin-block-end: 1.25rem; }
.field label, .field .label { display: block; font-weight: 700; font-size: 1rem; margin-block-end: 0.25rem; }
.req { color: var(--error); font-weight: 700; }
.hint { display: block; font-size: 0.9375rem; color: var(--text-muted); margin-block-end: 0.375rem; }
.control {
  display: block; inline-size: 100%; min-block-size: 3rem;
  padding: 0.5rem 0.875rem;
  font: inherit; font-size: 1.0625rem; color: var(--text);
  background: #fff;
  border: 2px solid var(--control-border);
  border-radius: 0.5rem;
}
.control:focus { border-color: var(--focus); }
.control[aria-invalid="true"] { border-color: var(--error); background: #fffbfa; }
.field-error { display: flex; gap: 0.375rem; align-items: flex-start; margin-block-start: 0.375rem; color: var(--error); font-weight: 600; font-size: 0.9375rem; }
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; inline-size: 1.125rem; block-size: 1.125rem; margin-block-start: 0.15rem; border-radius: 50%; background: var(--error); color: #fff; font-size: 0.75rem; font-weight: 800; }
.field-error[hidden] { display: none; }

.error-summary { margin-block-end: 1.25rem; padding: 1rem 1.25rem; border: 2px solid var(--error); border-radius: 0.75rem; background: #fef3f2; }
.error-summary[hidden] { display: none; }
.error-summary h3 { font-size: 1.0625rem; color: var(--error); margin-block-end: 0.5rem; }
.error-summary ul { list-style: disc; padding-inline-start: 1.25rem; }
.error-summary a { color: var(--error); font-weight: 600; }
.error-summary a:hover { color: #c0392b; }

.assurance { margin-block-end: 1.25rem; padding: 1rem; background: var(--surface-alt); border: 1px solid #e5e7eb; border-radius: 0.75rem; font-size: 1rem; color: var(--text-muted); }
.assurance strong { color: var(--ink); display: block; }

.form-status:empty { display: none; }
.form-status { padding: 1.25rem; border-radius: 0.75rem; background: var(--success-bg); color: var(--success-text); border: 2px solid var(--success-text); font-weight: 600; }
.form-status.is-error { background: #fef3f2; color: var(--error); border-color: var(--error); }
.form-status h3 { font-size: 1.25rem; margin-block-end: 0.5rem; color: inherit; }
.form-status p + p, .form-status p + .btn { margin-block-start: 1rem; }

/* ---------- Accessibility statement page ---------- */
.doc { padding-block: 3.5rem 5rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; margin-block-end: 1rem; }
.doc h2 { font-size: 1.625rem; font-weight: 600; margin-block: 2.5rem 0.75rem; }
.doc p, .doc li { max-inline-size: 46rem; }
.doc p + p { margin-block-start: 0.875rem; }
.doc ul { list-style: disc; padding-inline-start: 1.5rem; display: flex; flex-direction: column; gap: 0.375rem; }
.doc .meta { color: var(--text-muted); font-size: 1rem; margin-block-end: 1.5rem; }
.contact-card { margin-block-start: 1rem; padding: 1.5rem; max-inline-size: 36rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; }
.contact-card dt { font-weight: 700; }
.contact-card dd { margin: 0; }
.placeholder { background: #fff3bf; color: #1f2937; padding: 0.05em 0.35em; border-radius: 0.25rem; font-weight: 600; }
.doc table { border-collapse: collapse; inline-size: 100%; max-inline-size: 46rem; margin-block-start: 0.75rem; font-size: 1rem; }
.doc caption { text-align: start; font-weight: 700; padding-block-end: 0.5rem; }
.doc th, .doc td { text-align: start; padding: 0.625rem 0.75rem; border: 1px solid var(--border); vertical-align: top; }
.doc th { background: var(--surface-alt); }

/* ---------- Responsive ---------- */
@media (max-width: 47.99rem) {
  :root { --header-h: 4.5rem; }
  .site-header__inner { grid-template-columns: 1fr auto; min-block-size: 7.5rem; }
  .is-scrolled .site-header__inner { min-block-size: var(--header-h); }
  .brand { justify-self: start; grid-column: 1; grid-row: 1; }
  .brand img { block-size: 5.5rem; }
  .is-scrolled .brand img { block-size: 3.25rem; }
  .header-actions { grid-column: 2; grid-row: 1; gap: 0.5rem; }
  .employers-link { font-size: 1rem; }
  .header-cta { padding-inline: 0.875rem; }
  /* menu links move to a second row once scrolled; absent at the top */
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; padding-block-end: 0.25rem; }
  .site-nav ul { justify-content: center; }
  .site-header:not(.is-scrolled) .site-nav,
  .site-header:not(.is-scrolled) .header-cta { display: none; }
  .hero { padding-block-start: 8rem; }
  .hero .cloud { display: none; }
  .container { padding-inline: 1rem; }
}

/* Honour user motion and contrast preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .btn, .sector-card, .control, .dialog-close { border: 2px solid ButtonText; }
  .btn:hover { background: Highlight; color: HighlightText; }
}
@media print {
  .site-header, .skip-link, .quote-dialog { display: none !important; }
}

/* Button that looks like a footer link */
.link-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; min-block-size: 2.25rem; cursor: pointer; }
.link-btn:hover { color: #94a3b8; }
.footer-col li.plain { display: flex; align-items: center; min-block-size: 2.25rem; }
