html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: "Cairo", sans-serif;
  }
  
  html[dir="rtl"] .navbar {
    flex-direction: row-reverse;
  }
  
  html[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
  }
  /* === RTL HEADER FIX === */
  html[dir="rtl"] header.transparent .d-flex {
      flex-direction: row-reverse !important; /* يقلب كل الاتجاه */
      justify-content: space-between !important;
  }
  
  /* Logo على الشمال */
  html[dir="rtl"] #logo {
      margin-left: auto !important;
      margin-right: 0 !important;
  }
  
  /* Menu على اليمين */
  html[dir="rtl"] #mainmenu {
      margin-right: auto !important;
      margin-left: 0 !important;
      flex-direction: row !important;
      text-align: right !important;
  }
  
  /* تعديل ترتيب الهيدر لو محتاج */
  html[dir="rtl"] .de-flex-col:first-child {
      order: 1 !important; /* Logo */
  }
  html[dir="rtl"] .de-flex-col:nth-child(2) {
      order: 2 !important; /* Menu */
  }
  html[dir="rtl"] .de-flex-col:last-child {
      order: 3 !important; /* Button + Hamburger */
  }
  
  /* Side Menu RTL */
  html[dir="rtl"] .side_menu_links {
      text-align: right !important;
      padding-right: 0 !important;
  }
  
  /* Section RTL */
  html[dir="rtl"] #section-overview .row {
      flex-direction: row-reverse; /* يقلب الأعمدة */
  }
  
  /* النصوص على اليمين */
  html[dir="rtl"] #section-overview .col-lg-6:last-child {
      text-align: right;
  }
  
  /* الصور على الشمال */
  html[dir="rtl"] #section-overview .col-lg-6:first-child {
      text-align: left;
  }
  
  /* الصورة absolute الصغيرة */
  html[dir="rtl"] #section-overview .col-lg-6:first-child .abs.end-0 {
      right: auto !important;
      left: 0 !important;
  }
  
  /* تعديلات padding bootstrap */
  html[dir="rtl"] #section-overview .ps-lg-3 {
      padding-left: 1rem !important;
      padding-right: 0 !important;
  }
  
  html[dir="rtl"] #section-overview .pe-5 {
      padding-right: 3rem !important;
      padding-left: 0 !important;
  }
  /* RTL Section Projects */
  html[dir="rtl"] #section-projects {
      direction: rtl;
  }
  
  /* كل project-card */
  html[dir="rtl"] #section-projects .project-card {
      text-align: right; /* كل النصوص على اليمين */
  }
  
  /* الصور داخل كل كارت */
  html[dir="rtl"] #section-projects .project-card .project-gallery {
      text-align: left;  /* الصور على الشمال */
  }
  
  /* Fancybox hidden links (optional) */
  html[dir="rtl"] #section-projects .project-card .d-none {
      text-align: left;
  }
  
  /* Buttons alignment (لو حابة) */
  html[dir="rtl"] #section-projects .project-actions {
      justify-content: flex-start; /* الزرار على اليسار */
  }
  
  html[dir="rtl"] #section-contact input.form-control,
  html[dir="rtl"] #section-contact textarea.form-control {
      text-align: right;   /* النصوص داخل الحقول على اليمين */
  }
  
  /* placeholder على اليمين */
  html[dir="rtl"] #section-contact input::placeholder,
  html[dir="rtl"] #section-contact textarea::placeholder {
      text-align: right;
  }
  
  /* RTL Footer */
  html[dir="rtl"] footer.section-dark {
      direction: rtl;
  }
  
  /* Subfooter */
  html[dir="rtl"] footer .subfooter .row {
      flex-direction: row-reverse; /* يقلب الأعمدة */
  }
  
  /* النصوص copyright على الشمال */
  html[dir="rtl"] footer .subfooter .col-md-6:first-child {
      text-align: left;
  }
  
  /* أيقونات السوشيال على اليمين */
  html[dir="rtl"] footer .subfooter .col-md-6.text-md-end {
      text-align: right;
  }
  
  /* RTL Hero Section */
  html[dir="rtl"] #section-hero {
      direction: rtl; /* النصوص على اليمين */
  }
  
  /* الـ container داخل الـ hero */
  html[dir="rtl"] #section-hero .abs .container {
      text-align: right; /* كل النصوص على اليمين */
  }
  
  /* العناوين */
  html[dir="rtl"] #section-hero h1,
  html[dir="rtl"] #section-hero h3 {
      text-align: right;
  }
  
  /* لو فيه أي عناصر abs أخرى يمكن تعديلها هنا */
  html[dir="rtl"] #section-hero .abs {
      left: auto;
      right: 0; /* يحرك المحتوى المطبق absolute لليمين */
  }
  /* Project Details - RTL */
  html[dir="rtl"] .project-details,
  html[dir="rtl"] .project-details section {
      direction: rtl;
  }
  
  /* Project Overview */
  html[dir="rtl"] .project-overview .row.align-items-center {
      flex-direction: row-reverse; /* الصور على الشمال، النصوص على اليمين */
  }
  
  html[dir="rtl"] .project-overview .col-lg-6 p.lead {
      text-align: right;
  }
  
  /* Payment Methods */
  html[dir="rtl"] .payment-methods .row.align-items-center {
      flex-direction: row-reverse; /* الصور على الشمال، النصوص على اليمين */
  }
  
  html[dir="rtl"] .payment-methods .col-lg-7 p.lead {
      text-align: right;
  }
  
  /* Tooltips (icons text) */
  html[dir="rtl"] .method-card h6 {
      text-align: center;
  }
  
  /* Contact Form */
  html[dir="rtl"] .contact-form {
      text-align: right; /* كل النصوص داخل الفورم على اليمين */
  }
  
  html[dir="rtl"] .contact-form input.form-control,
  html[dir="rtl"] .contact-form textarea.form-control {
      text-align: right; /* النصوص داخل الحقول على اليمين */
  }
  
  /* placeholder على اليمين */
  html[dir="rtl"] .contact-form input::placeholder,
  html[dir="rtl"] .contact-form textarea::placeholder {
      text-align: right;
  }
  
  
  /* RTL Modal */
  html[dir="rtl"] .modal-content {
      direction: rtl; /* كل النصوص داخل المودال على اليمين */
      text-align: right;
  }
  
  /* العناوين */
  html[dir="rtl"] .modal-title {
      text-align: right;
  }
  
  /* الفورم */
  html[dir="rtl"] .modal-body form input.form-control,
  html[dir="rtl"] .modal-body form textarea.form-control {
      text-align: right; /* placeholder والنصوص على اليمين */
  }
  
  /* الزرار X مش يكون ملاصق للعنوان */
  .modal-header .btn-close {
      margin-right: 1rem; /* لو RTL */
  }
  
  /* لو المودال RTL */
  html[dir="rtl"] .modal-header .btn-close {
      margin-left: 0;   /* نلغي المسافة على اليسار */
      margin-right: 1rem; /* مسافة بين العنوان والزرار */
  }
  
  /* لضبط محاذاة العنوان نفسه */
  .modal-header .modal-title {
      flex: 1; /* يخلي العنوان ياخد كل المساحة المتاحة */
  }
  
  /* Default LTR */
  #mainmenu {
      display: flex;
      list-style: none;
      padding: 0;
      margin: 0;
      gap: 30px; /* المسافة بين العناصر */
  }
  
  /* RTL */
  html[dir="rtl"] #mainmenu {
      flex-direction: row-reverse; /* يعكس ترتيب العناصر */
      text-align: right;
  }
  
  #mainmenu li a {
      text-decoration: none;
      display: block;
  }
  