html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .header-main, html[dir="rtl"] .header-right {
    direction: rtl;
}
html[dir="rtl"] .main-menu > nav > ul {
    flex-direction: row-reverse;
}
html[dir="rtl"] .main-menu > nav > ul > li {
    margin-left: 0;
    margin-right: 24px;
}
html[dir="rtl"] .main-menu > nav > ul > li > a {
  font-size: 1.5rem;
}

html[dir="rtl"] .breadcrumb-items li i {
    transform: scaleX(-1);
}
html[dir="rtl"] .accordion-button::after {
    transform: scaleX(-1);
}

html[dir="rtl"] .theme-btn .fa-arrow-right-long {
    transform: scaleX(-1);
}

/* Icon spacing in RTL */
html[dir="rtl"] .theme-btn i,
html[dir="rtl"] .theme-btn-2 i {
    margin-right: 8px;
    margin-left: 0;
}

/* Flip right-pointing arrows to point left in RTL */
html[dir="rtl"] .theme-btn i.fa-arrow-right,
html[dir="rtl"] .theme-btn i.fa-arrow-right-long,
html[dir="rtl"] .theme-btn-2 i.fa-arrow-right,
html[dir="rtl"] .theme-btn-2 i.fa-arrow-right-long {
    transform: scaleX(-1);
}

html[dir="rtl"] .service-details-wrapper .main-sidebar .single-sidebar-widget .widget-categories i {
    transform: scaleX(-1);
}

/* Slider block adjustment */
html[dir="rtl"] .hero-3 .hero-content {
  text-align: right;
}

html[dir="rtl"] .hero-3 .hero-content h5 {
  position: relative;
  margin-bottom: 10px;
  line-height: 1.6;
  letter-spacing: 0;
  padding-right: 45px;
  padding-left: 0;
}
html[dir="rtl"] .hero-3 .hero-content h5::before {
  right: 0;
  left: auto;
}

html[dir="rtl"] .hero-3 .hero-content h1 {
    font-size: clamp(30px, 5.5vw, 58px);
    line-height: 1.35;
    letter-spacing: 0;
    margin-top: 16px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

@media (max-width: 1400px) {
  html[dir="rtl"] .hero-3 .hero-content h1 { font-size: 58px; }
}
@media (max-width: 1200px) {
  html[dir="rtl"] .hero-3 .hero-content h1 { font-size: 52px; }
}
@media (max-width: 992px) {
  html[dir="rtl"] .hero-3 .hero-content h1 { font-size: 44px; }
}
@media (max-width: 768px) {
  html[dir="rtl"] .hero-3 .hero-content h1 { font-size: 36px; }
}
@media (max-width: 576px) {
  html[dir="rtl"] .hero-3 .hero-content h1 { font-size: 30px; }
}

html[dir="rtl"] .hero-3 .array-button {
  left: 50px;
  right: auto;
}

/* Optional: tweak spacing for very wide screens */
@media (max-width: 1799px) {
  html[dir="rtl"] .hero-3 .array-button {
    left: 30px;
    right: auto;
  }
}

html[dir="rtl"] .hero-3 .slider-image::before {
  /* original: linear-gradient(270deg, ... ) => mirror to the right */
  background: linear-gradient(to right, rgba(5, 26, 108, 0) 14.74%, #0A2DA4 70.82%);
  opacity: 0.95;
}

/* Mirror decorative shapes inside each slide */
html[dir="rtl"] .hero-3 .slider-image .border-shape {
  left: 0;
  right: auto;
}
html[dir="rtl"] .hero-3 .slider-image .circle-shape {
  left: 10%;
  right: auto;
}
html[dir="rtl"] .hero-3 .slider-image .frame {
  right: 10%;
  left: auto;
}
/* If the mask should hug the outer edge, move it to the right in RTL */
html[dir="rtl"] .hero-3 .slider-image .mask-shape {
  right: 0;
  left: auto;
}

/* About section on landing page */
.ripple::before, .ripple::after {
  inset-inline-start: auto;
  inset-inline-end: 50%;
}

html[dir="rtl"] .about-wrapper-2 .about-image .shape-image img {
  transform: scaleX(-1);
}

html[dir="rtl"] .about-wrapper-2 .about-image img {
  transform: scaleX(-1);
}

html[dir="rtl"] .about-wrapper-2 .about-content .section-title span {
  display: inline-block;        /* reserve vertical space */
  margin-bottom: 16px;          /* more gap above h2 */
  letter-spacing: 0;            /* safer for Arabic */
}

html[dir="rtl"] .about-wrapper-2 .about-content .section-title h2 {
  line-height: 1.4;             /* increase heading leading */
  margin-top: 12px;              /* extra gap from span */
  letter-spacing: 0;            /* avoid glyph collisions in Arabic */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

html[dir="rtl"] .about-wrapper-2 .about-content p {
  line-height: 2;             /* extend paragraph line height */
  letter-spacing: 0;
  white-space: normal;
}

/* About (mirror main/caption images and shapes) */
html[dir="rtl"] .about-wrapper .about-image-items .counter-shape {
  left: auto;
  right: -50px;
}
html[dir="rtl"] .about-wrapper .about-image-items .about-image-1::after {
  right: auto;
  left: -55px;
}
html[dir="rtl"] .about-wrapper .about-image-items .about-image-1 .about-image-2 {
  right: auto;
  left: -35%;
}
@media (max-width: 1399.98px) {
  html[dir="rtl"] .about-wrapper .about-image-items .about-image-1 .about-image-2 {
    left: -20%;
    right: auto;
  }
}
@media (max-width: 1199.98px) {
  html[dir="rtl"] .about-wrapper .about-image-items .about-image-1 .about-image-2 {
    left: -10%;
    right: auto;
  }
}
@media (max-width: 575.98px) {
  html[dir="rtl"] .about-wrapper .about-image-items .about-image-1 .about-image-2 {
    left: 0;
    right: auto;
  }
}

/* About (variant .style-2 if used) */
html[dir="rtl"] .about-wrapper.style-2 .about-image-items .counter-shape {
  left: auto;
  right: 30px;
}
html[dir="rtl"] .about-wrapper.style-2 .about-image-items .circle-shape {
  right: auto;
  left: 25%;
}
html[dir="rtl"] .about-wrapper.style-2 .about-image-items .about-image-1 .about-image-2 {
  right: auto;
  left: -40%;
}
@media (max-width: 1199.98px) {
  html[dir="rtl"] .about-wrapper.style-2 .about-image-items .about-image-1 .about-image-2 {
    left: -20%;
    right: auto;
  }
}
@media (max-width: 575.98px) {
  html[dir="rtl"] .about-wrapper.style-2 .about-image-items .about-image-1 .about-image-2 {
    left: 0;
    right: auto;
  }
}

/* About (landing section .about-wrapper-2) */
html[dir="rtl"] .about-wrapper-2 .about-image .video-box {
  right: auto;
  left: 14%;
}
html[dir="rtl"] .about-wrapper-2 .about-image .shape-image {
  left: auto;
  right: -12%;
}
html[dir="rtl"] .about-wrapper-2 .about-content {
  text-align: right;
}

/* Border side swap for icon items (fallback if SCSS not recompiled) */
html[dir="rtl"] .about-wrapper-2 .about-content .icon-area .icon-items {
  border-left: 0 !important;
  border-right: 3px solid var(--theme-color, #0b70f2);
}

/* Fix centered circle pseudo element */
html[dir="rtl"] .about-wrapper .about-content .about-author .author-icon .icon::before {
  right: auto !important;
  bottom: auto !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 1) Make Swiper obey RTL so slides move left-to-right */
html[dir="rtl"] .swiper { direction: rtl; }

/* 2) Contact list: keep the whole list right-aligned, but keep each item LTR so icon stays left of the text */
html[dir="rtl"] .contact-list { direction: rtl; text-align: right; }
html[dir="rtl"] .contact-list li {
  direction: ltr;
  display: inline-flex;
  align-items: center;
}
html[dir="rtl"] .contact-list li i {
  margin-right: 8px;
  margin-left: 0;
}

/* 4) Move hero nav buttons to the left (you already set array-button left) */

/* 5) About “Our Mission”: push second row down on large screens in RTL so it clears caption images */
@media (min-width: 1200px) {
  html[dir="rtl"] .about-section .about-wrapper.style-2 > .row + .row {
    margin-top: 120px;
    position: relative;
    z-index: 1;
  }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  html[dir="rtl"] .about-section .about-wrapper.style-2 > .row + .row { margin-top: 80px; }
}

/* Landing page service card adjustment */
html[dir="rtl"] .service-card-items .icon-2 {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: auto;
    opacity: .2;
}

/* Work process adjustment */
html[dir="rtl"] .work-process-section .process-work-wrapper .line-shape img {
  transform: scaleX(-1);
}

/* Landing page achievement adjustment */
html[dir="rtl"] .achievement-section-3 .shape-image {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    bottom: -50px;
}

html[dir="rtl"] .achievement-section-3 .shape-image img {
    transform: scaleX(-1);
}

/* FAQ adjustmenet for RTL */
html[dir="rtl"] .faq-content .accordion-header .accordion-button {
  text-align: right;
}

html[dir="rtl"] .faq-content .accordion-header .accordion-button::after {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .faq-content .accordion-header .accordion-button.collapsed::after {
  transform: scaleX(-1);
}

html[dir="rtl"] .faq-content .accordion-collapse .accordion-body {
  padding-right: 30px;
  padding-left: 150px;
}

@media (max-width: 1399.98px) { /* matches your max-xxl */
  html[dir="rtl"] .faq-content .accordion-collapse .accordion-body {
    padding-left: 50px;
  }
}
@media (max-width: 991.98px) {  /* matches your max-lg */
  html[dir="rtl"] .faq-content .accordion-collapse .accordion-body {
    padding-left: 30px;
  }
}

html[dir="rtl"] .faq-content.style-2 {
  margin-left: 0;
  margin-right: 50px;
}
@media (max-width: 1199.98px) { /* max-xl */
  html[dir="rtl"] .faq-content.style-2 {
    margin-right: 20px;
  }
}
@media (max-width: 991.98px) { /* max-lg */
  html[dir="rtl"] .faq-content.style-2 {
    margin-right: 0;
  }
}

/* Contact image adjustment on services page */
html[dir="rtl"] .contact-wrapper .contact-image {
  left: auto;
  right: 100px;
}

html[dir="rtl"] .contact-wrapper .contact-image img {
  transform: scaleX(-1);
}

@media (max-width: 1199.98px) { /* matches your max-xl */
  html[dir="rtl"] .contact-wrapper .contact-image {
    right: 20px;
    left: auto;
  }
}

/* Mirror the decorative shapes around the image */
html[dir="rtl"] .contact-wrapper .contact-image .cricle-shape {
  left: auto;
  right: -81px;
}

html[dir="rtl"] .contact-wrapper .contact-image .small-cricle-shape {
  left: auto;
  right: 60%;
}

html[dir="rtl"] .contact-wrapper .contact-image .frame-shape {
  left: auto;
  right: -47px;
}

/* Contact content: swap horizontal paddings/margins for RTL */
html[dir="rtl"] .contact-wrapper .contact-content {
  padding: 0 0 80px 60px;
  margin-left: 0;
  margin-right: 50px;
}

@media (max-width: 991.98px) {
  html[dir="rtl"] .contact-wrapper .contact-content {
    margin-right: 0;
    padding: 0;
  }
}

/* Footer adjustment for RTL */
html[dir="rtl"] .single-footer-widget .list-area li a i {
    transform: scaleX(-1);
}