/* Reset für den Body */
body {
  margin: 0;
}

/* Overlay – nur bei mobiler Navigation sichtbar */
.overlay {
  height: 0;
  width: 100%;
  position: absolute;
  top: 70px; /* direkt unter der Topnav */
  left: 0;
  background-color: rgba(0, 0, 0, 0.9);
  overflow-y: hidden;
  z-index: 999;
  transition: height 0.5s ease;
}

.overlay.open {
  height: calc(100vh - 75px);
  overflow-y: auto;
}

/* Gestaltung der Ausrichtung im Overlay */
.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 30%;
  position: relative;
}

 /* Gestaltung der Links im Overlay */
.overlay a {
  padding: 10px;
  text-decoration: none;
  font-size: 1.5em;
  color: #ccc;
  display: block;
  transition: color 0.3s;
}

/* Top-Navigation */
.topnav {
  overflow: hidden;
  background-color: #ffffff;
  width: 100%;
}

/* Größe des Logo  */
.topnav img {
  height: 50px;
}

/* Gestaltung der Links im Top-Menü */
.topnav a {
  float: left;
  display: block;
  color: #000;
  text-align: center;
  padding: 10px 10px 3px;
  text-decoration: none;
  font-size: 1.5em;
  transition: background-color 0.3s, color 0.3s;
}

.topnav a:hover {
  background-color: #ffffff; /* eigentlich gleiche Farbe, evtl. entfernen */
  color: #000;
}

.topnav a.active {
  background-color: #04AA6D;
  color: #fff;
}

.topnav .icon {
  font-size: 28px;
  line-height: 60px;
  display: none;
}

/* Mobil: Nur Logo und Home sichtbar, andere Links verstecken */
@media screen and (max-width: 719px) {
  /* Alle Links außer dem ersten ausblenden */
  .topnav a:not(:first-child) {
    display: none;
  }

  /* Ersten-Linkin der Mobil-Ansicht nach unten verschieben */
  .nav-home {
    display: inline-block;
    margin-top: 12px;
    margin-bottom: 37px;
  }

  /* Hamburger-Icon rechts positionieren */
  .topnav a.icon {
    float: right;
    display: block;
    padding: 0 20px;
  }

}

/* Desktop: Overlay ausblenden, alle Menüs sichtbar, Hamburger verstecken */
@media screen and (min-width: 720px) {
  .overlay {
    display: none;
  }

  .topnav a {
    display: block !important;
    float: left;
    text-align: center;
  }

  .topnav .icon {
    display: none !important;
  }

  .topnav .desktop-menu a {
    padding-top: 22px;
    display: inline-block; /* notwendig für padding */
  }
}

/* Scrollen bei geöffnetem Overlay verhindern */
body.no-scroll {
  overflow: hidden;
}