﻿/*התחלה  - עבור סרגל נגישות*/
/* Skip link */
.skip-link{
  position:absolute; right:-9999px; top:auto;
  width:1px;height:1px; overflow:hidden;
}
.skip-link:focus{
  right:12px; top:12px;
  width:auto;height:auto;
  padding:10px 12px;
  background:#000; color:#fff;
  z-index:999999;
  border-radius:8px;
}

/* Toggle button */
.acc-toggle{
  position:fixed;
  left:16px; bottom:16px;
  z-index:999999;
  padding:10px 12px;
  border-radius:999px;
  border:2px solid rgba(0,0,0,.5); /* הגדל עובי וחוזק הגבול */
  background:#fff;
  color: #000; /* הוסף צבע טקסט מפורש */
  font: 600 14px/1 Arial, sans-serif;
  cursor:pointer;
}

/* Panel */
.acc-panel{
  position:fixed;
  left:16px; 
  bottom:64px;
  width:320px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  z-index:999999;
  background:#fff;
  border:1px solid rgba(0,0,0,.2);
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  padding:12px;
}

.acc-panel[hidden]{
  display: none;
}

.acc-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
}
.acc-title{ margin: 0; font-size: 16px;
}
.acc-close{
  width:36px;height:36px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.2);
  background:#fff;
  cursor:pointer;
  font-size:22px;
  line-height:1;
}

.acc-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px;
}

.acc-btn{
  border:1px solid rgba(0,0,0,.18);
  background:#f7f7f7;
  border-radius:12px;
  padding:10px 8px;
  cursor:pointer;
  font:600 13px/1.2 Arial, sans-serif;
}
.acc-btn[aria-pressed="true"]{
  background:#000;
  color:#fff;
  border-color:#000;
}

/* Footer */
.acc-footer{ 
    margin-top:10px; 
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.acc-footer small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.acc-footer a {
    display: inline-block;
    font-size: 18px;
    font-weight: 600;
    color: #0078d4;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.acc-footer a:hover {
    background: #f0f0f0;
    color: #005a9e;
}

.acc-footer a:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Focus visible (גם בלי מצב פוקוס) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline:3px solid #000;
  outline-offset:2px;
}

/* ===== Accessibility states via body classes ===== */

/* Font scaling using CSS variables */
:root{ --acc-font-scale: 1; }
body{ font-size: calc(16px * var(--acc-font-scale)); }

/* High contrast */
body.acc-contrast #pageContent{
  background:#000 !important;
  color:#fff !important;
}
body.acc-contrast #pageContent a{ color:#00ffff !important; }
body.acc-contrast #pageContent *{
  background-color: transparent !important;
  color: inherit !important;
  border-color: currentColor !important;
}

/* Yellow-Black mode */
body.acc-yellowblack #pageContent{
  background: #ffff00 !important;
  color: #000 !important;
}
body.acc-yellowblack #pageContent *{
  background-color: transparent !important;
  color: #000 !important;
}

/* Dark mode */
body.acc-darkmode #pageContent{
  background: #1a1a1a !important;
  color: #e0e0e0 !important;
}
body.acc-darkmode #pageContent a{
  color: #66b3ff !important;
}

/* Invert - רק על תוכן העמוד */
body.acc-invert #pageContent{
  filter: invert(1) hue-rotate(180deg);
}

/* Grayscale - רק על תוכן העמוד */
body.acc-grayscale #pageContent{
  filter: grayscale(1);
}

/* Sepia - רק על תוכן העמוד */
body.acc-sepia #pageContent {
  filter: sepia(1);
}

/* Underline links */
body.acc-underline a{
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
}

/* Highlight links */
body.acc-highlightlinks a{
  outline: 3px solid #ff6600 !important;
  outline-offset: 2px !important;
  background: rgba(255, 102, 0, 0.1) !important;
}

/* Highlight headings */
body.acc-highlightheadings h1,
body.acc-highlightheadings h2,
body.acc-highlightheadings h3,
body.acc-highlightheadings h4,
body.acc-highlightheadings h5,
body.acc-highlightheadings h6{
  background: #ffeb3b !important;
  padding: 5px !important;
  border-right: 5px solid #f44336 !important;
}

/* Line height */
body.acc-lineheight{
  line-height: 2 !important;
}
body.acc-lineheight *{
  line-height: 2 !important;
}

/* Letter spacing */
body.acc-letterspacing{
  letter-spacing: 2px !important;
}
body.acc-letterspacing *{
  letter-spacing: 2px !important;
}

/* Big cursor */
body.acc-bigcursor{
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M2 2 L2 30 L10 22 L14 30 L18 28 L14 20 L22 20 Z' fill='black'/%3E%3C/svg%3E") 2 2, auto;
}
body.acc-bigcursor a, body.acc-bigcursor button{ cursor: inherit; }

/* Focus mode (תוספת הדגשה חזקה) */
body.acc-focus a:focus-visible,
body.acc-focus button:focus-visible,
body.acc-focus input:focus-visible,
body.acc-focus select:focus-visible,
body.acc-focus textarea:focus-visible{
  outline:4px solid #ff0;
  outline-offset:3px;
}

/* Reduce motion */
body.acc-reduce-motion *,
body.acc-reduce-motion *::before,
body.acc-reduce-motion *::after{
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Readable font (מחליף לפונט מערכת קריא) */
body.acc-readable{
  font-family: Arial, Tahoma, sans-serif !important;
}
body.acc-readable *{
  font-family: Arial, Tahoma, sans-serif !important;
}

/* Dyslexia font (OpenDyslexic או Verdana גדול) */
body.acc-dyslexiafont{
  font-family: Verdana, Geneva, sans-serif !important;
  font-size: 1.1em !important;
  letter-spacing: 0.5px !important;
  word-spacing: 3px !important;
}
body.acc-dyslexiafont *{
  font-family: Verdana, Geneva, sans-serif !important;
}

/* Hide images */
body.acc-hideimages img{
  display: none !important;
}
body.acc-hideimages video{
  display: none !important;
}

/*סוף עבור סרגל נגישות*/

/* Toast notification */
.acc-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.acc-toast.show {
    opacity: 1;
}

/* Basic page styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
    padding: 20px;
}

/* Main Content */
#main {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#main h1, #main h2 {
    margin-top: 20px;
    margin-bottom: 10px;
}

#main p {
    margin-bottom: 15px;
}

#main a {
    color: #0078d4;
    margin: 0 10px;
}

/* Overlay */
.acc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
    display: none;
}

.acc-overlay.active {
    display: block;
}

/* Sr-only (כספות נגישות) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* הוסף את זה אחרי .acc-header */

/* Tabs */
.acc-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.acc-tab-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 8px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font: 600 13px/1.2 Arial, sans-serif;
    transition: all 0.2s;
    color: #666;
}

.acc-tab-btn[aria-selected="true"] {
    background: #f7f7f7;
    border-bottom-color: #0078d4;
    color: #0078d4;
}

.acc-tab-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.acc-tab-btn:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
    z-index: 1;
}

/* Tab panels */
.acc-tabpanel {
    animation: fadeIn 0.3s ease-in-out;
}

.acc-tabpanel[hidden] {
    display: none;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(-5px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sepia mode */
body.acc-sepia #pageContent {
  filter: sepia(1);
}

/* Pause animations */
body.acc-pauseanimations *,
body.acc-pauseanimations *::before,
body.acc-pauseanimations *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

/* Keyboard navigation highlight */
body.acc-keyboardnav *:focus {
  outline: 4px solid #ff0 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 10px rgba(255, 255, 0, 0.8) !important;
}

/* Show alt text for images */
body.acc-showalttext img::after {
  content: "תיאור: " attr(alt);
  display: block;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px;
  font-size: 13px;
  margin-top: 5px;
  border-radius: 4px;
  max-width: 100%;
  word-wrap: break-word;
}

/* Show link titles */
body.acc-showlinktitles a[title]::after {
  content: " [" attr(title) "]";
  color: #666;
  font-size: 0.9em;
  font-style: italic;
}

/* kbd styling */
kbd {
  background: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 1px 4px;
  font-family: monospace;
  font-size: 0.9em;
}