/* nav-dropdown-hover-fix-v1 — desktop dropdown hover bridge + close delay */

@media (min-width: 1280px) {
  /* Invisible bridge so moving the mouse down doesn't leave the hover zone */
  .nav-dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 16px;
    z-index: 99;
  }

  .nav-dropdown-menu {
    top: calc(100% + 4px);
    max-height: min(70vh, 440px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  }

  .nav-dropdown-menu::-webkit-scrollbar {
    width: 6px;
  }

  .nav-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
  }

  /* Stay open briefly when the pointer leaves — easier for slower mouse movement */
  .nav-dropdown .nav-dropdown-menu {
    transition:
      opacity 0.18s ease,
      visibility 0s linear 0.28s,
      transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    transition:
      opacity 0.18s ease,
      visibility 0s linear 0s,
      transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
}
