/* ============================================================
   Mindset AI - שכבת נגישות משותפת (תקן ישראלי 5568 / WCAG 2.1 AA)
   ============================================================
   נטען בכל עמודי האתר, אחרי גיליונות הסגנון של העמוד.
   משתמש אך ורק בצבעי המותג הקיימים:
   ‎#4A3B7A · #896EC0 · #202239 · #25232B · #343043 · #B4A8E4 · #FFFFFF
   ============================================================ */

/* ----- קישור דילוג לתוכן הראשי (2.4.1) ----- */
.skip-link {
  position: fixed;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 10000;
  padding: 12px 22px;
  background: #4A3B7A;            /* אינדיגו עמוק - יחס ניגודיות 9.56 מול לבן */
  color: #FFFFFF;
  border: 2px solid #B4A8E4;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-200%);
  opacity: 0;
  pointer-events: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  outline: 3px solid #B4A8E4;
  outline-offset: 2px;
  color: #FFFFFF;
}

/* ----- סימון מיקוד מקלדת גלוי (2.4.7) -----
   ‎!important נדרש כדי לגבור על כללי outline:none נקודתיים בעמודים.
   לבנדר בהיר על הרקעים הכהים של האתר: יחס 5.9-8.1 (דרישת non-text: 3.0) */
:where(a, button, input, select, textarea, summary, iframe, [tabindex], [role="button"]):focus-visible {
  outline: 3px solid #B4A8E4 !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}
/* בתוך משטחים לבנים (נייר חתימה) - אינדיגו במקום לבנדר, יחס 9.56 */
.sig-paper :where(button, input, [tabindex]):focus-visible,
.mybox:focus-visible {
  outline-color: #4A3B7A !important;
}
/* יעד קישור הדילוג עצמו - בלי מסגרת כשמקבל מיקוד תוכניתי */
#main-content:focus,
#main-content:focus-visible {
  outline: none !important;
}

/* ----- הסתרה חזותית שנשארת זמינה לקורא מסך ----- */
.visually-hidden {
  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;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ----- כותרות פוטר: h2 סמנטי בעיצוב h4 המקורי (היררכיה בלי דילוג רמות) ----- */
.footer-section .footer-heading {
  color: var(--color-gold, #896EC0);
  font-size: var(--text-sm, 14px);
  font-weight: var(--weight-bold, 700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.33em 0 var(--space-3, 12px);
}

/* ----- קישורים בתוך גוף טקסט: קו תחתי (זיהוי שאינו תלוי-צבע, 1.4.1) ----- */
main p a:not(.btn):not(.skip-link),
main li a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ----- סימון שדה חובה ----- */
.req-mark {
  color: #B4A8E4;
  font-weight: 700;
  margin-inline-start: 2px;
}
.form-required-note {
  color: #B4A8E4;
  font-size: 14px;
  margin: 0 0 8px;
}

/* ----- זרימה מחדש במסכים צרים (1.4.10) -----
   הכותרת המשותפת דרשה 751 פיקסלים ויצרה גלילה אופקית בכל העמודים במובייל.
   שבירת שורות מתירה לתוכן להתאים לרוחב 320-768 בלי גלילה אופקית. */
@media (max-width: 800px) {
  .site-header .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 8px;
  }
  .site-header .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .site-header .header-inner > div:last-child {
    flex-wrap: wrap;
    justify-content: center;
  }
  /* טבלאות רחבות נגללות בתוך מיכל, לא שוברות את העמוד */
  .tier-table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}

/* כתובות דואר ארוכות נשברות לשורה במקום לגלוש מחוץ למסך */
a[href^="mailto:"] {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ----- התאמה למשתמשים הרגישים לתנועה (2.3.3) ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----- מצב ניגודיות גבוהה של מערכת ההפעלה (forced-colors) -----
   גבולות שקופים כדי שרכיבים שנשענים על צבע רקע בלבד יקבלו מתאר במצב זה */
@media (forced-colors: active) {
  .btn, .btn-primary, .btn-secondary, .btn-ghost,
  .badge, .language-switcher button, .tab, .nav-tab,
  .status-dot, .card, .post-card, .skip-link {
    border: 1px solid transparent;
  }
  .status-dot, .big-dot {
    forced-color-adjust: none;
  }
}
