/* Existing accessibility controls and user preference modes. */


/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -9999px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gold);
    color: var(--white);
    padding: 10px 20px;
    z-index: 9999;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s ease;
}

.skip-to-content:focus,
.skip-to-content:focus-visible {
    top: 0;
}

/* Focus Indicators */
:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Accessibility Widget */
.accessibility-widget {
    position: fixed;
    top: 100px;
    left: 0;
    z-index: 9990;
}

.accessibility-btn {
    background: var(--primary-gold);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.accessibility-btn:hover,
.accessibility-btn:focus {
    width: 55px;
    background: var(--dark-gold);
}

/* Always-visible link to the accessibility statement, sitting right under the
   accessibility menu button so users don't need to open the popup or scroll
   to the footer. */
.accessibility-statement-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-height: 60px;
    margin-top: 4px;
    background: var(--charcoal);
    color: var(--white);
    border-radius: 0 8px 8px 0;
    text-decoration: none;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    transition: background 0.3s ease, color 0.3s ease, width 0.3s ease;
    line-height: 1.15;
    padding: 6px 4px;
    text-align: center;
}

.accessibility-statement-link i {
    font-size: 16px;
    margin-bottom: 3px;
}

.accessibility-statement-text {
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    word-spacing: -1px;
    display: block;
}

.accessibility-statement-link:hover,
.accessibility-statement-link:focus-visible {
    width: 70px;
    background: var(--primary-gold);
    color: var(--white);
}

/* Prominent call-to-action link at the TOP of the accessibility menu popup,
   so users don't have to scroll past 16 toggles to find the statement link. */
.accessibility-statement-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 12px;
    margin: 0 0 12px 0;
    background: var(--primary-gold);
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: var(--font-weight-bold);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    min-height: 48px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.accessibility-statement-cta i {
    font-size: 18px;
}

.accessibility-statement-cta:hover,
.accessibility-statement-cta:focus-visible {
    background: var(--dark-gold);
    color: var(--white);
}

.accessibility-statement-cta:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 2px;
}

.accessibility-menu {
    position: absolute;
    top: 0;
    left: -320px; /* Hidden by default */
    width: 300px;
    max-height: 90vh;
    background: #fff;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    border-radius: 0 12px 12px 0;
    padding: 20px;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.accessibility-menu.active {
    left: 0;
}

.accessibility-menu::-webkit-scrollbar {
    width: 8px;
}

.accessibility-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.accessibility-menu::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 4px;
}

.accessibility-menu::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gold);
}

.accessibility-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.accessibility-header h3 {
    font-size: 18px;
    margin: 0;
}

.accessibility-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.accessibility-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accessibility-options button {
    width: 100%;
    padding: 10px;
    text-align: right;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.2s ease;
}

.accessibility-options button:hover,
.accessibility-options button:focus {
    background: #e9ecef;
    border-color: #ddd;
}

.accessibility-options button.active {
    background: var(--primary-gold);
    color: var(--white);
    border-color: var(--dark-gold);
    font-weight: bold;
}

.accessibility-footer {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

.accessibility-footer a {
    color: var(--text-light);
    text-decoration: underline;
}

/* Accessibility Modes */

/* Large Text */
body.large-text {
    font-size: 120%;
}

body.large-text h1 { font-size: 2.5em; }
body.large-text h2 { font-size: 2em; }
body.large-text h3 { font-size: 1.5em; }
body.large-text p { font-size: 1.2em; }

/* Huge Text - אותיות ענקיות! */
body.huge-text {
    font-size: 160% !important;
}

body.huge-text h1 { font-size: 3.5em !important; }
body.huge-text h2 { font-size: 2.8em !important; }
body.huge-text h3 { font-size: 2.2em !important; }
body.huge-text h4 { font-size: 1.8em !important; }
body.huge-text p { font-size: 1.6em !important; }
body.huge-text a { font-size: 1.6em !important; }
body.huge-text button { font-size: 1.4em !important; }
body.huge-text li { font-size: 1.6em !important; }

/* High Contrast */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast * {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.high-contrast img {
    filter: grayscale(100%) contrast(120%);
}

body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast button,
body.high-contrast .btn {
    background-color: #ffff00 !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

body.high-contrast .accessibility-menu {
    border: 2px solid #fff;
}

/* Highlight Links */
body.highlight-links a {
    text-decoration: underline !important;
    background-color: yellow !important;
    color: black !important;
}

body.highlight-links .btn {
    border: 3px solid yellow !important;
}

/* Readable Font */
body.readable-font {
    font-family: Arial, Helvetica, sans-serif !important;
}

body.readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Light Background - רקע בהיר */
body.light-background {
    background-color: #f0f0f0 !important;
}

body.light-background * {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.light-background a {
    color: #0066cc !important;
}

body.light-background button,
body.light-background .btn {
    background-color: var(--primary-gold) !important;
    color: #fff !important;
}

/* Negative Contrast - ניגודיות שלילית */
body.negative-contrast {
    filter: invert(1) hue-rotate(180deg);
}

body.negative-contrast img {
    filter: invert(1) hue-rotate(180deg);
}

/* Line Height - ריווח שורות */
body.increased-line-height {
    line-height: 2 !important;
}

body.increased-line-height * {
    line-height: 2 !important;
}

/* Text Spacing - ריווח אותיות */
body.increased-text-spacing * {
    letter-spacing: 0.15em !important;
    word-spacing: 0.2em !important;
}

/* Big Cursor - סמן גדול */
body.big-cursor,
body.big-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" style="font-size: 48px;"><text y="32">➤</text></svg>') 12 12, auto !important;
}

body.big-cursor a,
body.big-cursor button {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" style="font-size: 48px;"><text y="32">👆</text></svg>') 12 12, pointer !important;
}

/* Reading Guide - מדריך קריאה */
body.reading-guide {
    position: relative;
}

.reading-guide-line {
    position: fixed;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(84, 43, 67, 0.85);
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(84, 43, 67, 0.6),
                0 -50px 50px rgba(0, 0, 0, 0.3),
                0 50px 50px rgba(0, 0, 0, 0.3);
}

/* Stop Animations - עצור אנימציות */
body.stop-animations * {
    animation: none !important;
    transition: none !important;
}

body.stop-animations .hero-background {
    background-attachment: scroll !important;
}

/* Grayscale - גווני אפור */
body.grayscale-mode {
    filter: grayscale(100%);
}

/* Tooltips for Links */
body.show-tooltips a[href]:hover::after {
    content: attr(href);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 9999;
    margin-bottom: 8px;
}

body.show-tooltips a[href]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    margin-bottom: 2px;
}


/* Compact controls in the new palette; keep every existing accessibility action. */
.accessibility-widget { top: auto; bottom: 20px; left: 12px; }
.accessibility-btn { width: 42px; height: 42px; border-radius: 12px; background: var(--plum); color: #fff; box-shadow: 0 3px 12px #36273720; font-size: 21px; }
.accessibility-btn:hover, .accessibility-btn:focus { width: 42px; }
.accessibility-statement-link { width: 42px; min-height: 40px; border-radius: 10px; background: var(--paper); color: var(--plum); border: 1px solid var(--line); box-shadow: none; }
.accessibility-statement-link i { display: none; }
.accessibility-statement-text { font-size: 9px; }
.accessibility-statement-link:hover, .accessibility-statement-link:focus-visible { width: 42px; }
.accessibility-menu { top: auto; bottom: 0; left: 0; width: min(340px, calc(100vw - 24px)); max-height: min(680px, calc(100dvh - 130px)); border: 1px solid var(--line); border-radius: 18px; visibility: hidden; opacity: 0; transform: translateX(calc(-100% - 20px)); transition: transform .2s, opacity .2s, visibility .2s; }
.accessibility-menu.active { visibility: visible; opacity: 1; transform: translateX(0); }
.accessibility-options button.active { color: #fff; }
.accessibility-header button { min-width: 36px; min-height: 36px; }
body.large-text .hero-subtitle { font-size: 1em; }
body.huge-text .hero-subtitle { font-size: .65em; }
body.large-text .hero-layout, body.huge-text .hero-layout { grid-template-columns: 1fr; }
body.large-text .hero-art, body.huge-text .hero-art { max-width: 480px; }
body.large-text .nav-container, body.huge-text .nav-container { flex-wrap: wrap; }
body.large-text .logo-text, body.huge-text .logo-text { display: block; }
body.huge-text .service-card, body.huge-text .contact-form, body.huge-text .about > .container, body.huge-text .contact > .container { display: block; }
body.huge-text .service-features { margin-top: 20px; border: 0; padding: 0; }
body.huge-text .form-group { margin-bottom: 20px; }
body.huge-text .hero-title { overflow-wrap: anywhere; }
body.huge-text .header { position: relative; }
