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;
  cursor: pointer;
}

/* 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%);
  pointer-events: none;
  cursor: pointer;
}

/* Großes Titel-Overlay */
.title-container {
  z-index: 3;
  color: white;
  font-weight: 700;
}

.title-container p {
  font-size: 1.3em;
  text-align: left;
}

/* Overlay über dem Bild */
.img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,20,0.95);
  color: white;
  opacity: 0;             /* unsichtbar */
  visibility: hidden;     /* verhindert Klicks */
  z-index: 20;            /* über dem Bild */
  padding: 20px;
  overflow-y: auto;       /* scrollbar, falls Text zu lang */
  transition: opacity 0.5s ease, visibility 0.5s ease; /* sanftes Einblenden */
}

/* Text im Overlay */
.overlay-content {
  max-width: 80%;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.5;
}

/* Aktivklasse für Fade-In */
.img-overlay.overlay-active {
  opacity: 1;
  visibility: visible;
}

/* Bild rechts oben */
.img-right {
  float: right;          /* rechts vom Text */
  width: 35%;            /* Breite anpassen */
  margin: 0 0 15px 15px; /* Abstand oben/unten und links vom Text */
  border-radius: 8px;
}

/* Bild unten links */
.img-left-bottom {
  float: left;           /* links vom Text */
  width: 35%;            /* Breite anpassen */
  margin: 15px 15px 0 0; /* Abstand oben/rechts */
  border-radius: 8px;
}

/* Overlay-Content Textfluss */
.overlay-content p {
  text-align: justify;
  line-height: 1.5;
}

/* Grundzustand Finger */
#intro-finger {
  position: absolute;
  top: 65%;                    /* Höhe über Overlay */
  right: 40%;                 /* leicht rechts vom Bildrand */
  font-size: 2rem;
  color: white;  /* dunkelblau */
  opacity: 0;                 /* sichtbar */
  z-index: 10;                  /* über Overlay */
  transform: translate(40%, -50%); /* vertikal mittig, leicht links versetzt */
  transition: transform 1s ease, opacity 1s ease; /* sanfte Übergänge */
  pointer-events: none;
}

/* Einfacher "reinflug" Effekt */
#intro-finger.finger-active {
  transform: translate(0px, -50%); /* kleine Bewegung nach links */
  opacity: 1;
}

/* Media Query für kleine Bildschirme */
@media (max-width: 992px) {
  #intro-finger {
    display: none;
  }
}

.fixed-top {
  height: 20vh;
  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(20vh * 0.2);
  padding: 0.5rem 1rem;
}

.navbar-brand img {
  height: calc(20vh * 0.6);
  margin-right: 0 !important;
}

.nav-item img {
  height: calc(20vh * 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
}

.dropdown-item, .nav-link {
position: relative;
overflow: hidden;
}

.dropdown-item::after, .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 */
.dropdown-item:hover::after, .nav-link:hover::after {
  width: 100%;
  left: 0;  /* links nach rechts */
}

/* Aktiver Link */
.dropdown-item.active::after, .nav-link.active::after {
  width: 100%;
}

.dropdown-item.active {
	background-color: white;
	color: black;
}

.dropdown-item:active, .dropdown-item:hover {
	background-color: white;
	color: black;
}

/* Bei Dropdown-Headern keinen Balken anzeigen */
.dropdown-toggle::after {
  display: none !important;
}

/* 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;
	
  }
	.nav-item.dropdown .dropdown-menu { 
	  left: 0% !important;      /* absolute Zentrierung */
	}
  }

  .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;
  }
}

/* Dropdown breiter machen */
.nav-item.dropdown .dropdown-menu { 
  transform: translateX(-50%);
  left: 50% !important;      /* absolute Zentrierung */
  text-align: left;
  padding: 10px 0;
}



.dropdown-item img {
	height: auto !important;
	width: 80px;
}
