@media (max-width: 991.98px) {
  #masthead #site-navigation .navbar-brand-wrapper {
    margin-top: 7%;
  }
}

@media (max-width: 575.98px) {
  #masthead #site-navigation .navbar-brand-wrapper .navbar-brand img,
  #masthead #site-navigation .navbar-brand-wrapper .navbar-brand svg {
    height: 120px !important;
  }
  #masthead #site-navigation .navbar-brand-wrapper {
    margin-top: 8%;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  #masthead #site-navigation .navbar-brand-wrapper .navbar-brand img,
  #masthead #site-navigation .navbar-brand-wrapper .navbar-brand svg {
    height: 140px !important;
  }
}

@media (max-width: 991.98px) {
  #site-navigation.main-navigation--scrolled img,
  #site-navigation.main-navigation--scrolled svg {
    height: 70px !important;
  }
}

#masthead.site-header--scrolled {
  z-index: 2000 !important;
}
#masthead.site-header--scrolled #site-navigation {
  z-index: 2001 !important;
}

body.capabilities-page #masthead {
  z-index: 1000 !important;
}

body.page-capabilities #masthead.site-header--scrolled #site-navigation,
body.capabilities-page #masthead.site-header--scrolled #site-navigation {
  background: #ffffff !important;
  backdrop-filter: none !important;
}

#masthead.site-header--scrolled #site-navigation .btn--nav a.nav-link span {
  color: #ffffff !important;
}
#masthead.site-header--scrolled #site-navigation .btn--nav:hover a.nav-link span {
  color: #ffffff !important;
}

#masthead.bg--white #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg,
#masthead.site-header--scrolled #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg,
#site-navigation.main-navigation--scrolled .menu-primary-menu-right-container li.social-li a.social-link svg {
  fill: #000000 !important;
}

body.page-capabilities #masthead:not(.site-header--scrolled) #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg,
body.capabilities-page #masthead:not(.site-header--scrolled) #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg {
  fill: #ffffff !important;
}

body.page-capabilities #masthead.site-header--scrolled #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg,
body.capabilities-page #masthead.site-header--scrolled #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg {
  fill: #000000 !important;
}

@media (max-width: 782px) {
  body.admin-bar #masthead.site-header--scrolled #site-navigation {
    top: 0; 
  }
}

@media (min-width: 783px) {
  body.admin-bar #masthead.site-header--scrolled #site-navigation {
    top: 32px;
  }
}

#masthead,
#masthead #site-navigation {
  overflow: visible !important;
}

body.blog .entry-header__overlay,
body.archive .entry-header__overlay {
  background: linear-gradient(180deg, rgba(10, 38, 70, 0.86) 0%, rgba(10, 38, 70, 0.65) 100%) !important;
}

body.blog .entry-header__overlay,
body.archive .entry-header__overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
}

@media (min-width: 768px) {
  .entry-header--home .entry-header__cta-wrapper {
    flex-wrap: nowrap !important;
  }
}

body.blog .entry-header.bg--image::before,
body.archive .entry-header.bg--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 38, 70, 0.86) 0%, rgba(10, 38, 70, 0.65) 100%);
  z-index: 1;
  pointer-events: none;
}

body.blog .entry-header .entry-header__content,
body.archive .entry-header .entry-header__content { z-index: 2; position: relative; }

.entry-header__single .header {
  margin-bottom: 8px !important;
}

.single-post .entry-header__single .header h1 {
  font-size: clamp(28px, 3.2vw, 48px) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.01em;
}

@media (min-width: 992px) {
  #masthead #site-navigation .navbar-inner {
    padding-right: clamp(0.5rem, 2vw, 24px) !important;
    padding-left: clamp(0.5rem, 1.25vw, 20px) !important;
    gap: clamp(0.5rem, 1.25vw, 16px) !important;
  }

  #masthead .navbar-center {
    flex: 1 1 auto !important;
    min-width: 0;
  }
  #masthead .menu-primary-menu-right-container {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  #masthead #site-navigation .navbar-inner,
  #masthead #site-navigation .navbar-menus,
  #masthead #site-navigation .navbar-center,
  #masthead #site-navigation .navbar-right {
    align-items: center !important;
  }

  #masthead #site-navigation #menu-desktop > li > a {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    line-height: 1 !important;
  }

  #masthead #site-navigation .menu-desktop-right .contact-button a {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    padding: 0 20px !important; 
    position: relative;
    top: 0 !important; 
    height: 40px !important;
    transform: translateY(-2px) !important;
  }

  #masthead #site-navigation .menu-desktop-right .linkedin-icon a,
  #masthead #site-navigation .menu-primary-menu-right-container li.social-li a.social-link {
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateY(-2px) !important;
    line-height: 1 !important;
  }

  #masthead #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg,
  #masthead #site-navigation .menu-desktop-right .linkedin-icon a svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }

  /* Contact page: make header right-side controls match homepage */
  body.page-contact #masthead #site-navigation .menu-desktop-right .contact-button a,
  body.page-contact-us #masthead #site-navigation .menu-desktop-right .contact-button a {
    background-color: #0877B4 !important;
    border-color: #0877B4 !important;
    color: #ffffff !important;
  }

/* Global: set Contact button default color to #0877B4 to match brand */
#masthead #site-navigation .btn--nav a.nav-link {
  background: #0877B4 !important;
  border-color: #0877B4 !important;
}
  /* On Contact page, keep button filled even when the menu item is "active" */
  body.page-contact #masthead #site-navigation .btn--nav.active a.nav-link,
  body.page-contact-us #masthead #site-navigation .btn--nav.active a.nav-link {
    background: #0877B4 !important;
    border-color: #0877B4 !important;
  }
  body.page-contact #masthead #site-navigation .btn--nav.active a.nav-link span,
  body.page-contact-us #masthead #site-navigation .btn--nav.active a.nav-link span {
    color: #ffffff !important;
  }
  body.page-contact #masthead #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg,
  body.page-contact-us #masthead #site-navigation .menu-primary-menu-right-container li.social-li a.social-link svg {
    fill: #000000 !important;
  }
}

@media (min-width: 992px) and (max-width: 1366px) {
  #masthead #menu-desktop {
    gap: 0.4rem !important;
  }
  #masthead .menu-desktop-right {
    gap: 0.35rem !important;
  }
  #masthead #menu-desktop > li > a {
    font-size: 0.76rem !important;
    padding: 0.2rem 0 !important;
    letter-spacing: 0.2px !important;
  }
  #masthead .menu-desktop-right .contact-button a {
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
  }
  #masthead .navbar-brand-wrapper .navbar-brand img,
  #masthead .navbar-brand-wrapper .navbar-brand svg {
    height: 56px !important;
  }
  #masthead .navbar-center {
    padding-left: 10px !important;
  }
}

/* Mild compression for 1367px–1600px */
@media (min-width: 1367px) and (max-width: 1600px) {
  #masthead #menu-desktop {
    gap: 0.6rem !important;
  }
  #masthead #menu-desktop > li > a {
    font-size: 0.82rem !important;
  }
  #masthead .menu-desktop-right {
    gap: 0.5rem !important;
  }
  #masthead .menu-desktop-right .contact-button a {
    padding: 8px 16px !important;
  }
  #masthead .navbar-brand-wrapper .navbar-brand img,
  #masthead .navbar-brand-wrapper .navbar-brand svg {
    height: 62px !important;
  }
}

@media (min-width: 1595px) and (max-width: 1670px) {
  #masthead #site-navigation .navbar-inner {
    padding-left: 12px !important;
    padding-right: 18px !important;
    gap: 12px !important;
  }
  #masthead .navbar-brand-wrapper .navbar-brand img,
  #masthead .navbar-brand-wrapper .navbar-brand svg {
    height: 60px !important;
  }
  #masthead #menu-desktop {
    gap: 0.7rem !important;
  }
  #masthead #menu-desktop > li > a {
    font-size: 0.88rem !important;
  }
  #masthead .menu-desktop-right {
    gap: 0.55rem !important;
  }
  #masthead .menu-desktop-right .contact-button a {
    padding: 9px 20px !important;
  }
}

@media (min-width: 979px) and (max-width: 1050px) {
  #masthead #site-navigation .navbar-inner {
    padding-left: 4px !important;
    padding-right: 8px !important;
    gap: 6px !important;
  }

  #masthead .navbar-brand-wrapper {
    gap: 6px !important;
  }
  #masthead .navbar-brand-wrapper .navbar-brand img,
  #masthead .navbar-brand-wrapper .navbar-brand svg {
    height: 50px !important;
  }

  #masthead .navbar-center {
    padding-left: 6px !important;
  }

  #masthead .navbar-menus {
    gap: 8px !important;
  }

  #masthead #menu-desktop {
    gap: 0.35rem !important;
  }
  #masthead #menu-desktop > li > a {
    font-size: 0.74rem !important;
    padding: 0.2rem 0 !important;
  }
  #masthead .menu-desktop-right {
    gap: 0.35rem !important;
  }
  #masthead .menu-desktop-right .contact-button a {
    padding: 6px 10px !important;
    font-size: 0.74rem !important;
  }
}

@media (min-width: 992px) and (max-width: 1017px) {
  #masthead #site-navigation .navbar-inner {
    padding-left: 4px !important;
    padding-right: 6px !important;
    gap: 4px !important;
  }
  #masthead .navbar-brand-wrapper {
    gap: 4px !important;
  }
  #masthead .navbar-brand-wrapper .navbar-brand img,
  #masthead .navbar-brand-wrapper .navbar-brand svg {
    height: 46px !important;
  }

  .navbar-menus {
    gap: 6px !important;
  }
  #masthead .navbar-center {
    padding-left: 4px !important;
  }
  #masthead #menu-desktop {
    gap: 0.3rem !important;
  }
  #masthead #menu-desktop > li > a {
    font-size: 0.7rem !important;
    padding: 0.18rem 0 !important;
    letter-spacing: 0.15px !important;
  }

  #masthead .menu-primary-menu-right-container {
    flex-shrink: 0 !important;
  }
  #masthead .menu-desktop-right {
    gap: 6px !important;
  }
  #masthead .menu-desktop-right .contact-button a {
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
  }
  #masthead .menu-primary-menu-right-container li.linkedin-icon a {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }
}
