/**
 * Accessibility CSS
 * Improves accessibility for screen readers and keyboard navigation
 */

/* 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-width: 0;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Required field indicator */
.required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

/* Form labels styling */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

/* Form inputs with better contrast */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    border: 2px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* Improve button accessibility */
button,
.btn {
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
}

button:focus-visible,
.btn:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Improve link accessibility */
a {
    color: #0066cc;
    /* text-decoration: underline; */
    transition: color 0.3s ease;
}

a:hover {
    color: #0052a3;
}

a:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Improve heading hierarchy */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Improve list accessibility */
ul, ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

li {
    margin-bottom: 0.5em;
}

/* Improve table accessibility */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
    font-weight: bold;
}

/* Improve image accessibility */
img {
    max-width: 100%;
    height: auto;
}

/* Improve form group spacing */
.form-group {
    margin-bottom: 1.5em;
}

/* Alert messages accessibility */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    role: alert;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Improve color contrast for text */
body {
    color: #333;
    background-color: #fff;
}

/* Improve focus indicators for navigation */
nav a:focus-visible,
nav button:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Improve dropdown menu accessibility */
.dropdown-menu {
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dropdown-item:focus-visible {
    background-color: #f5f5f5;
    outline: 3px solid #4A90E2;
    outline-offset: -3px;
}

/* Improve carousel accessibility */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Improve modal accessibility */
.modal {
    display: none;
}

.modal.show {
    display: block;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

/* Print styles for accessibility */
@media print {
    .no-print {
        display: none;
    }
    
   
    
    body {
        color: #000;
        background-color: #fff;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    body {
        color: #000;
        background-color: #fff;
    }
    
    a {
        color: #0000ee;
        /* text-decoration: underline; */
    }
    
    button, .btn {
        border: 2px solid #000;
    }
}

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

