/* Stellenanzeigen Slider – Farben & Maße kommen als CSS-Variablen aus den Komponenten-Optionen */
.stellen-slider {
  --sa-bg: #fff;
  --sa-text: #333;
  --sa-heading: #1a4f8b;
  --sa-label: #555;
  --sa-accent: #1a4f8b;
  --sa-accent-contrast: #fff;
  --sa-border-color: #ddd;
  --sa-border-width: 1px;
  --sa-radius: 8px;
  --sa-padding: 24px;
  --sa-font: inherit;
  --sa-font-size: 16px;
  --sa-heading-size: 26px;
  --sa-shadow: 0 4px 18px rgba(0, 0, 0, .08);
  --sa-logo-height: 60px;
  --sa-speed: 600ms;
  --sa-min-height: 0px;

  --sa-max-width: none;

  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--sa-max-width);
  font-family: var(--sa-font);
  font-size: var(--sa-font-size);
  line-height: 1.55;
  color: var(--sa-text);
}

.stellen-slider--align-center {
  margin-left: auto;
  margin-right: auto;
}

.stellen-slider--align-right {
  margin-left: auto;
  margin-right: 0;
}

.stellen-slider--align-left {
  margin-left: 0;
  margin-right: auto;
}

.stellen-slider__viewport {
  position: relative;
  overflow: hidden;
  transition: height var(--sa-speed) ease;
}

.stellen-slider__track {
  display: flex;
  align-items: flex-start;
  transition: transform var(--sa-speed) ease;
  will-change: transform;
}

.stellen-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  /* Platz, damit der Schatten nicht abgeschnitten wird */
  padding: 4px 4px 20px;
}

/* Überblenden */
.stellen-slider.is-fade .stellen-slider__track {
  display: block;
  position: relative;
  transform: none !important;
}

.stellen-slider.is-fade .stellen-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--sa-speed) ease, visibility 0s linear var(--sa-speed);
}

.stellen-slider.is-fade .stellen-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition: opacity var(--sa-speed) ease, visibility 0s;
}

/* Karte */
.stellen-card {
  box-sizing: border-box;
  min-height: var(--sa-min-height);
  padding: var(--sa-padding);
  background: var(--sa-bg);
  color: var(--sa-text);
  border: var(--sa-border-width) solid var(--sa-border-color);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
  display: flex;
  flex-direction: column;
}

.stellen-card__fields {
  flex: 1 1 auto;
}

.stellen-card__title {
  margin: 0 0 1rem;
  color: var(--sa-heading);
  font-family: inherit;
  font-size: var(--sa-heading-size);
  line-height: 1.25;
}

.stellen-card a {
  color: var(--sa-accent);
}

/* Felder */
.stellen-field {
  margin: 0 0 1rem;
}

.stellen-field:last-child {
  margin-bottom: 0;
}

.stellen-field__label {
  margin-bottom: .25rem;
  color: var(--sa-label);
}

.stellen-labels--bold .stellen-field__label {
  font-weight: 700;
}

.stellen-labels--uppercase .stellen-field__label {
  font-size: .8em;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.stellen-fields--inline .stellen-field {
  display: grid;
  grid-template-columns: minmax(120px, 30%) 1fr;
  gap: 1rem;
}

.stellen-fields--inline .stellen-field__label {
  margin-bottom: 0;
}

.stellen-field__value > :first-child {
  margin-top: 0;
}

.stellen-field__value > :last-child {
  margin-bottom: 0;
}

.stellen-field--media img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: calc(var(--sa-radius) / 2);
}

.stellen-images--left .stellen-field--media img {
  margin-left: 0;
}

.stellen-images--right .stellen-field--media img {
  margin-right: 0;
}

.stellen-empty {
  text-align: center;
}

.stellen-empty > :first-child {
  margin-top: 0;
}

.stellen-empty > :last-child {
  margin-bottom: 0;
}

.stellen-list {
  margin: 0;
  padding-left: 1.2em;
}

.stellen-color {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -.15em;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 3px;
}

/* Logo – immer unten in der Anzeige */
.stellen-logo {
  margin-top: 1.5rem;
}

.stellen-logo--separator {
  padding-top: 1rem;
  border-top: 1px solid var(--sa-border-color);
}

.stellen-logo img {
  display: inline-block;
  max-height: var(--sa-logo-height);
  width: auto;
  max-width: 100%;
}

/* Fortschritt (Anzeigezeit) */
.stellen-slider__progress {
  height: 3px;
  margin: 0 4px;
  background: var(--sa-border-color);
  border-radius: 3px;
  overflow: hidden;
}

.stellen-slider__progress-bar {
  width: 0;
  height: 100%;
  background: var(--sa-accent);
}

/* Steuerung */
.stellen-slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .75rem;
}

.stellen-slider__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--sa-accent);
  background: transparent;
  border: 2px solid var(--sa-accent);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.stellen-slider__btn:hover,
.stellen-slider__btn:focus-visible {
  color: var(--sa-accent-contrast);
  background: var(--sa-accent);
}

.stellen-slider__btn:focus-visible,
.stellen-slider__dot:focus-visible {
  outline: 3px solid var(--sa-accent);
  outline-offset: 2px;
}

.stellen-slider__dots {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.stellen-slider__dot {
  width: .8rem;
  height: .8rem;
  padding: 0;
  background: var(--sa-accent);
  border: 0;
  border-radius: 50%;
  opacity: .3;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}

.stellen-slider__dot:hover {
  opacity: .6;
}

.stellen-slider__dot.is-active {
  opacity: 1;
  transform: scale(1.2);
}

.stellen-slider__toggle .stellen-icon-play,
.stellen-slider.is-paused .stellen-slider__toggle .stellen-icon-pause {
  display: none;
}

.stellen-slider.is-paused .stellen-slider__toggle .stellen-icon-play {
  display: block;
}

/* Ohne JavaScript: alle Anzeigen untereinander */
.stellen-slider:not(.is-ready) .stellen-slider__track {
  flex-direction: column;
}

.stellen-slider:not(.is-ready) .stellen-slider__controls,
.stellen-slider:not(.is-ready) .stellen-slider__progress {
  display: none;
}

@media (max-width: 600px) {
  .stellen-fields--inline .stellen-field {
    display: block;
  }

  .stellen-fields--inline .stellen-field__label {
    margin-bottom: .25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stellen-slider__viewport,
  .stellen-slider__track,
  .stellen-slider.is-fade .stellen-slide,
  .stellen-slider__progress-bar {
    transition: none !important;
  }
}
