/*
 * 44one Slim — Slider-Styles
 * Nutzt Theme-CSS-Variablen mit Fallbacks (funktioniert also auch ohne
 * das "44one"-Theme sinnvoll, ist aber darauf abgestimmt).
 */

.foss-slider {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  min-height: 320px;
  background: var(--fg, #2b2b2b);
}

.foss-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.foss-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}
.foss-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .foss-slide { transition: none; }
}

.foss-slide__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foss-slide__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  color: #fff;
  max-width: 640px;
}

.foss-slide__title {
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 .5rem;
  color: #fff;
}
.foss-slide__subtext {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin: 0 0 1.25rem;
  max-width: 60ch;
}
.foss-slide__cta {
  display: inline-block;
  align-self: flex-start;
  text-decoration: none;
  background: var(--accent, #B8860B);
  color: #fff;
  font-weight: 600;
  padding: .75rem 1.5rem;
  border-radius: var(--radius, 8px);
}
.foss-slide__cta:hover,
.foss-slide__cta:focus-visible {
  background: #fff;
  color: var(--fg, #2b2b2b);
}

/* Vorlage 1: Vollbild, Text zentriert */
.foss-slide--center .foss-slide__content {
  max-width: 100%;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}
.foss-slide--center .foss-slide__subtext { max-width: 60ch; }
.foss-slide--center::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 0;
}
.foss-slide--center .foss-slide__content { align-items: center; }

/* Vorlage 2: Vollbild, Text unten links */
.foss-slide--left .foss-slide__content {
  justify-content: flex-end;
}
.foss-slide--left::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0) 65%);
  z-index: 0;
}

/* Vorlage 3: Bild und Text nebeneinander — Text auf Akzentfläche statt
   auf dem Foto, dadurch immer garantiert ausreichender Kontrast. */
.foss-slide--split {
  display: flex;
  flex-direction: row-reverse;
}
.foss-slide--split .foss-slide__image {
  position: relative;
  inset: auto;
  width: 55%;
  height: 100%;
}
.foss-slide--split .foss-slide__content {
  position: relative;
  width: 45%;
  max-width: none;
  background: var(--fg, #2b2b2b);
  color: #fff;
  justify-content: center;
}
@media (max-width: 700px) {
  .foss-slide--split { flex-direction: column; }
  .foss-slide--split .foss-slide__image,
  .foss-slide--split .foss-slide__content { width: 100%; }
  .foss-slide--split .foss-slide__image { height: 45%; }
  .foss-slide--split .foss-slide__content { height: 55%; padding: 1.5rem; }
}

/* Pfeile */
.foss-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.foss-slider__arrow:hover,
.foss-slider__arrow:focus-visible {
  background: var(--accent, #B8860B);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.foss-slider__arrow--prev { left: 1rem; }
.foss-slider__arrow--next { right: 1rem; }

/* Dots */
.foss-slider__dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: .6rem;
}
.foss-slider__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.foss-slider__dot[aria-selected="true"] {
  background: #fff;
}
.foss-slider__dot:focus-visible {
  outline: 2px solid var(--accent, #B8860B);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .foss-slider { aspect-ratio: 4 / 5; }
  .foss-slider__arrow { display: none; } /* auf Mobil reicht Swipe + Dots, spart Platz */
}
