/* ==========================================================================
   site-rtl.css — Sağdan sola (RTL) düzen katmanı
   --------------------------------------------------------------------------
   YALNIZCA Arapça alanında, site.css'ten SONRA yüklenir. site.css'e hiç
   dokunulmaz; buradaki kurallar [dir="rtl"] öneki sayesinde daha yüksek
   önceliğe (specificity) sahip olduğu için onları geçersiz kılar.

   Kapsam kararı: sadece okuma yönünü ve gezinmeyi etkileyen kurallar aynalandı.
   Merkezlenmiş öğeler, yükleme animasyonu, dekoratif arka plan görselleri ve
   keyframe animasyonları olduğu gibi bırakıldı — bunlarda yön anlam taşımıyor.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Temel yön ve tipografi
   Mevcut fontlar (Source Sans Pro, Merriweather, Abril Fatface) Arap alfabesini
   desteklemiyor; Cairo hem Arapça hem Latin karakterleri kapsıyor.
   -------------------------------------------------------------------------- */
[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] .ay-section-title,
[dir="rtl"] .ay-footer-title,
[dir="rtl"] .ay-cta-title {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* Marka adı, e-posta, telefon ve URL'ler Latin/LTR kalmalı —
   aksi halde RTL akış içinde parçalanmış görünürler. */
[dir="rtl"] .ay-copyright a,
[dir="rtl"] a[href^="mailto:"],
[dir="rtl"] a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   2. Masaüstü açılır menüler
   -------------------------------------------------------------------------- */
[dir="rtl"] .ay-dropdown-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .ay-dropdown-item {
    border-left: none;
    border-right: 3px solid transparent;
    text-align: right;
}

[dir="rtl"] .ay-dropdown-item:hover {
    border-left: none;
    border-right: 3px solid var(--secondary-color);
    padding-left: 15px;
    padding-right: 18px;
}

/* Dil değiştirici navbar'ın en solunda kalır (RTL'de satır sonu) */
[dir="rtl"] .ay-lang-switcher .ay-lang-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .ay-lang-item.active {
    border-left: none;
    border-right: 3px solid var(--secondary-color);
}

/* Üst menü bağlantısının hover üçgeni */
[dir="rtl"] .ay-nav-link::before {
    left: auto;
    right: 0;
    border-left: none;
    border-right: 10px solid var(--secondary-color);
}

/* --------------------------------------------------------------------------
   3. Mobil menü — RTL'de soldan açılır
   -------------------------------------------------------------------------- */
[dir="rtl"] .ay-mobile-menu {
    right: auto;
    left: -100%;
    transition: left 0.4s ease;
}

[dir="rtl"] .ay-mobile-menu.ay-show {
    right: auto;
    left: 0;
}

[dir="rtl"] .ay-mobile-menu-toggle {
    right: auto;
    left: 5%;
}

[dir="rtl"] .ay-mobile-dropdown-toggle {
    text-align: right;
}

[dir="rtl"] .ay-mobile-dropdown-menu {
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .ay-mobile-dropdown-link {
    border-left: none;
    border-right: 3px solid transparent;
    transition: color 0.3s ease, padding-right 0.3s ease;
}

[dir="rtl"] .ay-mobile-dropdown-link:hover {
    border-left-color: transparent;
    border-right-color: var(--secondary-color);
    padding-left: 0;
    padding-right: 10px;
}

[dir="rtl"] .ay-mobile-dropdown-link.ay-lang-item {
    border-right: none;
}

/* --------------------------------------------------------------------------
   4. Başlıklar ve breadcrumb
   -------------------------------------------------------------------------- */
[dir="rtl"] .ay-section-title {
    text-align: right;
    padding-left: 0;
    padding-right: 0;
}

[dir="rtl"] .ay-section-title::before {
    left: auto;
    right: 0;
}

/* Ortalanmış başlıklarda çizgi ortada kalmalı */
[dir="rtl"] .text-center .ay-section-title::before,
[dir="rtl"] .ay-section-title.text-center::before {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

[dir="rtl"] .ay-breadcrumb-title {
    text-align: right;
}

[dir="rtl"] .ay-breadcrumb-item {
    margin-right: 0;
    margin-left: 5px;
}

/* --------------------------------------------------------------------------
   5. İçerik bileşenleri
   -------------------------------------------------------------------------- */
[dir="rtl"] .ay-info-icon {
    margin-right: 0;
    margin-left: 15px;
}

/* View'ların kendi <style> bloklarında tanımlı alıntı kutuları
   (yönetim mesajları, misyon/vizyon vb.) */
[dir="rtl"] .ay-manager-quote,
[dir="rtl"] blockquote {
    border-left: none;
    border-right: 5px solid #0056b3;
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .ay-footer-links,
[dir="rtl"] .ay-mobile-nav-list,
[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-right: 0;
}

/* --------------------------------------------------------------------------
   6. Yüzen öğeler ve bildirimler
   -------------------------------------------------------------------------- */
[dir="rtl"] .ay-back-to-top {
    right: auto;
    left: 30px;
}

[dir="rtl"] .x-alert {
    right: auto;
    left: 5rem;
}

[dir="rtl"] .x-alert-close {
    right: auto;
    left: .4rem;
}

/* --------------------------------------------------------------------------
   7. Form öğeleri
   -------------------------------------------------------------------------- */
[dir="rtl"] .form-control,
[dir="rtl"] .form-select,
[dir="rtl"] .ay-form-input,
[dir="rtl"] textarea {
    text-align: right;
    direction: rtl;
}

/* Telefon, e-posta ve sayısal alanlar LTR girilir */
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="url"],
[dir="rtl"] input[type="number"],
[dir="rtl"] input[type="date"] {
    text-align: left;
    direction: ltr;
}

[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}

[dir="rtl"] .form-check-label {
    text-align: right;
}

/* --------------------------------------------------------------------------
   8. Mobil düzenlemeler
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991.98px) {
    [dir="rtl"] .ay-navbar-center-custom {
        left: auto;
        right: 33%;
    }
}
