/* ========================================================
   AYAYDER - ENGELSİZ ERİŞİM (ACCESSIBILITY / WCAG 2.1) CSS
   ======================================================== */

/* 1. Klavyeden Sekme ile Geçiş / İçeriğe Atla (Skip to content) */
.a11y-skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: #0284c7;
    color: #ffffff !important;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: 0 0 10px 10px;
    z-index: 9999999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    transition: top 0.2s ease;
}
.a11y-skip-link:focus {
    top: 0;
    outline: 4px solid #facc15;
}

/* 2. Yüzen Engelsiz Erişim Butonu */
.a11y-floating-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999980;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 10px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.45);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.a11y-floating-trigger:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.6);
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}
.a11y-floating-trigger .a11y-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Engelsiz Erişim Modal / Yan Çekmece */
.a11y-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 23, 43, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999990;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.a11y-modal-backdrop.open {
    display: flex;
    opacity: 1;
}
.a11y-modal-drawer {
    position: fixed;
    top: 0;
    left: -420px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #0b1524;
    color: #e2e8f0;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
    z-index: 999995;
    display: flex;
    flex-direction: column;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.a11y-modal-backdrop.open .a11y-modal-drawer {
    left: 0;
}
.a11y-drawer-header {
    padding: 20px 24px;
    background: #07172b;
    border-bottom: 2px solid #0284c7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.a11y-drawer-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.a11y-drawer-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.a11y-drawer-close:hover {
    color: #fff;
}
.a11y-drawer-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
.a11y-section-title {
    font-size: 0.76rem;
    font-weight: 800;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 16px 0 10px 0;
}
.a11y-section-title:first-child {
    margin-top: 0;
}
.a11y-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.a11y-btn {
    background: #132238;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    transition: all 0.2s ease;
}
.a11y-btn:hover {
    background: #1e3a5f;
    border-color: #0284c7;
    color: #ffffff;
}
.a11y-btn.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}
.a11y-btn .a11y-btn-icon {
    font-size: 1.3rem;
}
.a11y-btn-full {
    grid-column: span 2;
    flex-direction: row;
    padding: 10px 14px;
    justify-content: flex-start;
    gap: 12px;
}
.a11y-drawer-footer {
    padding: 16px 24px;
    background: #07172b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.a11y-reset-btn {
    width: 100%;
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.a11y-reset-btn:hover {
    background: #dc2626;
}

/* 4. Sesli Okuma Oynatıcı Çubuğu (Audio Player Widget) */
.a11y-speech-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #07172b;
    border: 2px solid #0284c7;
    border-radius: 50px;
    padding: 8px 18px;
    display: none;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 999999;
    color: #fff;
}
.a11y-speech-bar.active {
    display: flex;
}
.a11y-speech-ctrl-btn {
    background: #0284c7;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.1s;
}
.a11y-speech-ctrl-btn:hover {
    transform: scale(1.1);
}

/* 5. Okuma Cetveli / Kılavuzu */
.a11y-reading-ruler {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 32px;
    background: rgba(250, 204, 21, 0.3);
    border-top: 2px solid #facc15;
    border-bottom: 2px solid #facc15;
    pointer-events: none;
    z-index: 999970;
    display: none;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
}
body.a11y-ruler-active .a11y-reading-ruler {
    display: block;
}

/* 6. Okuma Maskesi (Reading Mask) */
.a11y-reading-mask-top,
.a11y-reading-mask-bottom {
    position: fixed;
    left: 0;
    width: 100vw;
    background: rgba(0, 0, 0, 0.65);
    pointer-events: none;
    z-index: 999965;
    display: none;
}
body.a11y-mask-active .a11y-reading-mask-top,
body.a11y-mask-active .a11y-reading-mask-bottom {
    display: block;
}

/* ========================================================
   ERİŞİLEBİLİRLİK MODLARI VE SINIFLARI
   ======================================================== */

/* Yazı Boyutları */
html.a11y-font-1 { font-size: 110% !important; }
html.a11y-font-2 { font-size: 120% !important; }
html.a11y-font-3 { font-size: 135% !important; }
html.a11y-font-4 { font-size: 150% !important; }

/* 1. Yüksek Kontrast (Sarı & Siyah - High Contrast) */
body.a11y-high-contrast {
    background-color: #000000 !important;
    color: #ffff00 !important;
}
body.a11y-high-contrast *,
body.a11y-high-contrast div,
body.a11y-high-contrast section,
body.a11y-high-contrast article,
body.a11y-high-contrast header,
body.a11y-high-contrast footer,
body.a11y-high-contrast nav,
body.a11y-high-contrast main {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
body.a11y-high-contrast a,
body.a11y-high-contrast a * {
    color: #00ffff !important;
    text-decoration: underline !important;
}
body.a11y-high-contrast button,
body.a11y-high-contrast .btn,
body.a11y-high-contrast input,
body.a11y-high-contrast select,
body.a11y-high-contrast textarea {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

/* 2. Negatif / Ters Kontrast (Beyaz & Siyah - Invert) */
body.a11y-invert {
    filter: invert(100%) hue-rotate(180deg) !important;
    background-color: #fff !important;
}
body.a11y-invert img,
body.a11y-invert video,
body.a11y-invert iframe,
body.a11y-invert .a11y-modal-drawer,
body.a11y-invert .a11y-floating-trigger {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* 3. Monokrom / Siyah Beyaz (Grayscale) */
body.a11y-grayscale {
    filter: grayscale(100%) !important;
}

/* 4. Açık Arka Plan / Yüksek Okunabilirlik (Light Contrast) */
body.a11y-light-mode {
    background-color: #ffffff !important;
    color: #111827 !important;
}
body.a11y-light-mode .card,
body.a11y-light-mode section,
body.a11y-light-mode div {
    background-color: #ffffff !important;
    color: #111827 !important;
}

/* 5. Disleksi Dostu Yazı Tipi */
@font-face {
    font-family: 'OpenDyslexic';
    src: url('https://cdn.jsdelivr.net/npm/opendyslexic@latest/open-dyslexic-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
body.a11y-dyslexia,
body.a11y-dyslexia * {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Trebuchet MS', sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
    line-height: 1.8 !important;
}

/* 6. Satır & Harf Aralığı Genişletme */
body.a11y-wide-spacing * {
    line-height: 2 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.18em !important;
}

/* 7. Bağlantıları / Linkleri Vurgula */
body.a11y-highlight-links a {
    text-decoration: underline !important;
    text-decoration-thickness: 3px !important;
    background: #facc15 !important;
    color: #000000 !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
}

/* 8. Başlıkları Vurgula */
body.a11y-highlight-headers h1,
body.a11y-highlight-headers h2,
body.a11y-highlight-headers h3,
body.a11y-highlight-headers h4,
body.a11y-highlight-headers h5,
body.a11y-highlight-headers h6 {
    background: #0284c7 !important;
    color: #ffffff !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border-left: 6px solid #facc15 !important;
}

/* 9. Görselleri Gizle (Pure Text Mode) */
body.a11y-hide-images img,
body.a11y-hide-images video,
body.a11y-hide-images iframe,
body.a11y-hide-images [style*="background-image"] {
    display: none !important;
    visibility: hidden !important;
}

/* 10. Büyük Fare İmleci */
body.a11y-big-cursor,
body.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='2' d='M4.5 3.5l11 11-4.5 1-1 4.5z'/%3E%3C/svg%3E"), auto !important;
}

/* 11. Animasyonları Durdur */
body.a11y-stop-anim *,
body.a11y-stop-anim *::before,
body.a11y-stop-anim *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Seslendirme Vurgusu */
.a11y-speaking-highlight {
    background-color: #facc15 !important;
    color: #000000 !important;
    box-shadow: 0 0 10px #facc15 !important;
}
