/* Service Plus — 3D Catalog Prototype · وضع فاتح فقط · RTL
   الألوان مؤقتة (لم يُعتمد دليل هوية في المشروع) — غيّرها من المتغيّرات التالية. */
:root {
  color-scheme: light;
  --brand: #2057d6;
  --brand-600: #1a47b0;
  --brand-50: #eef3fd;
  --brand-100: #dbe6fb;
  --accent: #0e9f8e;
  --ink: #16202e;
  --ink-2: #3d4a5c;
  --muted: #6a7686;
  --line: #e5e9ef;
  --line-2: #d6dce5;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --warn-bg: #fff6e0;
  --warn-ink: #7a5a00;
  --ok-bg: #e6f6f3;
  --ok-ink: #0a6b5e;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --sh-1: 0 1px 2px rgba(22, 32, 46, .05), 0 2px 8px rgba(22, 32, 46, .04);
  --sh-2: 0 10px 30px rgba(22, 32, 46, .09), 0 2px 6px rgba(22, 32, 46, .04);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.wrap { width: min(1280px, 100% - 40px); margin-inline: auto; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 10px; }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.big { width: 40px; height: 40px; }

/* ───────── الترويسة ───────── */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 40px; width: auto; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; letter-spacing: -.02em; direction: ltr; }
.brand-mark b { color: #9fe3d9; font-weight: 800; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-ar { font-weight: 800; font-size: 17px; }
.brand-en { font-size: 10.5px; letter-spacing: .16em; color: var(--muted); font-weight: 600; direction: ltr; text-align: start; }
.nav { display: flex; gap: 6px; margin-inline-start: 8px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 15px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--brand-50); color: var(--brand); }
.header-cta { margin-inline-start: auto; }

/* ───────── أزرار ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 12px 20px; font-weight: 700; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(32, 87, 214, .25); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); }
.btn-primary:disabled { background: #b9c4dc; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }

/* ───────── المقدمة ───────── */
.intro { padding: 22px 0 16px; display: grid; gap: 12px; justify-items: start; }
.badge-demo { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f0dca0; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.intro h1 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.intro .accent { color: var(--brand); }
.lead { color: var(--ink-2); font-size: clamp(16px, 1.4vw, 18.5px); max-width: 80ch; }

/* ───────── التجربة الرئيسية ───────── */
.explore { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 20px; align-items: start; padding-bottom: 28px; }
.stage-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.stage { position: relative; height: clamp(440px, 66vh, 680px); background:
    radial-gradient(120% 90% at 50% 8%, #ffffff 0%, #f2f6fc 62%, #e9eff8 100%); touch-action: none; overflow: hidden; }
.pin-layer { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }

.room-pin { position: absolute; top: 0; left: 0; pointer-events: auto; background: rgba(255, 255, 255, .94); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); box-shadow: 0 2px 8px rgba(22, 32, 46, .12); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; will-change: transform; }
.room-pin:hover, .room-pin.hover { border-color: var(--brand); color: var(--brand); }
.room-pin.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(32, 87, 214, .35); }
.pin-sub { font-weight: 600; font-size: 11.5px; opacity: .75; }
.pin-sub:empty { display: none; }
.pin-sub { background: rgba(32,87,214,.1); color: var(--brand); border-radius: 999px; padding: 0 7px; opacity: 1; }
.room-pin.active .pin-sub { background: rgba(255,255,255,.22); color: #fff; }

.stage-top { position: absolute; inset: 14px 14px auto 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; z-index: 3; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.crumb { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; box-shadow: var(--sh-1); }
.crumb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); transition: background .2s; }
.crumb.on .crumb-dot { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }

.hint { position: absolute; inset-inline-start: 16px; bottom: 14px; display: inline-flex; gap: 8px; align-items: center; z-index: 3; font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, .88); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; pointer-events: none; transition: opacity .4s; }
.hint.gone { opacity: 0; }
.hint .ico { width: 16px; height: 16px; color: var(--brand); }

.tools { position: absolute; inset-inline-end: 14px; bottom: 14px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.tool { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .95); color: var(--ink-2); display: grid; place-items: center; box-shadow: var(--sh-1); transition: border-color .2s, color .2s, background .2s; }
.tool:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }

.loading, .fallback { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; background: inherit; color: var(--ink-2); }
.loading { background: radial-gradient(120% 90% at 50% 8%, #fff 0%, #f2f6fc 62%, #e9eff8 100%); transition: opacity .4s; }
.loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--brand-100); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fallback { background: #f6f8fb; max-width: none; }
.fallback h2 { font-size: 20px; color: var(--ink); }
.fallback p { max-width: 46ch; }
.fallback .ico { color: var(--muted); }
.fb-sub { color: var(--muted); font-size: 14px; }

.chips-wrap { border-top: 1px solid var(--line); padding: 12px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; color: var(--ink-2); transition: all .2s; }
.chip .ico { width: 17px; height: 17px; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(32, 87, 214, .25); }
.chip .n { font-size: 12px; opacity: .7; font-weight: 600; }

/* ───────── لوحة الخدمات ───────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 20px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.panel-head { display: flex; gap: 12px; align-items: flex-start; }
.panel-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.panel-icon .ico { width: 24px; height: 24px; }
.panel h2 { font-size: 20px; line-height: 1.3; font-weight: 800; }
.panel-desc { color: var(--ink-2); font-size: 14.5px; }
.panel-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.panel-list { display: flex; flex-direction: column; gap: 10px; }
.panel-empty { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 22px 16px; text-align: center; color: var(--muted); font-size: 14.5px; }
.panel-empty .ico { width: 30px; height: 30px; color: var(--brand); margin-bottom: 6px; }
.panel-foot { margin-top: auto; }
.panel-foot .btn { width: 100%; }
.panel-intro-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.panel-intro-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.panel-intro-list .ico { color: var(--brand); margin-top: 3px; width: 18px; height: 18px; }

.svc { text-align: start; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.svc:hover { border-color: var(--brand); box-shadow: var(--sh-2); transform: translateY(-1px); }
.svc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.svc-ico.c-cleaning, .svc-ico.c-specialized { background: var(--ok-bg); color: var(--ok-ink); }
.svc-ico.c-recurring { background: #f1edfb; color: #5b3fb3; }
.svc-body { display: grid; gap: 4px; min-width: 0; }
.svc-name { font-weight: 800; font-size: 15.5px; line-height: 1.35; }
.svc-short { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.svc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.svc-link { margin-inline-start: auto; color: var(--brand); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 2px; }
.svc-link .ico { width: 16px; height: 16px; }

.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; line-height: 1.7; }
.tag-core { background: var(--ok-bg); color: var(--ok-ink); }
.tag-study { background: var(--warn-bg); color: var(--warn-ink); }
.tag-cat { background: #eef1f5; color: var(--ink-2); }
.price { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.price small { font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); border-radius: 6px; padding: 0 6px; margin-inline-start: 4px; }

/* ───────── الكتالوج ───────── */
.catalog { padding: 40px 0 20px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2, .about h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; line-height: 1.3; }
.section-head p { margin-top: 4px; max-width: 58ch; }
.search { position: relative; width: min(380px, 100%); display: block; }
.search .ico { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; border: 1px solid var(--line-2); border-radius: 14px; padding: 11px 16px; padding-inline-start: 44px; background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.result-count { color: var(--muted); font-size: 14px; margin-bottom: 14px; min-height: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }

/* ───────── عن النموذج ───────── */
.about { padding: 44px 0 56px; }
.about h2 { margin-bottom: 18px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-1); }
.about-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.about-card p { color: var(--ink-2); font-size: 14.5px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 18px 0; font-size: 14px; color: var(--ink-2); }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ───────── نافذة التفاصيل ───────── */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(22, 32, 46, .42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
.modal { position: relative; width: min(600px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 24px 70px rgba(22, 32, 46, .25); padding: 26px; display: grid; gap: 16px; animation: rise .28s var(--ease); outline: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-close { position: absolute; inset-inline-start: 14px; top: 14px; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); }
.modal-close:hover { border-color: var(--brand); color: var(--brand); }
.m-head { display: flex; gap: 14px; align-items: center; padding-inline-start: 44px; }
.m-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.m-icon .ico { width: 28px; height: 28px; }
.m-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.modal h2 { font-size: 23px; line-height: 1.3; font-weight: 800; }
.m-desc { color: var(--ink-2); }
.m-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.m-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.m-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 11px; flex: none; }
.m-block h3 { font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.m-areas { display: flex; flex-wrap: wrap; gap: 8px; }
.m-areas .chip { padding: 5px 12px; font-size: 13.5px; }
.m-price { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-price strong { font-size: 20px; font-weight: 800; }
.m-price small { color: var(--muted); font-size: 13px; }
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.m-note { font-size: 12.5px; color: var(--muted); }
.noscript { padding: 16px; background: var(--warn-bg); color: var(--warn-ink); text-align: center; }

/* ───────── استجابة ───────── */
@media (max-width: 1080px) {
  .explore { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .nav { display: none; }
  .header-cta { margin-inline-start: auto; }
}
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
  .wrap { width: calc(100% - 32px); }
  .header-in { height: 60px; gap: 10px; }
  .brand-en { display: none; }
  .intro { padding-top: 22px; }
  .stage { height: clamp(360px, 56vh, 520px); }
  .hint span { display: none; }
  .hint { padding: 5px 8px; }
  .room-pin { padding: 3px 9px; font-size: 12px; }
  .pin-sub { display: none; }
  .crumb { font-size: 13px; padding: 5px 11px; }
  .panel { padding: 16px; }
  .modal { padding: 20px; }
  .m-actions .btn { flex: 1; }
  .header-cta { padding: 7px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
