/* Service pages (website/partials/service_detail_content.html): what → benefits → tips → warranty, WhatsApp after
   each part. Dark by default like the site; html[data-theme="light"] is the site's light mode. */
.sp-hero, .sp-main, .sp-sticky {
  --sp-bg: #07090d; --sp-panel: #10141b; --sp-panel-2: #151a23; --sp-line: rgba(255,255,255,.09);
  --sp-ink: #f4f5f7; --sp-muted: rgba(244,245,247,.66); --sp-red: #e30613; --sp-red-soft: rgba(227,6,19,.12);
  --sp-wa: #1fa855; --sp-wa-hover: #17914a; --sp-wa-soft: rgba(31,168,85,.12); --sp-gold: #f2b24b;
}
html[data-theme="light"] .sp-hero, html[data-theme="light"] .sp-main, html[data-theme="light"] .sp-sticky {
  --sp-bg: #f5f6f8; --sp-panel: #ffffff; --sp-panel-2: #f8f9fb; --sp-line: rgba(10,14,20,.10);
  --sp-ink: #12161d; --sp-muted: rgba(18,22,29,.66); --sp-red-soft: rgba(227,6,19,.08); --sp-wa-soft: rgba(31,168,85,.10);
}
.sp-wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.sp-hero, .sp-main { font-family: Tajawal, "Segoe UI", Tahoma, sans-serif; color: var(--sp-ink); }

/* hero */
.sp-hero { position: relative; overflow: hidden; padding: 132px 0 56px;
  background: radial-gradient(ellipse at 85% 10%, rgba(227,6,19,.22), transparent 45%), radial-gradient(ellipse at 0% 100%, rgba(31,168,85,.10), transparent 40%), var(--sp-bg); }
.sp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--sp-muted); margin-bottom: 26px; }
.sp-crumbs a { color: inherit; text-decoration: none; }
.sp-crumbs a:hover { color: var(--sp-ink); }
.sp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.sp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--sp-red);
  background: var(--sp-red-soft); padding: 6px 12px; border-radius: 999px; }
.sp-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.25; margin: 16px 0 12px; font-weight: 900; text-wrap: balance; }
.sp-hook { font-size: clamp(18px, 2.3vw, 22px); line-height: 1.7; color: var(--sp-ink); opacity: .9; margin: 0 0 24px; max-width: 34em; font-weight: 500; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sp-small { font-size: 13px; color: var(--sp-muted); margin: 12px 0 0; }
.sp-small i { color: var(--sp-gold); }

.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border-radius: 14px; font-weight: 800; font-size: 16px; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.sp-btn:hover { transform: translateY(-1px); }
.sp-btn:focus-visible, .sp-steps a:focus-visible, .sp-inline-wa:focus-visible { outline: 3px solid var(--sp-gold); outline-offset: 3px; }
.sp-wa { background: var(--sp-wa); color: #fff; box-shadow: 0 10px 28px rgba(31,168,85,.28); }
.sp-wa:hover { background: var(--sp-wa-hover); color: #fff; }
.sp-wa i { font-size: 21px; }
.sp-ghost { border: 1px solid var(--sp-line); color: var(--sp-ink); background: var(--sp-panel); }
.sp-big { min-height: 58px; font-size: 17px; padding: 0 28px; }

.sp-steps { list-style: none; margin: 0; padding: 18px; display: grid; gap: 10px; background: var(--sp-panel); border: 1px solid var(--sp-line); border-radius: 22px; }
.sp-steps a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; color: var(--sp-ink); text-decoration: none; font-weight: 700; }
.sp-steps a:hover { background: var(--sp-panel-2); }
.sp-steps b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sp-red-soft); color: var(--sp-red); font-size: 15px; flex: none; }

/* sections */
.sp-main { padding: 26px 0 120px; background: var(--sp-bg); width: auto; }
.sp-main > * { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.sp-block { padding: 34px 0; border-bottom: 1px solid var(--sp-line); scroll-margin-top: 96px; }
.sp-block header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sp-num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--sp-red); color: #fff; font-size: 18px; flex: none; }
.sp-block h2 { font-size: clamp(22px, 3vw, 30px); margin: 0; font-weight: 900; }
.sp-lead { font-size: 17.5px; line-height: 2; color: var(--sp-ink); opacity: .92; max-width: 46em; margin: 0 0 12px; }
.sp-note { font-size: 14.5px; color: var(--sp-muted); }
.sp-inline-wa { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--sp-wa); font-weight: 800; text-decoration: none; }
.sp-inline-wa:hover { text-decoration: underline; }
.sp-inline-wa i { font-size: 20px; }

.sp-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.sp-benefit { display: flex; gap: 12px; padding: 16px; background: var(--sp-panel); border: 1px solid var(--sp-line); border-radius: 16px; min-width: 0; }
.sp-benefit > i { color: var(--sp-wa); font-size: 20px; margin-top: 4px; flex: none; }
.sp-benefit h3 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.6; }
.sp-benefit p { margin: 4px 0 0; color: var(--sp-muted); font-size: 15px; line-height: 1.8; }

.sp-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px;
  padding: 18px 20px; border-radius: 18px; background: var(--sp-wa-soft); border: 1px solid rgba(31,168,85,.35); }
.sp-band strong { display: block; font-size: 18px; }
.sp-band span { color: var(--sp-muted); font-size: 15px; }

.sp-tips { list-style: none; counter-reset: tip; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 52em; }
.sp-tips li { counter-increment: tip; position: relative; padding: 14px 58px 14px 16px; background: var(--sp-panel); border: 1px solid var(--sp-line);
  border-radius: 14px; font-size: 16px; line-height: 1.8; }
.sp-tips li::before { content: counter(tip); position: absolute; right: 14px; top: 13px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; background: var(--sp-panel-2); border: 1px solid var(--sp-line); font-weight: 800; font-size: 14px; color: var(--sp-gold); }

.sp-warranty { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sp-w { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 18px; background: var(--sp-panel); border: 1px solid var(--sp-line); position: relative; overflow: hidden; }
.sp-w::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--sp-red), var(--sp-gold)); }
.sp-w-label { color: var(--sp-muted); font-weight: 700; font-size: 14.5px; }
.sp-w-dur { font-size: 30px; font-weight: 900; line-height: 1.3; }
.sp-w-note { color: var(--sp-muted); font-size: 14px; line-height: 1.7; }
.sp-w-points { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.sp-w-points li { display: flex; gap: 10px; align-items: baseline; font-size: 15.5px; line-height: 1.8; }
.sp-w-points i { color: var(--sp-red); width: 18px; flex: none; }
.sp-w-points a { color: inherit; font-weight: 800; }

/* closing ask */
.sp-final { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 40px !important;
  padding: 28px; border-radius: 26px; background: linear-gradient(135deg, var(--sp-panel), var(--sp-panel-2)); border: 1px solid var(--sp-line); scroll-margin-top: 96px; }
.sp-final h2 { font-size: clamp(24px, 3.2vw, 34px); margin: 0 0 10px; font-weight: 900; line-height: 1.35; }
.sp-final-copy p { color: var(--sp-muted); font-size: 16.5px; line-height: 1.9; margin: 0 0 20px; }
.sp-form { display: grid; gap: 6px; }
.sp-form label { font-weight: 700; font-size: 14.5px; margin-top: 6px; }
.sp-form label small { font-weight: 400; color: var(--sp-muted); }
.sp-form input, .sp-form textarea { width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--sp-line);
  background: var(--sp-bg); color: var(--sp-ink); font: inherit; font-size: 16px; }
.sp-form input:focus, .sp-form textarea:focus { outline: none; border-color: var(--sp-wa); box-shadow: 0 0 0 3px var(--sp-wa-soft); }
.sp-submit { margin-top: 12px; width: 100%; }

.sp-guide { margin-top: 34px !important; border: 1px solid var(--sp-line); border-radius: 18px; background: var(--sp-panel); }
.sp-guide summary { cursor: pointer; padding: 18px 20px; font-weight: 800; font-size: 17px; list-style: none; display: flex; gap: 10px; align-items: center; }
.sp-guide summary::-webkit-details-marker { display: none; }
.sp-guide summary::after { content: "+"; margin-inline-start: auto; font-size: 22px; color: var(--sp-muted); }
.sp-guide[open] summary::after { content: "−"; }
.sp-guide-body { padding: 0 22px 22px; line-height: 2; font-size: 16px; }
.sp-guide-body h2 { font-size: 21px; margin: 22px 0 6px; }
.sp-guide-body h3 { font-size: 17px; margin: 14px 0 4px; }
.sp-guide-body p, .sp-guide-body li { color: var(--sp-ink); opacity: .9; }

/* phones: WhatsApp always one tap away */
.sp-sticky { display: none; }
@media (max-width: 860px) {
  .sp-hero { padding-top: 110px; }
  .sp-hero-grid, .sp-final { grid-template-columns: 1fr; }
  .sp-steps { grid-template-columns: 1fr 1fr; padding: 10px; }
  .sp-steps a { padding: 10px; gap: 10px; font-size: 14.5px; }
  .sp-final { padding: 20px; }
  .sp-sticky { display: block; position: fixed; z-index: 900; left: 0; right: 0; bottom: 0;
    padding: 10px max(12px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, var(--sp-bg) 35%); }
  .sp-sticky a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; border-radius: 15px;
    background: var(--sp-wa); color: #fff; font-family: Tajawal, sans-serif; font-weight: 800; font-size: 16px; text-decoration: none;
    box-shadow: 0 10px 28px rgba(31,168,85,.35); }
  .sp-sticky a i { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .sp-btn { transition: none; } .sp-btn:hover { transform: none; } }
@media (max-width: 860px) {
  /* the site's floating colours button and contact dock sit above the WhatsApp bar on these pages */
  body:has(.sp-sticky) .aui-pal,
  body:has(.sp-sticky) .atlas-mobile-contact-dock { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* the picture or clip of the service, where the contents used to be */
.sp-media { margin: 0; border-radius: 24px; overflow: hidden; border: 1px solid var(--sp-line); background: var(--sp-panel);
  aspect-ratio: 4 / 3; max-width: 100%; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.sp-media img, .sp-media video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* the contents stay beside the four parts while reading */
.sp-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 44px; align-items: start; }
.sp-content { min-width: 0; }
.sp-toc { position: sticky; top: 112px; padding: 14px; border-radius: 20px; background: var(--sp-panel); border: 1px solid var(--sp-line);
  display: grid; gap: 10px; margin-top: 34px; }
.sp-toc nav { display: grid; gap: 4px; }
.sp-toc nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--sp-muted);
  text-decoration: none; font-weight: 700; transition: background .15s ease, color .15s ease; }
.sp-toc nav a b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--sp-panel-2);
  border: 1px solid var(--sp-line); font-size: 14px; flex: none; transition: background .15s ease, color .15s ease; }
.sp-toc nav a:hover { color: var(--sp-ink); background: var(--sp-panel-2); }
.sp-toc nav a.on { color: var(--sp-ink); background: var(--sp-red-soft); }
.sp-toc nav a.on b { background: var(--sp-red); border-color: var(--sp-red); color: #fff; }
.sp-toc nav a:focus-visible, .sp-toc-wa:focus-visible { outline: 3px solid var(--sp-gold); outline-offset: 2px; }
.sp-toc-wa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; background: var(--sp-wa);
  color: #fff; font-weight: 800; text-decoration: none; }
.sp-toc-wa:hover { background: var(--sp-wa-hover); color: #fff; }
.sp-toc-wa i { font-size: 19px; }

@media (max-width: 860px) {
  .sp-media { aspect-ratio: 16 / 10; border-radius: 18px; }
  .sp-body { grid-template-columns: 1fr; gap: 0; }
  /* phones: a slim bar of the four parts under the site header */
  .sp-toc { top: 64px; z-index: 50; margin: 0 -16px; padding: 8px 16px; border-radius: 0; border-width: 0 0 1px; display: block;
    background: color-mix(in srgb, var(--sp-bg) 92%, transparent); backdrop-filter: blur(10px); }
  .sp-toc nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
  .sp-toc nav::-webkit-scrollbar { display: none; }
  .sp-toc nav a { flex: none; padding: 7px 12px 7px 10px; border-radius: 999px; border: 1px solid var(--sp-line); font-size: 14px; gap: 8px; }
  .sp-toc nav a b { width: 22px; height: 22px; font-size: 12px; border-radius: 7px; }
  .sp-toc-wa { display: none; }
  .sp-block { scroll-margin-top: 130px; }
}
@media (prefers-reduced-motion: reduce) { .sp-toc nav a, .sp-toc nav a b { transition: none; } .sp-toc nav { scroll-behavior: auto; } }
/* the site's mobile `overflow-x: hidden` on body makes body a scroll container and stops position: sticky;
   `clip` hides sideways overflow the same way without that (service pages only) */
body:has(.sp-toc) { overflow-x: clip !important; overflow-y: visible !important; }

/* «انضم كمركز معتمد» (centers/apply.py) */
.ca-steps { list-style: none; margin: 0; padding: 18px; display: grid; gap: 12px; background: var(--sp-panel); border: 1px solid var(--sp-line); border-radius: 22px; }
.ca-steps li { display: flex; gap: 12px; align-items: flex-start; }
.ca-steps b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--sp-red); color: #fff; flex: none; }
.ca-steps strong { display: block; font-size: 16px; }
.ca-steps span { display: block; color: var(--sp-muted); font-size: 14.5px; line-height: 1.7; }
.ca-form-wrap { grid-template-columns: minmax(0, 1fr) !important; }
.ca-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.ca-field { display: grid; gap: 6px; }
.ca-field.ca-wide { grid-column: 1 / -1; }
.ca-field label span { color: var(--sp-red); }
.ca-field select { width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--sp-line); background: var(--sp-bg); color: var(--sp-ink); font: inherit; font-size: 16px; }
.ca-field.ca-bad input, .ca-field.ca-bad select, .ca-field.ca-bad textarea { border-color: #f0475c; }
.ca-err { color: #f0475c; font-size: 13.5px; }
.ca-alert { padding: 12px 14px; border-radius: 12px; background: rgba(240,71,92,.12); border: 1px solid rgba(240,71,92,.4); margin-bottom: 8px; }
.ca-submit { background: var(--sp-red); box-shadow: 0 10px 28px rgba(227,6,19,.28); }
.ca-submit:hover { background: #c10510; }
@media (max-width: 700px) { .ca-grid { grid-template-columns: 1fr; } }
.ca-done { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 16px; background: var(--sp-wa-soft); border: 1px solid rgba(31,168,85,.4); }
.ca-done i { color: var(--sp-wa); font-size: 26px; margin-top: 2px; }
.ca-done strong { display: block; font-size: 19px; }
.ca-done span { color: var(--sp-muted); }
