/* ====== Widget UI ====== */
#a11y-widget {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147483647;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
#a11y-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #2563eb;
  background: rgba(37, 99, 235, 0.15);
  pointer-events: none;
  z-index: 2147483646;
  transform: translate(-50%, -50%);
  display: none;
}

html.a11y-lowvision #a11y-cursor {
  display: block;
}

#a11y-toggle {
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font-size:26px;
  line-height:37px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  background: #111;
  color: #fff;
}
#a11y-panel {
  margin-top: 10px;
  width: 300px;
  border-radius: 14px;
  background: #fff;
  color: #111;
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
  overflow: hidden;
  display: none;
}
#a11y-panel[aria-hidden="false"] { display: block; }
#a11y-panel header {
  padding: 12px 14px;
  background: #f3f4f6;
  font-weight: 700;
}
#a11y-panel .content {
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
}
#a11y-panel button, #a11y-panel select {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
#a11y-panel button:focus, #a11y-panel select:focus {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
#a11y-panel .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#a11y-panel .small { font-size: 12px; opacity: .75; }

/* ====== Skip link (Keyboard navigation) ====== */
#a11y-skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 2147483647;
  padding: 10px 12px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform .15s ease;
}
#a11y-skip:focus { transform: translateY(0); outline: 3px solid #f97316; }

/* ====== A11y variables ====== */
html {
  --a11y-font-scale: 1;
  --a11y-line-height: 1.5;
  --a11y-letter-spacing: 0;
  --a11y-target-min: 0px;
  --a11y-cursor-size: 0px;
}

/* Base typography controls (used by multiple modes) */
body {
  font-size: calc(1rem * var(--a11y-font-scale));
  line-height: var(--a11y-line-height);
  letter-spacing: var(--a11y-letter-spacing);
}

/* Larger click targets (motor assistance) */
html.a11y-motor a,
html.a11y-motor button,
html.a11y-motor input,
html.a11y-motor select,
html.a11y-motor textarea {
  min-height: 44px;
}

/* Cursor bigger (desktop only practical) */
html.a11y-motor body {
  cursor: default;
}
html.a11y-motor a,
html.a11y-motor button {
  cursor: pointer;
}

/* Strong focus ring */
html.a11y-keyboard :focus,
html.a11y-focus :focus {
  outline: 3px solid #f97316 !important;
  outline-offset: 3px !important;
}

/* Link highlighting (low vision + cognitive) */
html.a11y-links a:not(a.ibrany-logo,a.theme-btn,a.szechenyieulogo) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  background: rgba(255, 235, 59, .35);
  padding: 0 2px;
  border-radius: 4px;
}
html.a11y-links a.theme-btn{
  color:white!important;
  font-size:20px;
  padding:16.5px 38px!important;
}

html.a11y-links a.theme-btn:before{
  background:#373737!important;
}
html.a11y-links a.theme-btn:after{
  background:#373737!important;
}

html.a11y-links i.far.fa-home{
  color:black!important;
}
html.a11y-links i.far.fa-search{
  color:black!important;
}

html.a11y-links a.share-btn{
  color:black!important;
  font-weight:600;
}
html.a11y-links a.share-btn i{
display:none;
}
html.a11y-links .news-block-two .inner-box .content-box .text h3:before{
background:white!important;
}
html.a11y-links section.schedules-style-two a.theme-btn{
  font-weight:600;
  
  color:#137E96!important;
}
html.a11y-links section.schedules-style-two a.theme-btn:hover{
  color:white!important;
}
html.a11y-links section.schedules-style-two a.theme-btn:before{
    background:#137E96!important;
}
html.a11y-links section.schedules-style-two a.theme-btn:after{
  background:#137E96!important;
}
html.a11y-links nav.main-menu .navigation > li.dropdown > a:before{
  content:none!important;
}

html.a11y-links section.banner-section a{
 color:white!important;
 font-weight:600; 
}

html.a11y-links .blog-sidebar .category-widget .category-list li a{
  color:#252638!important;
}

html.a11y-links .news-block-one .inner-box .lower-content .post-info li a{
  color:#252638!important;
}
html.a11y-links .pagination li a:hover, .pagination li a.current{
  color:#252638!important;
}



html.a11y-links section.banner-section a.theme-btn{
  background:#137E96!important;
}
html.a11y-links section.banner-section a.theme-btn:before{
  background:#373737!important;
}
html.a11y-links section.banner-section a.theme-btn:after{
  background:#373737!important;
}

html.a11y-links .schedules-style-two .bx-controls-direction .bx-prev, .schedules-style-two .bx-controls-direction .bx-next{
  color:white!important;
  background:#137E96!important;
}
html.a11y-links .bx-wrapper .bx-pager.bx-default-pager a:hover, .bx-wrapper .bx-pager.bx-default-pager a.active, .bx-wrapper .bx-pager.bx-default-pager a:focus{
  background:white!important;
}

html.a11y-links button.theme-btn{
  font-size:20px;
}
html.a11y-links .sec-title.centred div.visual-heading span{
  font-size:18px;
}
html.a11y-links .portfolio-block-one .inner-box .content-box .text h4 a:hover{
  color:white!important;
}
html.a11y-links .facebook-share a{
  font-size:20px;
}
html.a11y-links .search-popup .recent-searches li a{
  font-size:22px;
}
html.a11y-links .schedule-block-three .inner-box .text .category{
      position: relative;
    display: inline-block;
    color: #ffffff;
    border-radius: 5px;
    text-align: center;
    padding: 1.5px 10px;
    font-weight: 300;
    font-size:20px;
}
html.a11y-links .schedule-block-three .inner-box:hover .schedule-block-three .inner-box a,.schedule-block-three .inner-box p{
color:white!important;
}
html.a11y-links .footer-bottom.alternat-2 a{
color:#252638!important;
}



/* High contrast */
html.a11y-contrast body {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-contrast a { color: #00e5ff !important; }
html.a11y-contrast * { border-color: #666 !important; }

/* Reduce motion / epilepsy safe */
html.a11y-epilepsy *,
html.a11y-epilepsy *::before,
html.a11y-epilepsy *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Reduce distractions */
html.a11y-distractions * {
  text-shadow: none !important;
  box-shadow: none !important;
}
html.a11y-distractions body {
  background-image: none !important;
}
html.a11y-distractions video,
html.a11y-distractions .carousel,
html.a11y-distractions [data-animated="true"] {
  animation: none !important;
  transition: none !important;
}

/* Dyslexia-friendly font (provide @font-face separately if self-hosted) */
html.a11y-dyslexia body,
html.a11y-dyslexia button,
html.a11y-dyslexia input,
html.a11y-dyslexia select,
html.a11y-dyslexia textarea {
  font-family: "OpenDyslexic", "Atkinson Hyperlegible", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}

/* Low vision preset (applies typographic boosts) */
html.a11y-lowvision {
  --a11y-font-scale: 1.25;
  --a11y-line-height: 1.85;
  --a11y-letter-spacing: 0.03em;
}
/* ===== Low vision font stack ===== */
html.a11y-lowvision body,
html.a11y-lowvision button,
html.a11y-lowvision input,
html.a11y-lowvision select,
html.a11y-lowvision textarea {
  font-family:
    "Atkinson Hyperlegible",
    "Arial",
    "Verdana",
    "Tahoma",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif !important;
  font-weight: 600;
}


/* Dyslexia preset (more spacing, but not too much) */
html.a11y-dyslexia {
  --a11y-line-height: 1.8;
  --a11y-letter-spacing: 0.015em;
}

/* Cognitive learning preset */
html.a11y-cognitive {
  --a11y-line-height: 1.85;
  --a11y-letter-spacing: 0.01em;
}

/* ===== Reading mask overlay ===== */
#a11y-reading-mask {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  display: none;
}
html.a11y-mask #a11y-reading-mask { display: block; }
#a11y-reading-mask .shade-top,
#a11y-reading-mask .shade-bottom {
  position: absolute;
  left: 0; right: 0;
  background: rgba(0,0,0,.55);
}
#a11y-reading-mask .window {
  position: absolute;
  left: 0; right: 0;
  border-top: 2px solid rgba(255,255,255,.35);
  border-bottom: 2px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.02);
}

/* ===== Color blindness filters via SVG =====
   We apply this to the whole page (except images can be re-filtered if needed). */
html.a11y-cb-protanopia #a11y-page { filter: url(#a11y-protanopia); }
html.a11y-cb-deuteranopia #a11y-page { filter: url(#a11y-deuteranopia); }
html.a11y-cb-tritanopia #a11y-page { filter: url(#a11y-tritanopia); }
html.a11y-cb-grayscale #a11y-page { filter: grayscale(1); }

/* Active state for toggle buttons */
#a11y-panel button.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
  font-weight: 700;
}

#a11y-panel button.is-active::after {
  content: " ✓";
  font-weight: 800;
}