/* Arabic pages. dir="rtl" already mirrors flex and grid rows, so nothing here reverses rows again. */

/* ---- Fonts: Arabic in Tajawal, Latin accents keep their faces, no fake italics ---- */
html[dir="rtl"] body,
html[dir="rtl"] body * {
  font-family: 'Tajawal', 'Inter', sans-serif;
  letter-spacing: 0;
  font-synthesis: weight;
}

html[dir="rtl"] .playfair-italic,
html[dir="rtl"] .hero__title-impactful,
html[dir="rtl"] .inner-hero-title__bottom,
html[dir="rtl"] .carriers-title-bottom {
  font-family: 'Playfair Display', 'Tajawal', serif;
  font-weight: 500;
  font-synthesis: none;
}

html[dir="rtl"] :is(.stat__number, .about-stat__num, .service-card__num, .process-card__num, .award-row__source,
  .pricing-card__number, .pcard__number, .exp-card__num, .mission-card__num, .hero__featured-num) {
  font-family: 'Inter', 'Tajawal', sans-serif;
}

/* ---- Line spacing: Arabic letters rise and descend further than Latin ---- */
html[dir="rtl"] :is(.hero__title-create, .hero__title-impactful) { line-height: 1.25; }

html[dir="rtl"] :is(.inner-hero-title__top, .inner-hero-title__bottom, .carriers-title-top, .carriers-title-bottom,
  .detail-hero__title, .page-hero__title) { line-height: 1.3; }

html[dir="rtl"] :is(.services__title, .process__title, .team__title, .pricing__title, .faq-section__title, .mission__title,
  .expertise__title, .projects-page__title, .inner-contact__title, .pricing-page__title, .blog__title, .testimonials__title) {
  line-height: 1.4;
}

html[dir="rtl"] :is(.service-card__title, .process-card__title, .award-row__title, .team-card__name, .pricing-card__name,
  .pcard__name, .mission-card__title, .exp-card__company, .footer__cta-text, .proj-card__title, .project-card__title,
  .inner-contact__sub, .legal h2) {
  line-height: 1.5;
}

html[dir="rtl"] :is(.hero__description p, .about__text, .about-intro__text p) { line-height: 1.7; }

html[dir="rtl"] :is(.services__desc, .process__desc, .service-card__desc, .process-card__desc, .team-card__role,
  .pricing__subtitle, .pricing-page__subtitle, .pricing-card__desc, .pricing-card__features li, .pcard__desc,
  .pcard__features li, .faq-item__question, .faq-item__answer p, .expertise__desc, .exp-card__desc, .mission-card__desc,
  .contact-page__info-text, .site-footer__col-text, .legal p, .legal li, .projects-page__top p, .hero__wedo-list p,
  .project-card__subtitle, .proj-card__subtitle, .detail-hero__desc, .blog-detail__text) {
  line-height: 1.8;
}

/* Gradient text paints only inside its own box; give Arabic glyphs room so edges are not cut */
html[dir="rtl"] span.gradient-text,
html[dir="rtl"] .playfair-italic {
  padding: 0.12em 0.16em 0.26em;
  margin: -0.12em -0.16em -0.26em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---- Mirror the template's physical left/right rules ---- */
html[dir="rtl"] .navbar__logo { direction: ltr; }
html[dir="rtl"] .navbar__burger { margin-left: 0; margin-right: auto; }

html[dir="rtl"] .mobile-menu__panel {
  right: auto;
  left: 0;
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(-100%);
}
html[dir="rtl"][data-theme="light"] .mobile-menu__panel { border-left: 0; border-right: 1px solid rgba(0, 0, 0, 0.08); }
html[dir="rtl"] .mobile-menu.open .mobile-menu__panel { transform: translateX(0); }
html[dir="rtl"] .mobile-menu__close { right: auto; left: 16px; }

html[dir="rtl"] .hero__title { padding-left: 0; padding-right: 80px; }
html[dir="rtl"] .hero__title-create { padding-left: 0; padding-right: 12px; }
html[dir="rtl"] .hero__title-impactful { padding-left: 0.12em; padding-right: 24px; }
html[dir="rtl"] .hero__right { padding-right: 0; padding-left: 15px; }
html[dir="rtl"] .hero__bottom-right { margin-left: 0; margin-right: auto; }

html[dir="rtl"] .btn-primary svg,
html[dir="rtl"] .btn-secondary svg { transform: scaleX(-1); }

html[dir="rtl"] .service-card { border-right: 0; border-left: 1px solid var(--border-subtle); }
html[dir="rtl"] .service-card:last-child { border-left: 0; }
html[dir="rtl"] .process-card { border-right: 0; border-left: 1px solid var(--border-subtle); }
html[dir="rtl"] .process-card:last-child { border-left: 0; }

html[dir="rtl"] .award-row__project { text-align: left; }
html[dir="rtl"] .pricing-card__badge { right: auto; left: 36px; }
html[dir="rtl"] .expertise__title,
html[dir="rtl"] .expertise__desc { text-align: right; }
html[dir="rtl"] .inner-hero-title__bottom { padding-right: 0; padding-left: 0.15em; }
html[dir="rtl"] .testimonials__bg { left: auto; right: -3.5%; }

html[dir="rtl"] .blog__desc { text-align: left; }
html[dir="rtl"] :is(.blog-card__category, .bcard__category) { left: auto; right: 16px; }
html[dir="rtl"] .blog-card__read { padding-left: 0; padding-right: 16px; border-left: 0; border-right: 1px solid var(--border-subtle); }
html[dir="rtl"] .blog-detail__points li { padding-left: 0; padding-right: 28px; }
html[dir="rtl"] .blog-detail__points li::before { left: auto; right: 0; }
html[dir="rtl"] .blog-detail__body ul { padding-left: 0; padding-right: 24px; }
html[dir="rtl"] .job-card__req ul { padding-left: 0; padding-right: 20px; }

@media (max-width: 768px) {
  html[dir="rtl"] .hero__title,
  html[dir="rtl"] .hero__title-create { padding-right: 0; }
  html[dir="rtl"] .hero__title-impactful { padding-right: 4px; }
  html[dir="rtl"] .hero__right { padding-left: 0; }
  html[dir="rtl"] .hero__bottom-right { margin-right: 0; }
  html[dir="rtl"] .service-card,
  html[dir="rtl"] .process-card { border-left: 0; }
  html[dir="rtl"] .inner-hero-title__bottom { padding-left: 0; }
  html[dir="rtl"] .blog__desc { text-align: right; }
}

/* Hero content padding is uneven in the template (60px end, 72px start) */
html[dir="rtl"] .hero__content { padding-left: 60px; padding-right: 72px; }
@media (max-width: 1200px) {
  html[dir="rtl"] .hero__content { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 768px) {
  html[dir="rtl"] .hero__content { padding-left: 20px; padding-right: 20px; }
}
