/* ============================================================================
 * RTL / Arabic specific overrides
 * Sadece <html dir="rtl"> ve <html class="lang-ar"> aktifken uygulanır.
 * ============================================================================
 */

html.lang-ar,
html[dir="rtl"] {
    font-family: 'Tajawal', system-ui, -apple-system, "Segoe UI", sans-serif;
}

html.lang-ar h1,
html.lang-ar h2,
html.lang-ar h3,
html.lang-ar h4,
html.lang-ar .font-heading,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] .font-heading {
    font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
    letter-spacing: 0;
}

/* Arapça body line-height biraz daha rahat */
html.lang-ar body {
    line-height: 1.75;
}

/* Numerik / Latin değerleri zorla LTR (telefon, rakam, e-mail, URL) */
html.lang-ar .num,
html.lang-ar [data-num],
html.lang-ar [dir="ltr"] {
    direction: ltr;
    unicode-bidi: embed;
    font-feature-settings: "tnum";
}

/* Owl carousel slider RTL — owl 2 zaten dir attr'ına saygı duyar; ekstra fix */
html[dir="rtl"] .owl-carousel {
    direction: ltr; /* slider track LTR kalsın, içerik RTL */
}
html[dir="rtl"] .owl-carousel .owl-item {
    direction: rtl;
}

/* FontAwesome / arrow icons flip */
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .rtl-flip {
    transform: scaleX(-1);
}

/* Tailwind space-x-* RTL uyumu — eski blade'lerde manual destek */
html[dir="rtl"] [class*="space-x-"] > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Form input/label hizalama */
html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="search"],
html[dir="rtl"] textarea {
    text-align: right;
}

/* Tel / email / url linkler her zaman LTR */
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] a[href^="http"] code,
html[dir="rtl"] .ltr-only {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}
