/* Critical header overrides to ensure dropdown styling remains consistent after platform CSS loads. */
.bpg-header .divider-vertical { display: none !important; }
.bpg-header .nav-link .bar,
.bpg-header .dropdown-split-toggle .bar { display: none !important; }

.bpg-header .dropdown-menu {
  /* hidden initial state with slight upward offset for slide-in */
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-8px) translateZ(0) !important;
  pointer-events: none !important; /* avoid accidental mouse capture when hidden */
  z-index: 2000 !important; /* ensure dropdown sits above other content */
  will-change: opacity, transform !important;
  /* default hide delay (prevents instant hide on accidental mouseout) */
  transition: opacity 320ms cubic-bezier(.2,.9,.2,1) 120ms, transform 320ms cubic-bezier(.2,.9,.2,1) 120ms !important;
  margin-top: 0 !important; /* remove gap to avoid mouseout between trigger and menu */
  background: #fff !important;
  border-radius: 6px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
  transform-origin: top center !important;
}

/* Show immediately on hover/focus or when the JS .show class is present */
.bpg-header .nav-item.weblink.dropdown:hover > .dropdown-menu,
.bpg-header .nav-item.weblink.dropdown:focus-within > .dropdown-menu,
.bpg-header .nav-item.dropdown:hover > .dropdown-menu,
.bpg-header .nav-item.dropdown:focus-within > .dropdown-menu,
.bpg-header .nav-item.weblink.dropdown .dropdown-menu:hover,
.bpg-header .nav-item.dropdown .dropdown-menu:hover,
.bpg-header .nav-item:hover > .dropdown-menu,
.bpg-header .nav-item:focus-within > .dropdown-menu,
.bpg-header .dropdown-menu.show {
  transition-delay: 0ms !important; /* cancel hide delay when showing */
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Small invisible hover buffer beneath nav items to reduce flicker when moving pointer to menu */
.bpg-header .nav-item { position: relative; }
.bpg-header .nav-item.has-children::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  /* overlap slightly with the dropdown to prevent any mouse gap */
  top: calc(100% - 6px);
  height: 40px; /* larger buffer to give users room to move */
  pointer-events: auto; /* allow the buffer to capture hover so the menu doesn't close */
  background: transparent; /* transparent buffer */
  z-index: 1999; /* sit just below the dropdown menu */
}

/* Nudge the dropdown a little higher so it overlaps the buffer and removes gaps */
.bpg-header .dropdown-menu {
  top: calc(100% - 6px) !important;
}

.bpg-header .dropdown-menu .dropdown-divider { display: none !important; }
.bpg-header .nav-item.weblink.dropdown:hover > .dropdown-menu .dropdown-divider,
.bpg-header .nav-item.dropdown:hover > .dropdown-menu .dropdown-divider {
  display: block !important;
}

.bpg-header .dropdown-split-toggle,
.bpg-header .dropdown-split-toggle::before,
.bpg-header .dropdown-split-toggle::after {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  content: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-block !important;
}

.bpg-header .dropdown-split-toggle .caret { display: none !important; }
.bpg-header .nav-link .caret { display: inline-block !important; }

.bpg-header .dropdown-split-toggle,
.bpg-header .dropdown-split-toggle::after,
.bpg-header .dropdown-split-toggle::before {
  border-bottom: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Critical: ensure navbar elements remain visible if a later theme overrides them. */
.bpg-header .navbar-collapse {
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}

.bpg-header .navbar-nav,
.bpg-header .nav-item,
.bpg-header .nav-link {
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}
.bpg-header .navbar-nav {
  display: flex !important;
  flex-direction: row !important;
}
.bpg-header .nav-item {
  display: flex !important;
  align-items: center !important;
}
.bpg-header .nav-link {
  display: inline-flex !important;
  align-items: center !important;
}

@media (min-width: 992px) {
  .bpg-header .navbar-collapse {
    display: flex !important;
    justify-content: center;
  }
}

/* Sign-in button alignment overrides */
.bpg-header .nav-item-auth { right: 40px !important; }
body .bpg-header .nav-item-auth { right: 40px !important; }
body.bpg-header .nav-item-auth { right: 40px !important; }
body .bpg-header .bpg-signin-btn, .bpg-header .bpg-signin-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 8px 16px !important; height: auto !important; }
body .bpg-signin-btn:hover, body .bpg-signin-btn:focus, .bpg-signin-btn:hover, .bpg-signin-btn:focus { transform: none !important; }

/* Remove any accidental gap below the header and ensure the first page block is flush */
.bpg-header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* When content immediately follows the header, remove extra top spacing from that first sibling */
.bpg-header + * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Specific: collapse top padding on the common section row used across pages */
.bpg-header + .row.sectionBlockLayout,
.bpg-header + section.page_section,
.bpg-header + .page-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
