/* 基本：アラビア語ページ全体を RTL に */
html[lang^="ar"] {
  direction: rtl;
}

/* body 自体も unicode-bidi を効かせておく */
html[lang^="ar"] body {
  text-align: start;
  unicode-bidi: isolate;
}

/* 英語テキスト部分は明示的に LTR */
html[lang^="ar"] body .en-text,
html[lang^="ar"] body .en-text p {
  text-align: start !important;
  direction: ltr !important;
  unicode-bidi: isolate;
}

/* 英語ブロック内で一部だけ RTL に戻す場合 */
html[lang^="ar"] body .en-text .ar_right p {
  text-align: start !important;
  direction: rtl !important;
  unicode-bidi: isolate;
}

/* 主要なテキスト要素に direction + unicode-bidi を明示 */
html[lang^="ar"] p,
html[lang^="ar"] input,
html[lang^="ar"] a[href^="mailto:"],
html[lang^="ar"] a[href^="tel:"] {
  direction: rtl;
  text-align: start ;
  unicode-bidi: isolate;
}

/* プレイスホルダーに direction + unicode-bidi を明示 */
html[lang^="ar"] .wpcf7 input[type="url"],
html[lang^="ar"] .wpcf7 input[type="email"],
html[lang^="ar"] .wpcf7 input[type="tel"] {
  direction: rtl;
  text-align: start !important;
  unicode-bidi: isolate;
}

html[lang^="ar"] p.has-text-align-right.wp-block-paragraph {
  direction: rtl;
  text-align: start;
  unicode-bidi: isolate;
}

/* 中央揃えの英語ブロック */
html[lang^="ar"] .en-center p {
  direction: ltr;
  text-align: center;
}

/* CF7 の完了・エラーメッセージ */
html[lang^="ar"] .wpcf7 form.sent .wpcf7-response-output,
html[lang^="ar"] .wpcf7 form.invalid .wpcf7-response-output,
html[lang^="ar"] .wpcf7 form.unaccepted .wpcf7-response-output,
html[lang^="ar"] .wpcf7 form.payment-required .wpcf7-response-output {
  text-align: start !important;
  direction: rtl !important;
  unicode-bidi: isolate;
}