/* ==========================================================================
   أُسرة — نظام التصميم
   مشتق حرفياً من هوية التطبيق (أيقونة App Store):
     الفحمي  #3A1630   ·  الذهبي  #CB4991   ·  الأرضية  #FFFAFC
   ========================================================================== */

:root {
  /* --- ألوان الهوية --- */
  --ink:        #3A1630;   /* بنفسجي العلامة */
  --ink-soft:   #5B4A55;
  --ink-mute:   #8C7B86;
  --gold:       #CB4991;   /* وردي العلامة */
  --gold-deep:  #962F68;
  --gold-soft:  #E58BBB;
  --gold-wash:  #FCEFF6;

  --sand:       #FFFAFC;   /* أرضية الأيقونة */
  --surface:    #FFFFFF;
  --line:       rgba(58, 22, 48, .10);
  --line-soft:  rgba(58, 22, 48, .06);

  /* --- مقاييس --- */
  --radius:     18px;
  --radius-sm:  12px;
  --radius-pill: 999px;
  --shell:      1180px;
  --gutter:     20px;

  --shadow-sm:  0 1px 2px rgba(58,22,48,.05), 0 2px 8px rgba(58,22,48,.04);
  --shadow-md:  0 2px 4px rgba(58,22,48,.04), 0 14px 38px rgba(58,22,48,.08);
  --shadow-lg:  0 8px 20px rgba(58,22,48,.08), 0 36px 80px rgba(58,22,48,.14);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ==========================================================================
   أساسيات
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Almarai", "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--ink);
}

p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s var(--ease);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold); color: #fff; }

/* اللغة الإنجليزية تنقلب للـLTR */
html[lang="en"] body { font-family: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif; }

/* ==========================================================================
   تخطيط
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 116px); }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section--tight { padding-block: clamp(48px, 6vw, 76px); }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--gold);
  margin-bottom: 14px;
}
/* المعيّن الذهبي — مأخوذ من الأيقونة */
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.section-title { font-size: clamp(27px, 3.6vw, 42px); }

.section-sub {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.85;
}

/* ==========================================================================
   أزرار
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--ink   { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn--ink:hover { background: #1F1F20; box-shadow: var(--shadow-md); }

.btn--gold  { background: var(--gold); color: #fff; box-shadow: var(--shadow-sm); }
.btn--gold:hover { background: var(--gold-deep); box-shadow: var(--shadow-md); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: #fff; }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--gold-wash); }

/* زرّا المتجرين */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.store-btn:hover { transform: translateY(-2px); background: #1F1F20; box-shadow: var(--shadow-md); }
.store-btn svg { width: 25px; height: 25px; flex: none; fill: currentColor; }
.store-btn b { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; }
.store-btn span { display: block; font-size: 11.5px; opacity: .72; line-height: 1.3; }

.store-btn--alt { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.store-btn--alt:hover { background: #fff; border-color: var(--ink); }

/* على الخلفية الداكنة */
.on-dark .store-btn { background: #fff; color: var(--ink); border-color: #fff; }
.on-dark .store-btn:hover { background: var(--gold-wash); }
.on-dark .store-btn--alt { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.on-dark .store-btn--alt:hover { background: rgba(255,255,255,.08); border-color: #fff; }

/* ==========================================================================
   الهيدر
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 250, 251, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line); background: rgba(248, 250, 251, .94); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 74px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand img { height: 30px; width: auto; }
.brand__name {
  font-family: "Almarai", sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--gold);
  padding-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* مبدّل اللغة — رابط لكل لغة مفعّلة، يُبنى من الخادم */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
}
.lang-opt {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mute);
  line-height: 1.6;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-opt:hover { color: var(--ink); background: var(--sand); }
.lang-opt.on { background: var(--ink); color: #fff; }

.burger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.burger svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; }

/* قائمة الجوال */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--sand);
  padding: 10px var(--gutter) 22px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 13px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a:hover { color: var(--ink); }
.mobile-nav .btn { width: 100%; margin-top: 18px; }

/* ==========================================================================
   الهيرو
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 92px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}

/* هالة ذهبية خفيفة خلف الهيرو */
.hero::before {
  content: "";
  position: absolute;
  inset-block-start: -220px;
  inset-inline-start: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(203,73,145,.09) 0%, rgba(203,73,145,0) 68%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero h1 .gold { color: var(--gold); }

.hero__lead {
  margin-top: 20px;
  max-width: 50ch;
  font-size: clamp(16px, 1.7vw, 18.5px);
  line-height: 1.9;
  color: var(--ink-soft);
}

.hero .store-row { margin-top: 32px; }

.hero__note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 9px;
}
.hero__note::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--gold-soft);
  transform: rotate(45deg);
  flex: none;
}

/* --- ماكيت الجوال (CSS خالص، بلا صور ثقيلة) --- */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
}
.phone-stage::before {
  content: "";
  position: absolute;
  inset-block: 8%;
  inset-inline: 12%;
  background: radial-gradient(ellipse at center, rgba(58,22,48,.14) 0%, rgba(58,22,48,0) 70%);
  filter: blur(26px);
}

.phone {
  position: relative;
  width: min(292px, 76vw);
  aspect-ratio: 292 / 596;
  background: var(--ink);
  border-radius: 44px;
  padding: 9px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255,255,255,.14);
}

.phone__screen {
  position: relative;
  height: 100%;
  background: #fff;
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone__notch {
  position: absolute;
  top: 9px; left: 50%;
  transform: translateX(-50%);
  width: 86px; height: 23px;
  background: var(--ink);
  border-radius: var(--radius-pill);
  z-index: 3;
}

.phone__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
}

.phone__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.phone__top strong { font-size: 13px; font-weight: 700; }
.phone__top span { font-size: 11px; color: var(--gold); font-weight: 600; }

.phone__body { padding: 15px 14px; flex: 1; overflow: hidden; }
.phone__label { font-size: 11px; font-weight: 700; color: var(--ink-soft); margin-bottom: 11px; }

.phone__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.phone__card {
  background: var(--sand);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 11px 10px;
}
.phone__card i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--gold-wash);
  margin-bottom: 8px;
}
.phone__card i svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 1.7; }
.phone__card b { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.4; }
.phone__card small { display: block; font-size: 8.5px; color: var(--ink-mute); line-height: 1.55; margin-top: 3px; }

.phone__cta {
  margin-top: 12px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  text-align: center;
  padding: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================================================
   شريط التخصصات السريع
   ========================================================================== */

.strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-block: 22px;
}
.strip__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
  margin-inline-end: 6px;
}
.chip {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--sand);
}

/* ==========================================================================
   الخطوات
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step { position: relative; padding-top: 26px; }

/* الخط الفاصل العلوي + الرقم */
.step::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--line);
}
.step::after {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 34px; height: 2px;
  background: var(--gold);
}

.step__num {
  font-family: "Almarai", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .1em;
}
.step h3 { margin-top: 10px; font-size: 18px; }
.step p { margin-top: 9px; font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); }

/* ==========================================================================
   البطاقات — الخدمات / المميزات
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(203,73,145,.3);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--gold-wash);
  margin-bottom: 18px;
}
.card__icon svg {
  width: 22px; height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { font-size: 18.5px; }
.card p { margin-top: 10px; font-size: 14.5px; line-height: 1.85; color: var(--ink-soft); }

/* بطاقات التخصصات — أهدأ */
.card--quiet { padding: 24px 22px; }
.card--quiet h3 { font-size: 16.5px; }
.card--quiet p  { font-size: 13.5px; }

/* قائمة المميزات */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px 34px;
}
.feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.feature__tick {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold-wash);
  display: flex; align-items: center; justify-content: center;
  margin-top: 3px;
}
.feature__tick svg { width: 13px; height: 13px; stroke: var(--gold); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.feature b { display: block; font-size: 15.5px; font-weight: 600; }
.feature p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.75; margin-top: 2px; }

/* ==========================================================================
   قسم داكن — للمحامين + الدعوة النهائية
   ========================================================================== */

.on-dark {
  background: var(--ink);
  color: #fff;
}
.on-dark h2, .on-dark h3 { color: #fff; }
.on-dark .section-sub, .on-dark p { color: rgba(255,255,255,.72); }
.on-dark .eyebrow { color: var(--gold-soft); }
.on-dark .eyebrow::before { background: var(--gold-soft); }

.band {
  position: relative;
  overflow: hidden;
}
/* معيّنات ذهبية باهتة — زخرفة الهوية */
.band::before {
  content: "";
  position: absolute;
  inset-block-start: -90px;
  inset-inline-end: -90px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(185,154,88,.22) 0%, rgba(185,154,88,0) 70%);
  pointer-events: none;
}

.band__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

.cta-final { text-align: center; }
.cta-final .store-row { justify-content: center; margin-top: 30px; }
.cta-final__mark { height: 46px; width: auto; margin-inline: auto; margin-bottom: 24px; opacity: .95; }

/* ==========================================================================
   الفوتر
   ========================================================================== */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 64px) 26px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.footer__about p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 34ch;
}

.footer__col h4 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink);
  margin-bottom: 15px;
}
.footer__col a, .footer__col li {
  display: block;
  padding-block: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer__col a:hover { color: var(--gold); }

.social { display: flex; gap: 9px; margin-top: 16px; }
.social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.social a:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--ink-mute);
}

/* ==========================================================================
   ظهور تدريجي عند التمرير
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .store-btn:hover, .social a:hover { transform: none; }
}

/* ==========================================================================
   الاستجابة
   ========================================================================== */

@media (max-width: 1024px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 22px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .band__grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .nav { display: none; }
  .lang-opt { padding: 5px 10px; font-size: 12px; }
  .burger { display: inline-flex; }
  .header__actions { margin-inline-start: auto; }
  .header__actions .btn { display: none; }

  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero .store-row, .hero__note { justify-content: center; }
  .section-head { margin-inline: auto; text-align: center; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .store-row { flex-direction: column; }
  .store-btn { justify-content: flex-start; }
  .header__inner { height: 64px; }
  .brand img { height: 26px; }
}

/* ==========================================================================
   شريط الحساب في الترويسة (عميل / محامٍ) + صورة العرض
   ========================================================================== */
[hidden] { display: none !important; }
.me { position: relative; }
.me > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 5px 5px 5px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--surface); transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.me > summary::-webkit-details-marker { display: none; }
.me > summary:hover, .me[open] > summary { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.me__txt { line-height: 1.35; text-align: start; }
.me__txt b { display: block; font-size: 13px; font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__txt span { display: block; font-size: 11px; color: var(--ink-mute); }
.me__chev { width: 14px; height: 14px; stroke: var(--ink-mute); fill: none; stroke-width: 2; transition: transform .18s; }
.me[open] .me__chev { transform: rotate(180deg); }
.av { width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; display: inline-flex;
  align-items: center; justify-content: center; background: var(--gold-wash); color: var(--gold-deep);
  font-family: var(--font-display, inherit); font-weight: 800; font-size: 13px; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av--lg { width: 96px; height: 96px; font-size: 30px; }
.me__menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: 8px; }
.me__head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.me__head b { display: block; font-size: 14px; }
.me__head span { display: block; font-size: 12px; color: var(--ink-mute); direction: ltr; text-align: end; word-break: break-all; }
.me__menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--ink-soft); }
.me__menu a:hover { background: var(--sand); color: var(--ink); }
.me__menu a svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.me__menu a.out { color: #9A2B2B; margin-top: 4px; border-top: 1px solid var(--line-soft); border-radius: 0 0 10px 10px; }
@media (max-width: 760px) {
  .me__txt { display: none; }
  .me > summary { padding: 4px; gap: 4px; }
  .me__menu { position: fixed; inset-inline: 12px; top: 68px; min-width: 0; }
}

/* ==========================================================================
   الشريط السفلي (بأسلوب تيك توك) — في كل الشاشات
   ========================================================================== */
body.has-tabbar { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 640px; margin-inline: auto; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 641px) { .tabbar { bottom: 12px; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md);
  padding-bottom: 6px; inset-inline: 12px; } body.has-tabbar { padding-bottom: 96px; } }
.tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px;
  border-radius: 14px; color: var(--ink-mute); font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center;
  transition: color .18s var(--ease), background .18s var(--ease); -webkit-tap-highlight-color: transparent; }
.tabbar__item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar__item:hover { color: var(--ink); }
.tabbar__item.on { color: var(--ink); }
.tabbar__item.on svg { stroke: var(--gold); stroke-width: 2.1; }
.tabbar__item.on span { color: var(--ink); }
.tabbar--dark { background: rgba(10,10,11,.92); border-color: rgba(255,255,255,.08); }
.tabbar--dark .tabbar__item { color: rgba(255,255,255,.6); }
.tabbar--dark .tabbar__item.on, .tabbar--dark .tabbar__item.on span { color: #fff; }
/* الصفحات ذات الشريط: روابط الترويسة العلوية يغني عنها الشريط */
body.tabbar-slim .header .nav { display: none; }

/* يوميات المحامي (بوابة المحامي) */
.up-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 0 0 14px; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.dy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dy-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.dy-card__media { position: relative; display: block; aspect-ratio: 9 / 14; background: #111; }
.dy-card__media video, .dy-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dy-card__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 26px; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.dy-card__body { padding: 10px; display: grid; gap: 6px; font-size: 12.5px; }
.dy-card__body p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.dy-card__body small { color: var(--ink-mute); }
/* الملف الشخصي */
.prof { text-align: center; padding-block: 8px 4px; }
.prof .av--lg { margin-inline: auto; }
.prof h1 { font-size: 22px; margin-top: 12px; }
.prof__stats { display: flex; justify-content: center; gap: 28px; margin: 16px 0 6px; }
.prof__stats b { display: block; font-family: var(--font-display); font-size: 19px; }
.prof__stats span { font-size: 12.5px; color: var(--ink-mute); }
.prof-links { display: grid; gap: 0; }
.prof-links a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); font-size: 15px; color: var(--ink); }
.prof-links a:last-child { border-bottom: 0; }
.prof-links a svg { width: 20px; height: 20px; stroke: var(--gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.prof-links a::after { content: "‹"; margin-inline-start: auto; color: var(--ink-mute); font-size: 18px; }
[dir="ltr"] .prof-links a::after { content: "›"; }
.prof-links a.out { color: #9A2B2B; }
.prof-links a.out svg { stroke: #9A2B2B; }

/* «اكتشف» — بحث وتصفّح */
.srch { position: relative; margin-bottom: 14px; }
.srch svg { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px;
  stroke: var(--ink-mute); fill: none; stroke-width: 2; stroke-linecap: round; }
.srch input { width: 100%; padding: 14px 18px; padding-inline-start: 46px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font: inherit; font-size: 15px; color: var(--ink); }
.srch input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sec-h { font-size: 17px; margin: 6px 0 12px; }
.sec-h small { font-weight: 500; color: var(--ink-mute); font-size: 13px; }
.lw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.lw-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 12px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: transform .18s var(--ease), box-shadow .18s; }
.lw-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.lw-card b { font-size: 14.5px; line-height: 1.4; }
.lw-card small { color: var(--ink-mute); font-size: 12.5px; }
.lw-card__meta { font-size: 12px; color: var(--ink-mute); }
.vok { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #20D5EC; color: #fff;
  font-size: 10.5px; vertical-align: 2px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-bottom: 20px; }
.thumb { position: relative; aspect-ratio: 9 / 14; background: #111; overflow: hidden; display: block; }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.thumb__v { position: absolute; inset-inline-start: 6px; bottom: 6px; color: #fff; font-size: 12px; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.thumb--add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--gold-wash);
  border: 2px dashed var(--gold-soft); color: var(--gold-deep); }
.thumb--add span { font-size: 40px; line-height: 1; font-weight: 300; }
.thumb--add small { font-size: 12.5px; font-weight: 700; }

/* زرّ «+» للمحامين في الشريط السفلي */
.tabbar--5 { grid-template-columns: repeat(5, 1fr); }
.tabbar__add { display: flex; align-items: center; justify-content: center; }
.tabbar__add i { display: grid; place-items: center; width: 50px; height: 34px; border-radius: 11px; font-style: normal;
  background: var(--ink); color: #fff; font-size: 24px; font-weight: 400; line-height: 1;
  box-shadow: -4px 0 0 #20D5EC, 4px 0 0 #FE2C55; transition: transform .15s; }
.tabbar__add:active i { transform: scale(.92); }
.tabbar--dark .tabbar__add i { background: #fff; color: #111; }

/* النجوم */
.stars-in { border: 0; padding: 0; margin: 14px 0 0; display: inline-flex; flex-direction: row-reverse; gap: 6px; }
.stars-in input { position: absolute; opacity: 0; pointer-events: none; }
.stars-in label { font-size: 42px; line-height: 1; color: var(--line); cursor: pointer; transition: transform .12s, color .12s; -webkit-text-stroke: 1px var(--ink-mute); color: transparent; }
.stars-in label:hover, .stars-in label:hover ~ label, .stars-in input:checked ~ label { color: #FFC83D; -webkit-text-stroke: 0; }
.stars-in label:active { transform: scale(.9); }
.stars-in input:focus-visible + label { outline: 2px solid var(--gold); border-radius: 6px; }
.rate { color: #FFC83D; letter-spacing: 1px; }
.rate-n { font-size: 12.5px; color: var(--ink-mute); }
.rv { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.rv:first-child { border-top: 0; }
.rv__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; }
.rv__head b { font-weight: 700; }
.rv p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); white-space: pre-line; }
.rv small { color: var(--ink-mute); font-size: 12px; }

/* ==========================================================================
   الشاشة الافتتاحية + الانتقال بين الصفحات
   ========================================================================== */
@view-transition { navigation: auto; }                       /* انتقال سلس بين الصفحات (كروم/سفاري الحديث) */
::view-transition-old(root) { animation: vtOut .22s ease both; }
::view-transition-new(root) { animation: vtIn .32s ease both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); } }
@keyframes vtIn  { from { opacity: 0; transform: translateY(8px); } }
.tabbar { view-transition-name: tabbar; }                    /* الشريط السفلي ثابت لا يومض */

.splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse 70% 45% at 50% 42%, rgba(203,73,145,.28), transparent 70%), #000;
  transition: opacity .55s ease, visibility .55s ease; }
.splash::before { content: ""; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent, rgba(185,154,88,.10), transparent 30%);
  animation: spSpin 6s linear infinite; }
.splash__in { position: relative; text-align: center; }
.splash__logo { width: 138px; height: auto; display: block; margin: 0 auto; animation: spRise .9s cubic-bezier(.2,.8,.2,1) both;
  filter: drop-shadow(0 8px 30px rgba(185,154,88,.35)); }
.splash__word { display: block; margin-top: 16px; color: #E58BBB; font: 800 12px/1 "Almarai", system-ui, sans-serif; letter-spacing: .5em;
  text-indent: .5em; animation: spFade .9s .25s ease both; }
.splash__bar { width: 120px; height: 2px; margin: 22px auto 0; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden;
  animation: spFade .6s .35s ease both; }
.splash__bar i { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #D9B861, transparent); animation: spLoad 1.1s ease-in-out infinite; }
.splash-out .splash { opacity: 0; visibility: hidden; }
.splash-off .splash { display: none; }
@keyframes spRise { from { opacity: 0; transform: translateY(14px) scale(.92); filter: blur(6px); } to { opacity: 1; transform: none; } }
@keyframes spFade { from { opacity: 0; } }
@keyframes spLoad { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
[dir="rtl"] .splash__bar i { animation-direction: reverse; }
@keyframes spSpin { to { transform: rotate(360deg); } }
.splash { animation: spSafety 0s 4s forwards; }               /* إن تعطّل السكربت تختفي وحدها */
@keyframes spSafety { to { opacity: 0; visibility: hidden; } }

/* شريط التقدّم أثناء الانتقال */
.navbar-progress { position: fixed; top: 0; inset-inline: 0; z-index: 999; height: 3px; pointer-events: none; opacity: 0; }
.navbar-progress::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 0;
  background: linear-gradient(90deg, #CB4991, #F49BC9); box-shadow: 0 0 12px rgba(244,155,201,.6); }
.is-leaving .navbar-progress { opacity: 1; }
.is-leaving .navbar-progress::before { animation: npGo 2.4s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes npGo { 0% { width: 0; } 40% { width: 62%; } 100% { width: 92%; } }
.is-leaving main, .is-leaving .feed { opacity: .55; transition: opacity .25s ease; }

/* خلفية الصفحات الداكنة: توهّج ذهبي خفيف بدل الأسود المسطّح */
html[data-theme="dark"] body.has-tabbar:not(.discover) { background:
  radial-gradient(ellipse 90% 40% at 50% -6%, rgba(203,73,145,.16), transparent 70%) no-repeat, #000; background-attachment: fixed; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .splash, .splash::before, .splash__logo, .splash__bar i { animation: none !important; }
}

/* الإشعارات */
.nt-list { padding: 6px 0; }
.nt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.nt:last-child { border-bottom: 0; }
.nt:hover { background: rgba(255,255,255,.03); }
.nt--new { background: var(--gold-wash); }
.nt__ic { font-size: 20px; line-height: 1.4; flex: none; }
.nt__tx { font-size: 14.5px; line-height: 1.7; }
.nt__tx small { display: block; font-size: 12px; color: var(--ink-mute); }
.tabbar__item { position: relative; }
.tabbar__badge { position: absolute; top: 2px; inset-inline-end: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #FE2C55; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; }

/* زرّ المتابعة بلون تيك توك */
.btn--follow { background: #FE2C55; color: #fff; box-shadow: 0 6px 18px rgba(254,44,85,.28); }
.btn--follow:hover { background: #E81E47; }
.fl-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.fl-list a:last-child { border-bottom: 0; }
.fl-list .av { width: 42px; height: 42px; font-size: 14px; }
.fl-list small { display: block; color: var(--ink-mute); font-size: 12.5px; }

/* ---------- الترويج المدفوع (promote.php) ---------- */
.pr-goals { display: grid; gap: 10px; }
.pr-goal { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.pr-goal:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.pr-goal input { margin-top: 4px; accent-color: var(--gold); }
.pr-goal span { display: grid; gap: 2px; }
.pr-goal small { color: var(--ink-mute); font-size: 12.5px; }
.pr-est { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 8px; }
.pr-est > div { padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 10%, transparent); text-align: center; }
.pr-est small { display: block; color: var(--ink-mute); font-size: 12.5px; }
.pr-est b { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.pr-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.8; margin-top: 12px; }
.pr-consent input { margin-top: 5px; accent-color: var(--gold); flex: none; }
.pr-camp { padding: 14px 0; border-top: 1px solid var(--line); }
.pr-camp:first-of-type { border-top: 0; }
.pr-camp__top { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.pr-camp__top small { color: var(--ink-mute); margin-inline-start: auto; }
.pr-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink-mute) 22%, transparent); overflow: hidden; margin: 10px 0 8px; }
.pr-bar i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.pr-camp__stats { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }

/* ---------- المكافآت والدعوات (rewards.php) ---------- */
.rw-bal { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 16%, transparent), transparent); }
.rw-bal small { color: var(--ink-mute); }
.rw-bal > b { display: block; font-family: var(--font-display); font-size: 40px; font-weight: 800; line-height: 1.2; }
.rw-bal > b span { font-size: 16px; font-weight: 600; color: var(--ink-mute); }
.rw-week { display: flex; gap: 10px; }
.rw-week span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 2px dashed var(--line); color: var(--ink-mute); }
.rw-week span.on { background: var(--gold); border: 0; color: #fff; }
.rw-week span.wait { border-style: solid; border-color: var(--gold); color: var(--gold); }
.rw-link { display: flex; gap: 8px; margin-top: 12px; }
.rw-link input { flex: 1; min-width: 0; font-size: 13px; }
.rw-inv { display: flex; gap: 18px; margin-top: 12px; font-size: 14px; color: var(--ink-mute); }
.rw-inv b { color: var(--ink); margin-inline-start: 4px; }
.rw-hist { list-style: none; margin: 0; padding: 0; }
.rw-hist li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rw-hist li:first-child { border-top: 0; }
.rw-hist li span { display: grid; }
.rw-hist small { color: var(--ink-mute); font-size: 12px; }
.rw-hist .plus { color: #1C7A4D; } .rw-hist .minus { color: #9A2B2B; }
html[data-theme="dark"] .rw-hist .plus { color: #6EE7A8; } html[data-theme="dark"] .rw-hist .minus { color: #FF8A8A; }

/* فيديو شرح التطبيق داخل ماكيت الجوال */
.phone__screen--video{ background:#FFFAFC; }
.phone__screen--video video{ width:100%; height:100%; object-fit:cover; display:block; }
.phone__snd{ position:absolute; z-index:4; left:50%; top:11px; transform:translateX(-50%); display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px; border-radius:999px; border:0; cursor:pointer; background:rgba(58,22,48,.9); color:#fff; font:600 10.5px/1 inherit;
  box-shadow:0 8px 20px -8px rgba(0,0,0,.5); transition:opacity .3s, background .2s; white-space:nowrap; }
.phone__snd:hover{ background:var(--gold); }
.phone__snd svg{ width:15px; height:15px; }
.phone__snd .on{ display:none; } .phone__snd[aria-pressed="true"] .on{ display:inline; } .phone__snd[aria-pressed="true"] .off{ display:none; }
.phone__snd[aria-pressed="true"]{ opacity:.55; } .phone__snd[aria-pressed="true"]:hover{ opacity:1; }
@media (prefers-reduced-motion:reduce){ .phone__screen--video video{ } }
