/*
 * Module site_pages — shared public header, footer, content pages, FAQ, WhatsApp button.
 * Prefix `sp-`. Tokens only (assets/css/ds/tokens.css): light/dark and the brand colour come
 * from there. Mobile first, RTL (logical properties). Loaded only where the shell renders.
 */

/* The header, mega menu, search overlay, drawer and footer moved to the core sheet assets/css/ds/public.css
   (prefix pub-; the sp-* classes stay on the markup as hooks). This sheet keeps the content page, the FAQ and
   the WhatsApp button. */
.sp-main :focus-visible, .sp-wa:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* footer organisation block (kept markup) */
.sp-social { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.sp-social a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); }
.sp-social a:hover { border-color: var(--brand); color: var(--brand); }
.sp-company { font-size: var(--fs-sm); color: var(--text-2); }
.sp-co-name { margin: 0 0 var(--sp-2); color: var(--text); font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.sp-co-list { margin: 0; display: grid; gap: 6px; }
.sp-co-line { display: flex; flex-wrap: wrap; gap: 2px var(--sp-2); line-height: 1.7; }
.sp-co-line dt { color: var(--text-3); }
.sp-co-line dt::after { content: ":"; }
.sp-co-line dd { margin: 0; color: var(--text-2); }
.sp-co-line a { color: var(--text-2); text-decoration: none; }
.sp-co-line a:hover { color: var(--brand); }
.sp-pay { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.sp-pay li { display: grid; place-items: center; height: 36px; padding: 4px 8px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sp-pay img { display: block; height: 24px; width: auto; max-width: 72px; object-fit: contain; }

/* ── WhatsApp button ─────────────────────────────────────────────────────────── */
.sp-wa { position: fixed; inset-inline-end: var(--sp-4); bottom: var(--sp-4); z-index: 70;
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 48px; padding: 0 var(--sp-4) 0 var(--sp-3);
  border-radius: var(--radius-pill); background: var(--ok); color: #fff; text-decoration: none;
  font-family: var(--font); font-weight: var(--fw-semibold); font-size: var(--fs-md); box-shadow: var(--shadow); }
.sp-wa:hover { filter: brightness(1.08); }
.sp-wa svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .sp-wa { color: #0d1726; }
@media (max-width: 520px) { .sp-wa-label { display: none; } .sp-wa { padding: 0; width: 52px; justify-content: center; } }
@media print { .sp-wa { display: none !important; } }

/* ── Content page ────────────────────────────────────────────────────────────── */
body.sp-content-page { background: var(--bg); }
.sp-main { display: block; padding-block: clamp(24px, 5vw, 48px) clamp(32px, 6vw, 64px); font-family: var(--font); color: var(--text); }
.sp-article { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: var(--sp-4); box-sizing: border-box; }
.sp-article-head { margin-bottom: var(--sp-6); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.sp-article-head h1 { margin: 0; font-size: clamp(1.5rem, 4vw, var(--fs-2xl)); line-height: 1.35; color: var(--text); font-weight: var(--fw-bold); }
.sp-article-meta { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--text-3); }
.sp-prose { font-size: 1rem; line-height: 1.95; color: var(--text); overflow-wrap: anywhere; }
.sp-prose > * { margin-block: 0 1em; }
.sp-prose h2, .sp-prose h3, .sp-prose h4 { margin-block: 1.6em .6em; line-height: 1.4; color: var(--text); font-weight: var(--fw-bold); }
.sp-prose h2 { font-size: var(--fs-xl); }
.sp-prose h3 { font-size: var(--fs-lg); }
.sp-prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.sp-prose ul, .sp-prose ol { padding-inline-start: 1.4em; }
.sp-prose li { margin-block: .3em; }
.sp-prose blockquote { margin-inline: 0; padding: var(--sp-3) var(--sp-4); border-inline-start: 3px solid var(--brand);
  background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text-2); }
.sp-prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.sp-prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); display: block; overflow-x: auto; }
.sp-prose th, .sp-prose td { padding: 8px 10px; border: 1px solid var(--border); text-align: start; }
.sp-prose th { background: var(--surface-2); }
.sp-prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2em; }
.sp-prose code { padding: 1px 6px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9em; }

/* ── FAQ accordion (<details>, no script) ────────────────────────────────────── */
.sp-faq { display: grid; gap: var(--sp-2); margin-block: 0 1em; }
.sp-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sp-faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); font-weight: var(--fw-semibold); color: var(--text); line-height: 1.6; }
.sp-faq-item > summary::-webkit-details-marker { display: none; }
.sp-faq-item > summary::after { content: "+"; flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-2); font-weight: var(--fw-bold); }
.sp-faq-item[open] > summary::after { content: "−"; background: var(--brand-soft); color: var(--brand); }
.sp-faq-item[open] > summary { border-bottom: 1px solid var(--border); }
.sp-faq-a { padding: var(--sp-3) var(--sp-4); color: var(--text-2); line-height: 1.9; }
.sp-faq-a > :last-child { margin-bottom: 0; }
