/*
 * Upcuan v1.0.0.5
 * Center the complete desktop navigation row on every public page.
 *
 * Primary navigation + Search + User navigation are treated as one visual
 * group. The logo remains independently anchored on the left when present.
 */

@media (min-width: 992px) {
  /* The header becomes the centering stage for the complete navigation row. */
  #header.upc-header .upc-header-inner {
    position: relative !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  /* Keep an optional journal logo from pushing the navigation off-centre. */
  #header.upc-header .logo:not(:empty) {
    position: absolute !important;
    left: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    z-index: 2 !important;
  }

  /* Remove the old left-fill/right-auto layout so primary and utility menus
     sit next to each other as a single centered row. */
  #header.upc-header .upc-navbar {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: center !important;
  }

  #header.upc-header .pkp_navigation_primary {
    justify-content: center !important;
  }

  #header.upc-header .upc-utility-nav {
    flex: 0 0 auto !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: flex-start !important;
  }
}
