/* =====================================================================
   منصة ميكرز التعليمية — Makers LMS
   نظام تصميم احترافي (Design System) — CSS3
   ===================================================================== */

:root {
  /* الألوان الأساسية */
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #eef2ff;
  --accent: #06b6d4;
  --accent-dark: #0e7490;
  --gold: #f59e0b;
  --success: #10b981;

  /* الحياد */
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-dark: #0b1020;

  /* تدرّجات */
  --grad-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, #eef2ff 0%, #ecfeff 100%);

  /* الظلال */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 8px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(79, 70, 229, .18);

  /* أخرى */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --container: 1200px;
  --t: .35s cubic-bezier(.4, 0, .2, 1);
}

/* ============ أساسيات ============ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Tajawal", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Cairo", "Tajawal", sans-serif;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

a { text-decoration: none; transition: color var(--t); }

img { max-width: 100%; height: auto; }

.container { max-width: var(--container); }

section { position: relative; }

.section-pad { padding: 96px 0; }

@media (max-width: 768px) { .section-pad { padding: 64px 0; } }

/* العناوين */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .9rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: 0 auto; }

.text-grad {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ الأزرار ============ */
.btn { font-weight: 700; border-radius: 100px; padding: .8rem 1.7rem; transition: all var(--t); border: 0; }
.btn:focus { box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .25); }

.btn-brand {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
}
.btn-brand:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(79, 70, 229, .45); }

.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--line); }
.btn-ghost:hover { color: var(--primary-dark); border-color: var(--primary); transform: translateY(-3px); }

.btn-light-ghost { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.btn-light-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.btn-lg { padding: 1rem 2.1rem; font-size: 1.05rem; }

/* ============ شريط التنقّل ============ */
.navbar {
  padding: 18px 0;
  transition: all var(--t);
  background: transparent;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
.navbar-brand { font-family: "Cairo"; font-weight: 900; font-size: 1.5rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand-badge {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--grad-primary); color: #fff;
  display: grid; place-items: center; font-size: 1.3rem;
  box-shadow: 0 8px 18px rgba(79, 70, 229, .35);
}
.navbar .nav-link { font-weight: 700; color: var(--body); margin: 0 4px; position: relative; }
.navbar .nav-link:hover { color: var(--primary); }
.navbar .nav-link::after {
  content: ""; position: absolute; bottom: 2px; inset-inline-start: 12px; inset-inline-end: 12px;
  height: 2px; background: var(--primary); transform: scaleX(0); transform-origin: center; transition: transform var(--t);
}
.navbar .nav-link:hover::after { transform: scaleX(1); }

/* ============ الهيرو ============ */
.hero {
  position: relative;
  padding: 170px 0 110px;
  background: var(--grad-soft);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: -160px; inset-inline-start: -120px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, .22), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; bottom: -180px; inset-inline-end: -140px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, .20), transparent 70%);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.25; margin-bottom: 22px; }
.hero p.lead { font-size: 1.2rem; color: var(--body); max-width: 560px; }

.hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line);
  padding: 8px 18px; border-radius: 100px; font-weight: 700;
  color: var(--ink); box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.hero-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16, 185, 129, .2); }

/* بطاقة معاينة لوحة التحكم */
.hero-mock {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 14px; border: 1px solid var(--line); position: relative;
}
.hero-mock .bar { display: flex; gap: 6px; padding: 8px 6px 14px; }
.hero-mock .bar span { width: 11px; height: 11px; border-radius: 50%; background: #e2e8f0; }
.hero-mock .bar span:nth-child(1) { background: #f87171; }
.hero-mock .bar span:nth-child(2) { background: #fbbf24; }
.hero-mock .bar span:nth-child(3) { background: #34d399; }
.hero-mock .screen { background: var(--bg-soft); border-radius: 16px; padding: 18px; }
.mini-stat { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.mini-stat .num { font-family: "Cairo"; font-weight: 900; font-size: 1.5rem; color: var(--ink); }
.mini-stat .lbl { font-size: .82rem; color: var(--muted); }
.mini-bar { height: 8px; border-radius: 100px; background: #e2e8f0; overflow: hidden; }
.mini-bar > i { display: block; height: 100%; border-radius: 100px; background: var(--grad-primary); }

.float-card {
  position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink);
  animation: float 4s ease-in-out infinite;
}
.float-card i.ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 1.1rem; }
.float-card.f1 { top: 30px; inset-inline-start: -28px; }
.float-card.f2 { bottom: 36px; inset-inline-end: -26px; animation-delay: 1.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ============ شريط الثقة ============ */
.trust { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 34px 0; }
.trust .item { color: var(--muted); font-weight: 700; opacity: .8; }

/* ============ الإحصائيات ============ */
.stats { background: var(--bg-dark); color: #fff; }
.stat-num { font-family: "Cairo"; font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lbl { color: #94a3b8; font-weight: 700; }

/* ============ بطاقات الميزات ============ */
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px; height: 100%; transition: all var(--t); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity var(--t);
  background: var(--grad-soft); z-index: 0;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card:hover::before { opacity: 1; }
.feature-card > * { position: relative; z-index: 1; }
.feature-ico {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.6rem; color: #fff; margin-bottom: 18px; box-shadow: var(--shadow);
}
.feature-card h5 { font-size: 1.18rem; margin-bottom: 10px; }
.feature-card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* خلفيات أيقونات متنوّعة */
.bg-i1 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.bg-i2 { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }
.bg-i3 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.bg-i4 { background: linear-gradient(135deg, #10b981, #059669); }
.bg-i5 { background: linear-gradient(135deg, #ec4899, #db2777); }
.bg-i6 { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.bg-i7 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.bg-i8 { background: linear-gradient(135deg, #0891b2, #06b6d4); }

/* ============ كيف تعمل ============ */
.steps-wrap { position: relative; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 26px; height: 100%; transition: all var(--t); }
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step-num {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Cairo"; font-weight: 900; font-size: 1.3rem; color: #fff; background: var(--grad-primary);
  margin-bottom: 18px; box-shadow: 0 10px 22px rgba(79, 70, 229, .32);
}

/* ============ التسعير ============ */
.pricing { background: var(--bg-soft); }
.price-card {
  background: #fff; border-radius: var(--radius-lg); padding: 44px 40px;
  box-shadow: var(--shadow-lg); border: 2px solid var(--primary); position: relative; overflow: hidden;
}
.price-card .ribbon {
  position: absolute; top: 26px; inset-inline-end: -52px; transform: rotate(45deg);
  background: var(--gold); color: #fff; font-weight: 800; padding: 6px 60px; font-size: .85rem;
  box-shadow: var(--shadow);
}
.price-amount { font-family: "Cairo"; font-weight: 900; font-size: 4rem; color: var(--ink); line-height: 1; }
.price-cur { font-size: 1.3rem; color: var(--muted); font-weight: 700; }
.price-per { color: var(--muted); }
.price-list { list-style: none; padding: 0; margin: 28px 0; }
.price-list li { padding: 9px 0; display: flex; align-items: center; gap: 12px; border-bottom: 1px dashed var(--line); }
.price-list li:last-child { border-bottom: 0; }
.price-list li i { color: var(--success); font-size: 1.15rem; }
.trial-badge {
  display: inline-flex; align-items: center; gap: 8px; background: #ecfdf5; color: var(--success);
  font-weight: 800; padding: 8px 18px; border-radius: 100px; margin-bottom: 16px;
}

.pay-note { background: var(--primary-light); border-radius: var(--radius); padding: 26px; border: 1px solid #c7d2fe; }
.pay-note .num { font-family: "Cairo"; font-weight: 900; font-size: 1.4rem; color: var(--primary-dark); direction: ltr; }

/* ============ آراء العملاء ============ */
.testi-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; height: 100%; transition: all var(--t); }
.testi-card:hover { box-shadow: var(--shadow); transform: translateY(-5px); }
.testi-stars { color: var(--gold); margin-bottom: 12px; }
.testi-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: "Cairo"; }

/* ============ FAQ ============ */
.faq .accordion-item { border: 1px solid var(--line); border-radius: var(--radius-sm) !important; margin-bottom: 14px; overflow: hidden; }
.faq .accordion-button { font-weight: 800; color: var(--ink); padding: 20px 24px; background: #fff; }
.faq .accordion-button:not(.collapsed) { color: var(--primary); background: var(--primary-light); box-shadow: none; }
.faq .accordion-button:focus { box-shadow: none; }
.faq .accordion-button::after { margin-inline-start: auto; margin-inline-end: 0; }
.faq .accordion-body { color: var(--muted); padding: 4px 24px 22px; }

/* ============ CTA ============ */
.cta-band { background: var(--grad-primary); color: #fff; border-radius: var(--radius-lg); padding: 64px; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; top: -80px; inset-inline-end: -40px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.cta-band::after { content: ""; position: absolute; bottom: -120px; inset-inline-start: -60px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; }

/* ============ الفوتر ============ */
.footer { background: var(--bg-dark); color: #cbd5e1; padding: 72px 0 28px; }
.footer h6 { color: #fff; font-weight: 800; margin-bottom: 18px; }
.footer a { color: #94a3b8; display: block; padding: 5px 0; }
.footer a:hover { color: #fff; }
.footer .navbar-brand { color: #fff; }
.footer-social { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; transition: all var(--t); }
.footer-social:hover { background: var(--primary); transform: translateY(-3px); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 50px; padding-top: 24px; color: #64748b; }
.news-input { border-radius: 100px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; padding: .8rem 1.3rem; }
.news-input::placeholder { color: #64748b; }
.news-input:focus { background: rgba(255,255,255,.1); border-color: var(--primary); color: #fff; box-shadow: none; outline: none; }

/* زر العودة للأعلى */
#toTop {
  position: fixed; inset-inline-end: 24px; bottom: 24px; width: 50px; height: 50px;
  border-radius: 50%; background: var(--grad-primary); color: #fff; border: 0; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all var(--t); z-index: 999;
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#toTop:hover { transform: translateY(-4px); }

/* عند تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* لمسات تجاوب */
@media (max-width: 991px) {
  .hero { padding: 140px 0 80px; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .float-card { display: none; }
  .navbar-collapse { background: #fff; border-radius: var(--radius); padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
  .cta-band { padding: 44px 26px; text-align: center; }
}
