/* ===== Accessibility Styles ===== */

/* Focus indicators for keyboard navigation */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Exclude decorative elements from focus outline */
svg[aria-hidden="true"] {
    outline: none !important;
}

/* aria-hidden should only affect screen readers, not visual display */
[aria-hidden="true"] {
    outline: none !important;
    /* Keep visual display but hide from screen readers */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .service-card {
        border: 2px solid #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .lazy-loading {
        animation: none;
    }
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for better keyboard navigation */
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* Button states for better accessibility */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:focus {
    outline: none;
}

/* Form validation styles */
input:invalid {
    border-color: #ef4444;
}

input:invalid:focus {
    outline-color: #ef4444;
}

/* ARIA live regions */
.aria-live {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Loading states */
.loading {
    cursor: wait;
}

.loading::after {
    content: " (Yükleniyor...)";
    font-style: italic;
}

/* Error states */
.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.error:focus {
    outline-color: #ef4444;
}

/* Success states */
.success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.success:focus {
    outline-color: #10b981;
}

/* Modal accessibility */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal[aria-hidden="true"] {
    display: none;
}

/* Ensure proper heading hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

/* Link accessibility */
a:not([href]) {
    cursor: default;
}

a[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.6;
}

/* Table accessibility */
table {
    border-collapse: collapse;
}

th {
    font-weight: 600;
    text-align: left;
}

/* Image accessibility */
img[alt=""] {
    border: 2px dashed #ccc;
}

/* Form fieldset and legend */
fieldset {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

legend {
    font-weight: 600;
    padding: 0 8px;
}

/* Required field indicators */
.required::after {
    content: " *";
    color: #ef4444;
    font-weight: bold;
}

/* Error messages */
.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

/* Success messages */
.success-message {
    color: #10b981;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}
