/**
 * Bizayla — RTL text alignment (Arabic / dir=rtl only).
 *
 * Root cause addressed: `theme-default.css` sets `body { text-align: left; }`, and
 * `style.css` / `responsive.css` add more physical `text-align: left` on several
 * components. Those beat inheritance for those nodes.
 *
 * Strategy: `[dir="rtl"]` + logical `text-align: start` on body and on selectors
 * that hard-code `left`. Does not target `.text-center` / `.section_title.text-center`
 * (explicit `center` must keep winning). Does not change `.mean-expand` (vendor).
 *
 * Load order: after `responsive.css` and `bizayla-locale-ar-font.css`.
 */

[dir="rtl"] body {
  text-align: start;
}

/**
 * Marquee: keep theme `slide-har` keyframes; only reverse playback direction.
 * (Renaming to `slide-har-revers` can leave the strip off-screen.) Duplicate items
 * in React for `ar` so the loop stays seamless.
 */
[dir="rtl"] .slide-har .box {
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
}

/* Theme / layout blocks that set physical `text-align: left` (style.css + responsive.css) */
[dir="rtl"] .service_content,
[dir="rtl"] .advisar_btn,
[dir="rtl"] .advisar_btn.style_two,
[dir="rtl"] .advisar_btn.sidebar_style,
[dir="rtl"] .call_social_icon,
[dir="rtl"] .call_area.style_three .footer_logo,
[dir="rtl"] .feature_item.style_three .feature_content,
[dir="rtl"] section.call_area.style_four .advisar_btn,
[dir="rtl"] section.contact_form .advisar_btn.home_five,
[dir="rtl"] .footer-bottom-menu,
[dir="rtl"] .proconsul_btn.right_btn,
[dir="rtl"] .tab,
[dir="rtl"] .tabs {
  text-align: start;
}

/* Meanmenu: menu links only (exclude expand control which uses physical `right`) */
[dir="rtl"] .mean-container .mean-nav ul li a:not(.mean-expand) {
  text-align: start;
}

/**
 * Footer newsletter (`style.css` pins `button.btn` with physical `right: 0`).
 * In RTL the placeholder starts at the inline-start edge (right) and collides with the button.
 * Use logical inset so the button sits on inline-end (left in RTL, right in LTR).
 */
.subscribe_form button.btn {
  left: auto;
  right: auto;
  inset-inline-end: 0;
}

.subscribe_form input.form-control,
.subscribe_form input {
  box-sizing: border-box;
  padding-inline-end: 132px;
}

/**
 * Mixed Arabic + Latin (Bizayla, UZSALT): without an explicit RTL paragraph base,
 * bidi can leave lines looking “left‑aligned” or jumbled. `unicode-bidi: plaintext`
 * uses the first strong character so Arabic leads and Latin runs stay readable.
 */
html[lang="ar"] section.counter_area .about-salt-block-copy,
html[lang="ar"] section.counter_area .about-salt-block-copy ul,
html[lang="ar"] section.counter_area .about-salt-block-copy p,
html[lang="ar"] section.counter_area .about-salt-block-copy li,
html[lang="ar"] section.about_area.style_two .section_title > p {
  direction: rtl;
  text-align: start;
  unicode-bidi: plaintext;
}

/**
 * About — three “value” cards above team photos use `.single-team_item.h-100`.
 * Theme `.team-content { text-align: center }` was winning over inherited `text-start`;
 * scope RTL alignment to those cards only (photo grid keeps centered captions).
 */
[dir="rtl"] section.team_area.inner_page .single-team_item.h-100 .team-content,
[dir="rtl"] section.team_area.inner_page .single-team_item.h-100 .team-content h3,
[dir="rtl"] section.team_area.inner_page .single-team_item.h-100 .team-content h3 a,
[dir="rtl"] section.team_area.inner_page .single-team_item.h-100 .team-content h4,
[dir="rtl"] section.team_area.inner_page .single-team_item.h-100 .team-content span {
  direction: rtl;
  text-align: start !important;
  unicode-bidi: plaintext;
}
