.header {
  padding-top: 10px;
  margin-bottom: 10px;
  -webkit-transition: background-color 0.3s ease-in-out;
  -moz-transition: background-color 0.3s ease-in-out;
  -o-transition: background-color 0.3s ease-in-out;
  transition: background-color 0.3s ease-in-out;
}
.header__wrapper {
  max-width: 1084px;
  margin: 0 auto;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr auto 1fr;
  grid-template-columns: 1fr auto 1fr;
  justify-content: space-between;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}
.header__logo {
  justify-self: flex-start;
}
.header__logo:focus-visible {
  outline: 2px dashed #1a68c4;
  outline-offset: 5px;
}
.header__nav {
  margin-right: 50px;
}
.header__menu {
  padding: 0;
  margin: 0;
  list-style: none;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  gap: 26px;
}
.header__menu-link {
  padding: 31px 0;
  display: inline-block;
  font-family: 'Outfit';

  font-weight: 600;
  font-size: 15px;
  color: #1d2f4c;
  -webkit-transition: color 0.5s linear;
  -moz-transition: color 0.5s linear;
  -o-transition: color 0.5s linear;
  transition: color 0.5s linear;
}

.header__menu-link:focus-visible {
  outline: 2px dashed #1a68c4;
  outline-offset: 1px;
}

@media (hover: hover) {
  .header__menu-link:hover {
    color: #0f4194;
    -webkit-transition: color 0.1s linear;
    -moz-transition: color 0.1s linear;
    -o-transition: color 0.1s linear;
    transition: color 0.1s linear;
  }
}

.header__menu-link:active {
  outline-color: rgba(13, 42, 91, 0.45);
}
.header__contact-btn {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  justify-self: flex-end;
  width: 100%;
  border: 1px solid rgba(29, 47, 76, 0.15);
  -webkit-border-radius: 50px;
  -moz-border-radius: 50px;
  border-radius: 50px;
  padding: 10px 15px;
  max-width: 128px;
  height: 39px;

  font-family: 'Outfit';
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: #1d2f4c;
  -webkit-transition: color 0.5s linear;
  -moz-transition: color 0.5s linear;
  -o-transition: color 0.5s linear;
  transition: color 0.5s linear;
}

.header__contact-btn:focus-visible {
  outline: 2px solid #1a68c4;
  outline-offset: -1px;
}

@media (hover: hover) {
  .header__contact-btn:hover {
    color: #0f4194;
    -webkit-transition: color 0.1s linear;
    -moz-transition: color 0.1s linear;
    -o-transition: color 0.1s linear;
    transition: color 0.1s linear;
  }
}

.header__contact-btn:active {
  outline-color: rgba(13, 42, 91, 0.45);
}

.burger {
  padding: 0;
  position: relative;
  display: none;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  width: 32px;
  height: 21px;
  background-color: transparent;
  border: none;
}

.burger > span,
.burger > span::before,
.burger > span::after {
  position: absolute;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  height: 3px;
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  border-radius: 20px;
  background-color: #0d2a5b;
}
.burger > span::before {
  content: '';
  top: -8px;
}
.burger > span::after {
  content: '';
  top: 8px;
}

.burger:focus-visible {
  outline: 2px dashed #1a68c4;
  outline-offset: 5px;
}

@media (max-width: 1199px) {
  .header {
    padding-top: 0;
    margin-bottom: 0;
  }
  .header__wrapper {
    max-width: clamp(670px, 87.24vw, 1084px);
  }
  .header__logo img {
    max-width: clamp(52px, 6.771vw, 82px);
  }
  .header__nav {
    margin-right: 27px;
  }
  .header__menu {
    gap: 16px;
  }
  .header__menu-link {
    padding: 29px 0;
    font-size: clamp(9px, 1.042vw, 15px);
    font-weight: 700;
  }
  .header__contact-btn {
    padding: 6px 16px;
    max-width: clamp(78px, 10.156vw, 128px);
    height: clamp(23px, 2.995vw, 39px);
    font-size: clamp(8px, 1.042vw, 15px);
    font-weight: 700;
  }
}

@media (max-width: 639px) {
  .burger {
    display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  }

  .header__wrapper {
    padding: 24px 0;
    max-width: 330px;
    grid-template-columns: auto auto;
    gap: 16px;
  }

  .header__nav,
  .header__contact-btn {
    display: none;
  }

  .header.menu-open .header__nav,
  .header.menu-open .header__contact-btn {
    display: block;
  }

  .header {
    position: relative;
    z-index: 20;
    transition: none;
  }

  .header__logo img {
    max-width: 70px;
  }

  .header__nav {
    margin-right: 0;
  }

  .header.menu-open .header__nav {
    padding: 95px 0px 135px;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    background-image: -webkit-linear-gradient(
      180deg,
      rgba(77, 187, 255, 0.3) 0%,
      rgba(77, 187, 255, 0) 100%
    );
    background-image: -moz-linear-gradient(
      180deg,
      rgba(77, 187, 255, 0.3) 0%,
      rgba(77, 187, 255, 0) 100%
    );
    background-image: -o-linear-gradient(
      180deg,
      rgba(77, 187, 255, 0.3) 0%,
      rgba(77, 187, 255, 0) 100%
    );
    background-image: linear-gradient(
      180deg,
      rgba(77, 187, 255, 0.3) 0%,
      rgba(77, 187, 255, 0) 100%
    );
  }

  .header.sticky .header__nav {
    background: #fff;
  }

  .header.menu-open .header__menu {
    display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
    -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
    -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
    gap: 32px;
  }

  .header.menu-open .header__menu-link {
    padding: 0;
    font-size: 20px;
  }

  .header.menu-open .header__contact-btn {
    padding: 10px 25px;
    position: absolute;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    top: calc(
      100% + 95px + 188px + 52px
    ); /*высота header__wrapper + верхний отступ у nav + высота header__menu + Отступ от header__menu*/
    max-width: calc(100% - 40px);
    width: auto;
    height: 45px;
    font-size: 20px;
  }

  .burger > span,
  .burger > span::before,
  .burger > span::after {
    -webkit-transition: -webkit-transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
    -moz-transition: -moz-transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
    -o-transition: -o-transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
  }
  .header.menu-open .burger > span {
    background: transparent;
  }
  .header.menu-open .burger > span::before {
    top: 0;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
  }
  .header.menu-open .burger > span::after {
    top: 0;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
  }
}
