/* === Navbar Styling === */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  background: rgba(255, 255, 255, 0.211);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 25px;
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  transform: translateY(-50px) translateX(-50%);
  animation: slideDown 0.8s ease forwards;
  font-family: 'Outfit', sans-serif;
}

@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

/* Logo */
.navbar-logo img {
  height: 50px;
  width: auto;
  border-radius: 10px;
}

/* Navbar Links Container */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* Allgemeine Button-Links */
.navbar-links a.nav-link,
.dropdown-btn {
  text-decoration: none !important;
  color: #2e7d32;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  transition: background 0.22s ease, color 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  box-sizing: border-box;
}

/* Hover */
.navbar-links a.nav-link:hover,
.dropdown-btn:hover {
  background-color: rgba(76, 175, 80, 0.699);
  color: #fff;
}

/* Active via Scrollspy */
.navbar-links a.nav-link.active {
  background-color: #4caf50e9;
  color: #F1EEE9;
  box-shadow: 0 0 8px #66bb6ad6, 0 0 16px #a5d6a7;
}

/* Kontakt Button */
.navbar-contact {
  background-color: #4caf50;
  color: #F1EEE9;
  padding: 10px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.navbar-contact:hover {
  background-color: #388e3c;
  transform: translateY(-2px);
}

/* === Dropdown (Desktop) === */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* Dropdown Menü */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 260px;
  background: rgba(255,255,255,0.98);
  border-radius: 14px;
  padding: 10px 0;
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);

  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;

  max-height: 0;
  opacity: 0;
  pointer-events: none;

  transition:
    max-height 0.26s ease,
    opacity 0.22s ease,
    transform 0.26s ease;
}

/* Geöffnet */
.dropdown.open .dropdown-menu {
  max-height: 300px;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Dropdown Links */
.dropdown-link {
  width: 100%;
  padding: 12px 0;
  margin: 4px 0;
  text-align: center;
  font-weight: 600;
  color: #2e7d32;
  text-decoration: none !important;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
}

.dropdown-link:hover {
  background: rgba(76, 175, 80, 0.699);
  color: #fff;
}

/* === Hamburger Menü === */
.navbar-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.navbar-toggle div {
  width: 28px;
  height: 3px;
  background-color: #4caf50;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.navbar-toggle.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active div:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active div:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Mobile (KEIN Dropdown!) === */
@media (max-width: 768px) {

  .navbar-links {
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    border-radius: 20px;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
  }

  .navbar-links.open {
    background: rgba(243, 243, 243, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding-top: 10px;
    padding-bottom: 10px;
    max-height: 500px;
    opacity: 1;
    visibility: visible;
  }

  .navbar-contact {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  /* ==== FIX: Dropdown auf Mobile wird zu normaler Liste ==== */
  .dropdown {
    width: 100%;
    display: block !important;
  }

  .dropdown-btn {
    width: 100% !important;
    display: block !important;
    text-align: center;
    justify-content: center;
  }

  .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    display: block !important;
    background: transparent;
    padding: 0;
    box-shadow: none;
    opacity: 1 !important;
    pointer-events: auto;
  }

  .dropdown-link {
    display: block !important;
    width: 100% !important;
    padding: 12px 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    text-align: center;
  }

  .dropdown-link:hover {
    background: rgba(76, 175, 80, 0.12);
    color: #2e7d32;
  }
}


/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}