
    .nav-links-row {
      display: flex;
      /* Wrap allows items to stay side-by-side on small screens */
      flex-wrap: wrap; 
      gap: 1rem;
      overflow: visible !important;
      white-space: normal;
      align-items: center;
    }

    .navlink {
      white-space: nowrap;
      flex-shrink: 0;
      position: relative;
      display: inline-block;
    }

    /* Target all screens down to 320px width */
    @media (min-width: 320px) {
      .dropdown {
        position: relative;
      }

      .dropdown:hover > .dropdown-menu,
      .dropdown .dropdown-menu.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        /* Smooth vertical distance */
        transform: translateY(14px) !important; 
        left: 0 !important;
        top: 100% !important;
        position: absolute !important;
        z-index: 2000 !important;
        background-color: #ffffff;
        border: none;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        border-radius: 8px;
        min-width: 240px;
      }

      /* Bridge: Keeps the menu open during the 12px gap movement */
      .dropdown:hover > .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -15px; 
        left: 0;
        width: 100%;
        height: 15px;
        background: transparent;
        display: block;
      }
    }

    /* Specific fix for iPhone-sized screens (375x667) */
    @media (max-width: 400px) {
      .nav-links-row {
        gap: 0.75rem; /* Tighter gap so links stay parallel */
      }
      
      .dropdown-menu {
        /* Prevents the menu from going off the right edge of a 375px screen */
        left: auto !important;
        right: -50px !important; 
      }
      
      .dropdown-item {
        white-space: normal; /* Wraps long text inside the menu */
        font-size: 0.9rem;
      }
    }
