/**
 * RTL (Right-to-Left) Specific Styles
 * Applied when the page is in Arabic language
 */

/* RTL Body Adjustments */
[dir="rtl"] body {
  text-align: right;
}

/* Navbar RTL Adjustments */
[dir="rtl"] .navbar-brand {
  margin-right: 0;
  margin-left: auto;
}

[dir="rtl"] .navbar-nav {
  margin-right: 0;
  margin-left: auto;
}

[dir="rtl"] .navbar-nav .nav-link {
  padding-right: 0;
  padding-left: 1rem;
}

[dir="rtl"] .language-toggle {
  margin-left: 0;
  margin-right: 1rem;
}

/* Dropdown Menus RTL */
[dir="rtl"] .dropdown-menu {
  right: 0;
  left: auto;
  text-align: right;
}

/* Card Components RTL */
[dir="rtl"] .card {
  text-align: right;
}

[dir="rtl"] .card-body {
  text-align: right;
}

/* Blog Cards RTL - Removed */

/* Service Cards RTL - Removed */

/* Team Cards RTL - Removed */

/* Contact Form RTL */
[dir="rtl"] .contact-info {
  padding-right: 0;
  padding-left: 2rem;
}

[dir="rtl"] .contact-info .info-item {
  text-align: right;
}

[dir="rtl"] .contact-info .info-item i {
  margin-left: 1rem;
  margin-right: 0;
}

[dir="rtl"] .form-label {
  text-align: right;
}

[dir="rtl"] .form-control,
[dir="rtl"] .form-select {
  text-align: right;
}

/* Footer RTL Adjustments */
[dir="rtl"] .footer-section {
  text-align: right;
}

[dir="rtl"] .footer-section ul {
  padding-right: 0;
  padding-left: 0;
}

[dir="rtl"] .footer-section ul li {
  text-align: right;
}

[dir="rtl"] .social-links {
  justify-content: flex-start;
}

[dir="rtl"] .footer-bottom {
  text-align: center;
}

/* Breadcrumb RTL */
[dir="rtl"] .breadcrumb {
  padding-right: 0;
  padding-left: 0;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-left: 0.5rem;
  padding-right: 0;
  content: "/";
}

/* List Items RTL */
[dir="rtl"] ul,
[dir="rtl"] ol {
  padding-right: 1.5rem;
  padding-left: 0;
}

/* Icons RTL Adjustments */
[dir="rtl"] .bi {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .icon-left {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .icon-right {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* Button Icons RTL */
[dir="rtl"] .btn i {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* Alert RTL */
[dir="rtl"] .alert {
  text-align: right;
}

/* Modal RTL */
[dir="rtl"] .modal-header {
  text-align: right;
}

[dir="rtl"] .modal-body {
  text-align: right;
}

[dir="rtl"] .modal-footer {
  justify-content: flex-start;
}

/* Accordion RTL */
[dir="rtl"] .accordion-button {
  text-align: right;
}

[dir="rtl"] .accordion-button::after {
  margin-right: auto;
  margin-left: 0;
}

/* Pagination RTL */
[dir="rtl"] .pagination {
  padding-right: 0;
}

/* Table RTL */
[dir="rtl"] .table {
  text-align: right;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
  text-align: right;
}

/* Dashboard RTL */
[dir="rtl"] .dashboard-container {
  text-align: right;
}

[dir="rtl"] .dashboard-form {
  text-align: right;
}

/* Hero Section RTL */
[dir="rtl"] .hero-section {
  text-align: right;
}

[dir="rtl"] .hero-content {
  text-align: right;
}

/* Stats Section RTL */
[dir="rtl"] .stats-item {
  text-align: center;
}

/* Features Section RTL */
[dir="rtl"] .feature-item {
  text-align: right;
}

[dir="rtl"] .feature-item .icon {
  margin-left: 0;
  margin-right: 0;
}

/* LTR Overrides (when switching to English) */
[dir="ltr"] body {
  text-align: left;
}

[dir="ltr"] .navbar-brand {
  margin-left: 0;
  margin-right: auto;
}

[dir="ltr"] .navbar-nav {
  margin-left: auto;
  margin-right: 0;
}

[dir="ltr"] .card,
[dir="ltr"] .card-body,
[dir="ltr"] .blog-card,
[dir="ltr"] .service-card,
[dir="ltr"] .team-card {
  text-align: left;
}

[dir="ltr"] .contact-info {
  padding-left: 0;
  padding-right: 2rem;
}

[dir="ltr"] .contact-info .info-item {
  text-align: left;
}

[dir="ltr"] .contact-info .info-item i {
  margin-right: 1rem;
  margin-left: 0;
}

[dir="ltr"] .form-label,
[dir="ltr"] .form-control,
[dir="ltr"] .form-select {
  text-align: left;
}

[dir="ltr"] .footer-section {
  text-align: left;
}

[dir="ltr"] ul,
[dir="ltr"] ol {
  padding-left: 1.5rem;
  padding-right: 0;
}

/* Smooth Transitions for Direction Changes */
* {
  transition: margin 0.3s ease, padding 0.3s ease;
}

/* Prevent transition on text-align to avoid jarring effect */
*:not(.no-transition) {
  transition-property: margin, padding, transform;
}
