/*
 * Ön yüz erişilebilirlik düzeltmeleri (WCAG 2.1 AA; Polo şablonunun üstüne, custom.css'ten sonra yüklenir).
 * - "İçeriğe geç" bağlantısı (2.4.1)
 * - Klavye odağı her zaman görünür (2.4.7): şablondaki outline:none kuralları geçersiz kalır
 * - Sayfa başlığı bandında beyaz yazının karşıtlığı (1.4.3): fotoğrafın üstüne koyu katman + gölge
 * - Bant başlığı detay sayfalarında <h1> değilse (.ust-baslik) aynı görünüm
 */

/* İçeriğe geç: yalnız klavyeyle odaklanınca görünür. */
.icerige-gec {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 10000;
    padding: .75rem 1.25rem;
    border-radius: 0 0 6px 6px;
    background: #154d8a;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    transition: top .15s;
}

.icerige-gec:focus {
    top: 0;
}

/* Programla odaklanan ana içerik (tabindex="-1") çerçeve göstermez. */
#ana-icerik:focus {
    outline: none;
}

/* Klavye odağı: sarı-siyah çift çerçeve hem açık hem koyu zeminde görünür. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
.select2-container--focus .select2-selection {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px #0b0c0c !important;
}

/* Sayfa başlığı bandı: fotoğraf/arka plan ne kadar açık olursa olsun beyaz yazı okunur kalsın. */
#page-title.text-light {
    position: relative;
}

#page-title.text-light::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, .45);
    pointer-events: none;
}

#page-title.text-light > .container {
    position: relative;
    z-index: 2;
}

/* Bandın üstüne binen içerik kartı (margin-top: -50px): koyu katman (::before) konumlu olduğu için konumsuz kartın
   üstüne çiziliyordu; kartın banda giren kısmı kararıyordu. */
#page-title.text-light + .card {
    position: relative;
    z-index: 2;
}

#page-title.text-light .page-title,
#page-title.text-light .breadcrumb {
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

#page-title .page-title > .ust-baslik {
    font-family: "Poppins", sans-serif;
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 400;
    margin-bottom: 1rem;
}

#page-title.text-light .page-title > .ust-baslik {
    color: #fff;
}

/* ---------------------------------------------------------------------------------------------
 * Erişilebilirlik menüsü (partials/erisilebilirlik-menusu, js/erisilebilirlik.js)
 * ------------------------------------------------------------------------------------------- */
/* Sol altta sabit, yalnız simge (kullanıcı kararı). Sağ altta yukarı çık / panel düğmeleri var. */
.erisim {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 10000;
}

.erisim-dugme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #154d8a;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    transition: transform .15s, background-color .15s;
}

.erisim-dugme:hover,
.erisim-dugme[aria-expanded="true"] {
    background: #0e3a69;
    transform: scale(1.06);
}

html.erisim-karsitlik .erisim-dugme {
    border-color: #ff0 !important;
    color: #ff0 !important;
}

/* Sabit konum (js/erisilebilirlik.js düğmeye göre yerleştirir): bandın overflow:hidden'ı ve üstüne binen kart kırpmasın. */
.erisim-paneli {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    width: 250px;
    padding: .5rem;
    border-radius: 6px;
    background: #fff;
    color: #222;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    text-align: left;
    text-shadow: none;
}

.erisim-paneli[hidden] {
    display: none;
}

.erisim-panel-baslik {
    margin: .25rem .5rem .5rem;
    font-weight: 700;
    font-size: 14px;
    color: #154d8a;
}

.erisim-secenek,
.erisim-sifirla {
    display: block;
    width: 100%;
    margin: 2px 0;
    padding: .5rem .75rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #222;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.erisim-secenek:hover,
.erisim-sifirla:hover {
    background: #eef3f9;
}

.erisim-secenek i,
.erisim-sifirla i {
    width: 1.25rem;
    text-align: center;
    color: #154d8a;
}

.erisim-secenek[aria-pressed="true"] {
    border-color: #154d8a;
    background: #154d8a;
    color: #fff;
}

.erisim-secenek[aria-pressed="true"] i {
    color: #fff;
}

.erisim-sifirla {
    margin-top: .5rem;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 4px 4px;
}

/* Yüksek karşıtlık: siyah zemin, beyaz yazı, sarı bağlantılar; arka plan resimleri kalkar (görseller kalır). */
html.erisim-karsitlik body,
html.erisim-karsitlik body *:not(img):not(video):not(iframe):not(svg):not(svg *):not(.erisim-paneli):not(.erisim-paneli *) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* :not(#_) özgüllüğü id'li şablon kurallarını (#mainMenu ..., #page-title ... a) geçmek için. */
html.erisim-karsitlik a:not(#_):not(#__):not(#___),
html.erisim-karsitlik a:not(#_):not(#__):not(#___) *:not(img) {
    color: #ff0 !important;
    opacity: 1 !important;
}

/* Mavi logo siyah zeminde seçilmez: sitenin beyaz logosu gösterilir. */
html.erisim-karsitlik #logo .logo-default {
    display: none !important;
}

html.erisim-karsitlik #logo .logo-dark {
    display: block !important;
}

html.erisim-karsitlik .parallax-container,
html.erisim-karsitlik #page-title.text-light::before {
    display: none !important;
}

/* Bağlantıları vurgula */
html.erisim-baglanti a:not(.btn):not(.icerige-gec) {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
    font-weight: 600;
}

/* Okunaklı yazı tipi (ikon yazı tiplerine dokunmaz: <i> ve ikon sınıflı öğeler hariç). */
html.erisim-okunakli body,
html.erisim-okunakli body :is(p, li, a, span, div, td, th, label, input, select, textarea, button, h1, h2, h3, h4, h5, h6, dt, dd, blockquote):not([class*="fa-"]):not([class*="icon-"]) {
    font-family: Verdana, Tahoma, Arial, sans-serif !important;
    letter-spacing: .02em;
}

/* Satır aralığı ve harf/kelime aralığı (WCAG 1.4.12 metin aralığı). */
html.erisim-satir body :is(p, li, td, th, dd, dt, blockquote, label) {
    line-height: 1.9 !important;
    letter-spacing: .05em !important;
    word-spacing: .12em !important;
}

html.erisim-satir body p {
    margin-bottom: 1.5em !important;
}

/* Animasyonları durdur (seçilince) ve işletim sisteminde "hareketi azalt" açıksa. */
html.erisim-hareket *,
html.erisim-hareket *::before,
html.erisim-hareket *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
        scroll-behavior: auto !important;
    }
}
