/* ============================================
   Arabic RTL Layout - نفس التصميم الإنجليزي مع RTL فقط
   ============================================ */

/* Base RTL Direction - فقط تغيير الاتجاه */
html[dir="rtl"],
html[dir="rtl"] body {
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif !important;
  direction: rtl;
  text-align: right;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* RTL Typography - نفس الخطوط لكن RTL */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: "Cairo", sans-serif !important;
  text-align: right;
  direction: rtl;
  line-height: 1.5;
  word-spacing: 0.05em;
  letter-spacing: 0;
}

html[dir="rtl"] p {
  text-align: right;
  direction: rtl;
  line-height: 1.8;
  word-spacing: 0.1em;
}

/* RTL Header - نفس التصميم */
html[dir="rtl"] .tg-header__top-menu ul {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

html[dir="rtl"] .tg-header__top-menu ul li {
  margin-left: 30px;
  margin-right: 0;
}

html[dir="rtl"] .tg-header__top-menu ul li:first-child {
  margin-left: 0;
}

html[dir="rtl"] .tg-header__top-menu ul li svg {
  margin-left: 8px;
  margin-right: 0;
}

/* RTL Navigation - نفس التصميم */
html[dir="rtl"] .tgmenu__nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .tgmenu__navbar-wrap {
  order: 2;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation {
  flex-direction: row-reverse;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li {
  margin-left: 30px;
  margin-right: 0;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:first-child {
  margin-left: 0;
}

html[dir="rtl"] .tgmenu__action {
  order: 1;
  flex-direction: row-reverse;
}

html[dir="rtl"] .tgmenu__action ul {
  flex-direction: row-reverse;
}

html[dir="rtl"] .tgmenu__action ul li {
  margin-left: 20px;
  margin-right: 0;
}

html[dir="rtl"] .tgmenu__action ul li:first-child {
  margin-left: 0;
}

html[dir="rtl"] .logo {
  order: 3;
}

/* RTL Dropdown - نفس التصميم */
html[dir="rtl"] .dropdown-menu {
  right: 0 !important;
  left: auto !important;
  text-align: right;
}

html[dir="rtl"] .sub-menu {
  right: 0 !important;
  left: auto !important;
  text-align: right;
}

html[dir="rtl"] .sub-menu li {
  text-align: right;
}

/* RTL Buttons - نفس التصميم */
html[dir="rtl"] .tg-btn svg,
html[dir="rtl"] .tg-text-btn svg,
html[dir="rtl"] .project__icon svg,
html[dir="rtl"] .about__list-item svg {
  margin-right: 8px;
  margin-left: 0;
  transform: scaleX(-1);
}

/* RTL Slider - نفس التصميم */
html[dir="rtl"] .slider__bg {
  direction: rtl;
}

html[dir="rtl"] .slider__content {
  text-align: right;
}

html[dir="rtl"] .slider__btn {
  flex-direction: row-reverse;
}

html[dir="rtl"] .slider__btn .tg-btn {
  margin-left: 15px;
  margin-right: 0;
}

html[dir="rtl"] .slider__btn .tg-btn:first-child {
  margin-left: 0;
}

html[dir="rtl"] .slider__shape {
  direction: ltr;
  pointer-events: none;
}

/* RTL Section Titles - نفس التصميم */
html[dir="rtl"] .section__title {
  text-align: right;
}

html[dir="rtl"] .section__title .sub-title {
  text-align: right;
}

html[dir="rtl"] .section__title .title {
  text-align: right;
}

html[dir="rtl"] .section__title p {
  text-align: right;
}

/* RTL Grid System - نفس التصميم */
html[dir="rtl"] .row {
  direction: rtl;
}

html[dir="rtl"] [class*="col-"] {
  direction: rtl;
}

/* RTL Cards - نفس التصميم */
html[dir="rtl"] .service__item,
html[dir="rtl"] .team__item,
html[dir="rtl"] .portfolio__item,
html[dir="rtl"] .blog__item {
  text-align: right;
}

html[dir="rtl"] .service__item .service__content,
html[dir="rtl"] .team__item .team__content,
html[dir="rtl"] .blog__item .blog__content {
  text-align: right;
}

html[dir="rtl"] .service__item .service__content h4,
html[dir="rtl"] .team__item .team__content h4,
html[dir="rtl"] .blog__item .blog__content h4 {
  text-align: right;
}

html[dir="rtl"] .service__item .service__content p,
html[dir="rtl"] .team__item .team__content p,
html[dir="rtl"] .blog__item .blog__content p {
  text-align: right;
}

/* RTL Forms - نفس التصميم */
html[dir="rtl"] .form-control,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .form-group label {
  text-align: right;
}

/* RTL Footer - نفس التصميم */
html[dir="rtl"] .footer__top {
  direction: rtl;
}

html[dir="rtl"] .footer__widget {
  text-align: right;
}

html[dir="rtl"] .footer__link {
  direction: rtl;
}

html[dir="rtl"] .footer__link li {
  text-align: right;
}

html[dir="rtl"] .footer__social ul {
  flex-direction: row-reverse;
}

/* RTL Lists - نفس التصميم */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 0;
  padding-left: 20px;
}

html[dir="rtl"] ul.list-wrap li {
  text-align: right;
}

/* RTL Icons - نفس التصميم */
html[dir="rtl"] .icon {
  margin-left: 10px;
  margin-right: 0;
}

/* RTL Swiper - نفس التصميم */
html[dir="rtl"] .swiper-container {
  direction: rtl;
}

/* RTL Breadcrumb - نفس التصميم */
html[dir="rtl"] .breadcrumb {
  direction: rtl;
  flex-direction: row-reverse;
}

html[dir="rtl"] .breadcrumb__content {
  text-align: right;
}

html[dir="rtl"] .breadcrumb__content .title {
  text-align: right;
}

/* RTL Testimonials - نفس التصميم */
html[dir="rtl"] .testimonial__item {
  text-align: right;
}

/* RTL Pricing - نفس التصميم */
html[dir="rtl"] .pricing__box {
  text-align: right;
}

html[dir="rtl"] .pricing__list ul {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .pricing__list ul li {
  direction: rtl;
  text-align: right;
}

/* RTL Accordion - نفس التصميم */
html[dir="rtl"] .accordion-item {
  text-align: right;
}

html[dir="rtl"] .accordion-button {
  text-align: right;
}

/* RTL Tabs - نفس التصميم */
html[dir="rtl"] .nav-tabs {
  flex-direction: row-reverse;
}

/* RTL Pagination - نفس التصميم */
html[dir="rtl"] .pagination {
  flex-direction: row-reverse;
}

/* RTL Modal - نفس التصميم */
html[dir="rtl"] .modal-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .modal-body {
  text-align: right;
}

html[dir="rtl"] .modal-footer {
  flex-direction: row-reverse;
}

/* RTL Table - نفس التصميم */
html[dir="rtl"] .table {
  direction: rtl;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
  text-align: right;
}

/* RTL Search - نفس التصميم */
html[dir="rtl"] .search__form {
  direction: rtl;
}

html[dir="rtl"] .search-input-field {
  direction: rtl;
  text-align: right;
}

/* RTL Counter - نفس التصميم */
html[dir="rtl"] .counter__item {
  text-align: center;
}

/* RTL Contact - نفس التصميم */
html[dir="rtl"] .contact__info-item {
  text-align: right;
}

html[dir="rtl"] .contact__info-item .icon {
  margin-left: auto;
  margin-right: 0;
}

/* RTL Float Helpers - نفس التصميم */
html[dir="rtl"] .float-left {
  float: right !important;
}

html[dir="rtl"] .float-right {
  float: left !important;
}

html[dir="rtl"] .ml-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html[dir="rtl"] .mr-auto {
  margin-right: 0 !important;
  margin-left: auto !important;
}

html[dir="rtl"] .text-left {
  text-align: right !important;
}

html[dir="rtl"] .text-right {
  text-align: left !important;
}

/* RTL Menu Item Has Children Arrow */
html[dir="rtl"] .menu-item-has-children > a::after {
  margin-right: 5px;
  margin-left: 0;
}

/* RTL Scroll to Top - نفس التصميم */
html[dir="rtl"] .scroll__top {
  left: 30px !important;
  right: auto !important;
}

/* RTL Brand Section - نفس التصميم */
html[dir="rtl"] .brand__item {
  text-align: center;
}

/* RTL Mobile Menu */
@media (max-width: 991px) {
  html[dir="rtl"] .mobile-nav {
    direction: rtl;
    text-align: right;
  }
}

/* Ensure images and decorative elements maintain their position */
html[dir="rtl"] .slider__shape,
html[dir="rtl"] .about__img-five .shape,
html[dir="rtl"] .portfolio__item .portfolio__thumb::after {
  direction: ltr;
}

/* Fix any absolute positioned decorative elements */
html[dir="rtl"] .slider__bg-img::before,
html[dir="rtl"] .slider__bg-img::after {
  direction: ltr;
}

/* Additional RTL fixes for better Arabic text rendering */
html[dir="rtl"] .services__item,
html[dir="rtl"] .services__content {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .about__content,
html[dir="rtl"] .about__list-wrap {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .about__img-five {
  direction: ltr;
}

html[dir="rtl"] .about__img-five .right-img {
  margin-left: 20px;
  margin-right: 0;
}

html[dir="rtl"] .about__area-five .row {
  direction: ltr !important;
  flex-direction: row-reverse !important;
}

html[dir="rtl"] .about__area-five .about__content-five {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .about__img-five .experience__wrap {
  left: 0 !important;
  right: auto !important;
  border-radius: 0 24px 0 15px !important;
}

html[dir="rtl"] .about__list-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .about__list-item .icon {
  margin-left: 15px;
  margin-right: 0;
}

html[dir="rtl"] .choose__list li {
  text-align: right;
  padding-right: 15px;
  padding-left: 0;
}

html[dir="rtl"] .choose__list li svg {
  margin-left: 10px;
  margin-right: 0;
}

html[dir="rtl"] .project__content {
  text-align: right;
}

html[dir="rtl"] .testimonial__content-wrap {
  text-align: right;
}

html[dir="rtl"] .testimonial__avatar {
  flex-direction: row-reverse;
}

html[dir="rtl"] .testimonial__avatar .content {
  text-align: right;
  margin-right: 15px;
  margin-left: 0;
}

html[dir="rtl"] .blog-post__content,
html[dir="rtl"] .blog-post__content-two {
  text-align: right;
}

html[dir="rtl"] .blog-post__meta {
  flex-direction: row-reverse;
}

html[dir="rtl"] .blog-post__meta li {
  margin-left: 20px;
  margin-right: 0;
}

html[dir="rtl"] .blog-post__meta li:first-child {
  margin-left: 0;
}

html[dir="rtl"] .contact__content {
  text-align: right;
}

html[dir="rtl"] .contact__info-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .contact__info-item .icon {
  margin-left: 15px;
  margin-right: 0;
}

html[dir="rtl"] .contact__info-item .content {
  text-align: right;
}

html[dir="rtl"] .contact__form-wrap {
  direction: rtl;
}

html[dir="rtl"] .form-grp {
  text-align: right;
}

html[dir="rtl"] .marquee__item {
  direction: rtl;
}

/* Fix text alignment for all text elements in RTL */
html[dir="rtl"] span,
html[dir="rtl"] a,
html[dir="rtl"] li,
html[dir="rtl"] td,
html[dir="rtl"] th {
  text-align: right;
  direction: rtl;
}

/* Fix Swiper pagination and navigation in RTL */
html[dir="rtl"] .swiper-pagination {
  direction: rtl;
}

html[dir="rtl"] .swiper-button-next,
html[dir="rtl"] .swiper-button-prev {
  transform: scaleX(-1);
}

/* Ensure proper line-height and spacing for Arabic text */
html[dir="rtl"] body {
  line-height: 1.8;
  word-spacing: 0.1em;
}

html[dir="rtl"] p {
  line-height: 1.8;
  text-align: right;
}

/* Fix counter items alignment */
html[dir="rtl"] .counter__item,
html[dir="rtl"] .counter__item-two {
  text-align: center;
}

/* Fix counter content alignment - important for consistent look */
html[dir="rtl"] .counter__content {
  text-align: center !important;
}

html[dir="rtl"] .counter__item-two .counter__content {
  text-align: right !important;
}

/* ============================================
   Hero Slider Arabic Formatting Fixes
   ============================================ */

/* Fix slider content alignment and spacing */
html[dir="rtl"] .slider__content {
  text-align: right !important;
  direction: rtl !important;
  padding-right: 0;
  padding-left: 20px;
}

html[dir="rtl"] .slider__content .sub-title {
  text-align: right !important;
  direction: rtl !important;
  display: inline-block;
  margin-right: 0;
  margin-left: auto;
}

html[dir="rtl"] .slider__content .sub-title::before {
  left: auto !important;
  right: 0 !important;
  transform: none !important;
}

html[dir="rtl"] .slider__content .title {
  text-align: right !important;
  direction: rtl !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  margin-bottom: 20px !important;
  word-spacing: 0.1em;
  letter-spacing: 0;
}

html[dir="rtl"] .slider__content p {
  text-align: right !important;
  direction: rtl !important;
  line-height: 1.8 !important;
  margin-bottom: 35px !important;
  width: 100% !important;
  max-width: 600px;
  margin-right: 0;
  margin-left: auto;
}

html[dir="rtl"] .slider__btn {
  flex-direction: row-reverse !important;
  justify-content: flex-start !important;
  gap: 15px;
  margin-right: 0;
  margin-left: auto;
}

html[dir="rtl"] .slider__btn .tg-btn {
  margin-left: 15px !important;
  margin-right: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html[dir="rtl"] .slider__btn .tg-btn:first-child {
  margin-left: 0 !important;
}

html[dir="rtl"] .slider__btn .tg-btn svg {
  margin-right: 8px !important;
  margin-left: 0 !important;
  transform: scaleX(-1);
}

/* Fix slider container alignment */
html[dir="rtl"] .slider__area .container .row {
  justify-content: flex-end;
}

html[dir="rtl"] .slider__area .container .row [class*="col-"] {
  display: flex;
  justify-content: flex-end;
}

/* Fix header top menu alignment */
html[dir="rtl"] .tg-header__top-menu ul {
  justify-content: flex-start !important;
  padding-right: 0;
  padding-left: 0;
}

html[dir="rtl"] .tg-header__top-menu ul li {
  margin-left: 30px !important;
  margin-right: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

html[dir="rtl"] .tg-header__top-menu ul li:first-child {
  margin-left: 0 !important;
}

html[dir="rtl"] .tg-header__top-menu ul li svg {
  margin-left: 8px !important;
  margin-right: 0 !important;
}

/* Fix navigation menu alignment */
html[dir="rtl"] .tgmenu__nav {
  flex-direction: row-reverse !important;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation {
  flex-direction: row-reverse !important;
  gap: 0;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li {
  margin-left: 30px !important;
  margin-right: 0 !important;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:first-child {
  margin-left: 0 !important;
}

html[dir="rtl"] .tgmenu__action {
  flex-direction: row-reverse !important;
}

html[dir="rtl"] .tgmenu__action ul {
  flex-direction: row-reverse !important;
}

html[dir="rtl"] .tgmenu__action ul li {
  margin-left: 15px !important;
  margin-right: 0 !important;
}

html[dir="rtl"] .tgmenu__action ul li:first-child {
  margin-left: 0 !important;
}

/* Improve Arabic text rendering in all sections */
html[dir="rtl"] .section__title {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .section__title.text-center {
  text-align: center !important;
}

html[dir="rtl"] .section__title .sub-title {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .section__title .title {
  text-align: right !important;
  direction: rtl !important;
  line-height: 1.4 !important;
}

/* Fix button text alignment */
html[dir="rtl"] .tg-btn {
  direction: rtl;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

html[dir="rtl"] .tg-btn.white-btn {
  direction: rtl;
}

/* ============================================
   Navbar Arabic Formatting Fixes
   ============================================ */

/* Fix navbar container alignment */
html[dir="rtl"] .tgmenu__wrap {
  direction: rtl !important;
}

html[dir="rtl"] .tgmenu__nav {
  flex-direction: row-reverse !important;
  direction: rtl !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100%;
}

/* Ensure proper spacing between navbar sections */
html[dir="rtl"] .tgmenu__wrap {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

/* Fix logo position in RTL */
html[dir="rtl"] .tgmenu__nav .logo {
  order: 3 !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Fix navigation menu */
html[dir="rtl"] .tgmenu__navbar-wrap {
  order: 2 !important;
  margin-left: 30px !important;
  margin-right: 30px !important;
  flex: 1;
  justify-content: flex-end;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation {
  flex-direction: row-reverse !important;
  direction: rtl !important;
  gap: 0 !important;
  justify-content: flex-end;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li {
  margin-left: 30px !important;
  margin-right: 0 !important;
  text-align: right !important;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:first-child {
  margin-left: 0 !important;
}

/* Ensure navigation items are in correct RTL order */
html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:nth-child(1) {
  order: 6; /* الرئيسية */
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:nth-child(2) {
  order: 5;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:nth-child(3) {
  order: 4;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:nth-child(4) {
  order: 3;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:nth-child(5) {
  order: 2;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li:nth-child(6) {
  order: 1;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li > a {
  text-align: right !important;
  direction: rtl !important;
  padding: 10px 0 !important;
}

/* Fix submenu in RTL */
html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li .sub-menu {
  right: 0 !important;
  left: auto !important;
  text-align: right !important;
  direction: rtl !important;
  min-width: 200px;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li .sub-menu li {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .tgmenu__navbar-wrap .navigation > li .sub-menu li a {
  text-align: right !important;
  direction: rtl !important;
  padding: 10px 20px 10px 15px !important;
}

/* Clean RTL Header Top alignment */
html[dir="rtl"] .tg-header__top-menu ul {
  display: flex !important;
  flex-direction: row !important;
  direction: rtl !important;
}

/* Action items order within the block */
html[dir="rtl"] .tgmenu__action > ul li.offCanvas-menu {
  order: 10 !important; /* Far left */
}

html[dir="rtl"] .tgmenu__action > ul li.header-lang {
  order: 5 !important;
}

html[dir="rtl"] .tgmenu__action > ul li.header-btn {
  order: 2 !important;
}

html[dir="rtl"] .tgmenu__action > ul li.header-search {
  order: 1 !important; /* Far right of action group */
}

html[dir="rtl"] .tgmenu__action > ul li.header-btn .tg-btn {
  white-space: nowrap;
  padding: 10px 20px;
}

/* Fix header top menu */
html[dir="rtl"] .tg-header__top-menu ul {
  justify-content: flex-start !important;
  flex-direction: row-reverse !important;
  direction: rtl !important;
}

html[dir="rtl"] .tg-header__top-menu ul li {
  margin-left: 30px !important;
  margin-right: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

html[dir="rtl"] .tg-header__top-menu ul li:first-child {
  margin-left: 0 !important;
}

html[dir="rtl"] .tg-header__top-menu ul li svg {
  margin-left: 8px !important;
  margin-right: 0 !important;
}

/* ============================================
   Services Section Arabic Formatting Fixes
   ============================================ */

/* Fix services cards alignment */
html[dir="rtl"] .services__item {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .services__content {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .services__content .title {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  margin-bottom: 16px !important;
  line-height: 1.4 !important;
}

html[dir="rtl"] .services__content p {
  text-align: right !important;
  direction: rtl !important;
  line-height: 1.8 !important;
  margin-bottom: 20px !important;
}

html[dir="rtl"] .services__content .tg-text-btn {
  text-align: right !important;
  direction: rtl !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
}

html[dir="rtl"] .services__content .tg-text-btn svg {
  margin-right: 8px !important;
  margin-left: 0 !important;
  transform: scaleX(-1);
}

/* Fix services icon position */
html[dir="rtl"] .services__icon-wrap {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .services__icon {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* Fix services item two and three */
html[dir="rtl"] .services__item-two,
html[dir="rtl"] .services__item-three {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .services__content-two,
html[dir="rtl"] .services__content-three {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .services__content-two .title,
html[dir="rtl"] .services__content-three .title {
  text-align: right !important;
  direction: rtl !important;
  line-height: 1.4 !important;
}

html[dir="rtl"] .services__content-two p,
html[dir="rtl"] .services__content-three p {
  text-align: right !important;
  direction: rtl !important;
  line-height: 1.8 !important;
}

/* ============================================
   Footer Spacing Reduction
   ============================================ */

/* Reduce footer top padding */
html[dir="rtl"] .footer__bg {
  padding: 60px 0 0 !important;
  margin-top: 0 !important;
}

@media (max-width: 991.98px) {
  html[dir="rtl"] .footer__bg {
    padding: 50px 0 0 !important;
  }
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .footer__bg {
    padding: 40px 0 0 !important;
  }
}

/* Reduce footer CTA wrap padding */
html[dir="rtl"] .footer__cta-wrap {
  padding-bottom: 30px !important;
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .footer__cta-wrap {
    padding-bottom: 20px !important;
  }
}

/* Reduce footer top section padding */
html[dir="rtl"] .footer__top {
  padding: 30px 0 25px !important;
}

@media (max-width: 991.98px) {
  html[dir="rtl"] .footer__top {
    padding: 25px 0 20px !important;
  }
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .footer__top {
    padding: 20px 0 15px !important;
  }
}

/* Reduce footer widget spacing */
html[dir="rtl"] .footer__widget {
  margin-bottom: 25px !important;
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .footer__widget {
    margin-bottom: 20px !important;
  }
}

html[dir="rtl"] .footer__widget-title {
  margin-bottom: 15px !important;
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .footer__widget-title {
    margin-bottom: 12px !important;
  }
}

/* Reduce footer bottom padding */
html[dir="rtl"] .footer__bottom {
  padding: 20px 0 !important;
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .footer__bottom {
    padding: 15px 0 !important;
  }
}

/* Fix footer text alignment */
html[dir="rtl"] .footer__widget {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .footer__link {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .footer__link li {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .footer__link li a {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .footer__contact {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .footer__contact p,
html[dir="rtl"] .footer__contact a {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .copyright__text {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] .footer__social ul {
  flex-direction: row-reverse !important;
  justify-content: flex-start !important;
}

/* ============================================
   Global RTL Resets & Positioning
   ============================================ */

html[dir="rtl"] [style*="left"],
html[dir="rtl"] .left,
html[dir="rtl"] .absolute-left {
  left: auto !important;
}

html[dir="rtl"] [style*="right"],
html[dir="rtl"] .right,
html[dir="rtl"] .absolute-right {
  right: auto !important;
}

/* Swap directional animations */
html[dir="rtl"] [data-sal*="slide-right"] {
  --sal-duration: 0.7s;
  --sal-delay: 0.1s;
  transform: translateX(-20px);
}

html[dir="rtl"] [data-sal*="slide-left"] {
  transform: translateX(20px);
}

/* ============================================
   Additional Navbar & Responsive RTL Fixes
   ============================================ */

/* Fix Top Menu Separator Line */
html[dir="rtl"] .tg-header__top-menu .list-wrap li::before {
  right: auto !important;
  left: -20px !important;
  transform: translateY(-50%) rotate(-30deg) !important;
}

/* Fix Navbar Wrap Margin */
html[dir="rtl"] .tgmenu__navbar-wrap ul {
  margin: 0 62px 0 0 !important;
}

@media (max-width: 1500px) {
  html[dir="rtl"] .tgmenu__navbar-wrap ul {
    margin: 0 30px 0 0 !important;
  }
}

/* Navbar Nav Padding Fix */
html[dir="rtl"] .tgmenu__nav {
  padding: 0 30px 0 13px !important;
}

@media (max-width: 1199.98px) {
  html[dir="rtl"] .tgmenu__nav {
    padding: 10px 30px 10px 13px !important;
  }
}

/* Submenu Position and Arrow Fix */
html[dir="rtl"] .tgmenu__navbar-wrap ul li .sub-menu {
  left: auto !important;
  right: 0 !important;
  transform-origin: 100% 0 !important;
}

html[dir="rtl"] .tgmenu__navbar-wrap ul li .sub-menu li a {
  padding: 8px 25px 8px 15px !important;
  text-align: right !important;
}

html[dir="rtl"] .tgmenu__main-menu li.menu-item-has-children > a::after {
  margin-right: 6px !important;
  margin-left: 0 !important;
}

/* Mobile Menu RTL Fixes */
html[dir="rtl"] .tgmobile__menu-box {
  left: auto !important;
  right: -100% !important;
  transition: all 0.5s cubic-bezier(0, 0, 0.2, 1) !important;
}

html[dir="rtl"] .mobile-menu-visible .tgmobile__menu-box {
  right: 0 !important;
}

html[dir="rtl"] .tgmobile__menu-box .nav-logo {
  text-align: right !important;
}

html[dir="rtl"] .tgmobile__menu-box .tgmobile__search form {
  direction: rtl !important;
}

html[dir="rtl"] .tgmobile__menu-box .tgmobile__search form input {
  padding: 10px 45px 10px 15px !important;
  text-align: right !important;
}

html[dir="rtl"] .tgmobile__menu-box .tgmobile__search form button {
  right: auto !important;
  left: 0 !important;
}

html[dir="rtl"] .tgmobile__menu-outer ul li a {
  text-align: right !important;
}

html[dir="rtl"]
  .tgmobile__menu-outer
  ul
  li.menu-item-has-children
  .dropdown-btn {
  right: auto !important;
  left: 0 !important;
}

/* Transitions and Polish */
.tgmenu__nav {
  transition: all 0.3s ease-in-out !important;
}

.tg-header__area {
  transition: background-color 0.3s ease, padding 0.3s ease !important;
}

.tg-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Ensure language text alignment */
.lang-text {
  margin: 0 4px !important;
}
