/* Skip link */
.skip-link {
  position: absolute;
  right: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 12px 20px;
  z-index: 10000;
  border-radius: 0 0 0 8px;
  font-weight: 700;
}

.skip-link:focus {
  right: 0;
}

/* Visible focus ring everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Floating accessibility button */
.a11y-toggle {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1f2a5c;
  color: #fff;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.a11y-toggle:hover { background: #0f6f39; }

.a11y-panel {
  position: fixed;
  bottom: 84px;
  inset-inline-start: 20px;
  width: 300px;
  max-width: calc(100vw - 40px);
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  z-index: 9999;
  padding: 16px;
  font-family: "Assistant", "Segoe UI", Arial, sans-serif;
  direction: rtl;
}

.a11y-panel[hidden] { display: none; }

.a11y-panel h2 {
  font-size: 1rem;
  margin: 0 0 12px;
  color: #1f2a5c;
}

.a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 6px;
  border: 1px solid #e2e6e3;
  border-radius: 8px;
  background: #f2f6f3;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1a1a1a;
}

.a11y-option[aria-pressed="true"] {
  background: #0f6f39;
  color: #fff;
  border-color: #0f6f39;
}

.a11y-reset {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: #b3261e;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.a11y-statement-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #1f2a5c;
}

/* ===== Applied accessibility states (on <html>) ===== */

html.a11y-contrast-dark body {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-contrast-dark a { color: #ffd54a !important; }
html.a11y-contrast-dark .site-header,
html.a11y-contrast-dark .site-footer,
html.a11y-contrast-dark .card,
html.a11y-contrast-dark .instructor-card,
html.a11y-contrast-dark .contact-form { background: #000 !important; border-color: #fff !important; }

html.a11y-contrast-light body { background: #fff !important; color: #000 !important; }
html.a11y-contrast-light a { color: #00408a !important; }

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

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

html.a11y-readable-font body,
html.a11y-readable-font input,
html.a11y-readable-font textarea,
html.a11y-readable-font button {
  font-family: Arial, "Segoe UI", sans-serif !important;
  letter-spacing: 0.02em !important;
  line-height: 1.9 !important;
}

html.a11y-stop-animations *,
html.a11y-stop-animations *::before,
html.a11y-stop-animations *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

html.a11y-big-cursor,
html.a11y-big-cursor * { cursor: pointer !important; }

html[data-a11y-font-size="1"] body { font-size: 112.5%; }
html[data-a11y-font-size="2"] body { font-size: 125%; }
html[data-a11y-font-size="3"] body { font-size: 137.5%; }

.a11y-reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  height: 32px;
  background: rgba(255, 235, 59, 0.35);
  border-top: 2px solid #f9a825;
  border-bottom: 2px solid #f9a825;
  pointer-events: none;
  z-index: 9997;
  display: none;
}

html.a11y-reading-guide-on .a11y-reading-guide { display: block; }
