/* Shared header contract. Keep this file in sync with css/header.css. */
:root {
  --project-it-header-max: 1920px;
  --project-it-header-gutter: 30px;
  --project-it-header-height: 86px;
  --project-it-header-gap: 32px;
  --project-it-header-nav-gap: 42px;
}

.header,
.header * {
  box-sizing: border-box;
}

.header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header .container.header__inner {
  align-items: center;
  display: flex;
  gap: var(--project-it-header-gap);
  height: var(--project-it-header-height);
  margin-inline: auto;
  max-width: var(--project-it-header-max);
  min-height: var(--project-it-header-height);
  padding-inline: 0;
  width: min(var(--project-it-header-max), calc(100% - (var(--project-it-header-gutter) * 2)));
}

.header .brand {
  align-items: center;
  display: flex;
  flex: 0 0 226px;
  gap: 10px;
  min-width: 0;
}

.header .brand__logo {
  align-items: center;
  background: #041b4e;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 96px;
  font-size: 10px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  line-height: 1;
  width: 96px;
}

.header .brand__divider {
  flex: 0 0 2px;
  height: 40px;
  width: 2px;
}

.header .brand__tagline {
  display: block;
  flex: 0 0 112px;
  font-size: 9px;
  line-height: 1.15;
  width: 112px;
}

.header .nav {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: var(--project-it-header-nav-gap);
}

.header .nav__item {
  align-items: center;
  display: flex;
  position: relative;
}

.header .nav__link {
  align-items: center;
  color: #041b4e;
  display: inline-flex;
  font-size: 20px;
  font-weight: 600;
  gap: 8px;
  letter-spacing: 0;
  line-height: 1.35;
  white-space: nowrap;
}

.header .nav__caret {
  transition: transform 160ms ease;
}

.header .nav__dropdown {
  background: #fff;
  border: 1px solid rgba(4, 27, 78, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(4, 27, 78, 0.14);
  left: 0;
  min-width: 302px;
  opacity: 0;
  padding: 8px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 18px);
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
  z-index: 80;
}

.header .nav__dropdown::before {
  content: "";
  height: 18px;
  inset: -18px 0 auto;
  position: absolute;
}

.header .nav__item:hover .nav__dropdown,
.header .nav__item:focus-within .nav__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.header .nav__item:hover .nav__caret,
.header .nav__item:focus-within .nav__caret {
  transform: rotate(180deg);
}

.header .nav__dropdown-link {
  border-radius: 6px;
  color: #041b4e;
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  padding: 11px 12px;
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.header .nav__dropdown-link:hover,
.header .nav__dropdown-link:focus-visible {
  background: rgba(4, 27, 78, 0.07);
  color: #041b4e;
  outline: none;
}

.header .header__right {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 24px;
  margin-left: auto;
}

.header .header__phone {
  color: #041b4e;
  flex: 0 0 202px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  width: 202px;
}

.header .header__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.header .icon-btn {
  align-items: center;
  display: inline-flex;
  flex: 0 0 52px;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.header .btn--header {
  align-items: center;
  display: inline-flex;
  flex: 0 0 312px;
  font-size: 15px;
  font-weight: 500;
  height: 44px;
  justify-content: center;
  line-height: 1;
  max-width: 312px;
  padding-inline: 24px;
  white-space: nowrap;
  width: 312px;
}

@media (max-width: 1180px) {
  :root {
    --project-it-header-gap: 24px;
    --project-it-header-nav-gap: 28px;
  }

  .header .brand {
    flex-basis: 214px;
  }

  .header .btn--header {
    flex-basis: 270px;
    max-width: 270px;
    width: 270px;
  }
}

@media (max-width: 980px) {
  .header .header__phone {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --project-it-header-gap: 18px;
    --project-it-header-nav-gap: 22px;
  }

  .header .brand {
    flex-basis: 194px;
  }

  .header .brand__tagline {
    flex-basis: 100px;
    width: 100px;
  }

  .header .icon-btn {
    flex-basis: 48px;
    height: 48px;
    width: 48px;
  }

  .header .btn--header {
    flex-basis: 230px;
    max-width: 230px;
    width: 230px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: var(--project-it-header-height);
  }

  .header.header {
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 110;
  }

  body.customize-support .header.header {
    top: 46px;
  }

  body.customize-support #wpadminbar {
    position: fixed !important;
    top: 0 !important;
  }

  .header .nav,
  .header .header__right {
    display: none;
  }

  .header .burger {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(4, 27, 78, .18);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 44px;
    flex-direction: column;
    gap: 4px;
    height: 44px;
    justify-content: center;
    margin-left: auto;
    width: 44px;
  }

  .header .burger span {
    background: #041b4e;
    border-radius: 2px;
    display: block;
    height: 2px;
    width: 18px;
  }

  .mobile-menu {
    display: block;
    inset: 0;
    opacity: 0;
    position: fixed;
    transition: opacity 150ms ease, visibility 150ms ease;
    visibility: hidden;
    z-index: 120;
  }

  .mobile-menu__backdrop {
    background: rgba(4, 27, 78, .25);
    inset: 0;
    position: absolute;
  }

  .mobile-menu__panel {
    align-content: start;
    background: #fff;
    box-sizing: border-box;
    display: grid;
    gap: 16px;
    height: 100%;
    max-width: 100vw;
    overflow-y: auto;
    padding: 20px;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 150ms ease;
    width: min(360px, 100%);
  }

  .mobile-menu__close {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(4, 27, 78, .18);
    border-radius: 999px;
    color: #041b4e;
    display: inline-flex;
    font-size: 22px;
    height: 44px;
    justify-content: center;
    justify-self: end;
    line-height: 1;
    width: 44px;
  }

  .mobile-menu__nav {
    display: grid;
    gap: 14px;
  }

  .mobile-menu__link,
  .mobile-menu__summary {
    color: #041b4e;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
  }

  .mobile-menu__summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
  }

  .mobile-menu__summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu__summary::after {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    display: block;
    height: 9px;
    margin-left: 16px;
    transform: rotate(45deg);
    transition: transform 150ms ease;
    width: 9px;
  }

  .mobile-menu__details[open] .mobile-menu__summary::after {
    transform: rotate(225deg);
  }

  .mobile-menu__submenu {
    display: grid;
    gap: 10px;
    padding: 12px 0 4px 14px;
  }

  .mobile-menu__sublink {
    color: #041b4e;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    opacity: .82;
  }

  .mobile-menu__actions {
    display: grid;
    gap: 12px;
  }

  .mobile-menu__phone {
    color: #041b4e;
    font-size: 18px;
    font-weight: 600;
  }

  .menu-toggle:checked ~ .mobile-menu {
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle:checked ~ .mobile-menu .mobile-menu__panel {
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  :root {
    --project-it-header-gutter: 16px;
    --project-it-header-height: 72px;
  }

  .header .container.header__inner {
    width: calc(100% - (var(--project-it-header-gutter) * 2));
  }

  .header .brand {
    flex-basis: 182px;
  }

  .header .brand__logo {
    flex-basis: 82px;
    height: 36px;
    width: 82px;
  }

  .header .brand__divider {
    height: 36px;
  }

  .header .brand__tagline {
    display: block;
    flex-basis: 92px;
    font-size: 8px;
    width: 92px;
  }
}

@media (max-width: 380px) {
  .header .brand {
    flex-basis: 160px;
    gap: 7px;
  }

  .header .brand__logo {
    flex-basis: 74px;
    height: 34px;
    width: 74px;
  }

  .header .brand__divider {
    height: 34px;
  }

  .header .brand__tagline {
    flex-basis: 72px;
    font-size: 7px;
    line-height: 1.12;
    width: 72px;
  }
}
