/* style-nav.css */

/* Desktop Navigation */
nav.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 0.8rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-list li a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-list li a:hover {
  border-bottom: 2px solid #ff9900;
  color: #000;
}

.nav-list li a.active {
  border-bottom: 2px solid #ff9900;
  color: #000;
}

.logo-left img {
  height: 35px;
  max-height: 35px;
  width: auto;
  object-fit: contain;
}

/* Burger Menü Symbol (nur sichtbar auf Mobile) */
.menu-toggle {
  display: none; /* Standardmäßig auf Desktop ausgeblendet */
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: #333;
  margin: 4px 0;
  transition: 0.4s;
}

/* Close-Button als Button stylen */
.menu-close {
  display: none; /* Standardmäßig ausgeblendet */
  position: absolute; /* Absolut positionieren relativ zum main-nav */
  top: 1.2rem;
  right: 1.5rem;
  font-size: 2.2rem;
  color: #222;
  cursor: pointer;
  z-index: 2001;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

/* Mobile Navigation */
@media (max-width: 768px) {

  .logo-left {
    order: 1;
  }

  .menu-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  body.menu-open .menu-close {
    display: block !important;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* KORREKTUR: Nur eine transform-Regel, Menü gleitet von rechts rein und überdeckt 70% */
    transform: translateX(100%); /* Initial off-screen (ganz rechts) */
    /* KORREKTUR: Animationen für Öffnen/Schließen (opacity und transform) */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0; /* Menü ist initial unsichtbar */
    pointer-events: none; /* Klicks deaktivieren, wenn unsichtbar */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 2000;
  }

  .nav-list.active {
    /* KORREKTUR: Menü schiebt sich auf den Bildschirm (bedeutet, es deckt die rechten 70% ab) */
    transform: translateX(0);
    opacity: 1; /* Menü ist sichtbar */
    pointer-events: auto; /* Klicks aktivieren, wenn sichtbar */
  }

  .nav-list li {
    /* KORREKTUR: Abstand zwischen Menü-Links weiter verringert */
    margin: 0.3rem 0; /* Von 0.8rem auf 0.5rem reduziert */
  }

  .nav-list li a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #222;
    border-bottom: none;
  }

  .nav-list li a:hover,
  .nav-list li a.active {
    color: #ff9900;
  }

  body.menu-open {
    overflow-y: hidden;
  }
}
