/* ============================================
   AI NEXT - RTL (Arabic) Overrides
   ============================================ */

/* ---------- Base RTL ---------- */
html[dir="rtl"] body {
  font-family: 'Inter', 'Segoe UI', 'Tahoma', 'Arial', system-ui, sans-serif;
  text-align: right;
}

/* ---------- Navigation RTL ---------- */
html[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav-links a::after {
  left: 50%;
  right: auto;
}

@media (max-width: 768px) {
  html[dir="rtl"] .nav-links {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid var(--glass-border);
    flex-direction: column;
  }

  html[dir="rtl"] .nav-links.open {
    left: 0;
    right: auto;
  }
}

/* ---------- Hero RTL ---------- */
html[dir="rtl"] .hero-content {
  text-align: center;
}

/* ---------- Buttons RTL ---------- */
html[dir="rtl"] .btn {
  flex-direction: row-reverse;
}

html[dir="rtl"] .btn-icon {
  transform: scaleX(-1);
}

html[dir="rtl"] .hero-buttons .btn {
  flex-direction: row-reverse;
}

/* ---------- Section Tags ---------- */
html[dir="rtl"] .section-tag::before,
html[dir="rtl"] .section-tag::after {
  content: '';
}

/* ---------- Service Cards RTL ---------- */
html[dir="rtl"] .service-card .card-link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .service-card .card-link:hover {
  gap: 0.8rem;
}

html[dir="rtl"] .service-card .card-link i {
  transform: scaleX(-1);
}

/* ---------- Feature Row RTL ---------- */
html[dir="rtl"] .features-row {
  direction: rtl;
}

html[dir="rtl"] .features-row.reverse {
  direction: ltr;
}

html[dir="rtl"] .features-row.reverse > * {
  direction: rtl;
}

html[dir="rtl"] .feature-list li {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .feature-content .feature-tag {
  text-align: right;
}

html[dir="rtl"] .feature-content h3 {
  text-align: right;
}

html[dir="rtl"] .feature-content p {
  text-align: right;
}

/* ---------- About RTL ---------- */
html[dir="rtl"] .about-content .section-title {
  text-align: right;
}

html[dir="rtl"] .about-content .about-text {
  text-align: right;
}

/* ---------- Contact RTL ---------- */
html[dir="rtl"] .contact-info-card {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .contact-info-card:hover {
  transform: translateX(-5px);
}

html[dir="rtl"] .form-group label {
  text-align: right;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea,
html[dir="rtl"] .form-group select {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .form-group select {
  background-position: left 1rem center;
  padding-left: 2.5rem;
  padding-right: 1.2rem;
}

/* ---------- Footer RTL ---------- */
html[dir="rtl"] .footer-column ul li a:hover {
  padding-left: 0;
  padding-right: 5px;
}

html[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

html[dir="rtl"] .footer-bottom-links {
  flex-direction: row-reverse;
}

/* ---------- Breadcrumb RTL ---------- */
html[dir="rtl"] .page-header .breadcrumb {
  flex-direction: row-reverse;
}

/* ---------- Process Timeline RTL ---------- */
html[dir="rtl"] .process-timeline::before {
  left: 10%;
  right: 10%;
}

/* ---------- Service Detail Card RTL ---------- */
html[dir="rtl"] .service-detail-card .detail-features li {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .service-detail-card .detail-features li::before {
  content: '←';
}

/* ---------- Testimonial RTL ---------- */
html[dir="rtl"] .testimonial-card .author {
  flex-direction: row-reverse;
  text-align: right;
}

/* ---------- Team Card RTL ---------- */
html[dir="rtl"] .team-card {
  text-align: center;
}

/* ---------- WhatsApp Float RTL ---------- */
html[dir="rtl"] .whatsapp-float {
  right: auto;
  left: 2rem;
}

html[dir="rtl"] .scroll-top {
  right: auto;
  left: 6rem;
}

/* ---------- FAQ RTL ---------- */
html[dir="rtl"] .faq-item > div:first-child {
  flex-direction: row-reverse;
}

/* ---------- Language Switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  margin-left: 0.25rem;
  letter-spacing: 0.02em;
}

.lang-switch:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.lang-switch i {
  font-size: 0.85rem;
}

html[dir="rtl"] .lang-switch {
  margin-left: 0;
  margin-right: 0.25rem;
}

/* ---------- Social Cards Row RTL ---------- */
html[dir="rtl"] .social-row-cards {
  flex-direction: row-reverse;
}

/* ---------- Marquee RTL ---------- */
html[dir="rtl"] .marquee-track {
  animation-direction: reverse;
}

/* ---------- Code Block in RTL ---------- */
html[dir="rtl"] .code-block,
html[dir="rtl"] .code-block pre {
  direction: ltr;
  text-align: left;
}
