/* Mobile header refinements. The matching source styles live in iec.scss. */
header {
  box-sizing: border-box;
}

header .cw {
  gap: 24px;
}

header #logo {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
}

header #logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

header #main-nav {
  margin-left: auto;
}

header .financeit-link {
  display: flex;
  flex: 0 1 140px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

header .financeit-link img {
  display: block;
  width: 100%;
  max-width: 140px;
  max-height: 26px;
  height: auto;
  object-fit: contain;
}

header .menu-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1024px) {
  header .cw {
    min-height: 70px;
    gap: 12px;
  }

  header #logo {
    padding: 5px 0;
  }

  header #logo img {
    width: auto;
    max-height: 60px;
  }

  header #main-nav {
    order: 3;
    margin-left: 0;
    flex: 0 0 auto;
  }

  header .financeit-link {
    order: 2;
    flex-basis: 110px;
    margin-left: auto;
  }

  header .financeit-link img {
    max-width: 110px;
    max-height: 24px;
  }

  header .menu-button {
    display: inline-flex;
    width: 44px;
    height: 44px;
    padding: 8px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
  }

  header .menu-button.hover ~ #main {
    top: 100%;
  }
}

@media (max-width: 480px) {
  header .cw {
    min-height: 60px;
    gap: 8px;
  }

  header #logo img {
    max-height: 50px;
  }

  header .financeit-link {
    flex-basis: 88px;
  }

  header .financeit-link img {
    max-width: 88px;
    max-height: 20px;
  }
}
