/* Desktop-only layout authority. Mobile (900px and below) is unchanged. */
@media (min-width: 901px) {
  :root,
  html,
  body {
    --jmf-main-offset: 0px !important;
    --jm-fixed-header-height: 0px !important;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Shared desktop header geometry. It occupies normal flow on interior pages. */
  html body .jmf-header {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 146px !important;
    min-height: 146px !important;
    margin: 0 !important;
    padding: 0 32px !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow: visible !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(7,31,67,.08) !important;
    box-shadow: none !important;
    z-index: 50000 !important;
    transform: none !important;
  }

  html body .jmf-logo-link {
    position: absolute !important;
    top: 4px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: 430px !important;
    height: 76px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 3 !important;
  }
  html body .jmf-header .jmf-logo {
    display: block !important;
    width: 430px !important;
    height: auto !important;
    max-width: none !important;
    max-height: 72px !important;
    margin: 0 !important;
    object-fit: contain !important;
  }

  html body .jmf-nav {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    top: 82px !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    max-width: none !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: clamp(28px, 3.2vw, 54px) !important;
    overflow: visible !important;
    z-index: 6 !important;
  }
  html body .jmf-nav-item {
    position: relative !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: visible !important;
  }
  html body .jmf-nav-link {
    display: flex !important;
    align-items: center !important;
    height: 64px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  html body .jmf-nav-link.active::after { bottom: 10px !important; }

  html body .jmf-header-actions {
    position: absolute !important;
    right: 32px !important;
    left: auto !important;
    top: 84px !important;
    bottom: auto !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    z-index: 8 !important;
  }
  html body .jmf-quote {
    background: #0756d9 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 7px !important;
    padding: 15px 25px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
  }
  html body .jmf-announcement { display: none !important; }

  /* Dropdowns remain open while the pointer crosses from the label to the panel. */
  html body .jmf-dropdown-menu {
    position: absolute !important;
    top: 62px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    z-index: 60000 !important;
    overflow: visible !important;
  }
  html body .jmf-dropdown-menu::before {
    content: "" !important;
    position: absolute !important;
    left: -12px !important;
    right: -12px !important;
    top: -14px !important;
    height: 16px !important;
  }
  html body .jmf-nav-item:hover > .jmf-dropdown-menu,
  html body .jmf-nav-item:focus-within > .jmf-dropdown-menu,
  html body .jmf-dropdown-menu:hover {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Interior pages: content begins immediately after the white header. */
  html body:not(.home):not(.home-page) > main,
  html body:not(.home):not(.home-page) > main[style],
  html body.interior-page > main,
  html body.interior-page > main[style] {
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
    transform: none !important;
    position: relative !important;
  }
  html body:not(.home):not(.home-page) main > :first-child,
  html body.interior-page main > :first-child {
    margin-top: 0 !important;
    top: auto !important;
    transform: none !important;
  }

  /* Homepage: the image starts at viewport y=0 and lies beneath the full header. */
  html body.home .jmf-header,
  html body.home-page .jmf-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html body.home > main,
  html body.home-page > main,
  html body.home > main[style],
  html body.home-page > main[style] {
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
    transform: none !important;
  }
  html body.home .desktop-hero-logo,
  html body.home-page .desktop-hero-logo { display: none !important; }

  html body.home .jmf-hero,
  html body.home-page .jmf-hero {
    position: relative !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 640px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    line-height: 0 !important;
    z-index: 0 !important;
  }
  html body.home .jmf-hero picture,
  html body.home-page .jmf-hero picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.home .jmf-hero picture > img,
  html body.home-page .jmf-hero picture > img,
  html body.home .jmf-hero img,
  html body.home-page .jmf-hero img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill !important;
    object-position: center top !important;
  }
}

@media (min-width: 901px) and (max-width: 1250px) {
  html body .jmf-header { height: 138px !important; min-height: 138px !important; padding: 0 20px !important; }
  html body .jmf-logo-link { width: 380px !important; height: 70px !important; top: 3px !important; }
  html body .jmf-header .jmf-logo { width: 380px !important; max-height: 68px !important; }
  html body .jmf-nav { top: 76px !important; height: 62px !important; gap: 24px !important; }
  html body .jmf-nav-link { height: 62px !important; font-size: 14px !important; }
  html body .jmf-header-actions { top: 78px !important; right: 20px !important; }
  html body .jmf-quote { padding: 13px 17px !important; font-size: 13px !important; }
  html body .jmf-dropdown-menu { top: 60px !important; }
}
