/* RTL Support for Frontend/Landing Pages - Arabic, Hebrew, Persian, Urdu */

/* Import fonts - EXACT same as ziwo.io */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Nunito:wght@300;400;500;600;700;800;900&family=Open+Sans:wght@300;400;500;600;700;800&display=swap');

/* Optimized font sizing for Arabic - better readability */
html {
  font-size: 95% !important;
}

body {
  font-size: 95% !important;
  line-height: 1.8 !important;
  letter-spacing: 0.02em !important;
}

[dir="rtl"] {
  /* Bootstrap Grid and Layout */
  text-align: right;
  direction: rtl;
  font-family: Montserrat, Nunito, 'Open Sans', 'Helvetica Neue', sans-serif !important;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[dir="rtl"] body {
  text-align: right;
  font-family: Montserrat, Nunito, 'Open Sans', 'Helvetica Neue', sans-serif !important;
}

[dir="rtl"] * {
  font-family: Montserrat, Nunito, 'Open Sans', 'Helvetica Neue', sans-serif !important;
}

/* Creative visual enhancements */
[dir="rtl"] .hero-banner-three {
  position: relative;
  overflow: hidden;
}

/* Smooth fade-in animation for Arabic content */
[dir="rtl"] .hero-banner-three h1,
[dir="rtl"] .hero-banner-three p,
[dir="rtl"] .hero-banner-three form {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Better text shadow for enhanced readability */
[dir="rtl"] .hero-banner-three .hero-heading {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Highlight important text with subtle gradient */
[dir="rtl"] .hero-banner-three .hero-heading::first-line {
  color: #1a1a1a;
}

/* Hero Banner - Mirror English design for RTL (56% width on left, not 50/50) */

/* Mirror illustration holder to LEFT side with bg_030.png - DESKTOP ONLY */
@media (min-width: 992px) {
  [dir="rtl"] .hero-banner-three .illustration-holder {
    right: auto !important;
    left: 0 !important;
    background: url(../frontend/images/graphics/bg_030.png) no-repeat right bottom !important;
    background-size: cover !important;
  }
}

/* Mobile - use default responsive illustration holder */
@media (max-width: 991px) {
  [dir="rtl"] .hero-banner-three .illustration-holder {
    right: auto !important;
    left: auto !important;
    background: url(../frontend/images/graphics/bg_030.png) no-repeat center bottom !important;
    background-size: cover !important;
  }
}

/* Mirror man image to LEFT and flip horizontally - DESKTOP ONLY */
@media (min-width: 992px) {
  [dir="rtl"] .hero-banner-three .illustration-holder .man-img {
    right: auto !important;
    left: 7% !important;
    transform: scaleX(-1) !important; /* Flip horizontally 180 degrees */
  }
}

/* Mobile - reset man image to default (no flip) */
@media (max-width: 991px) {
  [dir="rtl"] .hero-banner-three .illustration-holder .man-img {
    right: auto !important;
    left: auto !important;
    transform: none !important;
  }
}

/* Mirror screen image to LEFT - DESKTOP ONLY */
@media (min-width: 992px) {
  [dir="rtl"] .hero-banner-three .illustration-holder .shape_01 {
    right: auto !important;
    left: 5% !important;
  }
}

/* Mobile - reset screen image to default */
@media (max-width: 991px) {
  [dir="rtl"] .hero-banner-three .illustration-holder .shape_01 {
    right: auto !important;
    left: auto !important;
  }
}

/* Fix overlapping - better text container design - DESKTOP ONLY */
@media (min-width: 992px) {
  [dir="rtl"] .hero-banner-three .container {
    padding-left: 0 !important;
    padding-right: 3rem !important;
    margin-left: 56% !important; /* Match illustration-holder width */
    margin-right: 0 !important;
    width: 44% !important;
    max-width: 44% !important;
  }
}

/* Creative and optimized Arabic typography for hero section */
[dir="rtl"] .hero-banner-three .hero-heading {
  font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
  line-height: 1.4 !important;
  margin-bottom: 2rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  word-spacing: 0.1em !important;
}

[dir="rtl"] .hero-banner-three .fs-28 {
  font-size: clamp(1.25rem, 2vw, 1.75rem) !important;
  line-height: 1.8 !important;
  margin-bottom: 2rem !important;
  font-weight: 500 !important;
  color: rgba(0, 0, 0, 0.85) !important;
  word-spacing: 0.05em !important;
}

/* Improve button and form text */
[dir="rtl"] .hero-banner-three .hero-banner-email-btn {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  padding: 1rem 2rem !important;
  letter-spacing: 0.03em !important;
}

[dir="rtl"] .hero-banner-three .hero-banner-email-input {
  font-size: 1rem !important;
  padding: 1rem 1.5rem !important;
}

/* Feature items with better spacing */
[dir="rtl"] .hero-banner-three li {
  font-size: 1rem !important;
  line-height: 1.6 !important;
  margin-bottom: 0.75rem !important;
  word-spacing: 0.05em !important;
}

/* Desktop only - full width for text column */
@media (min-width: 992px) {
  [dir="rtl"] .hero-banner-three .col-xl-6,
  [dir="rtl"] .hero-banner-three .col-lg-7,
  [dir="rtl"] .hero-banner-three .col-md-8 {
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
}

/* Upper menu - EXACT same structure as English but RTL text */
[dir="rtl"] .theme-main-menu .info-row,
[dir="rtl"] .theme-main-menu.menu-style-three .info-row {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 10 !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

[dir="rtl"] .theme-main-menu.menu-style-three.fixed .info-row {
  display: none !important;
}

/* Upper menu layout - EXACTLY like English: up-nav LEFT, contact-info RIGHT */
[dir="rtl"] .theme-main-menu .info-row .d-md-flex {
  display: flex !important;
  justify-content: space-between !important;
}

/* Up-nav on LEFT side (Privacy, Terms, FAQ) - RTL text direction */
[dir="rtl"] .theme-main-menu .info-row .up-nav {
  display: flex !important;
  flex-direction: row-reverse !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  margin: 0 -4px !important;
  list-style: none !important;
  padding: 0 !important;
}

[dir="rtl"] .theme-main-menu .info-row .up-nav li {
  margin: 0 4px !important;
}

[dir="rtl"] .theme-main-menu .info-row .up-nav li a {
  font-size: 16px !important;
  font-weight: 500 !important;
  color: rgba(0, 0, 0, 0.6) !important;
  transition: all 0.2s ease-in-out !important;
  text-decoration: none !important;
}

[dir="rtl"] .theme-main-menu .info-row .up-nav li a:hover {
  color: #000 !important;
}

/* Contact info on RIGHT side (phone, email) - RTL with reversed icons */
[dir="rtl"] .theme-main-menu .info-row .contact-info {
  display: flex !important;
  flex-direction: row-reverse !important;
  list-style: none !important;
  margin: 0 -15px !important;
  padding: 0 !important;
}

[dir="rtl"] .theme-main-menu .info-row .contact-info li {
  padding: 0 15px !important;
  display: flex !important;
  align-items: center !important;
}

[dir="rtl"] .theme-main-menu .info-row .contact-info li a {
  font-size: 18px !important;
  color: #000 !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
}

[dir="rtl"] .theme-main-menu .info-row .contact-info li .icon,
[dir="rtl"] .theme-main-menu .info-row .contact-info li img {
  margin-right: 0 !important;
  margin-left: 8px !important;
  order: 2 !important;
}

[dir="rtl"] .theme-main-menu .info-row .contact-info li a:hover {
  text-decoration: underline !important;
}

[dir="rtl"] .theme-main-menu .space-X {
  padding-left: 40px !important;
  padding-right: 40px !important;
}

/* Dark mode support - same as English */
html[data-bs-theme='dark'][dir="rtl"] .theme-main-menu .info-row .contact-info li a {
  color: #fff;
}

html[data-bs-theme='dark'][dir="rtl"] .theme-main-menu .info-row .up-nav li a {
  color: rgba(255, 255, 255, 0.6);
}

html[data-bs-theme='dark'][dir="rtl"] .theme-main-menu .info-row .up-nav li a:hover {
  color: #fff;
}

html[data-bs-theme='dark'][dir="rtl"] .nav-item .nav-link {
  color: #fff;
}

html[data-bs-theme='dark'][dir="rtl"] .nav-item:hover .nav-link {
  color: #ff481f;
}

/* Header positioning - ensure no overlap */
[dir="rtl"] .theme-main-menu.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

/* Sticky menu - same as English */
[dir="rtl"] .theme-main-menu.sticky-menu.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

[dir="rtl"] .theme-main-menu.sticky-menu.fixed .info-row {
  display: none;
}

/* Override for RTL - show info-row even when fixed */
[dir="rtl"] .theme-main-menu.menu-style-three.sticky-menu.fixed .info-row {
  display: flex !important;
}

/* Override responsive.css - FORCE show info-row on mobile for RTL */
@media (max-width: 767px) {
  [dir="rtl"] .theme-main-menu .info-row,
  [dir="rtl"] .theme-main-menu.menu-style-three .info-row {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    padding: 12px 0 !important;
  }

  [dir="rtl"] .theme-main-menu .info-row .up-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
  }

  [dir="rtl"] .theme-main-menu .info-row .contact-info {
    display: none !important; /* Hide contact on very small screens */
  }

  /* Mobile header - EXACT same structure as English */
  [dir="rtl"] .theme-main-menu .top-header {
    flex-wrap: nowrap !important;
  }

  /* Logo on LEFT (order-lg-0 same as English) */
  [dir="rtl"] .theme-main-menu .logo {
    order: 0 !important;
    flex: 0 0 auto !important;
  }

  /* Right widget stays on RIGHT (order-lg-3, me-3 ms-auto same as English) */
  [dir="rtl"] .theme-main-menu .right-widget {
    order: 3 !important;
    margin-left: auto !important;
    margin-right: 1rem !important;
  }

  /* Hamburger toggle button */
  [dir="rtl"] .theme-main-menu .navbar-toggler {
    display: block !important;
    order: 2 !important;
    margin-left: 1rem !important;
    margin-right: 0 !important;
  }

  /* Mobile menu dropdown */
  [dir="rtl"] .navbar-collapse.collapse:not(.show) {
    display: none !important;
  }

  [dir="rtl"] .navbar-collapse.show {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    padding: 1rem 0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    z-index: 1000 !important;
  }

  [dir="rtl"] .navbar-collapse .navbar-nav {
    flex-direction: column !important;
    width: 100% !important;
  }

  [dir="rtl"] .navbar-nav .nav-item {
    width: 100% !important;
    text-align: right !important;
  }

  [dir="rtl"] .navbar-nav .nav-link {
    padding: 0.75rem 1.5rem !important;
    display: block !important;
    width: 100% !important;
  }

  /* Mobile logo in menu */
  [dir="rtl"] .navbar-collapse .logo {
    display: block !important;
    padding: 0 1.5rem 1rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1rem !important;
  }

  /* Ensure header doesn't overlap content */
  [dir="rtl"] .theme-main-menu {
    position: relative !important;
    z-index: 100 !important;
  }
}

/* Tablet and Mobile - Keep same design as English but RTL */
@media (max-width: 991px) {
  /* Fix hero section overlapping header on mobile */
  [dir="rtl"] .hero-banner-three {
    padding-top: 250px !important;
    padding-bottom: 70px !important;
    margin-top: 0 !important;
  }

  /* Typography adjustments for smaller screens */
  [dir="rtl"] .hero-banner-three .hero-heading {
    font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }

  [dir="rtl"] .hero-banner-three .fs-28 {
    font-size: clamp(1rem, 2.5vw, 1.25rem) !important;
    margin-bottom: 1.5rem !important;
  }

  [dir="rtl"] h1 {
    font-size: clamp(1.5rem, 4.5vw, 2.25rem) !important;
  }

  [dir="rtl"] h2 {
    font-size: clamp(1.35rem, 4vw, 1.85rem) !important;
  }

  [dir="rtl"] h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem) !important;
  }
}

@media (max-width: 575px) {
  /* Small mobile optimizations */
  [dir="rtl"] body {
    font-size: 100% !important;
    line-height: 1.7 !important;
  }

  [dir="rtl"] p {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
  }

  /* Fix hero section overlapping on small mobile */
  [dir="rtl"] .hero-banner-three {
    padding-top: 200px !important;
    padding-bottom: 50px !important;
    margin-top: 0 !important;
  }

  [dir="rtl"] .hero-banner-three .hero-heading {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.35 !important;
  }

  [dir="rtl"] .hero-banner-three .fs-28 {
    font-size: 0.95rem !important;
    margin-bottom: 1.25rem !important;
  }

  [dir="rtl"] .hero-banner-three .hero-banner-email-btn {
    font-size: 0.9rem !important;
    padding: 0.75rem 1.5rem !important;
  }

  [dir="rtl"] .hero-banner-three .hero-banner-email-input {
    font-size: 0.9rem !important;
    padding: 0.75rem 1rem !important;
  }

  [dir="rtl"] .btn {
    font-size: 0.9rem !important;
    padding: 0.65rem 1.25rem !important;
  }

  /* Fix overlapping on mobile */
  [dir="rtl"] .partner-logo-one,
  [dir="rtl"] .feedback-section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  [dir="rtl"] .partner-logo-one .title,
  [dir="rtl"] section h2,
  [dir="rtl"] section h3 {
    margin-bottom: 2rem !important;
    padding-bottom: 1rem !important;
  }

  [dir="rtl"] section {
    margin-bottom: 1.5rem !important;
    padding-top: 1.5rem !important;
  }
}

/* Dropdown menus - RTL support */
[dir="rtl"] .dropdown-menu {
  left: auto !important;
  right: 0 !important;
  text-align: right !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  padding: 15px 0 !important;
  min-width: 200px !important;
}

[dir="rtl"] .dropdown-item {
  text-align: right !important;
  padding: 8px 20px !important;
  font-size: 16px !important;
  color: #000 !important;
  transition: all 0.2s ease-in-out !important;
}

[dir="rtl"] .dropdown-item:hover,
[dir="rtl"] .dropdown-item.active {
  color: #ff481f !important;
  background-color: transparent !important;
}

/* Main header structure - EXACTLY like English */
[dir="rtl"] .theme-main-menu .inner-content {
  border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

[dir="rtl"] .theme-main-menu .top-header {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Logo on LEFT - order-lg-0 (same as English) */
[dir="rtl"] .theme-main-menu .logo {
  order: 0 !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

[dir="rtl"] .theme-main-menu .logo a {
  display: flex !important;
  align-items: center !important;
}

[dir="rtl"] .theme-main-menu .logo img {
  display: block !important;
  max-height: 50px !important;
}

/* Right widget (Login/Signup) - order-lg-3, me-3 ms-auto (same as English) */
[dir="rtl"] .theme-main-menu .right-widget {
  order: 3 !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
  margin-right: 1rem !important;
}

[dir="rtl"] .theme-main-menu .right-widget ul {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

[dir="rtl"] .theme-main-menu .right-widget li {
  display: flex !important;
  align-items: center !important;
}

/* Login link with icon - reverse for RTL */
[dir="rtl"] .theme-main-menu .right-widget li a {
  display: flex !important;
  align-items: center !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  color: #000 !important;
}

[dir="rtl"] .theme-main-menu .right-widget li .icon {
  margin-right: 0 !important;
  margin-left: 8px !important;
  order: 2 !important;
}

/* Signup button spacing - ms-lg-4 ms-3 (same as English) */
[dir="rtl"] .theme-main-menu .right-widget li:not(:first-child) {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

@media (min-width: 992px) {
  [dir="rtl"] .theme-main-menu .right-widget li:not(:first-child) {
    margin-left: 1.5rem !important;
  }
}

/* Navigation - order-lg-2, ms-lg-4 (same as English) */
[dir="rtl"] .theme-main-menu nav.navbar {
  order: 2 !important;
  flex: 0 1 auto !important;
  padding: 0 !important;
  margin-left: 1.5rem !important;
  margin-right: 0 !important;
}

/* Navigation menu items - EXACTLY like English */
[dir="rtl"] .navbar-collapse {
  display: flex !important;
}

[dir="rtl"] .navbar-collapse .navbar-nav {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

[dir="rtl"] .navbar-nav .nav-item {
  display: inline-block !important;
}

[dir="rtl"] .navbar-nav .nav-link {
  font-size: 18px !important;
  font-weight: 500 !important;
  color: #000 !important;
  padding: 0.5rem 1rem !important;
  text-decoration: none !important;
  transition: all 0.2s ease-in-out !important;
}

[dir="rtl"] .navbar-nav .nav-item:hover .nav-link,
[dir="rtl"] .navbar-nav .nav-link.active {
  color: #ff481f !important;
}

/* Signup buttons styling */
[dir="rtl"] .signup-btn-three,
[dir="rtl"] .signup-btn-one {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

/* Mobile menu overlay */
[dir="rtl"] .mobile-menu-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  z-index: 999 !important;
  display: none !important;
}

[dir="rtl"] .navbar-collapse.show ~ .mobile-menu-overlay {
  display: block !important;
}

/* Breadcrumbs */
[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  content: "\\";
  transform: rotateY(180deg);
}

/* Forms */
[dir="rtl"] .form-control,
[dir="rtl"] .form-select,
[dir="rtl"] input,
[dir="rtl"] textarea {
  text-align: right;
}

[dir="rtl"] .input-group > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

[dir="rtl"] .input-group > :not(:first-child) {
  border-top-left-radius: 0.375rem;
  border-bottom-left-radius: 0.375rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Buttons - Enhanced for Arabic */
[dir="rtl"] .btn {
  font-size: 1rem !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.75rem !important;
  letter-spacing: 0.03em !important;
  word-spacing: 0.05em !important;
  transition: all 0.3s ease !important;
}

[dir="rtl"] .btn svg,
[dir="rtl"] .btn i {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .btn svg:first-child,
[dir="rtl"] .btn i:first-child {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Primary buttons with better styling */
[dir="rtl"] .btn-primary,
[dir="rtl"] .signup-btn-three,
[dir="rtl"] .signup-btn-one {
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

/* Links - smooth transitions */
[dir="rtl"] a {
  transition: all 0.3s ease !important;
}

/* Dropdown hover behavior */
[dir="rtl"] .dropdown:hover .dropdown-menu {
  display: block !important;
}

/* Cards */
[dir="rtl"] .card {
  text-align: right;
}

[dir="rtl"] .card-header {
  text-align: right;
}

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

/* Lists */
[dir="rtl"] ul,
[dir="rtl"] ol {
  padding-left: 0;
  padding-right: 2rem;
}

[dir="rtl"] .list-group {
  padding-left: 0;
  padding-right: 0;
}

/* Tables */
[dir="rtl"] table {
  text-align: right;
}

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

/* Modals */
[dir="rtl"] .modal-header {
  text-align: right;
}

[dir="rtl"] .modal-header .btn-close {
  margin-left: 0;
  margin-right: auto;
}

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

/* Alerts */
[dir="rtl"] .alert {
  text-align: right;
}

[dir="rtl"] .alert .btn-close {
  left: 0;
  right: auto;
}

/* Badges */
[dir="rtl"] .badge {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* Pagination */
[dir="rtl"] .pagination {
  flex-direction: row-reverse;
}

/* Progress */
[dir="rtl"] .progress {
  flex-direction: row-reverse;
}

/* Tooltips and Popovers */
[dir="rtl"] .tooltip {
  text-align: right;
}

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

/* Footer */
[dir="rtl"] .footer {
  text-align: right;
}

/* Hero Section */
[dir="rtl"] .hero-section {
  text-align: right;
}

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

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

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

/* Flex row reverse for all rows in RTL */
[dir="rtl"] .row > * {
  text-align: right;
}

/* Specific hero image positioning */
[dir="rtl"] .hero-img,
[dir="rtl"] .hero-image,
[dir="rtl"] .banner-image {
  order: -1;
}

/* Features Section */
[dir="rtl"] .features-section {
  text-align: right;
}

/* Pricing Cards */
[dir="rtl"] .pricing-card {
  text-align: right;
}

/* Testimonials */
[dir="rtl"] .testimonial {
  text-align: right;
}

/* Call to Action */
[dir="rtl"] .cta-section {
  text-align: right;
}

/* Float utilities */
[dir="rtl"] .float-start {
  float: right !important;
}

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

/* Text alignment */
[dir="rtl"] .text-start {
  text-align: right !important;
}

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

/* Margin utilities */
[dir="rtl"] .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

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

[dir="rtl"] .ms-1 {
  margin-left: 0 !important;
  margin-right: 0.25rem !important;
}

[dir="rtl"] .me-1 {
  margin-right: 0 !important;
  margin-left: 0.25rem !important;
}

[dir="rtl"] .ms-2 {
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
}

[dir="rtl"] .me-2 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

[dir="rtl"] .ms-3 {
  margin-left: 0 !important;
  margin-right: 1rem !important;
}

[dir="rtl"] .me-3 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

[dir="rtl"] .ms-4 {
  margin-left: 0 !important;
  margin-right: 1.5rem !important;
}

[dir="rtl"] .me-4 {
  margin-right: 0 !important;
  margin-left: 1.5rem !important;
}

[dir="rtl"] .ms-5 {
  margin-left: 0 !important;
  margin-right: 3rem !important;
}

[dir="rtl"] .me-5 {
  margin-right: 0 !important;
  margin-left: 3rem !important;
}

/* Padding utilities */
[dir="rtl"] .ps-1 {
  padding-left: 0 !important;
  padding-right: 0.25rem !important;
}

[dir="rtl"] .pe-1 {
  padding-right: 0 !important;
  padding-left: 0.25rem !important;
}

[dir="rtl"] .ps-2 {
  padding-left: 0 !important;
  padding-right: 0.5rem !important;
}

[dir="rtl"] .pe-2 {
  padding-right: 0 !important;
  padding-left: 0.5rem !important;
}

[dir="rtl"] .ps-3 {
  padding-left: 0 !important;
  padding-right: 1rem !important;
}

[dir="rtl"] .pe-3 {
  padding-right: 0 !important;
  padding-left: 1rem !important;
}

[dir="rtl"] .ps-4 {
  padding-left: 0 !important;
  padding-right: 1.5rem !important;
}

[dir="rtl"] .pe-4 {
  padding-right: 0 !important;
  padding-left: 1.5rem !important;
}

[dir="rtl"] .ps-5 {
  padding-left: 0 !important;
  padding-right: 3rem !important;
}

[dir="rtl"] .pe-5 {
  padding-right: 0 !important;
  padding-left: 3rem !important;
}

/* Border radius */
[dir="rtl"] .rounded-start {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: var(--bs-border-radius) !important;
  border-bottom-right-radius: var(--bs-border-radius) !important;
}

[dir="rtl"] .rounded-end {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: var(--bs-border-radius) !important;
  border-bottom-left-radius: var(--bs-border-radius) !important;
}

/* Checkboxes and Radio */
[dir="rtl"] .form-check {
  padding-left: 0;
  padding-right: 1.5em;
}

[dir="rtl"] .form-check-input {
  float: right;
  margin-left: 0;
  margin-right: -1.5em;
}

/* Icons in text */
[dir="rtl"] .icon-left {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .icon-right {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Offcanvas */
[dir="rtl"] .offcanvas-start {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

[dir="rtl"] .offcanvas-end {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

/* Carousel */
[dir="rtl"] .carousel-control-prev {
  left: auto;
  right: 0;
}

[dir="rtl"] .carousel-control-next {
  right: auto;
  left: 0;
}

/* Accordion */
[dir="rtl"] .accordion-button::after {
  margin-left: 0;
  margin-right: auto;
}

/* Toast */
[dir="rtl"] .toast {
  text-align: right;
}

/* Custom styles for landing page */
[dir="rtl"] .landing-header {
  text-align: right;
}

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

[dir="rtl"] .feature-icon {
  margin-left: 1rem;
  margin-right: 0;
}

[dir="rtl"] .pricing-features {
  text-align: right;
  list-style-position: inside;
}

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

/* Typography - Creative and optimized for Arabic */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
  text-align: right;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  word-spacing: 0.08em !important;
  letter-spacing: -0.01em !important;
}

[dir="rtl"] h1 {
  font-size: clamp(2rem, 4vw, 3.5rem) !important;
  margin-bottom: 1.5rem !important;
}

[dir="rtl"] h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem) !important;
  margin-bottom: 1.25rem !important;
}

[dir="rtl"] h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
  margin-bottom: 1rem !important;
}

[dir="rtl"] h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem) !important;
}

[dir="rtl"] p {
  text-align: right;
  line-height: 1.8 !important;
  font-size: clamp(1rem, 1.5vw, 1.2rem) !important;
  word-spacing: 0.05em !important;
  margin-bottom: 1.25rem !important;
}

/* Better readability for card text */
[dir="rtl"] .card-body p,
[dir="rtl"] .pricing-card p,
[dir="rtl"] .feature p {
  line-height: 1.9 !important;
  color: rgba(0, 0, 0, 0.8) !important;
}

/* Section titles */
[dir="rtl"] .section-title,
[dir="rtl"] .title-style-one {
  font-size: clamp(2rem, 4vw, 3rem) !important;
  line-height: 1.3 !important;
  margin-bottom: 1.5rem !important;
}

/* Fix overlapping text issues - Partner logos and sections */
[dir="rtl"] .partner-logo-one,
[dir="rtl"] .partner-section,
[dir="rtl"] .feedback-section,
[dir="rtl"] .testimonial-section {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
  overflow: visible !important;
}

[dir="rtl"] .partner-logo-one .title,
[dir="rtl"] .feedback-section .title,
[dir="rtl"] .section-title {
  margin-bottom: 3rem !important;
  padding-bottom: 1.5rem !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}

/* Fix specific overlapping for "أكثر من 1.2 ألف عميل يحبوننا" */
[dir="rtl"] .partner-logo-one .top-border,
[dir="rtl"] .partner-section .top-border,
[dir="rtl"] .title-style-one {
  margin-top: 3rem !important;
  padding-top: 2rem !important;
  clear: both !important;
}

/* Ensure cards don't overlap with above content */
[dir="rtl"] .logo-wrapper,
[dir="rtl"] .partner-logo-wrapper,
[dir="rtl"] .card-wrapper {
  margin-top: 2rem !important;
  clear: both !important;
}

/* Add spacing between sections */
[dir="rtl"] section {
  margin-bottom: 2rem !important;
  overflow: visible !important;
}

/* Flex utilities */
[dir="rtl"] .d-flex {
  flex-direction: row-reverse;
}

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

[dir="rtl"] .justify-content-start {
  justify-content: flex-end !important;
}

[dir="rtl"] .justify-content-end {
  justify-content: flex-start !important;
}

/* Logo positioning - Arabic interface */
/* Desktop: Logo at absolute end (far right) */
@media (min-width: 992px) {
  [dir="rtl"] .theme-main-menu .logo {
    order: 4 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  [dir="rtl"] .theme-main-menu .right-widget {
    order: 1 !important;
  }

  [dir="rtl"] .theme-main-menu .navbar {
    order: 2 !important;
  }
}

/* Mobile: Logo on left, menu toggle on right */
@media (max-width: 991px) {
  [dir="rtl"] .theme-main-menu .logo {
    order: 0 !important;
    margin-right: auto !important;
    margin-left: 0 !important;
  }

  [dir="rtl"] .theme-main-menu .navbar-toggler {
    order: 3 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  [dir="rtl"] .theme-main-menu .right-widget {
    order: 2 !important;
  }
}

/* Pricing page RTL optimizations */
[dir="rtl"] .pricing-section-one .title-three,
[dir="rtl"] .pricing-section-three .title-three {
  text-align: right !important;
}

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

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

[dir="rtl"] .pr-header .d-flex {
  flex-direction: row-reverse !important;
}

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

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

[dir="rtl"] .card-style-eight {
  text-align: center !important;
}

[dir="rtl"] .pricing-nav-two .nav {
  flex-direction: row-reverse !important;
}

[dir="rtl"] .fancy-banner-six {
  text-align: center !important;
}
