/* MTS global masthead — Career Areas bar style on all pages */

/* Header Footer Elementor sets .ehf-header #masthead { z-index: 99 }. Anything outside the masthead
   with a higher z-index (e.g. Career Areas docked subnav at 998) will paint on top of the fixed bar —
   masking menu text. Raise the masthead stacking context above that subnav. */
.ehf-header #masthead {
  z-index: 1100 !important;
}

/* Default masthead tint (Career Areas “at top”) — applies site-wide wherever .site-header is used */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 32, 64, 0.58);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  padding: clamp(18px, 3vw, 26px) max(24px, 5%);
  z-index: 999;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transition:
    background 0.2s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    border-color 0.2s ease,
    backdrop-filter 0.12s linear,
    -webkit-backdrop-filter 0.12s linear;
}

/* About Us: lighter frosted bar over OUR SPECIALITY hero (more transparent tint) */
body.page-id-212:not(.mts-career-areas-page) #masthead .site-header:not(.mts-header--scrolled) {
  background: rgba(0, 40, 76, 0.26) !important;
  backdrop-filter: blur(22px) saturate(1.06);
  -webkit-backdrop-filter: blur(22px) saturate(1.06);
  border-bottom-color: rgba(255, 255, 255, 0.28);
}

/* Solid white after scroll (.mts-header--scrolled toggled via inline JS), all pages */
.site-header.mts-header--scrolled {
  transition:
    background 0.16s ease-out,
    box-shadow 0.2s ease-out,
    border-color 0.16s ease-out;
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 18, 42, 0.08);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

#masthead .site-header {
  padding: clamp(7.6px, 1.266vw, 10.97px) max(24px, 5%);
  box-sizing: border-box;
  /* Same logo box in both scrolled / hero — lock row height so subnav anchor doesn’t jitter */
  min-height: 56px;
}

/* Dual logos: mts-white.svg (hero) + mts-black.svg (scrolled bar) — same 38px layout box */
#masthead .site-header .logo .logo-img {
  max-width: 100%;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  filter: none;
}

#masthead .site-header:not(.mts-header--scrolled) .logo-img--on-hero {
  display: block;
  width: calc(38px * 129 / 166);
  height: 38px;
  transform: none;
  transform-origin: center center;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

#masthead .site-header .logo .logo-img--on-light {
  width: calc(38px * 129 / 166);
  height: 38px;
  display: none !important;
}

#masthead .site-header.mts-header--scrolled .logo-img--on-hero {
  display: none !important;
}

#masthead .site-header.mts-header--scrolled .logo-img--on-light {
  display: block !important;
}

#masthead .site-header:not(.mts-header--scrolled) .main-nav ul li a {
  text-shadow: 0 1px 12px rgba(0, 18, 42, 0.55);
}

#masthead .site-header.mts-header--scrolled .main-nav ul li a {
  color: #111111 !important;
  text-shadow: none !important;
}

#masthead .site-header.mts-header--scrolled .main-nav ul li a:hover,
#masthead .site-header.mts-header--scrolled .main-nav ul li a.active {
  color: #000000 !important;
}

#masthead .site-header.mts-header--scrolled .main-nav ul li a::after {
  background: #002c52;
}

#masthead .site-header.mts-header--scrolled .mts-careers-search-btn {
  background: rgba(0, 44, 82, 0.82);
  color: #ffffff;
  border: 1px solid rgba(128, 214, 251, 0.35);
  box-shadow:
    0 2px 14px rgba(0, 44, 82, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#masthead .site-header.mts-header--scrolled .mts-careers-search-btn:hover {
  background: rgba(0, 44, 82, 0.94);
  color: #ffffff;
  border-color: rgba(128, 214, 251, 0.5);
  box-shadow:
    0 4px 18px rgba(0, 44, 82, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

#masthead .site-header.mts-header--scrolled .mts-icon-search {
  color: #ffffff;
}

.header-container {
  max-width: min(1300px, 94vw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2.5vw, 28px);
}

#page #masthead ~ * header.site-header {
  display: none !important;
}

.main-nav {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10.125px, 1.8vw, 24.75px);
  row-gap: 5.625px;
  margin: 0;
  padding: 0;
}

.main-nav ul li a {
  color: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.08vw, 1.0625rem);
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.main-nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0%;
  height: 2px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: #fff;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
  width: 100%;
}

/* WP global link styles toggle text-decoration — keep pseudo underline as sole indicator */
#masthead .main-nav ul li a:hover,
#masthead .main-nav ul li a:focus-visible {
  text-decoration: none !important;
}

#masthead .main-nav ul li a.active::after {
  width: 100% !important;
}

/*
 * Contact Us page: the “Contact Us” tab — underline only while hovering or keyboard-focused;
 * when the pointer leaves, it must not stay lit like other active items.
 */
body.page-id-227 #masthead .main-nav ul li a[href*="contact-us"].active::after {
  width: 0 !important;
}

body.page-id-227 #masthead .main-nav ul li a[href*="contact-us"]:hover::after,
body.page-id-227 #masthead .main-nav ul li a[href*="contact-us"]:focus-visible::after {
  width: 100% !important;
}

/* Careers pill — Career Areas typography */
#masthead .mts-careers-search-btn {
  gap: 7.5px;
  padding: 8px 16px 8px 12px;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  font-size: 1.09375rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.25;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#masthead .mts-careers-label {
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
}

#masthead .mts-icon-search {
  width: 20.625px;
  height: 20.625px;
}

#masthead .mts-icon-search circle,
#masthead .mts-icon-search path {
  stroke-width: 1.75;
}

.mts-careers-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  color: #111;
  cursor: pointer;
  border-radius: 999px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.mts-careers-search-btn:hover {
  background: #fafbfc;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.mts-careers-search-btn:active {
  transform: translateY(1px);
}

.mts-careers-search-btn:focus-visible {
  outline: 2px solid #80d6fb;
  outline-offset: 3px;
}

.mts-icon-search {
  flex-shrink: 0;
  display: block;
  color: #111;
}

.mts-careers-label {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: inherit;
}

.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .main-nav {
    flex: unset;
    min-width: unset;
    justify-content: flex-start;
    display: none;
    position: absolute;
    top: 70px;
    right: 5%;
    background: #002c52;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 11.25px;
  }

  .main-nav.show {
    display: flex;
    flex-direction: column;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 26px;
    height: 3px;
    background-color: #80d6fb;
    border-radius: 2px;
  }

  #masthead .mts-careers-search-btn {
    padding: 6px 12px 6px 9px;
    font-family: "Roboto", Helvetica, Arial, sans-serif;
    font-size: 1.015625rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.25;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Careers search modal — floating dropdown below header */
.mts-careers-modal[hidden] {
  display: none !important;
}

.mts-careers-modal:not([hidden]) {
  display: flex;
  flex-direction: column;
}

.mts-careers-modal {
  position: fixed;
  top: var(--mts-masthead-h, 60px);
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  z-index: 10050;
  width: 100%;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mts-careers-modal__backdrop {
  display: none !important;
}

.mts-careers-modal__dialog {
  position: relative;
  flex: 1;
  width: 100%;
  overflow-y: auto;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  background: linear-gradient(165deg, #002c52 0%, #001a33 100%);
  color: #f8fbff;
  padding: clamp(28px, 5vw, 44px);
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.mts-careers-modal__eyebrow {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #80d6fb;
  font-weight: 600;
}

.mts-careers-modal__title {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.25;
}

.mts-careers-modal__lead {
  margin: 0 0 28px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(232, 245, 255, 0.92);
  font-weight: 400;
}

.mts-careers-modal__form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mts-careers-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mts-careers-field__label {
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(128, 214, 251, 0.95);
}

.mts-careers-field input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 26, 48, 0.45);
  border: 1px solid rgba(128, 214, 251, 0.25);
  border-bottom: 2px solid rgba(128, 214, 251, 0.35);
  color: #fff;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mts-careers-field input::placeholder {
  color: rgba(200, 226, 243, 0.45);
}

.mts-careers-field input:focus {
  border-color: #80d6fb;
  background: rgba(0, 35, 65, 0.55);
  box-shadow: 0 0 0 3px rgba(128, 214, 251, 0.2);
}

.mts-careers-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.mts-careers-modal__search {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 11px 24px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  background: #f24e1e;
  color: #fff;
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(242, 78, 30, 0.35);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.mts-careers-modal__search:hover {
  background: #c93d10;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(242, 78, 30, 0.45);
}

.mts-careers-modal__cancel {
  padding: 11px 20px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: rgba(232, 245, 255, 0.92);
  border: 2px solid rgba(128, 214, 251, 0.55);
  border-radius: 6px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mts-careers-modal__cancel:hover {
  border-color: #80d6fb;
  background: rgba(128, 214, 251, 0.12);
  color: #fff;
}

.mts-careers-modal__hint {
  margin: 14px 0 0;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(200, 226, 243, 0.72);
}

.mts-careers-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  background: rgba(128, 214, 251, 0.1);
  border: 1px solid rgba(128, 214, 251, 0.35);
  border-radius: 8px;
  color: #80d6fb;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mts-careers-modal__close:hover {
  background: rgba(128, 214, 251, 0.2);
  color: #fff;
  border-color: #80d6fb;
}

/* Active nav — match inline overrides from page widgets */
.main-nav a.active {
  border-bottom: none !important;
}

#masthead .site-header:not(.mts-header--scrolled) .main-nav a.active {
  color: #fff !important;
  font-weight: 700 !important;
}

/* Careers search pill — Career Areas page only */
#page #masthead .site-header .header-container > .mts-careers-search-btn {
  display: none !important;
}

body.mts-career-areas-page #page #masthead .site-header .header-container > .mts-careers-search-btn {
  display: inline-flex !important;
}