.sjs-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0 0 1.5em;
}
.sjs-slider:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.sjs-track {
  display: flex;
  transition: transform 0.5s ease;
}
@media (prefers-reduced-motion: reduce) { .sjs-track { transition: none; } }

.sjs-slide {
  flex: 0 0 100%;
  position: relative;
}
.sjs-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.sjs-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0.75em 1em 2.25em;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.sjs-prev, .sjs-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 28px; line-height: 1;
  cursor: pointer;
}
.sjs-prev { left: 12px; }
.sjs-next { right: 12px; }
.sjs-prev:hover, .sjs-next:hover,
.sjs-prev:focus-visible, .sjs-next:focus-visible { background: rgba(0, 0, 0, 0.75); }

.sjs-dots {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
}
.sjs-dot {
  width: 10px; height: 10px; padding: 0;
  border: 2px solid #fff; border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.sjs-dot.is-active { background: #fff; }

/* ---------- Text slides ---------- */
.sjs-slider--text {
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 6px;
}
.sjs-slide--text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 2em 4.5em 3em;   /* room for arrows and dots */
  box-sizing: border-box;
  text-align: center;
}
.sjs-text { max-width: 65ch; }
.sjs-text > :first-child { margin-top: 0; }
.sjs-text > :last-child  { margin-bottom: 0; }

/* Controls take the text colour so they show on light or dark themes */
.sjs-slider--text .sjs-prev,
.sjs-slider--text .sjs-next {
  background: transparent;
  color: inherit;
  opacity: 0.6;
}
.sjs-slider--text .sjs-prev:hover, .sjs-slider--text .sjs-next:hover,
.sjs-slider--text .sjs-prev:focus-visible, .sjs-slider--text .sjs-next:focus-visible {
  background: transparent;
  opacity: 1;
}
.sjs-slider--text .sjs-dot { border-color: currentColor; opacity: 0.6; }
.sjs-slider--text .sjs-dot.is-active { background: currentColor; opacity: 1; }

@media (max-width: 600px) {
  .sjs-slide--text { padding: 1.5em 3em 2.75em; }
}
