/*
 * RTL fine-tuning for Persian (fa) and Arabic (ar).
 * Grid/spacing mirroring is handled by Bootstrap's OFFICIAL RTL build.
 * This file fixes template-specific custom classes that Bootstrap RTL
 * doesn't know about.
 */

[dir="rtl"] .fa-arrow-right {
  transform: scaleX(-1);
  display: inline-block;
}

[dir="rtl"] .social-link {
  direction: ltr;
}

/* ---------------------------------------------------------------
 * Skill progress bars: keep them LTR on purpose, regardless of
 * page direction. This is the standard fix for progress/percent
 * bars in RTL sites — the fill and its width-based animation stay
 * predictable instead of depending on how style.css physically
 * positioned them (float/left/right), which is what was causing
 * the bar to render empty/invisible in ar and fa.
 * ------------------------------------------------------------- */
/* [dir="rtl"] .progress-charts .progress {
  direction: ltr;
}
[dir="rtl"] .progress-charts .progress-bar {
  float: left;
} */
[dir="rtl"] .progress-bar .percent-label {
  right: auto !important;
  left: 0;
}

/* ---------------------------------------------------------------
 * Safety-net rules for common Envato-template RTL breakage.
 * These target patterns that are frequent in this kind of theme:
 * absolutely-positioned decorative shapes, icon-then-text rows,
 * and swiper/slider controls. Remove any rule below that doesn't
 * apply once you've checked the live pages — they're written to be
 * harmless no-ops if the class isn't present.
 * ------------------------------------------------------------- */

/* Icon+text rows built with custom flex classes (not Bootstrap's) */
[dir="rtl"] .icon-box,
[dir="rtl"] .feature-item,
[dir="rtl"] .about-card {
  direction: rtl;
}

/* Swiper navigation arrows/pagination often need mirroring */
[dir="rtl"] .swiper-button-next {
  transform: rotate(180deg);
}

[dir="rtl"] .swiper-button-prev {
  transform: rotate(180deg);
}

/* Decorative absolutely-positioned shapes anchored with left/right */
[dir="rtl"] [class*="shape-"] {
  left: auto;
}

/* Shift the logo besides the hero from left to right in rtl */
[dir="rtl"] .banner-two-main-wrapper .banner-right-content .main-img .logo-under-img-wrap {
  right: 0;
  left: auto !important;
}

@media (min-width: 992px) {
  [dir="rtl"] .banner-two-main-wrapper .banner-right-content .main-img .logo-under-img-wrap {
    right: -110px;
    left: auto !important;
  }
}

/* fix about me circles */
[dir="rtl"] .mr--15 {
  margin-left: 15px;
  margin-right: 0 !important;
}

/* fix about me hovering button animation */
[dir="rtl"] .tmp-btn:hover.hover-icon-reverse .btn-text {
  transform: translateX(-23px);
}

[dir="rtl"] .cd-headline.clip .cd-words-wrapper::after {
  right: auto !important;
  left: 0;
}

[dir="rtl"] .cd-words-wrapper b {
  left: auto !important;
  right: 0;
}