/*!
RTL Stylesheet for Car Expert Theme
This file contains styles for Right-to-Left languages (Arabic, Hebrew, etc.)
*/

/* 
==========================================================================
   RTL LAYOUT ADJUSTMENTS
==========================================================================
*/

body.rtl {
  direction: rtl;
  text-align: right;
}

/* Typography RTL */
body.rtl h1, 
body.rtl h2, 
body.rtl h3, 
body.rtl h4, 
body.rtl h5, 
body.rtl h6 {
  text-align: right;
}

body.rtl p,
body.rtl div,
body.rtl span {
  text-align: right;
}

/* 
==========================================================================
   HEADER RTL STYLES
==========================================================================
*/

/* Header Style One RTL */
body.rtl .pxm-style1 .d-flex {
  flex-direction: row-reverse;
}

body.rtl .pxms1-logo {
  margin-left: auto;
  margin-right: 0;
}

body.rtl .pxms1-menu {
  margin-right: auto;
  margin-left: 0;
}

/* Site Branding RTL */
body.rtl .site-branding.brand-logo {
  margin-left: 10px;
  margin-right: 0;
}

body.rtl .head-logo-sec {
  flex-direction: row-reverse;
}

/* 
==========================================================================
   NAVIGATION RTL STYLES
==========================================================================
*/

/* Main Navigation RTL */
body.rtl .main-navigation ul li {
  float: right;
}

body.rtl .main-navigation ul li:after {
  right: auto;
  left: 0;
}

body.rtl .main-navigation ul li:first-child a {
  padding-left: 15px;
  padding-right: 0;
}

body.rtl .main-navigation ul li:last-child a {
  padding-right: 15px;
  padding-left: 0;
}

/* Dropdown Menu RTL */
body.rtl .main-navigation ul li ul {
  left: auto;
  right: 0;
  text-align: right;
}

body.rtl .main-navigation ul li ul ul {
  left: auto;
  right: 250px;
}

body.rtl .main-navigation ul li.menu-item.menu-item-has-children > a:after {
  right: auto;
  left: 2px;
}

body.rtl .main-navigation ul ul li.menu-item.menu-item-has-children > a:after {
  right: auto;
  left: 12px;
  content: "\f077"; /* Arrow pointing left for RTL */
}

body.rtl .main-navigation ul > li.menu-item.menu-item-has-children {
  padding-right: 0;
  padding-left: 15px;
}

/* 
==========================================================================
   LAYOUT RTL STYLES
==========================================================================
*/

/* Flexbox Direction RTL */
body.rtl .d-flex {
  flex-direction: row-reverse;
}

body.rtl .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

body.rtl .me-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* Grid RTL */
body.rtl .row {
  direction: rtl;
}

body.rtl [class*="col-"] {
  float: right;
}

/* 
==========================================================================
   CONTENT RTL STYLES
==========================================================================
*/

/* Blog Posts RTL */
body.rtl .ax-blog-post-author-img {
  margin-right: 0;
  margin-left: 0.5rem;
}

body.rtl .ax-blog-post-author-img img {
  margin-right: 0;
  margin-left: 6px;
}

body.rtl span.byline {
  margin: 4px 15px 5px 0px;
}

body.rtl .ax-all-blog .ax-single-blog-post-view {
  margin-right: 0;
  margin-left: 13px;
}

body.rtl .ax-all-blog .ax-single-blog-post-reaction-section i {
  margin-right: 0;
  margin-left: 2px;
}

body.rtl a.car-expert-readmore i {
  margin: 0px 6px 0 0;
}

body.rtl a.car-expert-readmore:hover i {
  margin-right: 10px;
  margin-left: 0;
}

/* Entry Footer RTL */
body.rtl footer.entry-footer span {
  margin-right: 0;
  margin-left: 10px;
  padding-right: 0;
  padding-left: 10px;
  border-right: none;
  border-left: 1px solid #ccc;
}

body.rtl footer.entry-footer span:last-child {
  border-left: none;
}

/* 
==========================================================================
   WIDGET RTL STYLES
==========================================================================
*/

/* Sidebar RTL */
body.rtl aside#secondary {
  float: left;
}

/* Widget Lists RTL */
body.rtl .widget ul li {
  text-align: right;
}

/* Tag Cloud RTL */
body.rtl .tagcloud {
  justify-content: flex-end;
}

body.rtl .tagcloud a {
  margin: 0 0 5px 2px;
}

/* 
==========================================================================
   HOME BANNER RTL STYLES
==========================================================================
*/

/* Home Banner RTL */
body.rtl .aghome .ax-home-details {
  text-align: right;
}

body.rtl .aghome .ax-home-two-details {
  left: auto;
  right: 5%;
}

body.rtl .aghome .ax-home-btn {
  justify-content: flex-end;
}

body.rtl .aghome a.ax-home-first-btn {
  margin-right: 0;
  margin-left: 25px;
}

/* 
==========================================================================
   PAGINATION RTL STYLES
==========================================================================
*/

/* Pagination RTL */
body.rtl .pagination .nav-links {
  direction: rtl;
}

body.rtl .pagination .nav-links a,
body.rtl .pagination .nav-links span {
  margin-right: 0;
  margin-left: 10px;
}

body.rtl .navigation.post-navigation .nav-links .nav-next {
  margin-left: 0;
  margin-right: auto;
}

/* 
==========================================================================
   FORM RTL STYLES
==========================================================================
*/

/* Search Form RTL */
body.rtl .widget .search-form {
  text-align: right;
}

body.rtl input[type="search"],
body.rtl input[type="email"],
body.rtl input[type="url"],
body.rtl input[type="text"],
body.rtl select,
body.rtl textarea {
  text-align: right;
}

/* Comment Form RTL */
body.rtl .comments-area .comment-form-comment label {
  text-align: right;
}

/* 
==========================================================================
   ADMIN BAR RTL STYLES
==========================================================================
*/

/* Admin Bar RTL */
body.rtl.admin-bar.has-aghome .ax-hstyle1,
body.rtl.admin-bar.scrolling .ax-hstyle1 {
  right: 0;
  left: auto;
}

/* 
==========================================================================
   BUTTON RTL STYLES
==========================================================================
*/

/* Buttons RTL */
body.rtl .btn.outline {
  margin-left: 0;
  margin-right: 1rem;
}

body.rtl .ax-all-blog .ax-blog-next-all-btn a {
  margin-right: 0;
  margin-left: 13px;
}

/* 
==========================================================================
   UTILITY CLASSES RTL
==========================================================================
*/

/* Text Alignment RTL */
body.rtl .text-left {
  text-align: right !important;
}

body.rtl .text-right {
  text-align: left !important;
}

/* Float RTL */
body.rtl .float-left {
  float: right !important;
}

body.rtl .float-right {
  float: left !important;
}

/* Margin RTL */
body.rtl .ml-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

body.rtl .mr-auto {
  margin-right: 0 !important;
  margin-left: auto !important;
}

/* Padding RTL */
body.rtl .pl-0 {
  padding-left: inherit !important;
  padding-right: 0 !important;
}

body.rtl .pr-0 {
  padding-right: inherit !important;
  padding-left: 0 !important;
}

/* 
==========================================================================
   RESPONSIVE RTL STYLES
==========================================================================
*/

/* Mobile RTL */
@media (max-width: 768px) {
  body.rtl .mobile-menu-bar {
    text-align: right;
  }
  
  body.rtl .main-navigation.toggled ul {
    text-align: right;
  }
  
  body.rtl .main-navigation.toggled ul li {
    float: none;
    text-align: right;
  }
  
  body.rtl .aghome .ax-home-btn {
    justify-content: center;
  }
  
  body.rtl .aghome a.ax-home-first-btn {
    margin: 0 0 15px 0;
  }
}

/* Tablet RTL */
@media (max-width: 992px) {
  body.rtl .head-logo-sec {
    justify-content: center;
    text-align: center;
  }
  
  body.rtl .pxm-style1 .d-flex {
    flex-direction: column;
  }
  
  body.rtl .pxms1-logo {
    margin: 0 auto 15px auto;
  }
}

/* 
==========================================================================
   RTL IMPROVEMENTS FOR BETTER READABILITY
==========================================================================
*/

/* Enhanced RTL Typography */
body.rtl {
  font-family: "Rubik", "Tahoma", "Arial", sans-serif;
}

/* RTL List Styling */
body.rtl ul,
body.rtl ol {
  padding-right: 20px;
  padding-left: 0;
}

body.rtl li {
  text-align: right;
}

/* RTL Blockquote */
body.rtl blockquote {
  border-right: 4px solid var(--color-primary);
  border-left: none;
  padding-right: 20px;
  padding-left: 0;
  margin-right: 0;
  margin-left: 20px;
}

/* RTL Code and Pre */
body.rtl pre,
body.rtl code {
  direction: ltr;
  text-align: left;
}

/* RTL Table */
body.rtl table {
  direction: rtl;
}

body.rtl th,
body.rtl td {
  text-align: right;
}

/* RTL Image Captions */
body.rtl .wp-caption {
  text-align: right;
}

body.rtl .wp-caption-text {
  text-align: right;
}
