  /* ===== متغيرات الألوان والخطوط ===== */
  :root {
    --primary:       #7E33CA;          /* اللون البنفسجي الأساسي للوغو */
    --primary-light: #9B59E0;          /* درجة فاتحة من البنفسجي */
    --primary-dark:  #6222A8;          /* درجة غامقة من البنفسجي */
    --primary-glow:  rgba(126,51,202,0.15); /* توهج خفيف للخلفيات */
    --bg:            #FAFAFA;          /* خلفية الصفحة الرئيسية */
    --bg-section:    #F4F0FB;          /* خلفية الأقسام المتناوبة */
    --text:          #1A1A2E;          /* لون النص الرئيسي */
    --text-muted:    #6B7280;          /* لون النص الثانوي */
    --border:        rgba(126,51,202,0.12); /* لون الحدود */
    --white:         #FFFFFF;
    --shadow-sm:     0 2px 12px rgba(126,51,202,0.08);
    --shadow-md:     0 8px 32px rgba(126,51,202,0.12);
    --shadow-lg:     0 20px 60px rgba(126,51,202,0.16);
    --radius:        16px;             /* نصف قطر الزوايا الأساسي */
    --radius-lg:     24px;
  }

  /* ===== إعادة ضبط عامة ===== */
  *, *::before, *::after { box-sizing: border-box; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    
  }

  /* ===== تنسيق عام للعناوين ===== */
  h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  /* ===== أيقونات Bootstrap ===== */
  i { color: var(--primary); }


  /* ====================================================
     قسم Hero — الجزء الأول من الصفحة
  ==================================================== */
  .hero {
    position: relative;
    padding: 100px 20px 80px;
    text-align: center;
    background: var(--white);
    overflow: hidden;
  }

  /* الدوائر الزخرفية في الخلفية */
  .hero::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126,51,202,0.06) 0%, transparent 70%);
    top: -200px; right: -150px;
    pointer-events: none;
  }
  .hero::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126,51,202,0.05) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    pointer-events: none;
  }

  /* شريط لوني فوق العنوان */
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-glow);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
  }
 

  /* عنوان Hero الرئيسي */
  .hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--text);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
  }
  /* تلوين كلمة مميزة في العنوان */
  .hero-title .accent {
    color: var(--primary);
    position: relative;
  }
  .hero-title .accent::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    opacity: 0.4;
  }

  /* وصف Hero */
  .hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
  }

  /* زر CTA الرئيسي */
  .btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: var(--white) !important;
    border: none;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(126,51,202,0.35);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
  }
  .btn-hero:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(126,51,202,0.45);
    color: var(--white) !important;
  }
  .btn-hero i { color: var(--white); font-size: 1rem; }

  /* ===== إحصائيات Hero ===== */
  .hero-stats {
    display: inline-grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 56px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
    max-width: 680px;
    width: 100%;
  }

  /* كل عنصر إحصائي */
  .stat-item {
    text-align: center;
    padding: 20px 16px;
    position: relative;
    transition: background 0.25s ease;
  }
  /* فاصل رأسي بين العناصر */
  .stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0; top: 20%; bottom: 20%;
    width: 1px;
    background: var(--border);
  }
  .stat-item:hover { background: var(--bg-section); }

  /* أيقونة صغيرة فوق الرقم */
  .stat-icon {
    font-size: 1rem;
    margin-bottom: 6px;
    display: block;
    opacity: 0.85;
  }

  /* الرقم الرئيسي */
  .stat-number {
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
    letter-spacing: -0.03em;
  }

  /* النص التوضيحي */
  .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
  }

  /* شاشات صغيرة: شبكة 2×2 */
  @media (max-width: 520px) {
    .hero-stats {
      grid-template-columns: repeat(2, 1fr);
      max-width: 340px;
    }
    .stat-item:nth-child(2)::after { display: none; }
    .stat-item:nth-child(3) { border-top: 1px solid var(--border); }
    .stat-item:nth-child(4) { border-top: 1px solid var(--border); }
  }

  /* ====================================================
     عناوين الأقسام — مشتركة لكل section
  ==================================================== */
  .section-title {
    text-align: center;
    margin-bottom: 50px;
  }
  .section-title h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--text);
    margin-bottom: 12px;
  }
  .section-title p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
  }
  /* خط زيني تحت العنوان */
  .section-title .title-line {
    width: 48px; height: 4px;
    background: var(--primary);
    border-radius: 4px;
    margin: 16px auto 0;
  }

  /* ====================================================
     قسم كيف يعمل — How It Works
  ==================================================== */
  .how-it-works {
    background: var(--bg-section);
    padding: 80px 0;
  }

  /* بطاقة الخطوة الواحدة */
  .step-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
  }
  .step-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }
  .step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
  .step-card:hover::before { transform: scaleX(1); }

  /* رقم الخطوة الدائري */
  .step-number {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary-glow);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
  }

  /* أيقونة الخطوة */
  .step-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    display: block;
  }

  .step-card h5 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 10px;
  }
  .step-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
  }

  /* ====================================================
     قسم المميزات — Features
  ==================================================== */
  .features-section {
    padding: 80px 0;
    background: var(--white);
  }

  /* بطاقة الميزة */
  .feature-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 30px 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .feature-card:hover {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
  }

  /* أيقونة الميزة في مربع ملون */
  .feature-icon-box {
    width: 50px; height: 50px;
    border-radius: 12px;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
  }

  .feature-card h5 {
    font-size: 1rem;
    color: var(--text);
    margin: 0;
  }
  .feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
  }

  /* ====================================================
     قسم القوالب — Carousel Templates
  ==================================================== */
  .templates-section {
    padding: 80px 0;
    background: var(--bg-section);
  }

  /* تعديل أزرار الكاروسيل */
  #templatesCarousel .carousel-control-prev,
  #templatesCarousel .carousel-control-next {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    top: 50%; transform: translateY(-50%);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
  }
  #templatesCarousel .carousel-control-prev { left: -22px; }
  #templatesCarousel .carousel-control-next { right: -22px; }
  #templatesCarousel .carousel-control-prev:hover,
  #templatesCarousel .carousel-control-next:hover {
    background: var(--primary);
    border-color: var(--primary);
  }
  #templatesCarousel .carousel-control-prev-icon,
  #templatesCarousel .carousel-control-next-icon {
    filter: invert(1); /* يجعل السهم أبيض */
  }

  /* صور القوالب */
  .template-frame {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .template-frame:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
  }
  .template-frame img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
  }

  /* ====================================================
     قسم الأسعار — Pricing
  ==================================================== */
  .pricing-section {
    padding: 80px 0;
    background: var(--white);
  }

  /* بطاقة السعر */
  .pricing-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
  }
  /* بطاقة مميزة (Starter Plan) */
  .pricing-card.featured {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
  }
  /* شارة "الأكثر شيوعاً" */
  .pricing-badge {
    position: absolute;
    top: 20px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    inset-inline-end: 20px
  }

  .pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
  .pricing-card.featured:hover { box-shadow: var(--shadow-lg); }

  .pricing-card h4 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 8px;
  }

  /* سعر الاشتراك */
  .pricing-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin: 16px 0 24px;
  }
  .pricing-price small {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
  }

  /* قائمة المميزات داخل بطاقة السعر */
  .pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
  }
  .pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.93rem;
    color: var(--text);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  .pricing-features li:last-child { border-bottom: none; }
  /* أيقونة الصح والخطأ */
  .pricing-features li .check { color: #16A34A; font-size: 1rem; }
  .pricing-features li .cross { color: #DC2626; font-size: 1rem; }
  .pricing-features li.disabled { color: var(--text-muted); }

  /* أزرار بطاقات السعر */
  .btn-pricing {
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
  }
  .btn-pricing.outline {
    color: var(--primary);
    background: transparent;
  }
  .btn-pricing.outline:hover {
    background: var(--primary);
    color: var(--white);
  }
  .btn-pricing.solid {
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 6px 20px rgba(126,51,202,0.3);
  }
  .btn-pricing.solid:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 28px rgba(126,51,202,0.4);
    color: var(--white);
  }

  /* ====================================================
     قسم CTA النهائي — Final Call to Action
  ==================================================== */
  .final-cta {
    padding: 100px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
  }
  /* زخرفة خلفية CTA */
  .final-cta::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    top: -200px; right: -100px;
    pointer-events: none;
  }
  .final-cta::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
    bottom: -100px; left: -80px;
    pointer-events: none;
  }

  .final-cta h2 {
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 16px;
    position: relative; z-index: 1;
  }
  .final-cta p {
    color: rgba(255,255,255,0.82);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
    position: relative; z-index: 1;
  }

  /* زر CTA الأبيض */
  .btn-cta-white {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--primary) !important;
    border: none;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative; z-index: 1;
  }
  .btn-cta-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.25);
    color: var(--primary-dark) !important;
  }
  .btn-cta-white i { color: var(--primary); font-size: 1rem; }

  /* ====================================================
     تكيف الشاشات الصغيرة (Responsive)
  ==================================================== */
  @media (max-width: 768px) {
    .hero { padding: 70px 16px 60px; }
    .hero-stats { gap: 24px; }
    .how-it-works, .features-section,
    .templates-section, .pricing-section { padding: 60px 0; }
    .pricing-card { padding: 30px 24px; }
    #templatesCarousel .carousel-control-prev { left: 0; }
    #templatesCarousel .carousel-control-next { right: 0; }
  }

  /* تكبير الإحصائيات وتوسيعها في الشاشات الكبيرة (Desktop) */
  @media (min-width: 992px) {
    .hero-stats {
      display: grid; 
      max-width: 1050px; /* تكبير الصندوق أكثر لملء الشاشة الكبيرة بشكل أفضل */
      margin: 60px auto 40px; /* margin auto للتوسيط في المنتصف تماماً */
    }
    .stat-item {
      padding: 45px 30px; /* زيادة الحشوة الداخلية لتكبير الصناديق */
    }
    .stat-number {
      font-size: 3rem; /* تكبير حجم الأرقام لتبدو أوضح */
    }
    .stat-label {
      font-size: 1.1rem; /* تكبير حجم النصوص التوضيحية */
    }
  }
