/**
 * Fix disconnected Arabic letters on Ewebot/Elementor (RTL sites).
 * Root cause: Latin fonts + non-zero letter-spacing on heading widgets.
 */

body.rtl {
	font-family: "Noto Sans Arabic", Rubik, sans-serif;
}

body.rtl :is(
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	p,
	li,
	a,
	span,
	.elementor-heading-title,
	.elementor-widget-text-editor,
	.elementor-widget-text-editor p,
	.elementor-button-text,
	.elementor_gt3_btn_text,
	.wpda-menu a,
	.gt3_header_builder,
	.gt3-page-title__text
) {
	letter-spacing: 0 !important;
	word-spacing: normal !important;
	text-transform: none !important;
	font-variant-ligatures: common-ligatures contextual;
	font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
}

/* Prefer Arabic font wherever RTL content is shown. */
body.rtl :is(
	.elementor-heading-title,
	.elementor-widget-text-editor,
	.elementor-widget-text-editor *,
	.wpda-menu,
	.gt3_header_builder
) {
	font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
}

/* Elementor headline / motion widgets often split glyphs. */
body.rtl :is(
	.elementor-headline,
	.elementor-headline-dynamic-text,
	.elementor-headline-plain-text,
	.elementor-headline-dynamic-wrapper
) {
	letter-spacing: 0 !important;
	font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
}

/* Keep Latin brand name readable inside Arabic UI. */
body.rtl .arabiseo-latin,
body.rtl :lang(en) {
	font-family: Rubik, "Noto Sans Arabic", sans-serif !important;
}
