/* Skip to content */
.skip-to-content {
    position: fixed;
    top: -100px;
    left: 20px;
    background: #0077B6;
    color: #ffffff !important;
    padding: 12px 20px;
    z-index: 999999;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s ease-in-out;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.skip-to-content:focus {
    top: 0;
}

/* Accessibility Floating Trigger */
.a11y-trigger-btn {
    position: fixed;
    left: 25px;
    bottom: 30px;
    z-index: 9999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #0077B6;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 119, 182, 0.4);
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.a11y-trigger-btn:hover, .a11y-trigger-btn:focus-visible {
    transform: scale(1.1);
    background: #023e8a;
    outline: 3px solid #ffb703;
}

/* Accessibility Modal/Drawer Panel */
.a11y-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.a11y-panel-overlay.active {
    display: block;
    opacity: 1;
}

.a11y-panel {
    position: fixed;
    left: -400px;
    top: 0;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    z-index: 100000;
    box-shadow: 5px 0 25px rgba(0,0,0,0.2);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.a11y-panel.active {
    left: 0;
}

.a11y-header {
    padding: 18px 20px;
    background: #0077B6;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.a11y-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.a11y-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
}
.a11y-close-btn:hover, .a11y-close-btn:focus-visible {
    background: rgba(255,255,255,0.2);
    outline: 2px solid #ffb703;
}

.a11y-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.a11y-section-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: 8px;
}

.a11y-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.a11y-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
}
.a11y-card svg, .a11y-card i {
    font-size: 20px;
    color: #0077B6;
}
.a11y-card:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}
.a11y-card.active {
    background: #e0f2fe;
    border-color: #0077B6;
    color: #0077B6;
    font-weight: 700;
}
.a11y-card.active svg, .a11y-card.active i {
    color: #0077B6;
}

.a11y-reset-btn {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.a11y-reset-btn:hover, .a11y-reset-btn:focus-visible {
    background: #bb2d3b;
}

/* Reading Indicator Box for Text-to-speech */
.a11y-speaking-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    display: none;
    align-items: center;
    gap: 15px;
    z-index: 100002;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-size: 14px;
}
.a11y-speaking-bar.active {
    display: flex;
}
.a11y-speaking-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------------- ACCESSIBILITY GLOBAL MODES ---------------- */

/* High Contrast Mode */
body.a11y-high-contrast {
    background-color: #000000 !important;
    color: #ffff00 !important;
}
body.a11y-high-contrast * {
    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 button {
    color: #00ffff !important;
    text-decoration: underline !important;
}

/* Dark Mode */
body.a11y-dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}
body.a11y-dark-mode header,
body.a11y-dark-mode nav,
body.a11y-dark-mode footer,
body.a11y-dark-mode .card,
body.a11y-dark-mode .bg-white,
body.a11y-dark-mode .bg-light,
body.a11y-dark-mode .section {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}
body.a11y-dark-mode a {
    color: #90caf9 !important;
}

/* Monochrome / Grayscale */
body.a11y-grayscale {
    filter: grayscale(100%) !important;
}

/* Inverted Colors */
body.a11y-invert {
    filter: invert(100%) hue-rotate(180deg) !important;
}
body.a11y-invert img, body.a11y-invert video {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* Font Sizes */
body.a11y-font-lg {
    font-size: 115% !important;
}
body.a11y-font-xl {
    font-size: 130% !important;
}

/* Readable Font / Dyslexia Friendly */
body.a11y-readable-font, body.a11y-readable-font * {
    font-family: Arial, Helvetica, Tahoma, sans-serif !important;
    letter-spacing: 0.5px !important;
}

/* Line Spacing */
body.a11y-spacing, body.a11y-spacing * {
    line-height: 2 !important;
    letter-spacing: 1.5px !important;
    word-spacing: 3px !important;
}

/* Highlight Links */
body.a11y-highlight-links a {
    background-color: #ffeb3b !important;
    color: #000000 !important;
    text-decoration: underline !important;
    padding: 2px 4px !important;
    font-weight: 700 !important;
}

/* Big Cursor */
body.a11y-big-cursor, body.a11y-big-cursor * {
    cursor: default !important;
}

/* Keyboard Focus Ring */
:focus-visible {
    outline: 3px solid #ffb703 !important;
    outline-offset: 3px !important;
}
