/*
 * Stable navigation compatibility layer.
 * Keeps legacy static pages and new Astro builds aligned in narrow desktop
 * and split-screen windows, where the complete desktop navigation cannot fit.
 */
#navbar .nav-actions .btn {
  white-space: nowrap;
}

@media (max-width: 1080px) {
  #navbar .nav-hamburger {
    display: flex;
  }

  #navbar .nav-inner {
    display: flex;
    justify-content: space-between;
  }

  #navbar .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    max-height: calc(100vh - 72px);
    padding: 16px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  #navbar .nav-menu.open {
    display: flex;
  }

  #navbar .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
  }

  #navbar .nav-links > li {
    padding: 12px 0;
  }

  #navbar .nav-actions {
    margin-left: 0;
    flex-direction: column;
    gap: 10px;
    padding-top: 8px;
  }

  #navbar .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }

  #navbar .nav-dropdown-toggle {
    color: var(--ink);
    font-weight: var(--fw-semibold);
  }

  #navbar .nav-chevron {
    display: none;
  }

  #navbar .nav-dropdown {
    position: static;
    min-width: 0;
    padding: 8px 0 0 12px;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }

  #navbar .nav-dropdown a {
    padding: 8px 0;
  }

  #navbar .nav-dropdown a:hover {
    background: none;
  }
}
