/* ==========================================================================
   Erişilebilirlik — Görme Engellilere Uyumlu Stiller
   Accessibility Stylesheet (WCAG 2.1 AA uyumlu)
   ========================================================================== */

/* Yazı Boyutu Ayarları */
body.font-small    { font-size: 14px; }
body.font-normal   { font-size: 16px; }
body.font-large    { font-size: 19px; }
body.font-xlarge   { font-size: 22px; }

body.font-large  h1 { font-size: 2.6rem; }
body.font-xlarge h1 { font-size: 3rem; }

/* ==========================================================================
   Yüksek Kontrast Modu
   Siyah arka plan, beyaz/sarı metin (WCAG kontrast oranı >= 7:1)
   ========================================================================== */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast *,
body.high-contrast *::before,
body.high-contrast *::after {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #ffe500 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.high-contrast img,
body.high-contrast video,
body.high-contrast iframe {
    filter: grayscale(0) contrast(1.1);
    background: #000 !important;
}

body.high-contrast a,
body.high-contrast a * {
    color: #ffe500 !important;
    text-decoration: underline !important;
}
body.high-contrast a:hover,
body.high-contrast a:focus {
    color: #000 !important;
    background: #ffe500 !important;
}

body.high-contrast .btn,
body.high-contrast button,
body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #ffe500 !important;
}
body.high-contrast .btn-primary {
    background: #ffe500 !important;
    color: #000 !important;
}
body.high-contrast .btn-primary:hover,
body.high-contrast .btn-primary:focus {
    background: #fff !important;
    color: #000 !important;
}

body.high-contrast .a11y-toolbar,
body.high-contrast .site-header,
body.high-contrast .site-footer,
body.high-contrast .hero,
body.high-contrast .stats,
body.high-contrast .category-card,
body.high-contrast .area-card,
body.high-contrast .comment-item,
body.high-contrast .filter-bar,
body.high-contrast .map-filters {
    background: #000 !important;
    border: 2px solid #ffe500 !important;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast .section-title,
body.high-contrast .logo-text strong,
body.high-contrast strong {
    color: #ffe500 !important;
}

body.high-contrast .a11y-btn.active,
body.high-contrast .main-nav a.active,
body.high-contrast .area-badge {
    background: #ffe500 !important;
    color: #000 !important;
}

body.high-contrast *:focus-visible {
    outline: 4px solid #ffe500 !important;
    outline-offset: 3px !important;
}

/* ==========================================================================
   Hareket Tercihi (prefers-reduced-motion)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .area-card:hover,
    .category-card:hover,
    .btn-primary:hover { transform: none !important; }
}

/* ==========================================================================
   Sadece ekran okuyucular için gizli içerik
   ========================================================================== */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.sr-only-focusable:focus {
    position: static !important;
    width: auto; height: auto;
    clip: auto;
    white-space: normal;
}

/* Minimum dokunma hedefleri (WCAG 2.5.5) */
button, .btn, a.btn, .a11y-btn, .form-control, input, select {
    min-height: 44px;
}

/* Form erişilebilirliği */
input:invalid, textarea:invalid {
    border-color: #c62828;
}
.form-control:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 0;
}

/* Daha yüksek kontrastlı body.high-contrast form elemanları */
body.high-contrast input::placeholder,
body.high-contrast textarea::placeholder {
    color: #cccccc !important;
    opacity: 1;
}

/* Harita popup — yüksek kontrast */
body.high-contrast .leaflet-popup-content-wrapper,
body.high-contrast .leaflet-popup-tip {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #ffe500 !important;
}
