/* ============================================================
   رحلتي — صفحة تحميل التطبيق
   نظام الألوان مبني بالكامل على اللون الأساسي القادم من قاعدة البيانات
   (primary / primary-dark / primary-bright تُحقن من index.php)
   خلفية بيضاء نظيفة + طبقات زجاجية (Glassmorphism) ملوّنة بهوية التطبيق
   ============================================================ */

:root {
  /* هذه القيم افتراضية فقط لمعاينة الملف بمعزل عن القاعدة — يتم استبدالها من index.php */
  --primary: #9E000E;
  --primary-rgb: 158, 0, 14;
  --primary-dark: #5C0008;
  --primary-bright: #B5060F;
  --primary-soft-rgb: 231, 189, 190;

  --bg: #ffffff;
  --bg-soft: #FBF7F7;
  --surface: #ffffff;
  --surface-2: #FBF3F3;
  --border: rgba(20, 8, 9, 0.09);
  --border-soft: rgba(20, 8, 9, 0.06);

  --text: #180E0F;
  --muted: #6E5B5C;
  --muted-2: #9C8A8B;

  /* ---- طبقة الزجاج ---- */
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-bg-strong: rgba(255, 255, 255, .74);
  --glass-border: rgba(255, 255, 255, .65);
  --glass-tint-border: rgba(var(--primary-rgb), .16);
  --glass-blur: 22px;
  --glass-shadow: 0 20px 46px -22px rgba(var(--primary-rgb), .35), 0 2px 10px rgba(24, 14, 15, .04);

  --font-display: 'Tajawal', 'Segoe UI', sans-serif;
  --font-body: 'Tajawal', 'Segoe UI', sans-serif;

  --shadow-sm: 0 2px 10px rgba(24, 14, 15, .05);
  --shadow-md: 0 16px 40px -18px rgba(24, 14, 15, .18);
  --shadow-primary: 0 16px 34px -12px rgba(var(--primary-rgb), .42);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
section { position: relative; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

/* ---------- خلفية عامة هادئة مبنية على لون الهوية ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(46% 36% at 86% -4%, rgba(var(--primary-rgb), .09), transparent 62%),
    radial-gradient(38% 30% at 4% 6%, rgba(var(--primary-rgb), .06), transparent 65%),
    radial-gradient(30% 24% at 50% 100%, rgba(var(--primary-rgb), .05), transparent 70%),
    var(--bg);
}

/* حبيبات ضوئية خفيفة جدًا تمنح عمق للخلفية البيضاء */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .5;
  pointer-events: none;
  background-image: radial-gradient(rgba(var(--primary-rgb), .05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 55% at 50% 0%, #000, transparent);
}

/* ============================================================
   مكوّنات زجاجية قابلة لإعادة الاستخدام
   ============================================================ */
.glass-panel,
.glass-chip {
  background: var(--glass-bg);
  border: 1px solid var(--glass-tint-border);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--glass-shadow);
}

.glass-chip { border-radius: var(--radius-pill); }
.glass-panel { border-radius: var(--radius-lg); }

/* بقع ضوئية زجاجية عائمة تُستخدم كخلفية للأقسام */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- شريط علوي ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid var(--glass-tint-border);
}
.nav::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), .5), transparent);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .2px;
}
.nav-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border), 0 4px 10px -4px rgba(var(--primary-rgb), .35);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(150deg, var(--primary-bright), var(--primary-dark));
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .9rem;
  box-shadow: 0 8px 18px -8px rgba(var(--primary-rgb), .55);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.nav-cta .icon { width: .95em; height: .95em; }
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -8px rgba(var(--primary-rgb), .65);
}

/* ---------- الهيرو ---------- */
.hero {
  padding: 92px 0 64px;
  text-align: center;
  overflow: hidden;
}

.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-aurora .blob-1 {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .28), transparent 70%);
  animation: drift-a 14s ease-in-out infinite;
}
.hero-aurora .blob-2 {
  width: 320px;
  height: 320px;
  top: 60px;
  left: -140px;
  background: radial-gradient(circle, rgba(var(--primary-soft-rgb), .35), transparent 72%);
  animation: drift-b 16s ease-in-out infinite;
}
.hero-grid {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 60%;
  background-image:
    linear-gradient(rgba(var(--primary-rgb), .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent 75%);
  transform: perspective(500px) rotateX(55deg);
  transform-origin: top;
  opacity: .5;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-24px, 20px) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -16px) scale(1.06); }
}

.hero .container { position: relative; z-index: 1; }

.hero-glow {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 28px;
}
.hero-glow::before {
  content: '';
  position: absolute;
  inset: -42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .24), transparent 72%);
  filter: blur(4px);
  animation: pulse-glow 3.4s ease-in-out infinite;
}
.hero-logo {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 32px;
  object-fit: cover;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--border),
    var(--shadow-md);
  animation: float-y 5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--muted);
  padding: 8px 18px 8px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.eyebrow.glass-chip { background: var(--glass-bg-strong); }
.eyebrow .icon { color: var(--primary); width: 1.05em; height: 1.05em; }
.eyebrow b { color: var(--primary); font-weight: 800; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  letter-spacing: -.5px;
  margin-bottom: 18px;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  max-width: 620px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(150deg, var(--primary-bright), var(--primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 16px 34px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-primary);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-primary .icon { width: 1.1em; height: 1.1em; }
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -10px rgba(var(--primary-rgb), .55);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; right: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg);
  animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine {
  0%   { right: -60%; }
  35%  { right: 130%; }
  100% { right: 130%; }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-tint-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--text);
  font-weight: 700;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.btn-ghost .icon { color: var(--primary); }
.btn-ghost:hover {
  border-color: rgba(var(--primary-rgb), .45);
  background: var(--glass-bg-strong);
  transform: translateY(-2px);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  row-gap: 10px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: .86rem;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hero-meta .icon { color: var(--primary); width: 1.05em; height: 1.05em; }

/* ---------- شريط التقييمات في الهيرو ---------- */
.ratings-strip {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px 12px 22px;
  border-radius: var(--radius-pill);
  margin: 0 auto 22px;
  font-size: .9rem;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: center;
}
.ratings-score-block {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ratings-score {
  font-weight: 800;
  color: var(--text);
  font-size: 1.15rem;
  font-family: var(--font-display);
}
.ratings-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--primary);
}
.ratings-stars .icon { width: 15px; height: 15px; }
.ratings-divider {
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
}
.ratings-count {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ratings-count .icon { color: var(--primary); width: 1em; height: 1em; }

/* ---------- سكشن عام ---------- */
.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 46px;
  position: relative;
  z-index: 1;
}
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin-bottom: 12px;
}
.section-head p { color: var(--muted); }

.screens {
  padding: 44px 0 96px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* ---------- لقطات الشاشة ---------- */
.screens-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 30px 6px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.screens-track::-webkit-scrollbar { height: 6px; }
.screens-track::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb), .4); border-radius: 10px; }

.phone {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 220px;
  border-radius: 30px;
  padding: 10px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-tint-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.js .phone {
  opacity: 0;
  transform: translateY(28px) scale(.96);
}
.js .phone.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.js .phone:nth-child(odd)  { transform: translateY(38px) rotate(-2.5deg) scale(.96); }
.js .phone:nth-child(even) { transform: translateY(10px) rotate(2.5deg) scale(.96); }
.js .phone.is-visible:nth-child(odd)  { transform: translateY(14px) rotate(-2.5deg); }
.js .phone.is-visible:nth-child(even) { transform: translateY(0) rotate(2.5deg); }

.phone:hover {
  transform: translateY(-10px) rotate(0deg) scale(1.04) !important;
  box-shadow: 0 30px 54px -18px rgba(var(--primary-rgb), .38);
  z-index: 3;
}

.phone-screen {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 22px;
  overflow: hidden;
  background: #14090a;
  position: relative;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* لمعة زجاجية عابرة على شاشة الهاتف */
.phone-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 48%, transparent 60%);
  transform: translateX(-100%);
  pointer-events: none;
}
.phone:hover .phone-shine {
  transform: translateX(100%);
  transition: transform 1.1s var(--ease);
}

/* ---------- شريط تحميل لاصق (موبايل) ---------- */
.sticky-cta {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  transition: transform .4s var(--ease);
}
.sticky-cta.show { transform: translateX(-50%) translateY(0); }
.sticky-cta img { width: 34px; height: 34px; border-radius: 9px; }
.sticky-cta .btn-primary { padding: 10px 20px; font-size: .86rem; }

/* ---------- قسم آراء المستخدمين ---------- */
.testimonials {
  padding: 96px 0;
  overflow: hidden;
}
.testimonials .blob-3 {
  width: 460px;
  height: 460px;
  bottom: -220px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(var(--primary-rgb), .1), transparent 72%);
}
.testi-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

/* بطاقة احترافية: خط علوي بلون الهوية + سطح زجاجي ثابت وواضح + تسلسل بصري مرتب */
.testi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--glass-bg-strong);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-radius: var(--radius-md);
  padding: 30px 30px 26px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.testi-card::before {
  /* شريط علوي بتدرّج لون الهوية */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-bright), var(--primary), var(--primary-dark));
}
.testi-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 56px -22px rgba(var(--primary-rgb), .42);
  border-color: rgba(var(--primary-rgb), .28);
}

.testi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.testi-quote {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .1);
  flex: 0 0 auto;
}
.testi-quote .icon { width: 19px; height: 19px; }

.testi-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 12px;
  white-space: nowrap;
}
.testi-source .icon { width: 13px; height: 13px; color: var(--primary); }

.testi-stars {
  display: inline-flex;
  gap: 3px;
  color: var(--primary);
  margin-bottom: 16px;
}
.testi-stars .icon { width: 16px; height: 16px; }

.testi-text {
  color: var(--text);
  font-size: .98rem;
  line-height: 1.9;
  margin-bottom: 24px;
  flex: 1;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}
.testi-author > div { flex: 1; min-width: 0; }
.testi-author strong {
  display: block;
  font-size: .92rem;
}
.testi-author span {
  color: var(--muted-2);
  font-size: .8rem;
}
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--primary-bright), var(--primary-dark));
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
  color: #fff;
  font-weight: 800;
  font-family: var(--font-display);
  flex: 0 0 auto;
}
.testi-author .testi-score {
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), .1);
  border: 1px solid rgba(var(--primary-rgb), .18);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
}

@media (max-width: 860px) {
  .testi-grid { grid-template-columns: 1fr; }
}

/* ---------- فوتر ---------- */
.footer {
  padding: 56px 0 96px;
  text-align: center;
  color: var(--muted-2);
  font-size: .85rem;
  border-top: 1px solid var(--border-soft);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
  font-size: 1.05rem;
}
.footer-brand img { border-radius: 8px; }

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px;
  flex-wrap: wrap;
}
.footer-social a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease-spring), background .25s var(--ease), box-shadow .25s var(--ease);
}
.footer-social a .icon { width: 17px; height: 17px; }
.footer-social a:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(150deg, var(--primary-bright), var(--primary-dark));
  box-shadow: 0 10px 20px -8px rgba(var(--primary-rgb), .55);
  transform: translateY(-3px) scale(1.06);
}

.footer-complaint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .84rem;
  padding: 10px 20px;
  margin-bottom: 22px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.footer-complaint .icon { width: 15px; height: 15px; color: var(--primary); }
.footer-complaint:hover {
  color: var(--primary-dark);
  border-color: rgba(var(--primary-rgb), .3);
}

.footer-meta { margin: 4px 0; }

@media (max-width: 720px) {
  .hero { padding: 64px 0 48px; }
  .nav-inner { padding: 12px 18px; }
  .phone { width: 190px; }
  .footer { padding-bottom: 110px; }
  .testi-grid { gap: 16px; }
  .ratings-strip { padding: 10px 18px; gap: 12px; }
}

@media (min-width: 721px) {
  .sticky-cta { display: none; }
}

/* ---------- ظهور تدريجي عند التمرير (يعمل فقط إذا كان الجافاسكربت مفعّلاً) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* رقم مختلط (إنجليزي) داخل نص عربي RTL بدون انعكاس */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* وضوح التركيز للوحة المفاتيح */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}