.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color:#fff;
  z-index:10000;
  border-top:solid 40px black;
  transition: all 0.3s ease;
}

  @media (max-width: 991px) {
    .navbar {
    border-top:solid 10px black;
    }
  }

/* Desktop only: shrink on scroll */
@media (min-width: 992px) {
  .navbar.scrolled {
    border-top-width: 4px;
    background-color:#efefef;
  }
}
  .navbar-brand img { height: 60px; width: auto; }
  .search-form .form-control { border-radius: 0; border-right: none; font-size: 0.875rem; }
  .search-form .btn { border-radius: 0; border-left: none; }
  .search-form .form-control:focus { box-shadow: none; border-color: #dee2e6; }
  .navbar { border-bottom: 0.5px solid var(--color-border-tertiary); }
  .nav-link { font-size: 0.875rem; color: var(--color-text-secondary) !important; }
  .nav-link:hover, .nav-link:focus { color: var(--color-text-primary) !important; }
  .dropdown-menu { border: 0.5px solid var(--color-border-tertiary); box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-radius: 10px; font-size: 0.875rem; }
  .dropdown-item { color: var(--color-text-secondary); padding: 0.45rem 1rem; }
  .dropdown-item:hover { background: var(--color-background-secondary); color: var(--color-text-primary); }
  .dropdown-divider { border-color: var(--color-border-tertiary); }
  .navbar-toggler { border: 0.5px solid var(--color-border-tertiary); }
  .navbar-toggler:focus { box-shadow: none; }

  /* Desktop: center the nav links absolutely, search stays right */
  @media (min-width: 992px) {
    .navbar-nav.nav-center {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }

    .dropdown-menu-2col {
      display: none;
      min-width: 360px;
      padding: 0.75rem;
    }
    .dropdown-menu-2col.show {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0 0.5rem;
    }
    .dropdown-menu-2col .dropdown-header,
    .dropdown-menu-2col .dropdown-divider,
    .dropdown-menu-2col .dropdown-col-break {
      grid-column: 1 / -1;
    }
    .dropdown-menu-2col .dropdown-item {
      border-radius: 6px;
    }
  }

  /* Mobile: everything stacks, flows naturally, no absolute positioning */
  @media (max-width: 991px) {
    .navbar > .container-fluid {
      flex-wrap: wrap;
    }
    .navbar-brand {
      /* centered logo row */
      flex: 1;
      display: flex;
      justify-content: center;
    }
    .navbar-toggler {
      /* sits to the right of the centered logo */
      order: 2;
    }
    .navbar-brand {
      order: 1;
    }
    /* collapsed content stacks below and pushes page down */
    .navbar-collapse {
      order: 3;
      width: 100%;
      flex-basis: 100%;
    }
    .navbar-nav.nav-center {
      position: static;
      transform: none;
      width: 100%;
    }
    .search-form {
      width: 100%;
      margin-top: 0.5rem;
      margin-bottom: 0.75rem;
    }
    .search-form .input-group {
      width: 100% !important;
    }
  }

  :target {
    scroll-margin-top: 100px;
}