html {
  scroll-behavior: smooth;
}

p {
  text-align: justify;
  hyphens: auto;
  }

body {
  margin: 0;
  padding: 0;
  overflow: hidden
}

.section {
  display: none;
  height: 85vh;
  padding: 5vh;
  min-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.section.active-section {
  display: block;
}

#home {
  overflow: hidden;
  position: relative;
  padding-top: 0vh;
  }

#home .schalen {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  object-fit: contain;
  z-index: 1;
  max-height: 85vh;
}

/* Overlay genau mittig */
.overlay {
  position: absolute;
  top: 40%;
  left: 50%;
  background: rgba(0,0,20,0.7);
  z-index: 2;
  padding: 10px;
  /* Zentrierung */
  transform: translate(-50%, -50%);
}

/* Großes Titel-Overlay */
.title-container {
  z-index: 3;
  color: white;
  font-weight: 700;
}

.title-container p {
  font-size: 1.3em;
  text-align: left;
}

.fixed-top {
  height: 15vh;
  padding: 0 2rem;
  background-color: white;
  z-index: 10;
  position: relative !important;
}

.navbar-nav {
  font-weight: bold;
  height: 100%;
  align-items: center;
  color: black !important;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-link {
  font-size: calc(15vh * 0.2);
  padding: 0.5rem 1rem;
}

.navbar-brand img {
  height: calc(15vh * 0.6);
  margin-right: 0 !important;
}

.nav-item img {
  height: calc(15vh * 0.4);
  width: auto;
  display: block;
  margin-right: 0.5rem;
}

table {
  font-size: 1rem
}

tr {
  border-bottom: 1px solid;
}


tr td:first-child {
  font-weight: bold
}

.nav-link {
position: relative;
overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;             /* Startpunkt */
  width: 0;
  height: 3px;
  background-color: black;
  transition: width 0.3s ease, left 0.3s ease; /* left und width animieren */
}

/* Balken beim Hover */
.nav-link:hover::after {
  width: 100%;
  left: 0;  /* links nach rechts */
}

/* Aktiver Link */
.nav-link.active::after {
  width: 100%;
}


/* Keyframes für Slide-Up + Fade-In */
@keyframes slideUpFade {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Initialzustand der Sections */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Sichtbare Section bekommt Klasse 'active-section' */
.active-section {
  animation: slideUpFade 0.5s ease forwards;
}

#img-arbeitsweise {
  max-width: 40%;
  margin-left: 40px;
  border-radius: 10px;
}

/* Wrapper zentriert und gibt Breite */
.rundgang-wrapper {
  position: relative;
  width: 60%;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto; /* zentrieren */
}

/* Container übernimmt Höhe des ersten Bildes */
.rundgang-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Verhältnis als Platzhalter für Höhe */
  overflow: hidden;    /* verhindert, dass Bilder rausragen */
}

/* Bilder absolute für Slide-Animation */
.rundgang-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* Bild füllt Container */
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.rundgang-img.img-active {
  opacity: 1;
  transform: translateX(0);
}

.rundgang-img.exit-left {
  opacity: 0;
  transform: translateX(-100%);
}

/* Chevron unten rechts */
.rundgang-chevron {
  position: absolute;
  bottom: 10px;   /* Abstand vom unteren Rand */
  right: 10px;    /* Abstand vom rechten Rand */
  background: rgba(0,0,0,0.4);
  border: none;
  color: white;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  z-index: 5;
  transition: background 0.3s;
}

.rundgang-chevron:hover {
  background: rgba(0,0,0,0.7);
}

@media (max-width: 992px) {
  .rundgang-wrapper {
    width: 100%;        /* fast volle Breite */
    max-width: none;   /* max-width aufheben */
    padding: 10px;
  }

  .rundgang-container {
    padding-top: 90%;  /* mehr Höhe auf kleinen Screens */
  }

  .rundgang-img {
    object-fit: contain; /* Bilder bleiben vollständig sichtbar */
  }

  .rundgang-chevron {
    bottom: 10px;
    right: 10px;
    padding: 0.3rem 0.5rem;
  }
}

/* Buttons unten links */
.home-buttons {
  position: fixed;
  top: 50vh;
  left: 2vw;
  z-index: 10;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  height: 6vh;
}

.home-btn {
  background: rgba(0,0,20,0.7);
  color: white;
  border: none;
}

/* Standard: Desktop */
.home-overlay {
  position: absolute;
  top: 5vh;
  left: 5vh;
  z-index: 20;
  max-height: 70vh;
  overflow: auto;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.home-overlay.overlay-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Box selbst */
.overlay-box {
  background: rgba(0,0,20,0.95);
  padding: 20px;
  border-radius: 10px;
  color: white;
  max-width: 50%;      /* Desktop-Breite */
  max-height: 70vh;
  overflow: auto;
  position: relative;
  box-sizing: border-box;
}

/* Bild rechts floaten */
.overlay-box img {
  float: right;
  margin: 0 0 20px 20px;
  max-width: 40%;
  max-height: 60%;
  height: auto;
  display: block;
}

/* Mobile Anpassungen */
@media (max-width: 992px) {
  #home { overflow-y: scroll; }

  /* Overlay zentriert im Bildschirm, 80vw */
  .home-overlay {
    top: 30%;
    left: 50%;
    transform: translate(-50%, -100%); /* Startpunkt: oben außerhalb */
    width: 90vw;
    max-height: 40vh;
  }

  .home-overlay.overlay-visible {
    transform: translate(-50%, -50%); /* Ende: genau zentriert */
  }

  .overlay-box {
    width: 100%; /* Box füllt Overlay */
    max-width: none;
  }

  .home-buttons {
    left: 5vw;
    right: 5vw;
    z-index: 50;      /* über Overlay */
  }

  .home-btn {
    width: 100%;
  }
}