  /* Color variables defined in global.css */

  .navbar-container {
    width: 100%;
    top: 0;
    left: 0;
    position: fixed;
    z-index: 1000;
    transition: transform 0.4s ease, opacity 0.4s ease;
    background-color: #000000bb;
    align-content: center;
    height: 80px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Zentriert, max 1500px breit */
  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1550px;
    margin: 0 auto;
    padding: 10px 25px;
    box-sizing: border-box;
    height: 80px;
    /* backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); */
  }

  .navbar-hidden {
    transform: translateY(-100%);
    opacity: 0;
  }

  .logo {
    width: 220px;
    height: auto;
    transition: transform 0.3s ease;
    cursor: pointer;
  }

  .logo:hover {
    /* animation: wiggleScale 0.5s ease; */
    transform-origin: center;
    transform: scale(1.05);
  }

  /* @keyframes wiggleScale {
    0% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(2deg); }
    50% { transform: scale(1.05) rotate(-2deg); }
    75% { transform: scale(1.05) rotate(1deg); }
    100% { transform: scale(1) rotate(0); }
  } */

  .navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Abstand zwischen Hamburger und Desktop-Menü */
    /* margin-left: auto; <- entfernen! */
  }

  /* Desktop Navigation */
  .navbar-nav {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
  }

  .nav-link {
    position: relative;
    /* wichtig für das ::after-Element */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: white;
    padding: 15px 5px;
    user-select: none;
  }

  /* Entferne die Farbänderung bei Hover */
  .nav-link:hover {
    color: white;
  }

  .nav-item {
    position: relative;
    padding: 7px 0;
  }

  .nav-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: transform 0.4s ease;
  }

  .nav-item:hover::after {
    transform: translateX(-50%) scaleX(1);
  }

  /* Dropdown Menu */
  .dropdown {
    position: relative;
  }

  /* Invisible bridge to fix dropdown menu */
  .dropdown::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 7px;
    background: transparent;
    z-index: 1001;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    /* direkt an den unteren Rand vom nav-link */
    left: 0;
    min-width: 180px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    list-style: none;
    margin: 0;
    /* wichtig: kein Margin! */
    padding: 0;
    /* kein extra Abstand oben */

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    background-color: #000000dd;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
  }

  .dropdown:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(7px);
    pointer-events: auto;
    padding: 0;
  }

  .dropdown-link {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* beide Eigenschaften animieren */
    user-select: none;
  }

  .dropdown-link:hover {
    background-color: var(--primary-color);
    background-color: #ffffff44;
    /* gewünschte Hover-Farbe */
    color: white;
    /* Textfarbe animiert ebenfalls */
    border-radius: 10px;
  }

  .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    border: none;
    background: none;
    cursor: pointer;
    margin-left: auto;
  }

  .hamburger-line {
    width: 25px;
    height: 3px;
    background-color: white;
    transform-origin: center;
    transition: all 0.3s ease;
  }

  #mobileMenu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #000000bb;
    text-align: center;
    z-index: 950;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 0;
    transition: height 0.5s ease;
  }

  #mobileMenu.open {
    overflow-y: auto;
    padding-bottom: calc( env(safe-area-inset-bottom));
    /* ✅ scrollen erlaubt, wenn offen */
  }

  #mobileMenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: none;
  }

  #mobileMenu li {
   padding: 5px;
   margin: 10px 0;
  }

  #mobileMenu > ul > li {
    margin: 15px 0;
    padding: 7px;
  border-bottom: solid 1px #ffffff33;
}

  #mobileMenu a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    display: block;
  }

  #mobileMenu > ul > li > a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  display: block;
  padding-bottom: 10px; /* nur hier */
}

/* Alle Links in Dropdowns bleiben unverändert */
#mobileMenu ul.mobile-dropdown-menu li a {
  padding-bottom: 0; /* optional, zur Sicherheit */
}

  /* Mobile Dropdowns */
  .mobile-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease;
    /* kürzer = wirkt direkter */
    will-change: max-height;
    /* sagt dem Browser: plane diese Animation vor */
    background-color: #666666bb;
    border-radius: 5px;
    margin-top: 10px !important;
  }

  /* Wenn geöffnet */
  .mobile-dropdown.open .mobile-dropdown-menu {
    max-height: 500px;
    /* groß genug für alle Einträge */
  }

  .mobile-dropdown span {
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    display: flex;
    justify-content: center;
    gap: 5px;
    align-items: center;
  }

  /* Toggle Effekt rein über CSS mit :focus oder :checked */
  /* Beispiel mit Checkbox: */
  .mobile-dropdown input[type="checkbox"] {
    display: none;
  }

  .mobile-dropdown input[type="checkbox"]:checked+.mobile-dropdown-menu {
    max-height: 500px;
  }

  .mobile-dropdown label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
  }

  .mobile-dropdown label i {
    margin-left: 10px;
  }

  .mobile-dropdown label:hover {
    color: var(--primary-color);;
  }

  .mobile-dropdown.open span i:last-child {
    transform: rotate(90deg);
  }

  .mobile-dropdown span i {
    transition: transform 0.3s ease;
    will-change: transform;
  }


  /* Entfernt den blauen Tap-Highlight auf Mobilgeräten */
  * {
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  #blurOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(0px);
  background-color: rgba(0, 0, 0, 0.0); /* leichtes Abdunkeln optional */
  pointer-events: none; /* Klicks nicht blockieren */
  transition: backdrop-filter 0.5s ease, background-color 0.5s ease;
  z-index: 900; /* Unter dem Menü aber über Content */
}

#blurOverlay.active {
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.2); /* Abdunkeln beim Öffnen */
}

  @media (max-width: 1100px) {
    .mobile-menu-toggle {
      display: flex;
      -webkit-tap-highlight-color: transparent;
      outline: none;
    }

    .logo{
      width: 180px;
    }

    #mobileMenu{
      background-color: #000000bb;
    }

    .navbar-container{
      background-color: #000000bb;
    }

    .navbar-nav {
      display: none;
    }

    .navbar {
      padding: 15px;
    }

    .dropdown-link{
      padding: 0;
    }

    .language-switcher{
      margin-top: 0;
    }
  }

  @media (min-width: 768px) {
  .nav-item .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-3px) scaleX(1);
  transform-origin: center;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}
}