/* ==========================================================================
   WING Article Design System v1.0 (Wing theme 1.6) — shared styles for
   article bodies (.wing-article-body, .wa-*). Loaded on single posts only.
   Based on the approved pack's wing-articles.css, adapted to the theme:
   colours come from the theme tokens (so the accessibility menu's high
   contrast mode applies), logical properties for RTL, the theme's focus
   ring, no motion. Articles carry no inline CSS.
   ========================================================================== */

.wing-article-body {
  --wa-primary: var(--primary, #1257EE);
  --wa-primary-hover: var(--primary-hover, #0B47D1);
  --wa-heading: var(--heading, #0A1B5C);
  --wa-text: var(--text, #4A5A87);
  --wa-muted: var(--muted, #5A6A9C);
  --wa-tint: var(--tint, #EEF4FE);
  --wa-border: var(--border-featured, #86A5F5);
  --wa-line: var(--border, #E6EDF8);
  --wa-ok: #0B6B45;
  --wa-surface: var(--card, #FFFFFF);
  line-height: 1.8;
}
.wing-article-body > *:first-child { margin-top: 0; }
.wing-article-body h2 { scroll-margin-top: calc(var(--header-h, 70px) + 1rem); }
.wing-article-body section[id], .wing-article-body h2[id], .wing-article-body h3[id] { scroll-margin-top: calc(var(--header-h, 70px) + 1rem); }

/* Lead, summaries and call-outs */
.wa-lead { font-size: 1.08rem; color: var(--wa-heading); background: linear-gradient(135deg, #F7F9FF, #EEF3FF); border: 1px solid var(--wa-line); border-radius: 18px; padding: 1.25rem 1.4rem; margin: 0 0 1.5rem; }
.wa-lead > :last-child { margin-bottom: 0; }
.wa-quick, .wa-callout, .wa-tldr { border: 1px solid var(--wa-line); border-inline-start: 5px solid var(--wa-primary); border-radius: 16px; padding: 1.15rem 1.25rem; margin: 1.4rem 0; background: var(--wa-surface); }
.wa-quick h2, .wa-callout h2, .wa-tldr h2 { margin-top: 0; }
.wa-quick > :last-child, .wa-callout > :last-child, .wa-tldr > :last-child { margin-bottom: 0; }
.wa-callout--ok { border-inline-start-color: var(--wa-ok); background: #F3FBF7; }

/* Table of contents */
.wa-toc { background: var(--wa-tint); border: 1px solid var(--wa-line); border-radius: 16px; padding: 1.1rem 1.25rem; margin: 1.5rem 0 2rem; }
.wa-toc strong { display: block; margin-bottom: .45rem; color: var(--wa-heading); }
.wa-toc ul { columns: 2; column-gap: 2rem; margin: .2rem 0; padding-inline-start: 1.25rem; }
.wa-toc li { break-inside: avoid; margin: .2rem 0; }
.wa-toc a { font-weight: 650; }

/* Cards and grids */
.wa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.3rem 0; }
.wa-card { border: 1px solid var(--wa-line); border-radius: 16px; padding: 1.1rem; background: var(--wa-surface); }
.wa-card h3 { margin-top: 0; }
.wa-card > :last-child { margin-bottom: 0; }
.wa-card--accent { background: var(--wa-tint); border-color: #B8C9F7; }

/* Numbered steps */
.wa-steps { counter-reset: wa-step; list-style: none; padding: 0 !important; margin: 1.2rem 0; }
.wa-steps > li { counter-increment: wa-step; position: relative; border: 1px solid var(--wa-line); border-radius: 14px; padding-block: 1rem; padding-inline: 3.8rem 1rem; margin: .75rem 0; background: var(--wa-surface); }
.wa-steps > li::before { content: counter(wa-step); position: absolute; inset-inline-start: 1rem; top: 1rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--wa-primary); color: #fff; font-weight: 800; }

/* Check lists: the tick is decoration; the text carries the meaning */
.wa-checklist { list-style: none; padding: 0 !important; margin: 1rem 0; }
.wa-checklist > li { position: relative; padding-inline-start: 1.9rem; margin: .55rem 0; }
.wa-checklist > li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--wa-ok); font-weight: 900; }

/* Tables: the wrapper scrolls on narrow screens and can be reached with the keyboard */
.wa-table-wrap { overflow-x: auto; margin: 1.3rem 0; border-radius: 12px; }
.wa-table-wrap:focus-visible { outline: 3px solid var(--wa-primary); outline-offset: 3px; }
.wa-table { width: 100%; border-collapse: collapse; min-width: 620px; background: var(--wa-surface); }
.wa-table caption { text-align: start; font-weight: 800; margin-bottom: .55rem; color: var(--wa-heading); }
.wa-table th, .wa-table td { border: 1px solid var(--wa-line); padding: .8rem; text-align: start; vertical-align: top; }
.wa-table th { background: var(--wa-tint); color: var(--wa-heading); }

/* FAQ and decision helpers: native <details>/<summary>, no JavaScript */
.wa-faq details, .wa-decision details { border: 1px solid var(--wa-line); border-radius: 14px; background: var(--wa-surface); margin: .7rem 0; }
.wa-faq summary, .wa-decision summary { cursor: pointer; font-weight: 800; padding: 1rem 1.1rem; color: var(--wa-heading); border-radius: 14px; }
.wa-faq summary:hover, .wa-decision summary:hover { background: var(--wa-tint); }
.wa-faq details > div, .wa-decision details > div { padding: 0 1.1rem 1rem; }
.wa-faq details > div > :last-child, .wa-decision details > div > :last-child { margin-bottom: 0; }

/* Related articles */
.wa-related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.wa-related a { display: block; border: 1px solid var(--wa-line); border-radius: 13px; padding: 1rem; text-decoration: none; font-weight: 750; background: var(--wa-surface); color: var(--wa-primary); }
.wa-related a:hover { background: var(--wa-tint); border-color: #AFC4FA; text-decoration: underline; }

/* Plans, sources, author box */
.wa-plan-zone { margin: 1.7rem 0; }
.wa-plan-zone .plan { max-width: 380px; }
.wa-source-note { font-size: .92rem; color: var(--wa-muted); border-top: 1px solid var(--wa-line); padding-top: .8rem; margin-top: 1.2rem; }
.wa-author { background: #FAFBFE; border: 1px solid var(--wa-line); border-radius: 14px; padding: 1rem 1.15rem; margin-top: 1.5rem; }
.wa-author strong { color: var(--wa-heading); }
.wa-author > :last-child { margin-bottom: 0; }

/* 0.8.1: offers in articles (Content Center → הצעות והמרות). Rendered on the server, inside the
   article, clearly marked as an offer and kept apart from the text. */
.wing-offer { --wo-line: #C9D7FA; position: relative; border: 1px solid var(--wo-line); border-radius: 18px; background: var(--wa-surface); margin: 2rem 0; padding: 1.15rem 1.25rem; color: var(--wa-text); }
.wing-offer__label { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .01em; color: var(--wa-primary); background: var(--wa-tint); border-radius: 999px; padding: .15rem .65rem; margin: 0 0 .6rem; }
.wing-offer__title { font-size: 1.15rem; font-weight: 800; color: var(--wa-heading); line-height: 1.35; margin: 0 0 .35rem; }
.wing-offer__text { margin: 0 0 .6rem; }
.wing-offer__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: .8rem 0 0; }
.wing-offer__cta { text-decoration: none; }
.wing-offer .wing-offer__cta, .wing-offer .wing-offer__cta:visited { color: #fff; }
.wing-offer__link { font-weight: 700; color: var(--wa-primary); }
.wing-offer__price { margin: .4rem 0 0; color: var(--wa-heading); }
.wing-offer__amount { font-size: 1.45rem; font-weight: 800; }
.wing-offer__from, .wing-offer__price-name { font-weight: 700; font-size: .95rem; }
.wing-offer__period { font-weight: 600; }
.wing-offer__price-note, .wing-offer__quote { font-size: .88rem; color: var(--wa-muted); margin: .1rem 0 .5rem; }
.wing-offer__quote { font-weight: 700; }
.wing-offer__benefits { list-style: none; padding: 0; margin: .5rem 0 0; }
.wing-offer__benefits li { position: relative; padding-inline-start: 1.5rem; margin: .25rem 0; }
.wing-offer__benefits li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--wa-ok); font-weight: 900; }
/* A — a short recommendation between sections */
.wing-offer--inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1.25rem; border-inline-start: 5px solid var(--wa-primary); background: #FAFCFF; padding: .95rem 1.15rem; }
.wing-offer--inline .wing-offer__label { grid-column: 1 / -1; justify-self: start; }
.wing-offer--inline .wing-offer__title { font-size: 1.02rem; }
.wing-offer--inline .wing-offer__text { margin: 0; font-size: .95rem; }
.wing-offer--inline .wing-offer__actions { margin: 0; }
/* B — the main block around the middle */
.wing-offer--main { background: linear-gradient(135deg, #F7F9FF, #EEF3FF); padding: 1.35rem 1.4rem; }
.wing-offer__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: .9rem; }
.wing-offer__card { display: flex; flex-direction: column; border: 1px solid var(--wo-line); border-radius: 16px; background: var(--wa-surface); padding: 1rem 1.1rem; }
.wing-offer__card.is-featured { border-color: var(--wa-border); box-shadow: 0 8px 22px rgba(18, 87, 238, .08); }
.wing-offer__card .wing-offer__actions { margin-top: auto; padding-top: .8rem; }
.wing-offer__kind { font-size: .78rem; font-weight: 800; color: var(--wa-muted); margin: 0 0 .2rem; }
.wing-offer__card-title { font-size: 1.08rem; font-weight: 800; color: var(--wa-heading); margin: 0 0 .25rem; }
/* C — the end of the article */
.wing-offer--end { background: var(--wa-tint); border-color: #B8C9F7; padding: 1.35rem 1.4rem; }
.wing-offer__icon { display: block; }
.wing-offer--main > .wing-offer__icon, .wing-offer--end > .wing-offer__icon { position: absolute; inset-inline-end: 1.2rem; top: 1.1rem; }
.wing-offer--main > .wing-offer__body, .wing-offer--end > .wing-offer__body { padding-inline-end: 3.2rem; }
.wing-offer__card .wing-offer__icon { margin-bottom: .45rem; }
.wing-offer a:focus-visible { outline: 3px solid var(--wa-primary); outline-offset: 3px; }
.wing-offer .wing-offer__cta:focus-visible { outline-color: var(--wa-heading); }
html.a11y-contrast .wing-offer, html.a11y-contrast .wing-offer__card { --wo-line: #4D4D4D; background: #fff; border-color: #4D4D4D; }

/* Writing package v2 blocks (also used by ~50 earlier articles): notes, source line, related list,
   and the end call to action with real buttons — WhatsApp green, the rest outlined in the brand blue. */
.wa-note { border: 1px solid var(--wa-line); border-inline-start: 5px solid var(--wa-primary); border-radius: 14px; padding: 1rem 1.2rem; margin: 1.4rem 0; background: var(--wa-tint); }
.wa-note-warning { border-inline-start-color: #B45309; background: #FFF8EC; }
.wa-note strong:first-child { color: var(--wa-heading); }
.wa-note > :last-child { margin-bottom: 0; }
.wa-source { font-size: .92rem; color: var(--wa-muted); border-top: 1px solid var(--wa-line); padding-top: .9rem; margin: 1.6rem 0 0; }
section.wa-related { display: block; margin: 2rem 0 1rem; }
section.wa-related > ul { list-style: none; padding: 0; margin: .7rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
section.wa-related > ul > li { margin: 0; }
section.wa-related > ul > li:not(:has(a)) { border: 1px solid var(--wa-line); border-radius: 13px; padding: 1rem; font-weight: 750; color: var(--wa-heading); background: var(--wa-surface); }
.wing-article-body a[href^="https://wa.me"]:not(.wa-button) { color: var(--wa, #15803D); font-weight: 750; }
.wa-cta { background: linear-gradient(135deg, #F4F7FF 0%, #E6EEFD 100%); border: 1px solid #E0E8FB; border-radius: 20px; padding: clamp(1.25rem, 3vw, 1.75rem); margin: 2.2rem 0 1rem; }
.wa-cta h2 { margin-top: 0; margin-bottom: .4rem; }
.wa-cta > p:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: 1rem 0 0; }
.wa-cta > p:last-child > a:not(.wa-button) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.wa-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.25rem; border-radius: 10px; border: 1.5px solid var(--wa-primary); background: #fff; color: var(--wa-primary); font-weight: 750; line-height: 1.25; text-decoration: none; text-align: center; }
.wa-button:hover { background: var(--wa-tint); color: var(--wa-primary-hover); text-decoration: none; }
.wa-cta .wa-button:first-of-type { background: var(--wa-primary); color: #fff; box-shadow: 0 6px 16px rgba(18, 87, 238, .22); }
.wa-cta .wa-button:first-of-type:hover { background: var(--wa-primary-hover); border-color: var(--wa-primary-hover); color: #fff; }
.wing-article-body .wa-button[href^="https://wa.me"] { background: var(--wa, #15803D); border-color: var(--wa, #15803D); color: #fff; box-shadow: 0 6px 16px rgba(21, 128, 61, .22); }
.wing-article-body .wa-button[href^="https://wa.me"]:hover { background: var(--wa-hover, #166534); border-color: var(--wa-hover, #166534); color: #fff; }
html.a11y-contrast .wa-cta, html.a11y-contrast .wa-note { background: #fff; border-color: #4D4D4D; }
@media (max-width: 560px) {
  .wa-cta .wa-button { flex: 1 1 100%; }
  section.wa-related > ul { grid-template-columns: 1fr; }
}

/* Focus: the theme's visible ring on every interactive element in the article */
.wing-article-body a:focus-visible, .wing-article-body summary:focus-visible { outline: 3px solid var(--wa-primary); outline-offset: 3px; border-radius: 6px; }

/* The accessibility menu's high-contrast mode: stronger borders, no tinted gradients */
html.a11y-contrast .wing-article-body { --wa-line: #4D4D4D; --wa-ok: #04502F; }
html.a11y-contrast .wa-lead, html.a11y-contrast .wa-callout--ok, html.a11y-contrast .wa-author { background: #fff; }
html.a11y-contrast .wa-card--accent, html.a11y-contrast .wa-related a:hover { border-color: #4D4D4D; }

@media (max-width: 760px) {
  .wa-toc ul { columns: 1; }
  .wa-grid, .wa-related { grid-template-columns: 1fr; }
  .wing-offer { padding: 1rem; }
  .wing-offer--main > .wing-offer__icon, .wing-offer--end > .wing-offer__icon { display: none; }
  .wing-offer--main > .wing-offer__body, .wing-offer--end > .wing-offer__body { padding-inline-end: 0; }
  .wing-offer--inline { grid-template-columns: 1fr; }
  .wing-offer--inline .wing-offer__actions { margin-top: .7rem; }
  .wing-offer__actions .btn { width: 100%; }
  .wa-table { min-width: 560px; }
  .wa-steps > li { padding-inline: 3.4rem .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wing-article-body * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .wa-toc, .wa-plan-zone, .wing-offer { display: none; }
  .wa-faq details > div, .wa-decision details > div { display: block; }
}
