/* ==========================================================================
   מכון גסטרופלוס כרמיאל — Gastro Plus
   נבנה על הבראנד־בוק: ירוק #275438 גיבור, כחול #389CCE מלווה בלבד.
   טיפוגרפיה: Assistant. גוף הטקסט 17px — קהל היעד 50+.
   ========================================================================== */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Assistant';
  src: url('../fonts/Assistant.woff2') format('woff2-variations'),
       url('../fonts/Assistant.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/Playfair-latin.woff2') format('woff2-variations'),
       url('../fonts/Playfair-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  font-style: normal;
}

/* ---------- tokens ---------- */
:root {
  /* brand book */
  --green:        #275438;
  --green-deep:   #1c3d28;
  --green-soft:   #eef3ef;
  --blue:         #389CCE;
  --blue-soft:    #e8f3fa;
  --ink:          #353535;
  --ink-soft:     #5c6360;
  --off:          #F1F4F7;
  --white:        #ffffff;
  --line:         #dfe5ea;

  --radius:       14px;
  --radius-sm:    9px;
  --shadow:       0 1px 2px rgba(23,45,33,.05), 0 8px 24px -12px rgba(23,45,33,.16);
  --shadow-lg:    0 2px 4px rgba(23,45,33,.06), 0 20px 48px -20px rgba(23,45,33,.24);

  --wrap:         1120px;
  --gap:          clamp(1.25rem, 3vw, 2rem);

  --fs-body:      17px;
  --lh-body:      1.75;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: 'Assistant', 'Segoe UI', Arial, sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; color: var(--green); }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: clamp(1.12rem, 2.2vw, 1.3rem); }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-inline-start: 1.35em; }
li { margin-bottom: .55em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* latin/number isolation inside Hebrew — WEB-DESIGN-RULES §2 */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 999;
  background: var(--green); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { inset-inline-start: 0; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--green); color: #fff;
  font-size: .95rem;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; align-items: center; padding: .5rem 0; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem 0; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .sep { margin-inline-start: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; margin-inline-end: auto; }
.brand img { width: 118px; height: auto; }
.brand-he {
  display: block; padding-inline-start: .85rem;
  border-inline-start: 1px solid var(--line);
}
.brand-he b { display: block; font-size: .97rem; color: var(--green); line-height: 1.25; font-weight: 700; white-space: nowrap; }
.brand-he span { display: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 44px; height: 44px; cursor: pointer; color: var(--green);
  align-items: center; justify-content: center;
}
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .94rem;
  padding: .5rem .6rem; border-radius: var(--radius-sm); white-space: nowrap;
}
.nav a:hover { background: var(--green-soft); color: var(--green); }
.nav a[aria-current="page"] { color: var(--green); background: var(--green-soft); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; padding: .6rem 1.25rem 1rem; gap: .15rem;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .6rem; }
  .site-header .wrap { position: relative; flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .brand-he { display: none; }
  .brand img { width: 118px; }
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(155deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff; padding: clamp(2.5rem, 7vw, 4.5rem) 0;
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero .role { font-size: 1.1rem; font-weight: 700; color: #cfe3d5; margin-bottom: .3em; }
.hero .lede { font-size: clamp(1.02rem, 2vw, 1.2rem); color: #e6efe9; max-width: 62ch; margin-bottom: 1.6em; }

.safety {
  margin-top: 2rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: rgba(255,255,255,.1); border-inline-start: 4px solid var(--blue);
  font-weight: 700; font-size: 1.05rem;
}

/* ---------- sections ---------- */
.section { padding: clamp(2.25rem, 6vw, 3.75rem) 0; }
.section.alt { background: var(--off); }
.section > .wrap > h2 { margin-bottom: .8em; }
.section-intro { max-width: 68ch; color: var(--ink-soft); }

.grid { display: grid; gap: var(--gap); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card :last-child { margin-bottom: 0; }

/* numbered "בקיצור" points */
.points { list-style: none; padding: 0; display: grid; gap: 1rem; }
.points li {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.3rem; margin: 0; box-shadow: var(--shadow);
}
.points .num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; font-weight: 700; font-size: 1.05rem;
}
.points p { margin: 0; }

/* service list */
.services { list-style: none; padding: 0; display: grid; gap: .6rem; }
.services li {
  display: flex; align-items: flex-start; gap: .7rem; margin: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .85rem 1.05rem;
}
.services li::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-top: .62em;
  border-radius: 50%; background: var(--blue);
}

/* info / contact blocks */
.info-block h3 {
  display: flex; align-items: center; gap: .55rem;
  padding-bottom: .55rem; border-bottom: 2px solid var(--green-soft);
}
.info-block h3 svg { flex: 0 0 auto; color: var(--blue); }
.dl { margin: 0; }
.dl div { display: flex; flex-wrap: wrap; gap: .3rem .6rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.dl div:last-child { border-bottom: 0; }
.dl dt { font-weight: 700; color: var(--ink); margin: 0; min-width: 11ch; }
.dl dd { margin: 0; color: var(--ink-soft); }

/* prep-instruction link lists */
.doclist { list-style: none; padding: 0; display: grid; gap: .55rem; }
.doclist li { margin: 0; }
.doclist a {
  display: flex; align-items: center; gap: .7rem; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1.1rem; color: var(--ink); font-weight: 600; min-height: 44px;
}
.doclist a:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.doclist a::after { content: "‹"; margin-inline-start: auto; color: var(--blue); font-size: 1.4rem; line-height: 1; }
.doclist[dir="ltr"] a::after { content: "›"; }

/* article (content pages) */
.article { max-width: 74ch; margin-inline: auto; }
.article h2 {
  margin-top: 2.2em; padding-bottom: .35em; border-bottom: 2px solid var(--green-soft);
}
.article h2:first-of-type { margin-top: .6em; }
.article ul { padding-inline-start: 1.3em; }
.article ul li::marker { color: var(--blue); }

.callout {
  background: var(--blue-soft); border-inline-start: 4px solid var(--blue);
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin: 1.6em 0;
}
.callout :last-child { margin-bottom: 0; }
.callout.warn { background: #fdf3ec; border-inline-start-color: #d97a34; }

.toc {
  background: var(--off); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.35rem; margin-bottom: 2rem;
}
.toc h2 { font-size: 1.05rem; margin: 0 0 .5em; border: 0; padding: 0; }
.toc ol { margin: 0; padding-inline-start: 1.3em; }
.toc li { margin-bottom: .3em; }

.breadcrumb { font-size: .92rem; color: var(--ink-soft); padding: .9rem 0 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* prep protocol page */
.protocol { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25rem; background:#fff; }
.protocol > h2 {
  margin: 0; padding: 1.05rem 1.35rem; background: var(--green); color: #fff;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem); border: 0;
}
.protocol .body { padding: 1.35rem; }
.protocol .body > :last-child { margin-bottom: 0; }
.protocol h3 { margin-top: 1.5em; }
.protocol h3:first-child { margin-top: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-deep); color: #d7e2da; padding: clamp(2.25rem, 5vw, 3.25rem) 0 0; margin-top: 3rem; }
.site-footer a { color: #d7e2da; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.foot-grid h4 { color: #fff; font-size: 1.02rem; margin: 0 0 .8em; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: .5em; }
.foot-logo { width: 190px; height: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: .95; }
.foot-brand p { font-size: .95rem; color: #b9c9bf; max-width: 34ch; }
.social { display: flex; gap: .55rem; margin-top: .9rem; }
.social a, .social span {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #fff;
}
.social a:hover { background: var(--blue); }
.foot-bottom {
  margin-top: 2.25rem; border-top: 1px solid rgba(255,255,255,.14);
  padding: 1.15rem 0 1.5rem; font-size: .88rem; color: #a9bbb0;
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center;
}
.foot-bottom .disclaimer { max-width: 70ch; }
.foot-bottom .credit { margin-inline-start: auto; }

/* ---------- a11y widget position (opposite the call button) ---------- */
.a11y-fab, #a11y-fab { inset-inline-start: 18px !important; inset-inline-end: auto !important; }

/* ---------- print ---------- */
@media print {
  .topbar, .site-header, .site-footer, .skip, #a11y-fab, .a11y-fab, .toc { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .hero { background: none !important; color: #000; padding: 0; }
  .hero h1, .hero .role, .hero .lede { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; }
  .protocol { break-inside: avoid; }
}

/* ---------- high-contrast hook used by a11y widget ---------- */
body.a11y-contrast { background: #fff; color: #000; }
body.a11y-contrast .hero { background: #14301f; }
body.a11y-contrast .card, body.a11y-contrast .points li, body.a11y-contrast .services li { border-color: #000; }

.protocol-sub {
  margin: -.35rem 0 1.2rem; color: var(--ink-soft); font-weight: 600;
  font-size: .95rem; letter-spacing: 0;
}
.protocol h3 {
  font-size: 1.08rem; color: var(--ink); margin: 1.6em 0 .5em;
  padding-inline-start: .65rem; border-inline-start: 3px solid var(--blue);
}
.protocol h3:first-child { margin-top: 0; }

.hero .role a { color: #cfe3d5; text-decoration-thickness: 1px; }
.hero .role a:hover { color: #fff; }
.role-line { font-size: 1.1rem; font-weight: 700; color: var(--blue); margin-top: -.4em; }

.dl dd .note {
  display: block; font-size: .85rem; color: var(--ink-soft);
  font-weight: 400; margin-top: .1rem;
}
