/* ---------- RTL / Arabic overrides ---------- */
/* Applied on top of style.css when the Arabic version of the site is rendered.
   Body has class .lang-ar and the <html dir="rtl">; Bootstrap RTL flips most
   layout via bootstrap.rtl.min.css. These rules adjust typography, gold borders,
   and a few directional things that Bootstrap RTL doesn't touch. */

body.lang-ar {
  font-family: 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  font-size: 1.02rem;
  line-height: 1.85;
}

body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar h4,
body.lang-ar h5,
body.lang-ar .serif,
body.lang-ar .hero-name,
body.lang-ar .footer-title,
body.lang-ar .cv-name,
body.lang-ar .cv-section-title,
body.lang-ar .tumor-header h2 {
  font-family: 'Amiri', 'Tajawal', 'Times New Roman', serif;
  letter-spacing: 0;
}

body.lang-ar .hero-name { font-size: clamp(2.2rem, 5.5vw, 4.25rem); }
body.lang-ar .hero-creds { letter-spacing: .12em; font-family: 'Tajawal', sans-serif; }

/* The gold accent border-left on cv-entry and tumor-pearls needs to flip to border-right */
body.lang-ar .cv-entry {
  border-left: none;
  border-right: 2px solid var(--line);
  padding-left: 0;
  padding-right: 1rem;
}
body.lang-ar .module-tab-btn {
  text-align: right;
  border-left: none;
  border-right: 3px solid transparent;
}
body.lang-ar .module-tab-btn.active {
  border-right-color: var(--gold);
}
body.lang-ar .alert-light-warning {
  border-left: none;
  border-right: 3px solid var(--warn-line);
}
body.lang-ar .cv-contact-note {
  border-left: none;
  border-right: 3px solid var(--gold);
}

/* Navbar gap reversal handled by Bootstrap RTL; brand-mark sits right-aligned naturally */

/* Bootstrap Icons that imply direction (e.g., arrow-right) should be flipped */
body.lang-ar .bi-arrow-right,
body.lang-ar .bi-arrow-right-short,
body.lang-ar .bi-arrow-right-circle {
  transform: scaleX(-1);
}

/* Module-refs lists use Arabic-Indic or Western numerals — keep Western for citation consistency with DOI/PMID */
body.lang-ar .module-refs-list,
body.lang-ar .ref-list {
  list-style-position: outside;
  padding-right: 1.4rem;
  padding-left: 0;
}

/* Tables: headers and cells already centred or LTR-natural; Arabic flows RTL automatically */
body.lang-ar .med-table thead th {
  text-align: right;
}
body.lang-ar .med-table tbody td {
  text-align: right;
}

/* Citations / superscript marks — small style polish */
body.lang-ar .cite { font-size: .8em; }

/* Footer */
body.lang-ar .footer-links { padding-right: 0; }

/* Language switcher */
.lang-switcher {
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 2px;
  margin-inline-start: .75rem;
  padding: .35rem .85rem !important;
  font-size: .82rem !important;
  letter-spacing: .04em !important;
}
.lang-switcher:hover {
  background: rgba(201,169,97,.08);
  border-color: var(--gold);
}
.lang-switcher i { margin-inline-end: .3rem; opacity: .85; }
body.lang-ar .lang-switcher {
  font-family: 'Inter', sans-serif;  /* "English" text in English font */
}
