/* מערכת נגישות מלאה - עיצוב */
/* WCAG 2.1 AA compliant */

/* כפתור נגישות צף */
.accessibility-button {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-gold, #F0A500);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(240, 165, 0, 0.3);
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    min-width: 50px;
    min-height: 50px;
}

.accessibility-button:hover,
.accessibility-button:focus {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(240, 165, 0, 0.4);
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    background-color: var(--dark-gold, #CF7500);
}

.accessibility-button:active {
    transform: scale(0.95);
}

.accessibility-button.active {
    background-color: var(--dark-gold, #CF7500);
}

.accessibility-button svg {
    width: 24px;
    height: 24px;
}

/* תפריט נגישות */
.accessibility-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    direction: rtl;
    display: flex;
    flex-direction: column;
}

.accessibility-menu.open {
    right: 0;
}

.accessibility-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    background: rgba(255, 255, 255, 1);
    position: sticky;
    top: 0;
    z-index: 1;
}

.accessibility-menu-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1A1C20;
}

.accessibility-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    min-width: 40px;
    min-height: 40px;
    color: #1A1C20;
}

.accessibility-menu-close:hover,
.accessibility-menu-close:focus {
    background: rgba(0, 0, 0, 0.1);
    outline: 2px solid var(--primary-gold, #F0A500);
    outline-offset: 2px;
}

.accessibility-menu-close svg {
    width: 20px;
    height: 20px;
}

.accessibility-menu-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.accessibility-option {
    margin-bottom: 24px;
}

.accessibility-option label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1A1C20;
    font-size: 1rem;
}

.text-size-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.text-size-indicator {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    color: #1A1C20;
    font-size: 1rem;
}

.accessibility-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #1A1C20;
    transition: all 0.2s ease;
    text-align: right;
    min-height: 48px;
    font-family: inherit;
}

.accessibility-btn:hover,
.accessibility-btn:focus {
    background: #e8e8e8;
    border-color: var(--primary-gold, #F0A500);
    outline: 2px solid var(--primary-gold, #F0A500);
    outline-offset: 2px;
}

.accessibility-btn:active {
    transform: scale(0.98);
}

.accessibility-btn.active {
    background: var(--primary-gold, #F0A500);
    color: white;
    border-color: var(--primary-gold, #F0A500);
}

.accessibility-btn.active:hover,
.accessibility-btn.active:focus {
    background: var(--dark-gold, #CF7500);
    border-color: var(--dark-gold, #CF7500);
}

.accessibility-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.accessibility-btn span {
    flex: 1;
    text-align: right;
}

.reset-btn {
    margin-top: 24px;
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.reset-btn:hover,
.reset-btn:focus {
    background: #e8e8e8;
    border-color: #c0c0c0;
}

.accessibility-menu-footer {
    padding: 20px;
    border-top: 2px solid #e0e0e0;
    background: rgba(255, 255, 255, 1);
    position: sticky;
    bottom: 0;
}

.accessibility-statement-link {
    display: block;
    text-align: center;
    color: var(--primary-gold, #F0A500);
    text-decoration: none;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accessibility-statement-link:hover,
.accessibility-statement-link:focus {
    background: rgba(240, 165, 0, 0.1);
    outline: 2px solid var(--primary-gold, #F0A500);
    outline-offset: 2px;
    text-decoration: underline;
}

/* מצבי נגישות */
.high-contrast {
    background: #000000 !important;
    color: #FFD700 !important;
}

.high-contrast * {
    background: #000000 !important;
    color: #FFD700 !important;
    border-color: #FFD700 !important;
}

.high-contrast a {
    color: #FFD700 !important;
    text-decoration: underline !important;
}

.high-contrast button,
.high-contrast .cta-button {
    background: #FFD700 !important;
    color: #000000 !important;
    border: 2px solid #FFD700 !important;
}

.invert-contrast {
    filter: invert(1);
}

.invert-contrast img,
.invert-contrast video,
.invert-contrast iframe {
    filter: invert(1);
}

.highlight-links a {
    outline: 3px solid #FFD700 !important;
    outline-offset: 2px !important;
    background: rgba(255, 215, 0, 0.2) !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

.readable-font,
.readable-font * {
    font-family: Arial, "OpenDyslexic", sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}

.pause-animations *,
.pause-animations *::before,
.pause-animations *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-play-state: paused !important;
}

/* Screen reader only */
.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;
}

/* Responsive Design */
@media (max-width: 768px) {
    .accessibility-button {
        bottom: 85px;
        right: 15px;
        width: 45px;
        height: 45px;
        min-width: 45px;
        min-height: 45px;
    }
    
    .accessibility-button svg {
        width: 20px;
        height: 20px;
    }
    
    .accessibility-menu {
        width: 100vw;
        right: -100vw;
    }
    
    .accessibility-menu.open {
        right: 0;
    }
    
    .accessibility-menu-header {
        padding: 16px;
    }
    
    .accessibility-menu-header h2 {
        font-size: 1.25rem;
    }
    
    .accessibility-menu-content {
        padding: 16px;
    }
    
    .accessibility-btn {
        padding: 12px 14px;
        font-size: 0.95rem;
        min-height: 44px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .accessibility-button {
        border: 3px solid white;
    }
    
    .accessibility-btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .accessibility-button,
    .accessibility-menu,
    .accessibility-btn {
        transition: none;
    }
    
    .accessibility-menu {
        transition: right 0.1s ease;
    }
}

/* Focus visible for keyboard navigation */
.accessibility-button:focus-visible,
.accessibility-btn:focus-visible,
.accessibility-menu-close:focus-visible,
.accessibility-statement-link:focus-visible {
    outline: 3px solid var(--primary-gold, #F0A500);
    outline-offset: 3px;
}

/* Print styles */
@media print {
    .accessibility-button,
    .accessibility-menu {
        display: none !important;
    }
}

