/* rtl.css — AssisteMatik by Agam Digital (Mission 4 QA fix, 2026-10-24)
   Two jobs:
   1) Override the theme font variables so Hebrew text renders in a Hebrew-capable
      font (Assistant) instead of Geist (which has no Hebrew glyphs).
   2) Flip LTR directional layouts for RTL pages (margin/padding sides, flex order,
      icon arrows). Scoped to [dir="rtl"] so LTR pages are unaffected.
   Enqueued after main.css, so these win by cascade order. */

/* ---- 1. Hebrew typography ---- */
:root[lang="he"],
:root[lang^="he"],
html[dir="rtl"] {
	--font-family-primary: "Assistant", "Heebo", system-ui, sans-serif;
	--tg-font-family-base: "Assistant", "Heebo", system-ui, sans-serif;
	--tg-font-family-heading: "Assistant", "Heebo", system-ui, sans-serif;
}

/* Apply to body + any hardcoded "Geist" surfaces that the vars don't cover. */
html[dir="rtl"] body,
html[dir="rtl"] .amk-he,
html[dir="rtl"] .amk-rtl {
	font-family: "Assistant", "Heebo", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Hebrew reads better with slightly looser line-height on dense copy. */
html[dir="rtl"] p,
html[dir="rtl"] li {
	line-height: 1.7;
}

/* ---- 2. RTL directional flips ---- */
/* Side margins/paddings: mirror left<->right so spacing sits on the correct edge. */
html[dir="rtl"] .margin-left,
html[dir="rtl"] [class*="margin-left"] { margin-left: 0 !important; }
html[dir="rtl"] [class*="margin-right"] { margin-right: 0 !important; }

html[dir="rtl"] .amk-card__excerpt,
html[dir="rtl"] .amk-services__card,
html[dir="rtl"] .amk-agent__card {
	text-align: right;
}

/* Flex rows should read right-to-left. */
html[dir="rtl"] .amk-card__actions,
html[dir="rtl"] [class*="flex"] {
	flex-direction: row-reverse;
}
html[dir="rtl"] .amk-card__actions {
	flex-direction: row; /* keep button label+arrow in natural reading order */
}

/* CPT "back to hub" arrow should point right (forward in RTL). */
html[dir="rtl"] .amk-single__back .amk-card__more-icon,
html[dir="rtl"] .amk-single__crumb svg {
	transform: scaleX(-1);
}

/* Ensure the content wrapper aligns to the start edge in RTL. */
html[dir="rtl"] .amk-page-content,
html[dir="rtl"] .assistemekam-content-wrapper {
	direction: rtl;
}
