/* ============================================================
   QISTAS — RTL / Arabic Stylesheet
   Overrides for dir="rtl" — loaded after style.css on ar.html
   ============================================================ */

/* ── Arabic Font Stack ───────────────────────────────────────── */
body {
  font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0;
}

/* Numbers/Latin inside Arabic pages keep Inter */
.stat-value,
.stat-num,
.logo-text,
.btn,
.form-input {
  font-family: 'Inter', 'Cairo', sans-serif;
}

/* ── Direction & Text Alignment ──────────────────────────────── */
.hero-content,
.section-header,
.benefits-text,
.vision-inner,
.waitlist-inner,
.footer-brand,
.footer-col {
  text-align: right;
}

/* Center-aligned blocks stay centered */
.section-header,
.vision-inner {
  text-align: center;
}

/* ── Navigation RTL ──────────────────────────────────────────── */
.nav-container {
  flex-direction: row-reverse;
}

/* Logo stays on the right, links on the left (desktop only) */
@media (min-width: 901px) {
  .nav-links {
    flex-direction: row-reverse;
  }
}

/* Keep mobile/tablet nav stacked like base stylesheet */
@media (max-width: 900px) {
  .nav-links {
    flex-direction: column;
  }
}

[dir="rtl"] .nav-link.nav-cta {
  margin-left: 0;
  margin-right: 8px;
}

@media (max-width: 900px) {
  [dir="rtl"] .nav-link.nav-cta {
    margin-right: 0;
  }
}

/* Language switcher wrapper */
.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
}

.lang-switch-btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 100px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.lang-switch-btn:hover {
  color: var(--gold);
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.07);
}

/* Hide the list-item lang switcher on desktop (we use .lang-desktop) */
@media (min-width: 641px) {
  .lang-switch-item { display: none; }
  .lang-desktop { display: inline-flex; }
}

@media (max-width: 640px) {
  .lang-desktop { display: none; }
  .lang-switch-item { display: list-item; }
  .lang-switch-item .lang-switch-btn {
    display: block;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold);
    text-align: center;
    font-size: 13px;
  }
}

/* ── Hero RTL ────────────────────────────────────────────────── */
[dir="rtl"] .hero .container {
  direction: rtl;
}

[dir="rtl"] .hero-actions {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* Flip the arrow icon direction for RTL */
[dir="rtl"] .btn-primary .fa-arrow-left,
[dir="rtl"] .btn-primary .fa-arrow-right {
  transform: scaleX(1); /* arrow-left is already correct in RTL */
}

[dir="rtl"] .hero-trust {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* ── Dashboard mockup: mirror perspective tilt ───────────────── */
[dir="rtl"] .dashboard-mockup {
  transform: perspective(1000px) rotateY(4deg) rotateX(2deg);
}

[dir="rtl"] .dashboard-mockup:hover {
  transform: perspective(1000px) rotateY(1deg) rotateX(1deg);
}

/* Sidebar moves to the right side in RTL */
[dir="rtl"] .mockup-body {
  flex-direction: row-reverse;
}

[dir="rtl"] .mockup-sidebar {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Benefits RTL ────────────────────────────────────────────── */
[dir="rtl"] .benefits-inner {
  direction: rtl;
}

[dir="rtl"] .benefits-list li {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .benefits-list strong,
[dir="rtl"] .benefits-list p {
  text-align: right;
}

/* Flip floating cards */
[dir="rtl"] .card-1 { left: auto; right: -60px; }
[dir="rtl"] .card-2 { right: auto; left: -60px; }

/* ── Feature cards text ──────────────────────────────────────── */
[dir="rtl"] .feature-card {
  text-align: right;
  direction: rtl;
}

/* ── Audience cards ──────────────────────────────────────────── */
[dir="rtl"] .audience-card {
  text-align: right;
  direction: rtl;
}


[dir="rtl"] .audience-icon,
[dir="rtl"] .audience-tag {
  /* icons and tags stay centered */
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

[dir="rtl"] .audience-card h3,
[dir="rtl"] .audience-card p {
  text-align: center;
}

/* ── Waitlist form ───────────────────────────────────────────── */
[dir="rtl"] .waitlist-inner {
  direction: rtl;
}

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

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

/* Keep email input LTR */
[dir="rtl"] #wl-email {
  direction: ltr;
  text-align: left;
}

/* ── Footer RTL ──────────────────────────────────────────────── */
[dir="rtl"] .footer-top {
  direction: rtl;
}

[dir="rtl"] .footer-col ul,
[dir="rtl"] .footer-col h4 {
  text-align: right;
}

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

/* ── Section labels ──────────────────────────────────────────── */
[dir="rtl"] .section-label {
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0.5px;
}

/* ── Vision pillars ──────────────────────────────────────────── */
[dir="rtl"] .pillar h4,
[dir="rtl"] .pillar p {
  text-align: center;
}

/* ── Scroll hint ─────────────────────────────────────────────── */
[dir="rtl"] .hero-scroll-hint {
  font-family: 'Cairo', sans-serif;
}

/* ── Typography refinements for Arabic ──────────────────────── */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
}

[dir="rtl"] p,
[dir="rtl"] li,
[dir="rtl"] span,
[dir="rtl"] a {
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0;
}

[dir="rtl"] .hero-title {
  line-height: 1.35;
}

[dir="rtl"] .hero-tagline {
  line-height: 1.9;
}

/* ── Mobile RTL overrides ────────────────────────────────────── */
@media (max-width: 640px) {
  [dir="rtl"] .nav-links {
    align-items: stretch;
  }

  [dir="rtl"] .hero-actions {
    justify-content: center;
    flex-direction: row-reverse;
  }

  [dir="rtl"] .hero-trust {
    justify-content: center;
    flex-direction: row-reverse;
  }

  [dir="rtl"] .form-row {
    flex-direction: column;
  }

  [dir="rtl"] .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .lang-desktop { display: none !important; }
  .lang-switch-item { display: list-item !important; }

  [dir="rtl"] .hero .container {
    text-align: center;
  }

  [dir="rtl"] .hero-actions {
    justify-content: center;
  }

  [dir="rtl"] .hero-trust {
    justify-content: center;
  }

  [dir="rtl"] .dashboard-mockup {
    transform: none;
  }
}

@media (max-width: 480px) {
  [dir="rtl"] .hero-title {
    line-height: 1.45;
  }

  [dir="rtl"] .hero-tagline {
    line-height: 1.85;
  }
}
