/* ===========================
   NAVIGATION
   =========================== */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.main-nav a {
  color: #eee;
  text-decoration: none;
  margin: 0 20px;
  font-size: 1.2rem;
  transition: color 0.2s ease;
  position: relative;
}

.main-nav a:hover {
  color: #66ccff;
}

.main-nav a {
  position: relative;
  color: #eee;
  text-decoration: none;
  margin: 0 20px;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

/* Linie */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;

  width: 0%;
  height: 2px;

  background: linear-gradient(90deg, #66ccff, #44e38f);

  transform: translateX(-50%);
  transition: width 0.3s ease;
}

/* Hover */
.main-nav a:hover::after {
  width: 100%;
}

.main-nav a:hover {
  color: #66ccffbb;
}

body.nav-scrolled .main-nav {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* ===========================
   MOBILE MENU
   =========================== */

.menu-checkbox {
  display: none;
}

.menu-toggle {
  display: none;
  background: #111;
  color: #eee;
  border: 1px solid #333;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin: 10px auto 0;
  width: fit-content;
}

.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* Handy / kleines Display */
@media (max-width: 700px), (max-height: 500px) {
  .menu-toggle {
    display: inline-block;
  }

  .main-nav .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.45s ease, opacity 0.35s ease;
  }

  .menu-checkbox:checked + .menu-toggle + .nav-links {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav .nav-links a {
    display: block;
    margin: 0;
    font-size: 1rem;
    padding: 8px 0;
  }
}
/* ===========================
   ACTIVE NAV LINK
   =========================== */

.main-nav a.active {
   color: #44e38eab;
  text-shadow: 0 0 6px rgba(68, 227, 143, 0.10);
}

/* Unterstrich dauerhaft sichtbar */
.main-nav a.active::after {
  width: 100%;
}