html {
  height: 100%;
}

body {
  background-image: url(media/back.jpg);
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Mindestens 100% der Viewport-Höhe */
}

main {
  flex: 1; /* Dieser Teil dehnt sich aus und drückt den Footer nach unten */
}

.slideshow img {
  position: absolute; /* stack images */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: flash 1s infinite;
}

.slideshow {
  z-index: 1;
  display: block;
  position: absolute;
  right: 0;
  top: 0;
  width: 100vw;
  height: 80vh;
  bottom: 0;
  overflow: hidden;
}

header {
  display: flex;
  justify-content: center; /* Centers the .logo div within the header */
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}

.logo {
  position: relative; /* Acts as an anchor for the absolute images */
  width: 300px;
  height: 60px;
  overflow: hidden;
  /* Flexbox here won't affect absolute children, but good to keep for structure */
}

.logo img {
  position: absolute;
  top: 0;
  left: 50%; /* Move the left edge to the center of the div */
  transform: translateX(-50%); /* Pull the image back by half its own width */
  height: 60px;
  object-fit: cover;
  animation: flash 1s infinite;
}

.logo > .bild1 {
  animation-delay: 0s;
  opacity: 0;
}
.logo > .bild2 {
  animation-delay: 0.2s;
  opacity: 0;
}
.logo > .bild3 {
  animation-delay: 0.4s;
  opacity: 0;
}
.logo > .bild4 {
  animation-delay: 0.6s;
  opacity: 0;
}
.logo > .bild5 {
  animation-delay: 0.8s;
  opacity: 0;
}

.background {
  z-index: 1;
  display: block;
  position: absolute;
  right: 0;
  width: 100vw;
  height: 100vh;
  bottom: 0;
  overflow: hidden;
}

.background img {
  position: absolute; /* stack images */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow > .bild1 {
  animation-delay: 0s;
  opacity: 0;
}
.slideshow > .bild2 {
  animation-delay: 0.2s;
  opacity: 0;
}
.slideshow > .bild3 {
  animation-delay: 0.4s;
  opacity: 0;
}
.slideshow > .bild4 {
  animation-delay: 0.6s;
  opacity: 0;
}
.slideshow > .bild5 {
  animation-delay: 0.8s;
  opacity: 0;
}

@keyframes flash {
  0% {
    opacity: 1;
  } /* Appear instantly */
  23% {
    opacity: 1;
  } /* Stay visible for exactly 20% of the 1s loop (0.2s) */
  25% {
    opacity: 0;
  } /* Disappear instantly */
  100% {
    opacity: 0;
  }
}

.text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 78vh;
  width: 100vw;
  z-index: 1;
  margin: 0;
}

.text a {
  z-index: 2;
  font-family: "legitima", serif;
  font-weight: 500;
  font-style: normal;
  font-size: 24px;
  text-decoration: none;
  color: #212121;
  margin: 60px;
  margin-right: 77px;
}

.impressumtext {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: auto;
  width: 100vw;
  z-index: 1;
  margin: 0;
}

.impressumtext p {
  z-index: 2;
  width: 35vw;
  font-family: "legitima", serif;
  font-weight: 500;
  font-style: normal;
  font-size: 14px;
  text-decoration: none;
  color: #212121;
}
.impressum {
  z-index: 2;
  color: white;
  text-align: center;
  padding-top: 20px;
  padding-bottom: 50px;
  border-radius: 5px;
}

.impressum a {
  font-family: "legitima", serif;
  font-weight: 500;
  font-style: normal;
  font-size: 18px;
  padding-inline: 20px;
  text-decoration: none;
  color: #212121;
  font-style: normal;
  transition: 0.2s;
}

.impressum a:hover {
  color: #727272;
  transition: 0.2s;
}

.text a:hover {
  color: #727272;
  transition: 0.2s;
}
.logo-link {
  text-decoration: none; /* Removes any default link underlining */
  display: block; /* Ensures the link takes up the full space of the logo */
  cursor: pointer; /* Changes the mouse to a hand icon */
}

@media screen and (max-width: 700px) {
  .logo img {
    height: 40px;
  }

  .text a {
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
  }
  .impressum a {
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 1.5px;
  }

  .impressumtext p {
    width: 80vw;
  }
}
