/* ===========================================================
   🧭 GRUNDKOMPONENTEN: BUTTONS & MOBILE-VARIANTEN
   =========================================================== */

/* === Zugänglichkeits-Button === */
.accessibility-btn {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  padding: 5px;
  box-shadow: rgba(0, 0, 0, 0.06) 0px 1px 4px;
  z-index: 10000;
  transition: transform 0.3s ease;
  border: 0 !important;
}
.accessibility-btn i {
  margin-right: -1px;
  margin-top: -1px;
  font-size: 34px;
}
.accessibility-btn:hover {
  background-color: #00BDE0;
  transition: ease-in 0.2s;
}
.accessibility-btn:hover img[src$=".svg"] {
  filter: brightness(0) invert(1) grayscale(100%) !important;
  transition: ease-in 0.1s;
}

/* === Mobile Buttons === */
@media (min-width: 992px) {
  .accessibilityMobile-btn {
    display: none;
  }
}
@media (max-width: 991px) {
  .accessibilityMobile-btn {
    background: none!important;
    border: none!important;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
  }
  .accessibilityMobile-btn i {
    color: #fff;
    font-size: 28px;
  }
}

.a11y-option__dropdown {
  display: block;          /* WICHTIG: nicht verstecken über display */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  width: 100%;
}

.a11y-option__dropdown.show {
  max-height: 500px;
  opacity: 1;
}

/* ===========================================================
   🧱 SIDEBAR (Container, Layout, Responsive)
   =========================================================== */

/* === Overlay bei geöffneter Sidebar === */
.accessibility-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.6); /* halbtransparentes Schwarz */
  z-index: 99998; /* direkt unter der Sidebar (die hat 99999) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Aktiv bei geöffneter Sidebar */
.accessibility-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* === Sidebar-Grundlayout === */
.accessibility-sidebar {
  position: fixed;
  top: 0;
  right: -470px;
  width: 450px;
  height: 100vh;
  background: #f3f3f3;
  box-shadow: -4px 0 16px rgba(0,0,0,0.1);
  padding: 0;
  transition: right 0.4s ease;
  font-family: system-ui, Arial, sans-serif;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* horizontaler Scrollbalken aus */
}
.accessibility-sidebar.open { right: 0; }

/* === Sidebar Responsive === */
@media (max-width: 480px) {
  .accessibility-sidebar {
    right: -360px;
    width: 340px!important;
  }
}
@media (max-width: 340px) {
  .accessibility-sidebar {
    right: -310px;
    width: 290px!important;
  }
}

/* === Responsive Anpassungen === */
@media (max-width: 768px) {
  .accessibility-sidebar.open { right: 0; }
  .accessibility-btn {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }
}

html.sidebar-open,
body.sidebar-open {
  overflow: hidden !important;
  height: 100%;
}

/* ===========================================================
   🧩 SIDEBAR-INHALT (Header, Grid, Footer)
   =========================================================== */

/* === Header-Struktur === */
.a11y-header {
  background: #18345d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 60px;
  min-height: 60px!important;
  font-family: Arial, sans-serif;
  padding: 0 20px;
  position: absolute;
  top: 0;
  z-index: 10;
  background: #f3f3f3!important;
}

/* --- Header-Titel --- */
.a11y-header-title {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  user-select: none;
  text-align: center;
  flex: 1;
}
@media (max-width: 578px) {
  .a11y-header-title {
    font-size: 20px;
  }
}
@media (max-width: 350px) {
  .a11y-header-title {
    font-size: 18px;
  }
}

/* --- Header-Buttons --- */
.a11y-reset,
.a11y-close {
  background: none;
  border: none;
  color: #fff!important;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

/* === Hauptinhalt === */
.a11y-content {
  overflow-y: hidden;
  margin-bottom: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  padding: 1rem 0.5rem 1rem 1rem; /* oder so, falls du alle Seiten definierst */
}

.a11y-content:hover {
  overflow-y: auto;
}

/* === Gridbereich (Kacheln) === */
.a11y-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  border-top: 1px solid #bbc4ce;
  margin-top: 15px;
  padding-top: 20px;
}

/* === Scrollbar-Styling === */
.a11y-grid::-webkit-scrollbar {
  width: 6px;
}
.a11y-grid::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 3px;
}
.a11y-grid::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* === Footer === */
.a11y-footer {
  background: #18345d;
  width: 100%;
  position: absolute; 
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center; 
  font-size: 14px;
  z-index: 10;
  padding: 15px 30px;
}
.a11y-footer a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.3s ease;
}
.a11y-footer a:hover {
  color: #005fa3;
  text-decoration: underline;
}
@media (max-width: 578px) {
  .a11y-footer {
    padding: 15px 20px!important;
  }
  .a11y-footer a {
    padding-left: 0px!important;
  }
}

/* 🧩 FIX: Apple Mobile Sidebar (volle Höhe + kein Transparenzfehler)
   =========================================================== */

html, body {
  overflow-x: hidden !important;
}
/* Safari/iOS-sichere volle Höhe */
.accessibility-sidebar {
  position: fixed;
  top: 0;
  right: -470px;
  width: 450px;
  /* Verwende dynamische Viewport-Einheiten */
  height: 100dvh; /* statt 100vh */
  background: #f3f3f3; /* feste Hintergrundfarbe */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: -4px 0 16px rgba(0,0,0,0.15);
  overflow-y: auto;
  overflow-x: hidden;
  transition: right 0.4s ease;
  z-index: 99999;
}

/* === Header fixieren (nicht transparent auf Apple) === */
.a11y-header {
  position: sticky;
  top: 0;
  background: #18345d !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 50;
}

/* === Footer fixieren === */
.a11y-footer {
  position: sticky;
  bottom: 0;
  background: #18345d !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #fff;
  z-index: 50;
}

/* === Safari-spezifischer Farbanpassungsfix === */
@supports (-webkit-touch-callout: none) {
  .accessibility-sidebar {
    background-color: #f3f3f3 !important;
    height: 100dvh !important;
  }
  .a11y-header,
  .a11y-footer {
    background-color: #18345d !important;
  }
}


/* ===========================================================
   ⚙️ OPTIONEN, DROPDOWNS & PROFILE
   =========================================================== */

/* === Dropdown === */
.a11y-option__drop-btn {
  background: #f3f3f3!important;
  color: #657383;
  width: 100%;
  display: flex;
  justify-content: start;
  border: none;
  font-weight: 600;
}
.a11y-option__dropdown {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  width: 100%;
}
.a11y-option__dropdown.show {
  max-height: 500px;
  opacity: 1;
  width: 100%;
}

/* === Profile === */
.a11y-profiles__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;      
  list-style: none;
  margin: 15px 0 0;
  padding: 5px;
}
.a11y-profiles__item {
  flex: 1 1 calc(50% - 8px);
  box-sizing: border-box;
}
.a11y-profiles__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  border: 2px solid #fff;
  border-radius: 12px;
  background-color: #fff;
   box-shadow: rgba(0,0,0,0.14) 0px 1px 4px;  color: #748598;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  transition: all 0.2s;
}
.a11y-profiles__btn img {
  width: 28px;
  height: auto;
  margin-right: 8px;
}
.a11y-profiles__btn:hover {
  background-color: #f3f3f3;
  color: #000;
}
.a11y-profiles__btn__ico {
  font-size: 18px;
  flex-shrink: 0;
}
.profile-reset-icon {
  display: none;
  background: #fff;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  color: red;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.14) 0px 1px 4px;
}

.a11y-profiles__btn.active .profile-reset-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 25px;
  width: 25px;
  top: -12px;
  right: -10px;
}


/* ===========================================================
   🔲 KACHELN & UNIVERSAL ELEMENTE
   =========================================================== */

/* === Kachel-Layout === */
.a11y-tile {
  display: flex;
  justify-content: center;
  align-items: stretch;
}
.a11y-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  border: 2px solid #fff;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: rgba(0,0,0,0.14) 0px 1px 4px;
  color: #748598;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem;
  transition: all 0.15s ease;
  text-align: center;
  hyphens: auto;
  overflow-wrap: break-word;
}
.a11y-btn img {
  width: 36px;
  height: auto;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}
@media (max-width: 578px) {
  .a11y-btn img {
    width: 30px;
    margin-bottom: 6px;
  }
   .a11y-btn {
    font-size: 0.8rem;
    line-height: 1.3;
    font-weight: 400;
  }
}
@media (min-width: 430px) {
  .a11y-btn {
    aspect-ratio: 1 / 1;
  }
}
@media (max-width: 375px) {
  .a11y-btn img {
    width: 26px;
    margin-bottom: 4px;
  }
   .a11y-btn {
    font-size: 0.7rem;
  }
}
.a11y-btn.active {
  border: 2px solid #748598;
  color: #748598 !important;
}

.a11y-btn:hover {
  background-color: #f2f3f5;
}

/* === Universelle Step-Anzeige === */
.a11y-step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.a11y-step-indicator span {
  width: 12px;
  height: 6px;
  background-color: #ccc;
  transition: background-color 0.3s ease;
}
.a11y-step-indicator span.active {
  background-color: #748598;
}
@media (max-width: 578px) {
  .a11y-step-indicator {
    gap: 0.2rem;
  }
 .a11y-step-indicator span {
    width: 10px;
    height: 4px;
  }
}

/* ===========================================================
   🎨 VISUELLE MODI (Kontrast, Farben, Bewegung, Dyslexie)
   =========================================================== */

body.scaled {
  transform-box: border-box;
  transform-origin: top left;
  overflow-x: hidden;
}

/* === Hoher Kontrast === */
body.high-contrast {
  background: #000 !important;
}
body.high-contrast .bg-light,
body.high-contrast .content-bx,
body.high-contrast .site-footer,
body.high-contrast .bg-primary,
body.high-contrast .swiper,
body.high-contrast .dz-bnr-inr.dz-banner-dark,
body.high-contrast .dz-vacancy.style-1 .dz-content,
body.high-contrast .info-widget.style-10,
body.high-contrast .content-wrapper.style-5 .content-media .item1,
body.high-contrast .consent.modal-content .consentWrapper,
body.high-contrast .overlay-secondary-middle:before {
  color: #0ff !important;
  background-color: #292929 !important;
}
body.high-contrast,
body.high-contrast .header-nav.w3menu .nav > li .sub-menu,
body.high-contrast .vacancyWrapper,
body.high-contrast .info-widget.style-4 .widget-media,
body.high-contrast .info-widget.style-4 .widget-content,
body.high-contrast .offcanvas,
body.high-contrast .icon-bx-wraper.style-3:after,
body.high-contrast .overlay-secondary-dark:before,
body.high-contrast .overlay-primary-dark:before {
  background-color: #000 !important;
  color: #0ff !important;
}
body.high-contrast .dz-accordion.style-1 .accordion-item .accordion-body,
body.high-contrast .form-control,
body.high-contrast #submitButton,
body.high-contrast .list-group-item {
  background-color: #000 !important;
  border-color: #292929 !important;
  color: #0ff !important;
}
body.high-contrast .consent.modal-content,
body.high-contrast .noteCard {
  background-color: #000 !important;
  border-color: #292929 !important;
  color: #0ff !important;
}
body.high-contrast .outline-modal-content,
body.high-contrast .mo-left.show, 
body.high-contrast.mo-right.show    {
  color: #0ff !important;
  background-color: #292929 !important;
  border: 1px solid #000;
  box-shadow: rgba(255, 255, 255, 0.2) 0px 2px 34px;
}
body.high-contrast .outline-modal-content li:hover {
  color: #0ff !important;
  background-color: #000 !important;
}
body.high-contrast .info-widget.style-4 .widget-media::before,
body.high-contrast .info-widget.style-4 .widget-media::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0V50H50C22.3858 50 0 27.6142 0 0Z' fill='black'/%3E%3C/svg%3E");
}
body.high-contrast .btn-close {
    --bs-btn-close-color: #ffffff;
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e");
}

body.high-contrast p:not(#accessibilitySidebar *),
body.high-contrast span:not(#accessibilitySidebar *),
body.high-contrast li:not(#accessibilitySidebar *),
body.high-contrast h1:not(#accessibilitySidebar *),
body.high-contrast h2:not(#accessibilitySidebar *),
body.high-contrast h3:not(#accessibilitySidebar *),
body.high-contrast h4:not(#accessibilitySidebar *),
body.high-contrast h5:not(#accessibilitySidebar *),
body.high-contrast h6:not(#accessibilitySidebar *),
body.high-contrast div:not(#accessibilitySidebar *),
body.high-contrast strong:not(#accessibilitySidebar *),
body.high-contrast em:not(#accessibilitySidebar *) {
  color: #0ff !important;
}
body.high-contrast a:not(#accessibilitySidebar *) {
  color: rgb(13, 215, 215) !important;
}
body.high-contrast a:hover:not(#accessibilitySidebar *),
body.high-contrast a:focus:not(#accessibilitySidebar *) {
  color: #0ff !important;
  text-decoration: none !important;
}
body.high-contrast .dz-accordion.style-1 .accordion-item .accordion-button:not(#accessibilitySidebar *),
body.high-contrast .dz-team.style-1 .dz-content,
body.high-contrast .dz-team.style-1 .dz-media  {
  color: #0ff !important;
  background: #292929 !important;
}
body.high-contrast .icon-bx-footer i,
body.high-contrast .section-head i,
body.high-contrast .site-header .extra-nav .extra-cell ul li button,
body.high-contrast .site-header .extra-nav .extra-cell ul li a:hover:not(#accessibilitySidebar *),
body.high-contrast .site-header .extra-nav .extra-cell ul li a:not(#accessibilitySidebar *) {
  color: #000 !important;
  transition: none!important;
}

body.high-contrast span:not(#accessibilitySidebar *) {
    color: #fff !important;
}

body.high-contrast .active  span:not(#accessibilitySidebar *)  {
    color: #0ff !important;
}

/* === Dyslexia Schriftart === */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/OpenDyslexic-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}
body.dyslexia-font .contentWrapper:not(#accessibilitySidebar),
body.dyslexia-font .header-info:not(#accessibilitySidebar),
body.dyslexia-font .main-bar:not(#accessibilitySidebar),
body.dyslexia-font .site-footer:not(#accessibilitySidebar),
body.dyslexia-font .modal-content:not(#accessibilitySidebar),
body.dyslexia-font label:not(#accessibilitySidebar *),
body.dyslexia-font span:not(#accessibilitySidebar *),
body.dyslexia-font ul:not(#accessibilitySidebar *),
body.dyslexia-font li:not(#accessibilitySidebar *),
body.dyslexia-font a:not(#accessibilitySidebar *),
body.dyslexia-font span:not(#accessibilitySidebar *),
body.dyslexia-font h1:not(#accessibilitySidebar *),
body.dyslexia-font h2:not(#accessibilitySidebar *),
body.dyslexia-font h3:not(#accessibilitySidebar *),
body.dyslexia-font h4:not(#accessibilitySidebar *),
body.dyslexia-font h5:not(#accessibilitySidebar *),
body.dyslexia-font h6:not(#accessibilitySidebar *),
body.dyslexia-font p:not(#accessibilitySidebar *) { 
  font-family: 'OpenDyslexic', Arial, sans-serif !important;
}

/* === Bewegung reduzieren === */
body.reduce-motion *:not(#accessibilitySidebar *),
body.reduce-motion *::before:not(#accessibilitySidebar *),
body.reduce-motion *::after:not(#accessibilitySidebar *) {
  transition: none !important;
  animation: none !important;
}
body.reduce-motion [class*="fadeIn"]:not(#accessibilitySidebar *),
body.reduce-motion [class*="zoomIn"]:not(#accessibilitySidebar *),
body.reduce-motion [class*="slideIn"]:not(#accessibilitySidebar *) {
  opacity: 1 !important;
  transition: none !important;
  visibility: visible !important;
}
body.reduce-motion * {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
  animation-iteration-count: 1 !important;
  animation-play-state: paused !important;
}


/* ===========================================================
   🗣️ VORLESE & AUSWAHL
   =========================================================== */

.reading-highlight {
  outline: 3px solid #007bff;
  background-color: rgba(0, 123, 255, 0.1);
  transition: background-color 0.3s ease;
}
::selection {
  background-color: yellow!important;
  color: #000!important;
  transition: background-color 0.15s ease!important;
}


 /* ========================================================
   📑 SEITENSTRUKTUR (Outline / Gliederung)
   ======================================================== */
/* Modal */
.outline-modal {
  position:fixed; inset:0;
  background:rgba(0,0,0,.3);
  opacity:0;
  visibility:hidden;
  transition:opacity .35s ease, visibility .35s ease;
  z-index:999999;
  display:flex;
  justify-content:center;
  align-items:center;
}

/* Einblenden */
.outline-modal.active {
  visibility:visible;
  opacity:1;
}

/* Modal-Content kann optional auch weich „reinzoomen“ */
.outline-modal-content {
  position:relative;
  background:#fff;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 14px 44px;
  max-height:80vh;
  width:90%;
  max-width: 800px;
  border-radius:10px;
  padding: 40px 30px 30px 30px;
overflow: hidden;
  /* Effekt */
  transform:translateY(-20px);
  transition:transform .35s ease;
}
.outline-modal.active .outline-modal-content {
  transform:translateY(0);
}

/* Close Button */
.outline-close{
  position:absolute; top:12px; right:12px;
  border:none; background:none; cursor:pointer;
  font-size:22px; line-height:1;
}

.outline-tabs {
  display:flex;
  border-bottom:1px solid #d3d3d3;
  margin-bottom:10px;
}

.outline-tab {
  flex:1;
  padding:10px;
  text-align:center;
  cursor:pointer;
  background:none;
  border:none;
  font-weight:600;
  color:#748598!important;
  border:1px solid transparent;
  border-bottom:none!important;
  border-top-left-radius:8px;
  border-top-right-radius:8px;
  margin:0 20px;
  overflow: hidden;
  /* Nur diese Übergänge → bottom border bleibt instant */
  transition: color .25s ease, border-color .25s ease, margin-bottom 0;
}

/* Hover optional */
.outline-tab:hover {
  color:#47525c!important;
  border-color:#eee;
}

/* Aktiv: border-bottom sofort ohne Animation */
.outline-tab.active {
  color:#293039!important;
  border-color:#d3d3d3!important;
  border-bottom:1px solid #fff!important; /* erscheint sofort */
  margin-bottom:-1px;
}

.outline-tab-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:opacity .25s ease;
  scrollbar-gutter: stable;
}

/* Aktiver Tab */
.outline-tab-content.active {
  opacity: 1;
  max-height: 60vh; /* REALE Obergrenze, passt in dein Modal */
  overflow-y: auto;
  pointer-events: auto;
}

/* Listen */
#outlineListHeadings li,
#outlineListLinks li{
  list-style:none;
  padding:6px 0;
  cursor:pointer;
  display:flex;
  align-items:center;
  border-bottom:1px solid #eee;
  font-size:15px;
}
#outlineListHeadings li:hover,
#outlineListLinks li:hover{
  background:#f7f7f7;
}

/* Badge für H1–H6 */
.outline-badge{
  display:inline-block;
  font-size:11px;
  padding:3px 6px;
  border-radius:5px;
  margin-right:8px;
  font-weight:600;
  color:#fff;
  min-width:38px;
  text-align:center;
}
.outline-h1{ background:#005bbb; }
.outline-h2{ background:#007bff; }
.outline-h3{ background:#28a745; }
.outline-h4{ background:#17a2b8; }
.outline-h5{ background:#ffc107; color:#222; }
.outline-h6{ background:#6c757d; }


/* ===========================================================
   🌈 FARB- UND BILDMODI
   =========================================================== */

/* === Farbsättigung === */
body.low-saturation .contentWrapper:not(#accessibilitySidebar),
body.low-saturation .main-bar:not(#accessibilitySidebar),
body.low-saturation .site-footer:not(#accessibilitySidebar) {
  filter: saturate(50%) !important;
}
body.high-saturation .contentWrapper:not(#accessibilitySidebar),
body.high-saturation .main-bar:not(#accessibilitySidebar),
body.high-saturation .site-footer:not(#accessibilitySidebar) {
  filter: saturate(150%) !important;
}

/* === Mehrstufige Sättigung === */
body.low-saturation-1 .contentWrapper:not(#accessibilitySidebar),
body.low-saturation-1 .modal-content:not(#accessibilitySidebar),
body.low-saturation-1 .main-bar:not(#accessibilitySidebar),
body.low-saturation-1 .site-footer:not(#accessibilitySidebar) { filter: saturate(75%) !important; }

body.low-saturation-2 .contentWrapper:not(#accessibilitySidebar),
body.low-saturation-2 .modal-content:not(#accessibilitySidebar),
body.low-saturation-2 .main-bar:not(#accessibilitySidebar),
body.low-saturation-2 .site-footer:not(#accessibilitySidebar) { filter: saturate(60%) !important; }

body.low-saturation-3 .contentWrapper:not(#accessibilitySidebar),
body.low-saturation-3 .modal-content:not(#accessibilitySidebar),
body.low-saturation-3 .main-bar:not(#accessibilitySidebar),
body.low-saturation-3 .site-footer:not(#accessibilitySidebar) { filter: saturate(40%) !important; }

body.high-saturation-1 .contentWrapper:not(#accessibilitySidebar),
body.high-saturation-1 .modal-content:not(#accessibilitySidebar),
body.high-saturation-1 .main-bar:not(#accessibilitySidebar),
body.high-saturation-1 .site-footer:not(#accessibilitySidebar) { filter: saturate(125%) !important; }

body.high-saturation-2 .contentWrapper:not(#accessibilitySidebar),
body.high-saturation-2 .modal-content:not(#accessibilitySidebar),
body.high-saturation-2 .main-bar:not(#accessibilitySidebar),
body.high-saturation-2 .site-footer:not(#accessibilitySidebar) { filter: saturate(150%) !important; }

body.high-saturation-3 .contentWrapper:not(#accessibilitySidebar),
body.high-saturation-3 .modal-content:not(#accessibilitySidebar),
body.high-saturation-3 .main-bar:not(#accessibilitySidebar),
body.high-saturation-3 .site-footer:not(#accessibilitySidebar) { filter: saturate(175%) !important; }

body[style*="overflow: hidden"] {
  touch-action: none;
  overscroll-behavior: contain;
}

/* === Schwarz-Weiß === */
body.grayscale .contentWrapper:not(#accessibilitySidebar),
body.grayscale .header-info:not(#accessibilitySidebar),
body.grayscale .main-bar:not(#accessibilitySidebar),
body.grayscale .site-footer:not(#accessibilitySidebar),
body.grayscale .modal-content:not(#accessibilitySidebar) {
  filter: grayscale(100%) !important;
}

/* === Kontrastumkehr === */
body.contrast-invert .contentWrapper:not(#accessibilitySidebar),
body.contrast-invert .modal-content:not(#accessibilitySidebar),
body.contrast-invert .main-bar:not(#accessibilitySidebar),
body.contrast-invert .header-info:not(#accessibilitySidebar),
body.contrast-invert #headerSidebar:not(#accessibilitySidebar),
body.contrast-invert .site-footer:not(#accessibilitySidebar) { 
  filter: invert(100%) !important; 
}


/* ===========================================================
   🔦 FOKUS-LESEN
   =========================================================== */

:root {
  --focus-top: 40vh;
  --focus-height: 120px;
  --focus-bottom: calc(var(--focus-top) + var(--focus-height));
}
body.focus-reading::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.7) 0,
      rgba(0,0,0,0.7) var(--focus-top),
      transparent var(--focus-top),
      transparent var(--focus-bottom),
      rgba(0,0,0,0.7) var(--focus-bottom),
      rgba(0,0,0,0.7) 100%
    );
  transition: background 0.05s linear;
  cursor: context-menu!important;
}


/* ===========================================================
   🔗 LINKS
   =========================================================== */

body.link-highlight a:not(#accessibilitySidebar *),
body.link-highlight [role="link"]:not(#accessibilitySidebar *) {
  outline: 2px dashed #007BFF;
  outline-offset: 0px;
  background: rgba(0, 123, 255, 0.15);
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
body.link-highlight a:hover:not(#accessibilitySidebar *),
body.link-highlight [role="link"]:hover:not(#accessibilitySidebar *) {
  background: rgba(0, 123, 255, 0.25);
  outline-style: solid;
}

/* ===========================================================
   🖼️ BILDER
   =========================================================== */
/* === Bilder komplett ausblenden === */
html.hide-images img:not(#accessibilitySidebar *):not(#consentBadge img):not(#accessibilityBtn img):not(a[href="/"] img):not(.sidebar-header a[href="index.html"] img):not(.companyInfoStyle img):not(.serviceHeader img),
html.hide-images picture,
html.hide-images svg {
  opacity: 0 !important; /* Bild unsichtbar */
  visibility: visible !important; /* trotzdem im Layout */
}
html.hide-images img,
html.hide-images picture {
  object-fit: contain; /* Layout bleibt stabil */
}

/* Hinweis-Overlay */
html.hide-images .a11y-img-wrapper {
  position: relative;
  display: inline-block;
}

html.hide-images .a11y-img-wrapper img {
  opacity: 0 !important;
  visibility: visible !important;
}

html.hide-images .a11y-img-wrapper::after {
  content: "Bild ausgeblendet";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.85);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #555;
  pointer-events: none;
  white-space: nowrap;
}


/* === Hintergrundbilder deaktivieren === */
html.hide-images [style*="background-image"]:not(#accessibilitySidebar *):not(#consentBadge):not(#accessibilityBtn):not(a[href="/"]):not(.sidebar-header a[href="index.html"]):not(.companyInfoStyle):not(.serviceHeader),
html.hide-images [class*="bg-"]:not(#accessibilitySidebar *):not(#consentBadge):not(#accessibilityBtn):not(a[href="/"]):not(.sidebar-header a[href="index.html"]):not(.companyInfoStyle):not(.serviceHeader),
html.hide-images [class*="banner"]:not(#accessibilitySidebar *):not(#consentBadge):not(#accessibilityBtn):not(a[href="/"]):not(.sidebar-header a[href="index.html"]):not(.companyInfoStyle):not(.serviceHeader),
html.hide-images [class*="header"]:not(#accessibilitySidebar *):not(#consentBadge):not(#accessibilityBtn):not(a[href="/"]):not(.sidebar-header a[href="index.html"]):not(.companyInfoStyle):not(.serviceHeader),
html.hide-images [class*="hero"]:not(#accessibilitySidebar *):not(#consentBadge):not(#accessibilityBtn):not(a[href="/"]):not(.sidebar-header a[href="index.html"]):not(.companyInfoStyle):not(.serviceHeader) {
  background-image: none !important;
}

/* Hintergrundbilder unsichtbar */
html.hide-images [style*="background-image"]{
  background-image: none !important;
  position: relative;
}

/* Hinweis anzeigen */
html.hide-images [style*="background-image"]::after{
  content: "Hintergrundbild ausgeblendet";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.85);
  color: #555;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

/* Sicherstellen, dass Container sichtbar bleibt */
html.hide-images [style*="background-image"],
html.hide-images [class*="bg-"],
html.hide-images [class*="hero"],
html.hide-images [class*="banner"] {
  min-height: 40px; /* damit Hinweis sichtbar bleibt, wenn Element ohne eigene Höhe */
}

/* Leaflet Karten ausblenden + Hinweis anzeigen */
html.hide-images .leaflet-container {
  position: relative !important;
  background: #f5f5f5 !important; /* neutrale Fläche */
}

/* Kartenkacheln unsichtbar machen */
html.hide-images .leaflet-container .leaflet-pane,
html.hide-images .leaflet-container .leaflet-tile,
html.hide-images .leaflet-container .leaflet-overlay-pane,
html.hide-images .leaflet-container .leaflet-tile-pane {
  opacity: 0 !important;
  visibility: visible !important;
}
.leaflet-container {
  position: relative;
  z-index: 1;
}
/* Hinweistext über Karte */
html.hide-images .leaflet-container::after {
  content: "Karte ausgeblendet";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.85);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #555;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10000;
}

/* Sicherstellen, dass die Karte nicht komplett verschwindet */
html.hide-images .leaflet-container {
  min-height: 120px; /* je nach Layout anpassbar */
}



/* ===========================================================
   🖼️ INFOTEXTE BEI MOUSEOVER ALS TOOLTIP DIREKT AM CURSOR
   =========================================================== */

body.img-tooltips-enabled #imgTooltip {
  display: block;
}
#imgTooltip {
  position: fixed;
  max-width: 200px;
  overflow-x: hidden;
  padding: 6px 10px;
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 13px;
  border-radius: 5px;
  pointer-events: none;
  white-space: normal;   /* statt nowrap */
  word-wrap: break-word; /* Falls lange Wörter vorhanden */
  z-index: 999999;
  opacity: 0;
  transition: opacity .1s ease;
  hyphens: auto;
}


/* ===========================================================
   🔡 Buchstabenabstand
   =========================================================== */

body.letterspace-1 {
  letter-spacing: 0.5px !important;
}

body.letterspace-2 {
  letter-spacing: 1px !important;
}

body.letterspace-3 {
  letter-spacing: 1.5px !important;
}

/* Headlines etwas weniger aggressiv */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.5px !important;
}