/* Comprehensive RTL Overrides for ALL SaasoX Components */

/* Core RTL */
body.lang-ar, html[dir="rtl"] {
  direction: rtl;
  unicode-bidi: embed;
}

body.lang-ar * {
  text-align: right;
}

/* Lists RTL */
body.lang-ar ul:not(.cs_nav_list), body.lang-ar ol {
  padding-right: 1.25rem;
  padding-left: 0;
}

/* Navigation RTL */
body.lang-ar .cs_nav_list {
  flex-direction: row-reverse;
}

body.lang-ar .cs_nav_list > li {
  margin-left: 2rem;
  margin-right: 0;
}

body.lang-ar .cs_nav_list > li:last-child {
  margin-left: 0;
}

/* Dropdown RTL */
body.lang-ar .menu-item-has-children > ul {
  left: auto;
  right: 0;
}

body.lang-ar .cs_nav_list ul ul {
  left: auto;
  right: 100%;
}

/* Header Layout RTL */
body.lang-ar .cs_main_header_right {
  margin-left: 0;
  margin-right: auto;
}

body.lang-ar .cs_main_header_left {
  order: 3;
}

body.lang-ar .cs_main_header_center {
  order: 2;
}

body.lang-ar .cs_main_header_right {
  order: 1;
}

/* Button Icons RTL */
body.lang-ar .cs_btn_icon {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

/* Flex RTL */
body.lang-ar .cs_btns_group,
body.lang-ar .cs_post_meta_wrapper,
body.lang-ar .cs_avatar.cs_style_1,
body.lang-ar .cs_location_list,
body.lang-ar .cs_social_links,
body.lang-ar .cs_horizontal_slider_wrapper .cs_brands_list {
  flex-direction: row-reverse !important;
}

/* Padding/Margin RTL */
body.lang-ar .cs_workink_process_heading,
body.lang-ar .cs_sidebar {
  padding-left: 0 !important;
  padding-right: 2.625rem !important;
}

/* Position RTL */
body.lang-ar .cs_post_category {
  left: auto !important;
  right: 0 !important;
  border-radius: 0 0 0 2rem !important;
}

body.lang-ar .cs_slider_arrows.cs_style_1 {
  left: 3.75rem !important;
  right: auto !important;
}

body.lang-ar .cs_menu_toggle {
  left: 1.875rem !important;
  right: auto !important;
}

/* Iconbox RTL */
body.lang-ar .cs_iconbox.cs_style_1,
body.lang-ar .cs_features_list li {
  flex-direction: row-reverse !important;
}

body.lang-ar .cs_features_list li {
  padding-left: 0 !important;
  padding-right: 1.0625rem !important;
}

/* Accordion RTL */
body.lang-ar .cs_accordian.cs_style_2 .cs_accordian_toggler {
  left: 1.5rem !important;
  right: auto !important;
}

body.lang-ar .cs_accordian_head {
  padding-left: 1.5rem !important;
  padding-right: 4.125rem !important;
}

/* Search RTL */
body.lang-ar .cs_search .cs_search_button {
  left: 0 !important;
  right: auto !important;
  border-radius: 0.5rem 0 0 0.5rem !important;
}

/* Newsletter RTL */
body.lang-ar .cs_newsletter.cs_style_1 .cs_newsletter_form {
  flex-direction: row-reverse !important;
}

/* Footer RTL */
body.lang-ar .cs_footer_menu {
  padding-right: 1.25rem !important;
  padding-left: 0 !important;
}

/* Post Meta RTL */
body.lang-ar .cs_post_meta:last-child {
  padding-right: 1.375rem !important;
  padding-left: 0 !important;
}

/* Language Toggle RTL */
body.lang-ar .cs_lang_toggle {
  margin-left: 0 !important;
  margin-right: 1.25rem !important;
}

/* Container RTL */
body.lang-ar .container {
  padding-right: 0.9375rem !important;
  padding-left: 0.9375rem !important;
}

/* Grid RTL Fix */
body.lang-ar .cs_features_items_wrapper {
  direction: ltr;
}

/* Slider RTL (Slick already supports RTL) */
body.lang-ar .slick-slide {
  float: right !important;
}

/* Comprehensive fixes for remaining components */
body.lang-ar .cs_card_content {
  padding-left: 0 !important;
  padding-right: 2.5rem !important;
}

body.lang-ar .cs_hero_shape_1 {
  left: auto !important;
  right: 2% !important;
}

body.lang-ar .cs_hero_shape_2 {
  right: auto !important;
  left: 5% !important;
}

/* Override conflicting styles */
body.lang-ar .cs_main_header_in {
  flex-direction: row-reverse !important;
}

body.lang-ar [class*="col-"] {
  text-align: right !important;
}
body.lang-ar [class*="cs_iconbox"] {
  left: auto !important;
  right: 0 !important;
}

/* Toolset Icons RTL Fix */
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(1) {
  left: auto !important;
  right: 39% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(2) {
  right: auto !important;
  left: 39% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(3) {
  left: auto !important;
  right: 12% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(4) {
  left: auto !important;
  right: 25% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(5) {
  right: auto !important;
  left: 12% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(6) {
  right: auto !important;
  left: 25% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(7) {
  left: auto !important;
  right: 5% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(8) {
  left: auto !important;
  right: 19% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(9) {
  right: auto !important;
  left: 5% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(10) {
  right: auto !important;
  left: 19% !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(11) {
  left: auto !important;
  right: 0 !important;
}
body.lang-ar .cs_toolset_content .cs_iconbox.cs_style_3:nth-child(12) {
  right: auto !important;
  left: 0 !important;
}

/* cs_type_1 variant RTL */
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(1) {
  left: auto !important;
  right: 2% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(2) {
  left: auto !important;
  right: 18% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(3) {
  left: auto !important;
  right: auto !important;
  left: 2% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(4) {
  left: auto !important;
  right: auto !important;
  left: 18% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(5) {
  left: auto !important;
  right: 10% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(6) {
  right: auto !important;
  left: 10% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(7) {
  left: auto !important;
  right: 2% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(8) {
  left: auto !important;
  right: 18% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(9) {
  right: auto !important;
  left: 2% !important;
}
body.lang-ar .cs_toolset_content.cs_type_1 .cs_iconbox.cs_style_3:nth-child(10) {
  right: auto !important;
  left: 18% !important;
}
body.lang-ar .cs_toolset_content {
  overflow: hidden;
}
/* How It Works icons - RTL fix */
body.lang-ar .cs_workink_process_heading,
body.lang-ar .cs_working_process_wrap {
  direction: rtl;
}

/* إذا الأيقونات بـ absolute position */
body.lang-ar .cs_feature_step .cs_iconbox,
body.lang-ar .cs_working_process .cs_iconbox {
  left: auto !important;
  right: 0 !important;
}

/* محاذاة النص والأيقونة */
body.lang-ar .cs_iconbox.cs_style_1 {
  flex-direction: row-reverse !important;
}

body.lang-ar .cs_iconbox.cs_style_2 {
  text-align: right !important;
}

/* Final RTL polish */
body.lang-ar .text-left { text-align: right !important; }
body.lang-ar .text-right { text-align: left !important; }
body.lang-ar .float-left { float: right !important; }
body.lang-ar .float-right { float: left !important; }
