/* ============================================================
   ACCESSIBILITY PANEL
   ============================================================ */

.a11y-panel {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 99999;
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

.a11y-toggle-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    border: 3px solid #fff;
    border-left: none;
    border-radius: 0 0.75rem 0.75rem 0;
    background: var(--accent, #D4A843);
    color: #fff;
    font-size: 1.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 15px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
    animation: a11y-pulse 2s ease-in-out 3;
}

.a11y-toggle-btn:hover,
.a11y-toggle-btn:focus-visible {
    background: var(--primary, #003DA5);
    transform: translateY(-50%) scale(1.08);
}

@keyframes a11y-pulse {
    0%, 100% { box-shadow: 3px 3px 15px rgba(0,0,0,0.25); }
    50% { box-shadow: 3px 3px 25px rgba(212,168,67,0.6); }
}

.a11y-toggle-btn.open {
    opacity: 0;
    pointer-events: none;
}

.a11y-menu {
    position: absolute;
    left: -320px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: #fff;
    border-radius: 0 0.75rem 0.75rem 0;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.a11y-menu.open {
    left: 0;
}

.a11y-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--primary, #003DA5);
    color: #fff;
    font-size: 0.95rem;
}

.a11y-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.a11y-close:hover {
    opacity: 1;
}

.a11y-menu-body {
    padding: 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.a11y-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    background: none;
    font-size: 0.88rem;
    color: #333;
    cursor: pointer;
    border-radius: 0.375rem;
    text-align: left;
    transition: background 0.15s;
}

.a11y-option:hover,
.a11y-option:focus-visible {
    background: #e8eff9;
}

.a11y-option.active {
    background: var(--primary, #003DA5);
    color: #fff;
}

.a11y-option.active i {
    color: #fff;
}

.a11y-option i {
    font-size: 1rem;
    width: 1.3rem;
    text-align: center;
    color: var(--primary, #003DA5);
    flex-shrink: 0;
}

.a11y-reset {
    border-top: 1px solid #eee;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    color: #6c757d;
}

.a11y-reset i {
    color: #6c757d;
}

/* ============================================================
   ACCESSIBILITY MODES
   ============================================================ */

html.a11y-grayscale {
    filter: grayscale(100%);
}

html.a11y-high-contrast {
    filter: contrast(1.5);
}

html.a11y-negative {
    filter: invert(1) hue-rotate(180deg);
}

html.a11y-negative img,
html.a11y-negative video,
html.a11y-negative .a11y-panel {
    filter: invert(1) hue-rotate(180deg);
}

html.a11y-light-bg,
html.a11y-light-bg body {
    background-color: #fffff0 !important;
}

html.a11y-underline-links a {
    text-decoration: underline !important;
}

html.a11y-readable-font,
html.a11y-readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.03em !important;
    word-spacing: 0.1em !important;
}

/* Mobile */
@media (max-width: 767.98px) {
    .a11y-menu {
        width: 250px;
        left: -270px;
    }
    .a11y-toggle-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }
}
