
/*
 * BHR Core v1.3
 * Makes the dynamically injected MGM Global Header render exactly like the
 * working v28-generated-page header/menu.
 *
 * Scope is ONLY the runtime header on new/manual pages and posts.
 */

body.bhr-core-global-header-enabled .bhr-core-runtime-header{
  width:100% !important;
  max-width:none !important;
  overflow:visible !important;
}

/* Full-width menu bar */
body.bhr-core-global-header-enabled .bhr-core-runtime-header .elementor-widget-hp_mega_menu,
body.bhr-core-global-header-enabled .bhr-core-runtime-header .elementor-widget-hp_mega_menu > .elementor-widget-container,
body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm,
body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-bar{
  width:100vw !important;
  max-width:100vw !important;
  box-sizing:border-box !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .elementor-widget-hp_mega_menu,
body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-bar{
  position:relative !important;
  left:50% !important;
  margin-left:-50vw !important;
  margin-right:0 !important;
}

/* Match the established inner navigation alignment */
body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-bar{
  background:#373635 !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-list{
  display:flex !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
  gap:32px !important;

  width:min(1450px, calc(100% - 40px)) !important;
  max-width:1450px !important;
  min-height:74px !important;
  margin:0 auto !important;
  padding:0 20px !important;
  box-sizing:border-box !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item{
  flex:0 0 auto !important;
  width:auto !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item:last-child{
  margin-left:auto !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-link{
  font-weight:700 !important;
  letter-spacing:.015em !important;
  white-space:nowrap !important;
}

/* Keep compact dropdowns compact. This prevents the image menu from opening as
   a giant full-page white panel on newly created pages. */
body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-compact{
  position:relative !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-compact > .hpmm-dropdown{
  left:0 !important;
  right:auto !important;
  width:max-content !important;
  max-width:calc(100vw - 40px) !important;
  min-width:0 !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-compact .hpmm-dropdown-inner{
  width:auto !important;
  max-width:none !important;
  margin:0 !important;
  padding:18px !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-compact .hpmm-grid{
  grid-template-columns:repeat(var(--hpmm-cols, 4), var(--hpmm-card-width, 210px)) !important;
  gap:18px !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-compact .hpmm-card{
  width:var(--hpmm-card-width, 210px) !important;
  max-width:210px !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-compact .hpmm-thumb{
  width:100% !important;
  height:125px !important;
  object-fit:cover !important;
  overflow:hidden !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-compact .hpmm-thumb img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
}

/* Full dropdowns can span the bar, but never exceed the viewport. */
body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-item.hpmm-dropdown-full > .hpmm-dropdown{
  left:0 !important;
  right:0 !important;
  width:100% !important;
  max-width:100vw !important;
}

body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-dropdown-inner{
  box-sizing:border-box !important;
}

/* Header template itself should not inherit odd content widths from the new page. */
body.bhr-core-global-header-enabled .bhr-core-runtime-header > .elementor,
body.bhr-core-global-header-enabled .bhr-core-runtime-header .elementor-section-wrap,
body.bhr-core-global-header-enabled .bhr-core-runtime-header .e-con{
  max-width:none !important;
}

/* Tablet/mobile */
@media(max-width:1024px){
  body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-list{
    width:100% !important;
    max-width:100% !important;
    padding-left:20px !important;
    padding-right:20px !important;
  }
}

@media(max-width:767px){
  body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-bar{
    width:100vw !important;
  }

  body.bhr-core-global-header-enabled .bhr-core-runtime-header .hpmm-top-list{
    min-height:0 !important;
    padding-left:14px !important;
    padding-right:14px !important;
  }
}
