/* =========================================================
   RTL overrides — loaded only when dir="rtl" (Arabic)
   Mirrors spacing/alignment without duplicating the whole stylesheet
   ========================================================= */

body[dir="rtl"] {
  --font-display: 'Almarai', 'Tahoma', sans-serif;
  --font-body: 'Cairo', 'Tahoma', sans-serif;
  font-family: var(--font-body);
  text-align: right;
}

/* Elements that should stay centered regardless of direction */
body[dir="rtl"] .hero,
body[dir="rtl"] .hero h1,
body[dir="rtl"] .hero p,
body[dir="rtl"] .btn,
body[dir="rtl"] form button,
body[dir="rtl"] .badge,
body[dir="rtl"] .site-footer,
body[dir="rtl"] .stat-card .num,
body[dir="rtl"] .stat-card .label {
  text-align: center;
}

/* Header / nav */
body[dir="rtl"] .site-header nav a {
  margin-left: 0;
  margin-right: 22px;
}
body[dir="rtl"] .lang-switch {
  margin-right: 0;
  margin-left: 18px;
}

/* Category cards */
body[dir="rtl"] .category-card {
  border-top: 4px solid var(--blueprint);
  border-right: none;
}

/* Forms */
body[dir="rtl"] form label { text-align: right; }
body[dir="rtl"] form input,
body[dir="rtl"] form select,
body[dir="rtl"] form textarea { text-align: right; }

/* Tables */
body[dir="rtl"] th, body[dir="rtl"] td { text-align: right; }

/* Listing cards, contact info, dashboard stat cards */
body[dir="rtl"] .listing-card .body,
body[dir="rtl"] .contact-box,
body[dir="rtl"] .contact-box ul {
  text-align: right;
}
body[dir="rtl"] .contact-box ul { padding-right: 0; }

/* Hero search */
body[dir="rtl"] .hero-search input { text-align: right; }
body[dir="rtl"] .hero-search { direction: rtl; }
body[dir="rtl"] .section-header { flex-direction: row-reverse; }
