/* ============================================================
   RTL (Right-to-Left) Styles for Arabic Language
============================================================ */

/* RTL Direction */
html[dir="rtl"] {
  direction: rtl;
}

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

/* Navbar RTL */
html[dir="rtl"] .navbar__list {
  flex-direction: row-reverse;
}

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

/* Language Toggle Button */
.navbar__lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  margin-right: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar__lang-toggle:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

html[dir="rtl"] .navbar__lang-toggle {
  margin-right: 0;
  margin-left: 0.75rem;
}

/* Hero Section RTL */
html[dir="rtl"] .hero__cta-group {
  flex-direction: row-reverse;
}

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

html[dir="rtl"] .hero__stat-divider {
  margin: 0 1rem;
}

/* About Section RTL */
html[dir="rtl"] .about__values {
  flex-direction: row-reverse;
}

/* Services Grid RTL */
html[dir="rtl"] .services__grid,
html[dir="rtl"] .features__grid,
html[dir="rtl"] .pricing__grid,
html[dir="rtl"] .paths__grid,
html[dir="rtl"] .testimonials__grid {
  direction: rtl;
}

html[dir="rtl"] .service-card__features li,
html[dir="rtl"] .pricing__features-list li {
  text-align: right;
}

html[dir="rtl"] .service-card__features li i,
html[dir="rtl"] .pricing__features-list li i {
  margin-right: 0;
  margin-left: 0.5rem;
}

/* Contact Form RTL */
html[dir="rtl"] .form__input-wrapper {
  flex-direction: row-reverse;
}

html[dir="rtl"] .form__input-icon {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .form__input {
  padding-left: 1rem;
  padding-right: 3rem;
}

html[dir="rtl"] .form__input--textarea {
  padding-right: 3rem;
}

html[dir="rtl"] .form__input-icon--textarea {
  left: auto;
  right: 1rem;
}

/* Footer RTL */
html[dir="rtl"] .footer__top {
  direction: rtl;
}

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

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

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

/* Buttons with Icons RTL */
html[dir="rtl"] .btn i {
  margin-right: 0;
  margin-left: 0.5rem;
}

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

/* Paths/Process Cards RTL */
html[dir="rtl"] .paths__card-header {
  flex-direction: row-reverse;
  text-align: right;
}

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

html[dir="rtl"] .paths__step {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .paths__step-number {
  margin-right: 0;
  margin-left: 1rem;
}

/* Testimonials RTL */
html[dir="rtl"] .testimonial__author {
  flex-direction: row-reverse;
  text-align: right;
}

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

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

/* Contact Details RTL */
html[dir="rtl"] .contact__detail-item {
  flex-direction: row-reverse;
  text-align: right;
}

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

/* Portfolio Cards RTL */
html[dir="rtl"] .pricing__card-top {
  text-align: right;
}

html[dir="rtl"] .pricing__badge {
  left: auto;
  right: 1rem;
}

/* Scroll Indicator RTL */
html[dir="rtl"] .hero__scroll-indicator {
  text-align: center;
}

/* Back to Top Button RTL */
html[dir="rtl"] .back-to-top {
  left: 2rem;
  right: auto;
}

/* Animations RTL */
html[dir="rtl"] .reveal {
  animation: revealRTL 0.8s ease-out forwards;
}

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

/* Mobile Responsive RTL */
@media (max-width: 768px) {
  html[dir="rtl"] .navbar__nav {
    text-align: right;
  }
  
  html[dir="rtl"] .navbar__list {
    align-items: flex-end;
  }
  
  html[dir="rtl"] .hero__cta-group {
    flex-direction: column;
  }
  
  html[dir="rtl"] .footer__top {
    text-align: right;
  }
}

/* Font Adjustments for Arabic */
html[dir="rtl"] {
  font-family: 'Cairo', 'Tajawal', 'Inter', sans-serif;
}

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', 'Tajawal', 'Sora', sans-serif;
  font-weight: 700;
}

/* Fix number direction in RTL */
html[dir="rtl"] .hero__stat-number,
html[dir="rtl"] .features__card-stat,
html[dir="rtl"] .pricing__price {
  direction: ltr;
  display: inline-block;
}

/* Hero Code Card RTL - Match English height */
html[dir="rtl"] .hero__card {
  min-height: 420px;
}

html[dir="rtl"] .hero__card-code {
  font-size: 0.8125rem;
  line-height: 1.8;
}
