/* ==================================
   ملف التعديلات للنسخة العربية (RTL)
================================== */

/* --- 1. إصلاح القوائم المخصصة --- */
.feature-list {
  padding-left: 0;
  padding-right: 1.5rem;
  direction: rtl;
  text-align: right;
}

.feature-content {
  direction: rtl;
  text-align: right;
}

/* إلغاء البادينج العام الذي كان يسبب عدم التناظر */
.feature-content p {
  padding-right: 0;
  margin-bottom: 0;
}

.feature-list li {
  padding-left: 0;
  padding-right: 1.5rem;
}

.feature-list li::before {
  left: auto;
  right: 0;
}

/* ============================================================
   2. إصلاح محاذاة قسم المميزات (Features Alignment Fix)
   ============================================================ */

/* أ) الشاشات الكبيرة (Desktop): استقامة تامة وتناظر */
@media (min-width: 992px) {


  .navmenu li:last-child a {

    padding-right: 18px !important;
  }

  /* توحيد عرض حاوية الأيقونة لضمان استقامة الخط */
  .feature-icon {
    min-width: 60px;
    width: 60px;
    display: flex;
    justify-content: center;
    margin: 0 !important;
  }

  /* ضمان أن الحاوية تأخذ كامل العرض */
  .feature-item .d-flex {
    width: 100%;
  }

  /* ⭐ جديد: توحيد ارتفاع النصوص ليتطابق اليمين واليسار تماماً */
  .feature-content p {
    min-height: 55px;
    /* ارتفاع يكفي لـ 3 أسطر، مما يوازن النصوص القصيرة مع الطويلة */
  }

  /* --- العمود الأيمن (يمين الشاشة) --- */
  .col-lg-4:first-child .feature-item .d-flex {
    justify-content: flex-end;
    /* يدفع العناصر لليسار */
  }

  .col-lg-4:first-child .feature-content {
    text-align: left;
    /* محاذاة النص لليسار (تجاه الهاتف) */
    order: 1;
    /* النص أولاً */
  }

  .col-lg-4:first-child .feature-icon {
    order: 2;
    /* الأيقونة ثانياً */
  }

  /* --- العمود الأيسر (يسار الشاشة) --- */
  .col-lg-4:last-child .feature-item .d-flex {
    justify-content: flex-start;
    /* يدفع العناصر لليمين */
  }

  .col-lg-4:last-child .feature-content {
    text-align: right;
    /* محاذاة النص لليمين */
  }
}

/* ب) الموبايل (Mobile): توسيط كامل */
@media (max-width: 991px) {

  /* جعل العناصر عمودية */
  .feature-item .d-flex {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 15px !important;
    margin-bottom: 30px;
    width: 100%;
  }

  /* للعمود الأيمن: عكس الترتيب لتصبح الأيقونة فوق النص */
  .col-lg-4:first-child .feature-item .d-flex {
    flex-direction: column-reverse !important;
  }

  /* توسيط النصوص */
  .feature-content {
    text-align: center !important;
    width: 100%;
    padding: 0 10px;
  }

  /* إلغاء ارتفاع النصوص في الموبايل لأنه غير ضروري */
  .feature-content p {
    min-height: auto !important;
  }

  /* إلغاء التمدد لضمان التوسيط */
  .feature-content.flex-grow-1 {
    flex-grow: 0 !important;
  }

  .feature-icon {
    margin: 0 !important;
  }
}

/*تزرار التبديل*/
.btn-group[aria-label="Pricing Toggle"] {
  direction: rtl;
}

.btn-group .toggle-btnn {
  min-width: 200px;
  text-align: center;
  padding: 8px 28px;
  font-weight: 600;
  border-radius: 0 !important;
  border-color: #3DA9FC;
  color: #3DA9FC;
}

@media (max-width: 500px) {
  .btn-group .toggle-btnn {
    min-width: 100px;
  }
}

/* زر سنوي — حواف يسار */
#yearly+label {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

/* زر شهري — حواف يمين */
#monthly+label {
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

/* States: Checked */
.btn-check:checked+.toggle-btnn {
  background-color: #3DA9FC !important;
  border-color: #3DA9FC !important;
  color: #fff !important;
}

.btn-check:checked+.toggle-btnn:hover {
  background-color: #3DA9FC !important;
  border-color: #3DA9FC !important;
  color: #fff !important;
}

/* States: Hover on unchecked */
.btn-check:not(:checked)+.toggle-btnn:hover {
  background-color: rgba(61, 169, 252, 0.25) !important;
  border-color: #3DA9FC !important;
  color: #3DA9FC !important;
}

/* --- 3. تنسيق بطاقات الأسعار --- */
.pricing-card ul li {
  direction: rtl;
  text-align: right;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-card ul li i {
  color: #3DA9FC;
  font-size: 18px;
}

.pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-card .start-btn {
  margin-top: auto;
  margin-bottom: 25px;
  margin-top: 40px !important;
}

.savings-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* --- 4. إصلاح اتجاه السهم في الأسئلة الشائعة --- */
.faq-arrow svg {
  transform: scaleX(-1) !important;
}

/* --- 5. أزرار التبديل (شهري/سنوي) --- */
.btn-group[aria-label="Pricing Toggle"] {
  direction: rtl;
}

.toggle-btnn {
  padding: 8px 28px;
  font-weight: 600;
  border-radius: 0 !important;
  border-color: #3DA9FC;
  color: #3DA9FC;
}

/* زر سنوي — حواف يسار */
#yearly+label {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

/* زر شهري — حواف يمين */
#monthly+label {
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

.btn-check:checked+.toggle-btnn {
  background-color: #3DA9FC;
  color: #fff;
}

/* --- 6. تنسيق المودال (Modal) --- */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
}

.modal-header .btn-close {
  margin: 0 !important;
  margin-right: auto !important;
}

.choice-btn {
  background-color: #3DA9FC !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 0;
}

.choice-btn-outline {
  border: 2px solid #3DA9FC !important;
  color: #3DA9FC !important;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 0;
}

/* --- 7. تنسيق الحقول والنماذج RTL --- */
.input-group {
  direction: rtl;
}

.input-group .btn {
  border-radius: 0.75rem 0 0 0.75rem !important;
}

.input-group .form-control {
  border-radius: 0 0.75rem 0.75rem 0 !important;
}

.form-check {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.form-check-input {
  float: none !important;
  margin: 0 !important;
  margin-top: 2px !important;
}

.terms-row {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center !important;
  gap: 6px;
}

input::placeholder,
textarea::placeholder {
  text-align: right !important;
  direction: rtl !important;
}

input.form-control,
textarea.form-control {
  text-align: right !important;
  direction: rtl !important;
}

.form-floating>.form-control::placeholder {
  opacity: 0 !important;
}

.form-floating>label {
  right: 0 !important;
  left: auto !important;
  text-align: right !important;
}

/* --- 8. حركة علامة الاستفهام --- */
.fa-question {
  --flipX: -1;
  display: inline-block;
  transform: scaleX(var(--flipX));
  transform-origin: center center;
}

.question-anim {
  animation: shakeRTL 1.3s ease-in-out infinite;
}

@keyframes shakeRTL {
  0% {
    transform: scaleX(var(--flipX)) rotate(0deg);
  }

  25% {
    transform: scaleX(var(--flipX)) rotate(20deg);
  }

  50% {
    transform: scaleX(var(--flipX)) rotate(0deg);
  }

  75% {
    transform: scaleX(var(--flipX)) rotate(-20deg);
  }

  100% {
    transform: scaleX(var(--flipX)) rotate(0deg);
  }
}

/* ============================================================
   تنسيق الهيدر الجديد (Pill Shape Navbar)
   ============================================================ */

/* --- أ) تنسيق للموبايل (Mobile) --- */
@media (max-width: 991px) {
  #header {
    background-color: transparent !important;
    box-shadow: none !important;
    padding-top: 15px;
    pointer-events: none;
  }

  .header-container {
    background: #ffffff;
    border-radius: 50px;
    padding: 8px 20px !important;
    margin: 0 15px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo img {
    max-height: 35px;
    width: auto;
  }

  .btn-getstarted {
    padding: 6px 15px !important;
    font-size: 14px;
    margin: 0 !important;
    background-color: transparent;
    color: #333;
    border: none;
    font-weight: 700;
  }

  .mobile-nav-toggle {
    font-size: 28px !important;
    line-height: 0;
    color: #333 !important;
    order: -1 !important;
  }
}

/* أ) الشاشات الكبيرة (Desktop): استقامة تامة وتناظر */
@media (min-width: 992px) {

  /* 1. توحيد عرض حاوية الأيقونة */
  .feature-icon {
    min-width: 60px;
    width: 60px;
    display: flex;
    justify-content: center;
    margin: 0 !important;
  }

  /* 2. حاوية العنصر: محاذاة عمودية في المنتصف */
  .feature-item .d-flex {
    width: 100%;
    align-items: center !important;
    /* يضمن أن الأيقونة دائماً في وسط الكتلة النصية */
  }

  /* ⭐ 3. تثبيت ارتفاع العنوان (h3) ليتسع لسطرين دائماً */
  .feature-content h3 {
    min-height: 60px;
    /* ارتفاع يكفي لسطرين */
    display: flex;
    align-items: center;
    /* لتوسيط العنوان القصير (سطر واحد) في المساحة */
    margin-bottom: 10px;
    line-height: 1.4;
  }

  /* في الجهة اليمنى (النصوص يسار)، نحتاج محاذاة النص داخل الصندوق لليسار */
  .col-lg-4:first-child .feature-content h3 {
    justify-content: flex-end;
    /* محاذاة فليكس لليسار في RTL تعني flex-end */
  }

  /* في الجهة اليسرى (النصوص يمين)، نحتاج محاذاة النص داخل الصندوق لليمين */
  .col-lg-4:last-child .feature-content h3 {
    justify-content: flex-start;
  }


  /* ⭐ 4. تثبيت ارتفاع الوصف (p) ليتسع لسطرين دائماً */
  .feature-content p {
    min-height: 50px;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
  }


  /* --- تنسيق العمود الأيمن (يمين الشاشة) --- */
  .col-lg-4:first-child .feature-item .d-flex {
    justify-content: flex-end;
  }

  .col-lg-4:first-child .feature-content {
    text-align: left;
    order: 1;
  }

  .col-lg-4:first-child .feature-icon {
    order: 2;
  }

  /* --- تنسيق العمود الأيسر (يسار الشاشة) --- */
  .col-lg-4:last-child .feature-item .d-flex {
    justify-content: flex-start;
  }

  .col-lg-4:last-child .feature-content {
    text-align: right;
  }
}

/* ============================================================
   إصلاح ترتيب الهيدر في الجوال للنسخة العربية (إلغاء Order)
   ============================================================ */
/* ============================
   إصلاح ترتيب عناصر الهيدر في الجوال
   ============================ */
@media (max-width: 1200px) {

  /* ترتيب العناصر من اليمين لليسار */
  .header .header-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row-reverse !important;
  }

  /* زر القائمة (الهامبرجر) */
  .mobile-nav-toggle {
    order: 1 !important;
    margin-left: 10px !important;
  }

  /* زر English */
  .header .btn-getstarted {
    order: 2 !important;
    margin-right: 10px !important;
  }

  /* اللوجو */
  .header .logo {
    order: 1 !important;
  }

  /* القائمة (navmenu) */
  .header .navmenu {
    order: 4 !important;
  }
}


/* HERO Arabic fine-tuning */
.hero .hero-content h1 {
  letter-spacing: -0.3px;
}

.hero .hero-content .lead {
  font-size: clamp(1rem, 1vw + .6rem, 1.35rem);
}

.hero .hero-content ul li {
  line-height: 1.9;
}

/* اجعل كلمة الهدوء أو أي span.accent-text أوضح */
.accent-text {
  color: #3DA9FC;
}

/* موبايل */
@media (max-width: 576px) {
  .hero .hero-content h1 {
    font-size: clamp(1.6rem, 6vw + .4rem, 2.1rem);
  }

  .hero .hero-content p.fs-5 {
    font-size: 1rem !important;
  }
}


/* محاذاة نص قائمة المزايا — ثابتة يمين دائمًا */
.hero-features-list {
  text-align: right !important;
  direction: rtl !important;
}

/* جعل الأيقونة والنص على محاذاة واحدة */
.hero-features-list li {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}


/* --- إصلاح موقع السهم في الأسئلة الشائعة للنسخة العربية --- */
/* ضبط مكان السهم ليكون في اليسار */
.faq-item .faq-toggle {
  position: absolute;
  left: 20px !important;
  /* تثبيت في أقصى اليسار */
  right: auto !important;
  /* إلغاء التثبيت من اليمين */
  top: 50%;
  /* توسيط عمودي */
  transform: translateY(-50%);
  /* ضمان التوسيط بدقة */
  transform: rotate(180deg);

}

/* ضبط مسافة العنوان عشان الكلام ما يدخل في السهم */
.faq-item h3 {
  padding-left: 40px !important;
  /* مسافة من اليسار */
  padding-right: 0 !important;
  /* إلغاء المسافة الزائدة من اليمين */
  text-align: right;
  margin: 0 !important;
}

/* تأكد أن الحاوية نسبية عشان السهم يتحرك داخلها */
.faq-item {
  position: relative;
}

.table .amount {
  font-size: 2.25rem !important;
}

.table .currency {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.table .price-wrapper {
  align-items: center !important;
}

/* Restored Rules */
.comparison-section .text-secondary {
  color: #555 !important;
  font-weight: 500;
}

.table-extra-compact tbody td:not([colspan]),
.table-extra-compact tbody th:not([colspan]) {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.table-extra-compact .text-secondary {
  color: #A4A4A4 !important;
  font-weight: normal !important;
}


.text-start {
  text-align: right !important;
}

/* ensure pricing buttons align */
.plan-description {
  min-height: 48px;
  margin-bottom: 0.5rem !important;
}

/* Index Pricing Card Tweaks */
.pricing-card .amount {
  font-size: 3rem !important;
}

.pricing-card .price-wrapper {
  display: flex !important;
  align-items: center !important;
}