/*
  MEDLEARNING – CSS-NAVIGATION: slider.css

  sl01 – Folienbühne, Bild und Anordnung der CME-Inhalte
  sl02 – Seitliche Navigation mit gleich breiten Bildvorschauen

  Jede Kennung entspricht den Klassennamen ihres Abschnitts.
  Responsive-Regeln stehen unmittelbar bei der zugehörigen Komponente.
*/

/* ============================================================
   sl01 – Folienbühne, Bild und CME-Inhalte
   ============================================================ */

.sl01-slider {
  --sl01-hintergrund: #f5f7fc;
  --sl01-bildanteil: 55%;
  --sl01-vorschaubreite: 48px;
  --sl01-innenabstand: clamp(18px, 2.1vw, 29px);
  --sl01-bildhoehe-mobil: clamp(205px, 51vw, 295px);
  --sl01-uebergangszeit: 1200ms;
  position: relative;
  width: 100%;
  max-width: var(--bs01-sliderbreite);
  margin-inline: auto;
  min-width: 0;
  border: 1px solid #e1e7f0;
  border-radius: 15px;
  background: var(--sl01-hintergrund);
  box-shadow: 0 8px 22px #1b376417;
  overflow: hidden;
  isolation: isolate;
}

.sl01-buehne {
  display: grid;
  min-height: clamp(350px, 30vw, 405px);
}

.sl01-folie {
  position: relative;
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear var(--sl01-uebergangszeit);
}

.sl01-folie.sl01-aktiv {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.sl01-link {
  display: grid;
  grid-template-columns: var(--sl01-bildanteil) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  min-width: 0;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.sl01-link:focus-visible {
  outline: 3px solid #65b1d1;
  outline-offset: -5px;
  border-radius: 12px;
}

.sl01-bildrahmen {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: var(--sl01-hintergrund);
  opacity: 0;
  transition: opacity var(--sl01-uebergangszeit) ease;
}

.sl01-aktiv .sl01-bildrahmen {
  opacity: 1;
}

.sl01-bild {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  visibility: hidden;
}

.sl01-bild.ist-geladen {
  visibility: inherit;
}

.sl01-bildplatzhalter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  background: #dce8f3;
  color: #536d96;
  font-size: 14px;
  font-weight: 570;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.sl01-bildplatzhalter[hidden] {
  display: none;
}

.sl01-bildplatzhalter svg {
  width: 42px;
  height: 42px;
  flex: none;
  fill: none;
  stroke: #7f93b1;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sl01-inhalt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--sl01-innenabstand);
  padding-right: calc(var(--sl01-innenabstand) + var(--sl01-vorschaubreite));
  opacity: 0;
}

/* Der Text wechselt sofort mit der aktiven Folie. */
.sl01-aktiv .sl01-inhalt {
  opacity: 1;
}

.sl01-fachbereiche {
  margin: 0 0 14px;
  color: #657790;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1.45;
  text-transform: uppercase;
}

.sl01-titel {
  margin: 0 0 12px;
  color: #20345f;
  font-size: clamp(21.5px, 2.08vw, 29px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.039em;
  /* Wörter nach Möglichkeit vollständig in die nächste Zeile übernehmen. */
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: none;
  hyphens: none;
}

.sl01-beschreibung {
  margin: 0 0 8px;
  font-size: clamp(12px, 1.04vw, 14px);
  color: #5c6c85;
  line-height: 1.5;
}

.sl01-referentin {
  margin: 0;
  font-size: 12px;
  color: #6a7990;
}

.sl01-aktionen {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  min-height: 48px;
}

.sl01-punkte {
  display: inline-flex;
  align-items: center;
  padding: var(--ml-punkte-abstand);
  border: var(--ml-punkte-rand);
  border-radius: var(--ml-punkte-radius);
  background: var(--ml-punkte-hintergrund);
  box-shadow: 0 0 0 1px rgba(48, 84, 134, .22);
  color: var(--ml-punkte-farbe);
  font-size: var(--ml-punkte-schriftgroesse);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .sl01-slider {
    --sl01-bildanteil: 57%;
  }
  .sl01-buehne {
    height: auto;
    min-height: 360px;
  }
}

@media (max-width: 880px) {
  .sl01-slider {
    --sl01-bildanteil: 54%;
  }
  .sl01-buehne {
    min-height: 350px;
  }
  .sl01-inhalt {
    --sl01-innenabstand: 18px;
  }
  .sl01-fachbereiche {
    margin-bottom: 9px;
  }
}

@media (max-width: 700px) {
  .sl01-slider {
    --sl01-vorschaubreite: 0px;
  }
  .sl01-buehne {
    position: relative;
    height: auto;
    min-height: 0;
    transition: height .28s ease;
  }
  .sl01-folie:not(.sl01-aktiv) {
    position: absolute;
    inset: 0;
  }
  .sl01-link {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--sl01-bildhoehe-mobil) auto;
    align-content: start;
  }
  .sl01-bildrahmen {
    height: var(--sl01-bildhoehe-mobil);
  }
  .sl01-inhalt {
    align-self: start;
    padding-right: var(--sl01-innenabstand);
    padding-bottom: 70px;
  }
  .sl01-aktionen {
    position: absolute;
    bottom: 15px;
    left: var(--sl01-innenabstand);
    margin-top: 0;
    min-height: 0;
    padding-top: 0;
  }
}

/* Kleine Mobilansichten behalten ihren bisherigen Textinnenabstand. */
@media (max-width: 620px) {
  .sl01-inhalt {
    --sl01-innenabstand: 19px;
  }
}

/* Meldung nur für assistive Technologien. */
.sl01-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

/* ============================================================
   sl02 – Seitliche Navigation und Bildvorschauen
   ============================================================ */

.sl02-steuerung {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: var(--sl01-vorschaubreite);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.sl02-zurueck { left: 0; }
.sl02-weiter { right: 0; }

.sl02-vorschaubild {
  position: absolute;
  inset: 0;
  background-color: #e9edf5;
  background-image: var(--sl02-bild, none);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}

.sl02-vorschaubild::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(8, 27, 65, .42);
}

.sl02-pfeil {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: rgba(255, 255, 255, .78);
  background: rgba(8, 38, 92, .13);
  transition: background-color 180ms ease, color 180ms ease;
}

.sl02-pfeil .ml-symbol {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .sl02-steuerung:hover .sl02-vorschaubild { opacity: 1; }
  .sl02-steuerung:hover .sl02-pfeil {
    color: #fff;
    background: var(--bs01-blau);
  }
}

.sl02-steuerung:focus-visible .sl02-pfeil {
  color: #fff;
  background: var(--bs01-blau);
}
.sl02-steuerung:focus-visible .sl02-vorschaubild { opacity: 1; }

@media (hover: none), (pointer: coarse) {
  .sl02-vorschaubild {
    display: none;
  }
}

@media (max-width: 700px) {
  .sl02-steuerung {
    top: calc(var(--sl01-bildhoehe-mobil) / 2);
    bottom: auto;
    width: 46px;
    height: 48px;
    transform: translateY(-50%);
    overflow: visible;
  }
  .sl02-zurueck { left: 3px; }
  .sl02-weiter { right: 3px; }
  .sl02-vorschaubild {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sl01-buehne,
  .sl01-folie,
  .sl01-bildrahmen,
  .sl02-vorschaubild,
  .sl02-pfeil {
    transition: none !important;
  }
}
