header {
  position: sticky;
  top: 12px;
  z-index: 10;
}

.header {
  margin: 12px 20px;
  border-radius: 16px;
  background: #153163;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  gap: 24px;
  height: 54px;
}

.header__logo {
  font-weight: 900;
  color: var(--color-white);
  text-decoration: none;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.04em;
}

.header__logo-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex: none;
}

.header__nav {
  display: flex;
  gap: 18px;
}

.header__link {
  font-size: 13px;
  color: var(--color-white);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.header__link {
  position: relative;
  padding: 4px 0;
}

.header__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 1px;
  background: #7195db;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.header__link:hover {
  opacity: 0.7;
}

.header__link--active {
  font-weight: 700;
}

.header__link--active::after {
  transform: scaleX(1);
}

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.header__burger span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
}

.header__burger--open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header__burger--open span:nth-child(2) {
  opacity: 0;
}

.header__burger--open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.header .button {
  padding: 7px 16px;
  border-color: var(--color-white);
  font-size: 13px;
  background: var(--color-white);
  color: #153163;
}

@media (max-width: 1000px) {
  .header__inner {
    position: relative;
  }

  .header__burger {
    display: flex;
  }

  .header__nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
    border-radius: 16px;
    background: #153163;
    box-shadow: 0 12px 28px rgba(21, 49, 99, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0s linear 0.25s;
  }

  .header__nav--open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0s;
  }

  .header__link {
    padding: 10px 0;
    font-size: 15px;
  }

  .header__link::after {
    bottom: 4px;
  }
}

@media (max-width: 600px) {
  .header {
    margin: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(90deg, #1b2d6e, #2c4a85);
  }

  .header__inner {
    height: 56px;
    padding: 0 16px 0 19px;
  }

  .header__logo {
    font-size: 18px;
    gap: 8px;
  }

  .header__logo-mark {
    width: 26px;
    height: 26px;
  }

  .header .button {
    display: none;
  }

  .header__burger {
    gap: 5.5px;
    width: 22px;
    height: 24px;
    padding: 0;
    border-radius: 0;
    background: none;
  }

  .header__burger span {
    height: 2.4px;
  }

  .header__burger--open span:nth-child(1) {
    transform: translateY(7.9px) rotate(45deg);
  }

  .header__burger--open span:nth-child(3) {
    transform: translateY(-7.9px) rotate(-45deg);
  }

  .header__nav {
    background: #1f3a78;
  }
}
