/* ======================== RTL Support Styles ======================== */
/* This file contains RTL-specific styles and logical property overrides */

/* Persian/Dari Font Support */
body.rtl {
  font-family: 'Vazirmatn', 'Poppins', sans-serif;
  direction: rtl;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
  font-family: 'Vazirmatn', 'Playfair Display', serif;
}

/* Language Switcher Styles */
#language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 15px;
}

.lang-btn {
  background: transparent;
  border: 2px solid var(--primary-color);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--primary-color);
}

.lang-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.lang-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* RTL Navbar Adjustments */
body.rtl .navbar-nav {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

body.rtl .navbar-brand {
  margin-inline-end: 0;
  margin-inline-start: auto;
}

body.rtl .navbar-toggler {
  margin-inline-start: 0;
}

/* RTL Text Alignment */
body.rtl {
  text-align: start;
}

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

body.rtl .text-end {
  text-align: start !important;
}

body.rtl .text-start {
  text-align: end !important;
}

/* RTL Flexbox Adjustments */
body.rtl .d-flex {
  direction: rtl;
}

body.rtl .justify-content-start {
  justify-content: flex-end !important;
}

body.rtl .justify-content-end {
  justify-content: flex-start !important;
}

body.rtl .ms-auto {
  margin-inline-start: 0 !important;
  margin-inline-end: auto !important;
}

body.rtl .me-auto {
  margin-inline-end: 0 !important;
  margin-inline-start: auto !important;
}

/* RTL Card and Service Styles */
body.rtl .service-card,
body.rtl .industry-card,
body.rtl .team-card,
body.rtl .article-card {
  text-align: start;
}

/* RTL Icon Positioning */
body.rtl .accordion-icon {
  margin-inline: 0;
}

body.rtl .bi {
  margin-inline-end: 0;
}

/* RTL Form Styles */
body.rtl .form-control,
body.rtl .form-group input,
body.rtl .form-group textarea {
  text-align: start;
}

/* RTL Footer Styles */
body.rtl .footer-links {
  padding-inline-start: 0;
}

body.rtl .footer-column {
  text-align: start;
}

/* RTL Button Styles */
body.rtl .btn i {
  margin-inline-end: 8px;
  margin-inline-start: 0;
}

/* RTL Social Icons */
body.rtl .social-icon {
  margin-inline-end: 15px;
  margin-inline-start: 0;
}

body.rtl .social-icon:last-child {
  margin-inline-end: 0;
}

/* RTL Team Card Overlay */
body.rtl .team-overlay .social-links {
  direction: rtl;
}

/* RTL Article Meta */
body.rtl .article-meta {
  direction: rtl;
}

body.rtl .read-more-link {
  float: left;
}

/* RTL Step Boxes */
body.rtl .steps {
  direction: rtl;
}

body.rtl .step-box {
  text-align: start;
}

/* RTL Contact Info */
body.rtl .info-item {
  direction: rtl;
  text-align: start;
}

body.rtl .icon-box {
  margin-inline-end: 20px;
  margin-inline-start: 0;
}

/* RTL Animation Adjustments */
body.rtl .animate_fadeInLeft {
  animation-name: fadeInRight !important;
}

body.rtl .animate_fadeInRight {
  animation-name: fadeInLeft !important;
}

/* Ensure carousel and animations work correctly in RTL */
body.rtl .carousel {
  direction: ltr;
}

body.rtl .carousel-inner {
  direction: rtl;
}

/* RTL Partners Grid */
body.rtl .partners-grid {
  direction: rtl;
}

body.rtl .partner-logo {
  text-align: center;
}

/* Mobile Responsive RTL */
@media (max-width: 991px) {
  #language-switcher {
    margin-inline-start: 0;
    margin-top: 10px;
    justify-content: center;
  }

  body.rtl .navbar-collapse {
    text-align: start;
  }

  body.rtl .navbar-nav {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .lang-btn {
    padding: 5px 12px;
    font-size: 0.85rem;
  }
}

/* RTL Accordion Styles */
body.rtl .accordion-header {
  direction: rtl;
  text-align: start;
}

body.rtl .accordion-content {
  direction: rtl;
  text-align: start;
}

/* Ensure proper number rendering in RTL */
body.rtl .step-number {
  direction: ltr;
  display: flex;
}

/* RTL FAQ Section */
body.rtl .faq-title,
body.rtl .faq-subtitle {
  direction: rtl;
}

/* RTL Hero Section */
body.rtl .hero-content {
  text-align: start;
}

body.rtl .hero-section h1 {
  text-align: start;
}

/* RTL About Section */
body.rtl .section-subtitle,
body.rtl .section-title {
  text-align: start;
}

body.rtl .text-center .section-subtitle,
body.rtl .text-center .section-title {
  text-align: center;
}

/* RTL List Styles */
body.rtl ul,
body.rtl ol {
  padding-inline-start: 40px;
  padding-inline-end: 0;
}

body.rtl .footer-links {
  list-style: none;
  padding-inline-start: 0;
}

/* RTL Smooth Transitions */
body.rtl * {
  transition: text-align 0.3s ease, direction 0.3s ease;
}

/* Prevent FOUC (Flash of Unstyled Content) - REMOVED opacity blocker to prevent blank page */
/* Body is now always visible - i18n will update content when ready */
