/*
 * Right-to-left overrides, loaded only by the Arabic and Hebrew builds.
 *
 * The Elementor export ships LTR-only stylesheets and Elementor's own RTL bundle
 * is not part of the static export, so this file does not attempt a full mirror
 * of the layout. It fixes what actually reads wrong in RTL -- text flow,
 * alignment, list markers and the few directional paddings the theme hard-codes
 * -- and leaves decorative geometry (background positions, icon columns) alone.
 * Sections whose visual balance depends on left-anchored art are pinned back to
 * LTR rather than mirrored badly.
 */

html[dir="rtl"] body {
	direction: rtl;
	text-align: right;
}

/* Elementor writes `text-align:left` inline on many headings and text widgets;
   only override the ones that inherit, never the deliberately centred ones. */
html[dir="rtl"] .elementor-widget-text-editor,
html[dir="rtl"] .elementor-widget-heading .elementor-heading-title,
html[dir="rtl"] .elementor-icon-list-text,
html[dir="rtl"] .cc-guide,
html[dir="rtl"] .cc-guide p,
html[dir="rtl"] .cc-guide li {
	direction: rtl;
	text-align: right;
}

html[dir="rtl"] .elementor-heading-title.elementor-size-default[style*="center"],
html[dir="rtl"] .elementor-widget-heading.elementor-align-center .elementor-heading-title {
	text-align: center;
}

html[dir="rtl"] ul,
html[dir="rtl"] ol {
	padding-right: 1.4em;
	padding-left: 0;
}

html[dir="rtl"] .elementor-icon-list-items {
	padding-right: 0;
}

html[dir="rtl"] .elementor-icon-list-item {
	flex-direction: row-reverse;
}

html[dir="rtl"] .elementor-icon-list-item > a {
	flex-direction: row-reverse;
}

/* Inline rows that read as "icon then label" need the icon on the right. */
html[dir="rtl"] .elementor-inline-items .elementor-icon-list-item {
	margin-right: 0;
	margin-left: var(--e-icon-list-icon-gap, 8px);
}

/* Blockquotes and callouts hang a rule off one edge. */
html[dir="rtl"] blockquote,
html[dir="rtl"] .cc-note,
html[dir="rtl"] .cc-callout {
	border-left: none;
	border-right: 4px solid currentColor;
	padding-left: 0;
	padding-right: 16px;
}

/* Numbers, versions, keyboard shortcuts and file paths stay LTR inside RTL
   prose; without this a string like "4.1.194" or "Ctrl+Shift+A" reorders. */
html[dir="rtl"] code,
html[dir="rtl"] kbd,
html[dir="rtl"] samp,
html[dir="rtl"] pre,
html[dir="rtl"] .cc-ltr {
	direction: ltr;
	unicode-bidi: isolate;
	text-align: left;
}

/* The language switcher builds its own row; keep the popup anchored correctly. */
html[dir="rtl"] .cc-lang__list a {
	text-align: right;
}

/* Media, canvases and the hero video are geometry, not text: leaving them
   mirrored would flip the acceleration curve illustration. */
html[dir="rtl"] img,
html[dir="rtl"] svg,
html[dir="rtl"] video,
html[dir="rtl"] canvas,
html[dir="rtl"] .elementor-widget-image,
html[dir="rtl"] .cc-figure {
	direction: ltr;
}
