/* Basis-Styles für das reine-CSS-Radio-Karussell (N-spezifische Regeln kommen aus Hugo inline). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-slider {
  max-width: 800px;
  margin: 0.75rem auto;
  padding: 0 8px;
}

.home-slider__radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.home-slider__row {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}

.home-slider__viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  height: 600px;
  border-radius: 0;
}

.home-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.home-slider__slide {
  flex: 0 0 100%;
  margin: 0;
  height: 100%;
  min-height: 0;
}

.home-slider__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .home-slider__track {
    transition: none;
  }
}

/* Tablet und kleiner: Höhe aus Bildfläche (4:3), begrenzt durch Viewport — vermeidet frühere 60px/131px-Höhen */
@media (max-width: 1199px) {
  .home-slider__viewport {
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: min(70vh, 560px);
    min-height: 200px;
  }
}

@media (max-width: 700px) {
  .home-slider__viewport {
    max-height: min(72vh, 520px);
    min-height: 220px;
  }

  .home-slider {
    max-width: 100%;
    padding-inline: 4px;
  }
}

.home-slider__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.home-slider__arrow-stack {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
}

.home-slider__arrow-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  cursor: pointer;
}

.home-slider__arrow-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 3px;
  background: #dee3e6;
  box-shadow: none;
  border: 0 solid transparent;
  transition: background-color 0.35s ease;
}

.home-slider__arrow-layer:hover .home-slider__arrow-box,
.home-slider__arrow-layer:focus-within .home-slider__arrow-box {
  background: rgba(192, 150, 104, 1);
}

.home-slider__arrow-layer:focus-visible {
  outline: 2px solid #c09668;
  outline-offset: 2px;
  border-radius: 4px;
}

.home-slider__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 10px;
  padding-bottom: 4px;
}

.home-slider__dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  padding: 5px;
  margin: 4px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.67);
  cursor: pointer;
  transition: background-color 0.4s;
  box-shadow: none;
  border: 0;
}

.home-slider__dot:hover,
.home-slider__dot:focus-visible {
  background: rgba(192, 150, 104, 1);
  outline: none;
}

.home-slider__dot:focus-visible {
  outline: 2px solid #c09668;
  outline-offset: 2px;
}

@media (orientation: landscape) and (max-width: 900px),
  (orientation: portrait) and (max-width: 700px) {
  .home-slider__arrow {
    display: none;
  }

  .home-slider__row {
    gap: 0;
  }

  .home-slider__arrow-stack {
    width: 0;
    height: 0;
  }
}
