/* ============================================================
   RTL — Arabic layout polish (Zyntaxes)
   Loaded when html[dir=rtl] / body.is-rtl
   ============================================================ */

/* ---- Typography ---- */
body.is-rtl {
  font-family: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  letter-spacing: 0;
  line-height: 1.75;
}

body.is-rtl h1,
body.is-rtl h2,
body.is-rtl h3,
body.is-rtl .wordmark,
body.is-rtl .hero h1,
body.is-rtl .section-head h2,
body.is-rtl .contact h2,
body.is-rtl .about h2,
body.is-rtl .quote p,
body.is-rtl .tool-brand h1 {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0;
  line-height: 1.35;
}

body.is-rtl .eyebrow {
  flex-direction: row-reverse;
  letter-spacing: 0.06em;
  font-family: 'IBM Plex Sans Arabic', monospace;
}

body.is-rtl .hero h1 em {
  font-family: 'Tajawal', sans-serif;
}

/* ---- LTR islands (phones, emails, code, URLs) ---- */
body.is-rtl .num-ltr,
body.is-rtl .ltr-isolate,
body.is-rtl .hero-panel,
body.is-rtl .tool-out,
body.is-rtl .tool-textarea,
body.is-rtl code {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

body.is-rtl .num-ltr {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

body.is-rtl .contact-text strong.num-ltr {
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  font-weight: 700;
  margin-top: 4px;
}

/* ---- Nav ---- */
body.is-rtl nav {
  direction: rtl;
}

body.is-rtl .nav-links {
  direction: rtl;
}

body.is-rtl .nav-actions {
  direction: rtl;
}

body.is-rtl .nav-links a::after {
  left: auto;
  right: 0;
}

/* ---- Hero ---- */
body.is-rtl .hero {
  direction: rtl;
  text-align: right;
}

body.is-rtl .hero p {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

body.is-rtl .hero-cta {
  justify-content: flex-start;
}

body.is-rtl .squiggle {
  left: auto;
  right: 0;
  transform: scaleX(-1);
}

body.is-rtl .hero-panel {
  text-align: left;
  direction: ltr;
}

/* ---- Stats ---- */
body.is-rtl .stats {
  direction: rtl;
}

body.is-rtl .stat {
  border-left: none;
  border-right: 1px solid var(--line);
}

body.is-rtl .stat:first-child {
  border-right: none;
}

body.is-rtl .stat b {
  font-family: 'Tajawal', sans-serif;
}

/* ---- Marquee ---- */
body.is-rtl .marquee-track {
  animation-direction: reverse;
}

/* ---- Sections ---- */
body.is-rtl section,
body.is-rtl .section-head {
  text-align: right;
}

body.is-rtl .section-head {
  margin-inline: 0 auto 0;
}

body.is-rtl .grid,
body.is-rtl .process,
body.is-rtl .about {
  direction: rtl;
}

body.is-rtl .card {
  text-align: right;
}

body.is-rtl .card:hover {
  transform: translateY(-2px);
}

/* ---- About ---- */
body.is-rtl .values li {
  flex-direction: row-reverse;
  text-align: right;
  padding: 0;
}

body.is-rtl .values li::before {
  margin-top: 0.55em;
}

/* ---- Testimonial ---- */
body.is-rtl .quote {
  direction: rtl;
}

body.is-rtl .quote p {
  font-family: 'Tajawal', sans-serif;
  line-height: 1.65;
}

body.is-rtl .quote .doodle-star {
  right: auto;
  left: 26px;
}

body.is-rtl .quote-controls {
  right: auto;
  left: 24px;
  flex-direction: row-reverse;
}

body.is-rtl .quote-nav.prev,
body.is-rtl .quote-nav.next {
  transform: scaleX(-1);
}

/* ---- Contact ---- */
body.is-rtl .contact {
  direction: rtl;
  text-align: right;
}

body.is-rtl .contact > div:first-of-type p {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

body.is-rtl .contact-info a {
  flex-direction: row;
  text-align: right;
  justify-content: flex-start;
}

body.is-rtl .contact-info a:hover {
  transform: translateX(-3px);
}

body.is-rtl .contact-text {
  flex: 1;
  min-width: 0;
}

body.is-rtl .contact-text span {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

body.is-rtl .contact-doodle {
  right: auto;
  left: 6%;
  transform: scaleX(-1);
}

/* ---- Footer ---- */
body.is-rtl footer {
  direction: rtl;
  text-align: right;
}

body.is-rtl .footer-links {
  direction: rtl;
  flex-wrap: wrap;
}

body.is-rtl footer > div:last-child {
  direction: rtl;
  unicode-bidi: plaintext;
}

/* ---- Tool pages ---- */
body.is-rtl .tool-page {
  direction: rtl;
}

body.is-rtl .tool-topbar,
body.is-rtl .tool-brand,
body.is-rtl .tool-actions,
body.is-rtl .tool-tabs,
body.is-rtl .tool-row,
body.is-rtl .sign-pad-actions,
body.is-rtl .sign-doc-toolbar,
body.is-rtl .sign-ink-picker {
  direction: rtl;
}

body.is-rtl .tool-label {
  letter-spacing: 0.04em;
  text-align: right;
}

body.is-rtl .tool-field label {
  text-align: right;
}

body.is-rtl .tool-input,
body.is-rtl .tool-textarea,
body.is-rtl .tool-select {
  text-align: right;
  direction: rtl;
}

body.is-rtl .tool-input[type=email],
body.is-rtl .tool-input[type=tel],
body.is-rtl .tool-input[type=url],
body.is-rtl .tool-input[type=number],
body.is-rtl .tool-input[type=search] {
  direction: ltr;
  text-align: left;
}

body.is-rtl .tool-fav-btn {
  right: auto;
  left: 14px;
}

body.is-rtl .tool-privacy {
  flex-direction: row-reverse;
  text-align: right;
}

body.is-rtl .tool-back svg {
  transform: scaleX(-1);
}

body.is-rtl .sign-resize-handle {
  right: auto;
  left: -7px;
}

body.is-rtl .legal-inner,
body.is-rtl .tool-seo-inner,
body.is-rtl .tool-card {
  text-align: right;
}

body.is-rtl .tool-check {
  flex-direction: row-reverse;
}

body.is-rtl .sign-size-control {
  direction: rtl;
}

body.is-rtl .sign-page-nav {
  direction: rtl;
}

body.is-rtl .sign-link-btn {
  text-align: right;
}

/* ---- Work (keep centered) ---- */
body.is-rtl .work .section-head {
  text-align: center;
}

body.is-rtl .work-logos {
  direction: rtl;
}

/* ---- Progress bar stays LTR ---- */
body.is-rtl .progress-bar {
  left: 0;
  right: auto;
  background: linear-gradient(270deg, var(--gold), var(--clay));
}

/* ---- Mobile tweaks ---- */
@media (max-width: 900px) {
  body.is-rtl .hero-cta {
    align-items: stretch;
  }

  body.is-rtl .contact-info a {
    padding: 14px 0;
  }

  body.is-rtl .stats .stat:nth-child(3) {
    border-right: none;
  }

  body.is-rtl footer {
    text-align: center;
  }

  body.is-rtl .footer-links {
    justify-content: center;
  }
}
