@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');

/* فاتح افتراضياً — نص غامق على خلفية فاتحة */
:root {
  --bg: #f6f7fb;
  --bg-2: #eef0f8;
  --panel: #ffffff;
  --panel-2: #f4f5fa;
  --border: #e4e6f0;
  --text: #14141f;
  --muted: #66667a;
  --accent: #6d5ef8;
  --accent-2: #9b5cf6;
  --green: #16a34a;
  --green-bg: rgba(22,163,74,.12);
  --red: #dc2626;
  --red-bg: rgba(220,38,38,.1);
  --yellow: #b45309;
  --yellow-bg: rgba(180,83,9,.12);
  --shadow: 0 1px 2px rgba(20,20,40,.04), 0 8px 24px -12px rgba(20,20,40,.12);
  --shadow-lg: 0 20px 60px -20px rgba(20,20,40,.25);
  --radius: 16px;
  color-scheme: light;
}

/* داكن — نص أبيض على خلفية داكنة */
:root[data-theme="dark"] {
  --bg: #0a0a15;
  --bg-2: #0f0f1c;
  --panel: #15151f;
  --panel-2: #1c1c2b;
  --border: #2a2a3d;
  --text: #f5f4fb;
  --muted: #9895af;
  --accent: #8b6bff;
  --accent-2: #ff6bd6;
  --green: #22c55e;
  --green-bg: rgba(34,197,94,.16);
  --red: #f87171;
  --red-bg: rgba(248,113,113,.14);
  --yellow: #facc15;
  --yellow-bg: rgba(250,204,21,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 25px 80px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a15;
    --bg-2: #0f0f1c;
    --panel: #15151f;
    --panel-2: #1c1c2b;
    --border: #2a2a3d;
    --text: #f5f4fb;
    --muted: #9895af;
    --accent: #8b6bff;
    --accent-2: #ff6bd6;
    --green: #22c55e;
    --green-bg: rgba(34,197,94,.16);
    --red: #f87171;
    --red-bg: rgba(248,113,113,.14);
    --yellow: #facc15;
    --yellow-bg: rgba(250,204,21,.14);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 30px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 25px 80px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  min-height: 100%;
  transition: background-color .25s ease, color .25s ease;
}

/* لمين بيفضّل حركة أقل (إعدادات النظام) — نلغي كل الحركات والانتقالات */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── تخطيط عام ── */

.wrap { max-width: 1000px; margin: 0 auto; padding: 28px 20px 90px; }
.wrap.narrow { max-width: 460px; }

.topbar {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 900;
  font-size: 21px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  text-decoration: none;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.menu-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.menu-toggle-btn:hover, .menu-toggle-btn.open { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── القائمة المنسدلة (روابط التنقل) ── */
/* overlay منفصل عن تدفق الصفحة (position: absolute جوّا .topbar اللي sticky) —
   ما بيدفع محتوى الصفحة وما بيتحرك مع سكرول الخلفية. الخلفية (backdrop) بتغلق
   القائمة بالنقر عليها، وسكرول الصفحة يتقفل وقت ما تكون القائمة مفتوحة. */
.nav-menu {
  display: none;
  position: absolute;
  inset-inline: 0;
  top: 100%;
  flex-wrap: wrap;
  gap: 20px 28px;
  padding: 6px 20px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.nav-menu.open { display: flex; animation: fadeUp .25s cubic-bezier(.16,.8,.3,1) both; }

.nav-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 25;
}
.nav-menu-backdrop.open { display: block; }

body.nav-open { overflow: hidden; }

.nav-group { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.nav-group-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
  padding: 0 14px;
}
.nav-group a {
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.nav-group a:hover { background: var(--panel-2); text-decoration: none; }
.nav-group a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 800; }

.credits-badge {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.theme-toggle {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  transition: transform .2s ease, background-color .15s ease;
}
.theme-toggle:hover { background: var(--border); transform: scale(1.06); }

/* ── بطاقات ── */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .35s ease, border-color .35s ease;
}

h1 { font-size: 28px; margin: 0 0 8px; font-weight: 900; }
h2 { font-size: 19px; margin: 0 0 16px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }
p.muted, .muted { color: var(--muted); }

/* ── تبويبات ── */

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: var(--panel-2);
  border-radius: 12px;
  padding: 4px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 11px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  user-select: none;
  transition: background-color .15s ease, color .15s ease;
}
.tab.active { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; }

/* ── نماذج ── */

label { display: block; margin: 14px 0 6px; font-size: 14px; color: var(--muted); font-weight: 500; }

/* ── أيقونة توضيح (ⓘ) ── */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  cursor: pointer;
  vertical-align: middle;
  margin-inline-start: 6px;
  user-select: none;
}
.info-tip:hover, .info-tip:focus, .info-tip.open { background: var(--accent); border-color: var(--accent); color: #fff; outline: none; }
.info-tip-text {
  display: none;
  position: absolute;
  z-index: 30;
  inset-inline-start: 0;
  top: calc(100% + 8px);
  width: max-content;
  max-width: 280px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.25);
  white-space: normal;
  cursor: default;
}
.info-tip:hover .info-tip-text, .info-tip:focus .info-tip-text, .info-tip.open .info-tip-text { display: block; }
@media (max-width: 640px) {
  .info-tip-text { max-width: 220px; }
}

/* ── زر مساعد الصياغة بالذكاء الاصطناعي ── */
.ai-assist-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
}
.ai-assist-btn:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.ai-assist-btn:disabled { opacity: .6; cursor: default; }

input, textarea, select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 11px;
  padding: 12px 15px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
input[type="color"] { padding: 4px; height: 46px; cursor: pointer; }
input[type="file"] { padding: 10px 15px; }

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238a8a9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: left 15px center;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.repeat-row {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px 4px; margin-bottom: 12px; position: relative;
}
.repeat-row .remove-row {
  position: absolute; inset-inline-end: 10px; top: 10px; background: none; border: none;
  color: var(--red); font-weight: 800; cursor: pointer; font-size: 13px;
}

.btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  margin-top: 18px;
  transition: transform .12s ease, box-shadow .2s ease, opacity .15s ease;
  box-shadow: 0 6px 20px -8px var(--accent);
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.4) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .6s ease;
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -8px var(--accent); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
  box-shadow: none;
}
.btn.secondary:hover { background: var(--border); box-shadow: none; }
.btn.danger { background: linear-gradient(90deg, #ef4444, #dc2626); box-shadow: 0 6px 20px -8px #ef4444; }
.btn.small { padding: 7px 14px; font-size: 12px; margin-top: 0; width: auto; border-radius: 9px; }

.error-msg { color: var(--red); font-size: 14px; margin-top: 10px; min-height: 18px; }

/* ── تعليمات دفع CliQ ── */
.payment-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.payment-box h3 { margin: 0 0 14px; font-size: 16px; }
.payment-row { margin-bottom: 14px; }
.payment-row:last-of-type { margin-bottom: 0; }
.payment-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.payment-value-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.payment-value {
  font-weight: 800;
  font-size: 18px;
  font-family: 'Tajawal', monospace;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  letter-spacing: .5px;
}
.success-msg { color: var(--green); font-size: 14px; margin-top: 10px; min-height: 18px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── شبكة التوليدات ── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.gen-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.gen-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gen-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-2);
  display: block;
}
.gen-media.video { aspect-ratio: 16 / 9; }
.gen-body { padding: 12px 14px; }
.gen-prompt {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
  min-height: 34px;
}

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
}
.badge.pending, .badge.processing { background: var(--yellow-bg); color: var(--yellow); }
.badge.completed, .badge.active, .badge.open { background: var(--green-bg); color: var(--green); }
.badge.failed, .badge.suspended, .badge.closed { background: var(--red-bg); color: var(--red); }

/* ── جداول ── */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em; }
tr:last-child td { border-bottom: none; }

.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1; min-width: 160px; }
.inline-form .btn { width: auto; margin-top: 0; }

.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ── ستات كروت (حسابي) ── */

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; }
.stat-tile {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}
.stat-tile:hover { box-shadow: var(--shadow); }
.stat-tile .num { font-size: 28px; font-weight: 900; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile .label { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }

.meter { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; margin-top: 10px; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .4s ease; }

/* ── رسائل (تذاكر) ── */

.msg {
  max-width: 80%;
  margin-bottom: 12px;
  padding: 11px 15px;
  border-radius: 13px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.msg.staff { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: var(--accent); margin-left: auto; }
.msg .msg-meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.msg .msg-body { white-space: pre-wrap; word-break: break-word; }

/* ── صفحة الهبوط (تسويقية) ── */

.hero-section {
  text-align: center;
  padding: 130px 20px 110px;
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: -35% -20% auto -20%; height: 850px;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 52%),
    radial-gradient(circle at 80% 18%, color-mix(in srgb, var(--accent-2) 50%, transparent), transparent 52%),
    radial-gradient(circle at 50% 90%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 58%),
    radial-gradient(circle at 90% 80%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 55%);
  filter: blur(70px);
  pointer-events: none;
  animation: auroraDrift 14s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate(4%, 5%) scale(1.15) rotate(6deg); }
  100% { transform: translate(-4%, -2%) scale(1.06) rotate(-4deg); }
}
.hero-spotlight {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--text) 8%, transparent), transparent 70%);
}
.hero-content { position: relative; }
.hero-title {
  font-size: clamp(34px, 6.4vw, 64px);
  line-height: 1.18;
  margin: 0 0 18px;
  perspective: 600px;
}
.hero-title .hero-line { display: block; }
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(45deg);
  filter: blur(10px);
  animation: heroWordIn 1s cubic-bezier(.16,.8,.3,1) forwards;
  background: linear-gradient(90deg, var(--text) 20%, var(--accent) 45%, var(--accent-2) 60%, var(--text) 85%);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-word.shine { animation: heroWordIn 1s cubic-bezier(.16,.8,.3,1) forwards, heroShine 9s linear 1.2s infinite; }
@keyframes heroWordIn { to { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); } }
@keyframes heroShine { to { background-position: -250% center; } }
.hero-section p {
  font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 auto 34px; line-height: 1.6;
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.16,.8,.3,1) .55s forwards;
}
.hero-cta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.16,.8,.3,1) .7s forwards;
}
.hero-cta .btn { width: auto; }

/* ── أشكال عائمة بالخلفية (خلف كل الصفحة، ثابتة الموقع) ── */
.ambient-orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .22;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: ambientFloat 24s ease-in-out infinite alternate;
}
.ambient-orbs span:nth-child(1) { width: 32vw; height: 32vw; top: -6vw; inset-inline-start: -8vw; }
.ambient-orbs span:nth-child(2) {
  width: 26vw; height: 26vw; top: 40vh; inset-inline-end: -10vw;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation-duration: 28s; animation-delay: -8s;
}
.ambient-orbs span:nth-child(3) {
  width: 24vw; height: 24vw; bottom: -8vw; inset-inline-start: 30vw;
  animation-duration: 32s; animation-delay: -16s;
}
@keyframes ambientFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5vw, -6vh) scale(1.2); }
}

.features-marketing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  padding: 20px 0 60px;
}
.feature-marketing {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.feature-marketing:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.feature-marketing .icon { font-size: 30px; margin-bottom: 14px; }
.feature-marketing h3 { margin: 0 0 8px; }
.feature-marketing p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 18px; }
.price-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow);
}
.price-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.price-tile .amount { font-size: 34px; font-weight: 900; margin: 10px 0 4px; }
.price-tile .amount span { font-size: 15px; font-weight: 700; color: var(--muted); }

.steps-marketing { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 24px; text-align: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px;
  box-shadow: 0 8px 24px -8px var(--accent);
  transition: transform .4s cubic-bezier(.16,.8,.3,1);
}
.steps-marketing > div:hover .step-num { transform: scale(1.12) rotate(-6deg); }

footer.site-footer { padding: 48px 0 0; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding-bottom: 32px; text-align: start; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { margin: 0 0 2px; font-size: 14px; color: var(--text); }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 13.5px; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.footer-brand p { margin: 0; max-width: 340px; line-height: 1.7; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--border); text-align: start;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { max-width: none; margin: 0 auto; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ── حركة دخول بسيطة ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.card { animation: fadeUp .4s ease both; }

/* ── ظهور تدريجي عند السكرول (core.js بيراقب العناصر ويضيف .in-view لما تدخل الشاشة) ── */
.reveal {
  opacity: 0;
  transform: translateY(46px) scale(.92);
  filter: blur(6px);
  transition: opacity 1s cubic-bezier(.16,.8,.3,1), transform 1s cubic-bezier(.16,.8,.3,1), filter 1s cubic-bezier(.16,.8,.3,1);
}
.reveal.in-view { opacity: 1; transform: none; filter: blur(0); }

/* ── شريط تقدّم السكرول (أعلى الصفحة) ── */
.scroll-progress {
  position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 40;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: right center;
  transform: scaleX(0);
  transition: transform .1s linear;
}
html[dir="ltr"] .scroll-progress { transform-origin: left center; }

/* ── توهج يتبع المؤشر + ميلان خفيف عند المرور على البطاقات/البلاطات ── */
.feature-marketing, .price-tile, .stat-tile, .gen-card {
  position: relative;
  overflow: hidden;
  transition: transform .15s ease-out, box-shadow .4s ease, border-color .4s ease;
}
.feature-marketing::before, .price-tile::before, .stat-tile::before, .gen-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.feature-marketing:hover::before, .price-tile:hover::before, .stat-tile:hover::before, .gen-card:hover::before { opacity: 1; }

/* ── جولة تعريفية للمستخدم الجديد ── */
.tour-highlight {
  position: relative;
  z-index: 250;
  border-radius: 10px;
  box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgba(0,0,0,.55);
  transition: box-shadow .25s ease;
}
.tour-tooltip {
  position: fixed;
  z-index: 260;
  max-width: 300px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
  animation: fadeUp .25s ease both;
}
.tour-tooltip h4 { margin: 0 0 8px; font-size: 16px; }
.tour-tooltip p { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.tour-tooltip .tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-tooltip .tour-progress { font-size: 12px; color: var(--muted); }
.tour-tooltip .tour-buttons { display: flex; gap: 8px; }
.tour-tooltip button { width: auto; padding: 7px 14px; font-size: 13px; }

/* ── شريط تثبيت التطبيق (PWA) ── */
.pwa-install-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--panel);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px -10px rgba(0,0,0,.25);
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.16,.8,.3,1);
}
.pwa-install-bar.open { transform: translateY(0); }
.pwa-install-bar img { width: 42px; height: 42px; border-radius: 11px; flex: none; }
.pwa-install-bar .pwa-text { flex: 1; min-width: 0; }
.pwa-install-bar .pwa-title { font-weight: 800; font-size: 14.5px; }
.pwa-install-bar .pwa-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pwa-install-bar .btn { width: auto; margin-top: 0; padding: 9px 18px; font-size: 13.5px; flex: none; }
.pwa-install-bar .pwa-close {
  flex: none; background: none; border: none; color: var(--muted); font-size: 20px;
  cursor: pointer; padding: 4px 6px; line-height: 1; font-family: inherit;
}
.pwa-install-bar .pwa-close:hover { color: var(--text); }
@media (max-width: 480px) {
  .pwa-install-bar .pwa-sub { display: none; }
}
