/* Navbar Overrides */
.navbar {
  /* Allow the parent navbar to expand dynamically */
  min-height: 4.5rem;
  height: auto !important;
  /* Frosted Glass Base */
  background-color: rgba(9, 9, 11, 0.65) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  position: sticky; /* Keeps it locked to the top */
  top: 0;
  z-index: 1050;

  /* Add a subtle glowing bottom border instead of a flat grey one */
  border-bottom: 1px solid rgba(0, 255, 102, 0.2) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-link {
  position: relative;
  background-color: transparent;
  color: var(--text-muted) !important; /* Uses your existing variable */
  transition: color 0.3s ease;
  padding-bottom: 0.25rem; /* Gives the underline room to breathe */
}

.nav-link:hover {
  color: var(--accent-green) !important; /* Glows green on hover */
}

/* The Animated Cyber Underline */
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-green);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-green); /* Adds the neon glow to the line */
}

.nav-link:hover::after {
  width: 100%;
}

/* Keep your mobile toggler exactly as is! */
.navbar-toggler {
  border-color: var(--accent-cyan) !important;
  border-radius: 2px !important;
  transition: all 0.3s ease;
}

.navbar-toggler:focus, .navbar-toggler:active {
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4) !important;
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Mobile Hamburger Menu Dropdown */
/* Seamless Unified Menu & Right-Aligned Text*/
@media (max-width: 991.98px) {
  /* Strip away any separate background so it merges with the parent navbar */
  .navbar-collapse {
    background: transparent !important;
    backdrop-filter: none;
    border: none;
    box-shadow: none;

    margin-top: 1rem;
    padding-bottom: 1rem;
  }

  /* Force links to the right */
  .navbar-nav {
    text-align: right;
    align-items: flex-end; /* Ensures flex container pushes children right */
    width: 100%;
  }

  /* Space out touch targets for mobile */
  .navbar-nav .nav-item {
    margin-bottom: 0.75rem;
  }

  /* Adjust the hover underline to originate from the right side */
  .nav-link::after {
    left: auto;
    right: 0;
  }
}

.nav-link:focus-visible,
.navbar-brand:focus-visible,
.navbar-toggler:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 3px;
  border-radius: 2px;
}
