nav {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  background-color: #222;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topnav {
  overflow: hidden;
  background-color: #222;
  margin-top: -5px;
}

.topnav a {
  float: left;
  display: block;
  color: #fff;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav-r {
  float: right;
}

.active {
  background-color: #ff0000;
  color: #fff;
}

.topnav .icon {
  display: none;
}

.dropdown {
  float: left;
  overflow: hidden;
}

.dropdown .dropbtn {
  font-size: 17px;
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #555;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.dropdown-content a {
  float: none;
  color: rgb(255, 255, 255);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.topnav a:hover,
.dropdown:hover .dropbtn {
  background-color: #555;
  color: white;
}

.dropdown-content a:hover {
  background-color: #fff;
  color: black;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ===== HERO / HEADER ===== */
.hero {
  position: relative;
  width: 100%;
  height: clamp(260px, 40vw, 460px);
  overflow: hidden;
  background: rgb(0, 0, 0);
}

/* ===== Slider Container ===== */
.slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
}

.slide-track {
  display: flex;
  height: 100%;
  animation: scroll 180s linear infinite;
  will-change: transform;
}

.slide-track img {
  width: 100vw;
  height: 100%;
  object-fit: cover;
  flex: 0 0 100vw;

  mask-image: linear-gradient(to right,
      transparent 0%,
      rgb(0, 0, 0) 5%,
      rgb(0, 0, 0) 95%,
      transparent 100%);

  -webkit-mask-image: linear-gradient(to right,
      transparent 0%,
      rgb(0, 0, 0) 5%,
      rgb(0, 0, 0) 95%,
      transparent 100%);
}

/* Endlos nach links: bei N Bildern im ersten Set = N*100vw verschieben */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-700vw);
  }
}

/* ===== Overlay ===== */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(1200px 500px at 50% 55%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0) 4px);
  mix-blend-mode: overlay;
}

.hero-title {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  font-size: clamp(50px, 8vw, 110px);
  line-height: 1;
  text-align: center;
  color: #ff8000;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  font-family: serif;
  letter-spacing: 0.5px;
}

.pos-center {
  object-position: center center;
}

.pos-bottom {
  object-position: center 80%;
}

@media (max-width: 768px) {
  .hero {
    height: 30vh;
  }

  .slide-track {
    animation: scroll 120s linear infinite;
  }

  .hero-title {
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  }
}

/* ===== Accessibility: Reduce Motion ===== */
@media (prefers-reduced-motion: reduce) {

  .slide-track,
  .slide-track img {
    animation: none !important;
    transform: none !important;
  }
}

@media screen and (max-width: 681px) {
  .topnav-r {
    float: left;
  }

  .topnav a:not(:first-child),
  .dropdown .dropbtn {
    display: none;
  }

  .topnav a.icon {
    float: right;
    display: block;
  }

  .topnav.responsive {
    position: relative;
  }

  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }

  .topnav.responsive .dropdown {
    float: none;
  }

  .topnav.responsive .dropdown-content {
    position: relative;
  }

  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
  }
}