.ym-header {
  position: absolute;
  z-index: 80;
  top: 0;
  left: 0;
  width: 100%;
  color: var(--ym-color-text);
}

.ym-header__inner {
  width: min(100%, 1920px);
  margin: 0 auto;
  padding: 40px 108px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ym-header__left,
.ym-header__right {
  display: flex;
  align-items: center;
}

.ym-header__left {
  gap: 28px;
}

.ym-header__right {
  gap: 20px;
}

.ym-header__logo {
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
  color: var(--ym-color-black);
  text-decoration: none;
  letter-spacing: -0.04em;
}

.ym-header__socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ym-header__social {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity var(--ym-transition), transform var(--ym-transition);
}

.ym-header__social img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ym-header__social:hover {
  opacity: 0.68;
  transform: translateY(-1px);
}

.ym-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ym-header__button {
  min-height: 46px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ym-color-blue);
  border: 1px solid var(--ym-color-blue);
  color: var(--ym-color-white);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ym-transition), color var(--ym-transition), border-color var(--ym-transition), transform var(--ym-transition);
}

.ym-header__button img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter var(--ym-transition);
}

.ym-header__button:hover {
  background: transparent;
  color: var(--ym-color-blue);
  transform: translateY(-1px);
}

.ym-header__button:hover img {
  filter: none;
}

.ym-lang {
  position: relative;
  flex: 0 0 auto;
}

.ym-lang__button {
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ym-color-black);
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
}

.ym-lang__error {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d9dde3;
  color: #626a75;
  font-size: 8px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ym-lang__code {
  display: inline-block;
}

.ym-lang__flag {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 50%;
  object-fit: cover;
}

.ym-lang__chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
  transition: transform var(--ym-transition);
}

.ym-lang.is-open .ym-lang__chevron {
  transform: rotate(180deg);
}

.ym-lang__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  min-width: 176px;
  padding: 10px 8px;
  background: var(--ym-color-white);
  border: 1px solid var(--ym-color-border);
  box-shadow: 0 18px 40px rgba(16, 35, 63, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--ym-transition), visibility var(--ym-transition), transform var(--ym-transition);
}

.ym-lang.is-open .ym-lang__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ym-lang__item {
  min-height: 38px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ym-color-text);
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
  transition: background var(--ym-transition);
}

.ym-lang__item:hover {
  background: rgba(24, 51, 95, 0.08);
}

.ym-lang__item .ym-lang__flag,
.ym-lang__item .ym-lang__error {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.ym-lang__item .ym-lang__flag {
  border-radius: 50%;
  object-fit: cover;
}

.ym-lang__item .ym-lang__error {
  font-size: 6px;
}

.ym-header__burger {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.ym-header__burger span {
  width: 100%;
  height: 2px;
  display: block;
  background: var(--ym-color-black);
}

.ym-menu {
  position: fixed;
  z-index: 200;
  inset: 0;
  pointer-events: none;
}

.ym-menu.is-open {
  pointer-events: auto;
}

.ym-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 34, 0.18);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ym-menu.is-open .ym-menu__overlay {
  opacity: 1;
}

.ym-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 560px);
  height: 100%;
  padding: 42px 48px;
  background: var(--ym-color-blue-dark);
  color: var(--ym-color-white);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
}

.ym-menu.is-open .ym-menu__panel {
  transform: translateX(0);
}

.ym-menu__close {
  position: relative;
  width: 38px;
  height: 38px;
  margin-left: auto;
  margin-bottom: 34px;
  padding: 0;
  display: block;
  border: 0;
  background: transparent;
}

.ym-menu__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 2px;
  background: var(--ym-color-white);
  transform-origin: center;
}

.ym-menu__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ym-menu__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ym-menu__nav {
  display: flex;
  flex-direction: column;
}

.ym-menu__nav a {
  min-height: 64px;
  padding: 18px 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ym-color-menu-line);
  color: var(--ym-color-white);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: opacity var(--ym-transition), padding-left var(--ym-transition);
}

.ym-menu__nav a:hover {
  opacity: 0.72;
  padding-left: 8px;
}

.ym-menu__actions {
  display: none;
  margin-top: 34px;
  gap: 12px;
}

.ym-menu__button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ym-color-white);
  border: 1px solid var(--ym-color-white);
  color: var(--ym-color-blue-dark);
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}

.ym-menu__button--outline {
  background: transparent;
  color: var(--ym-color-white);
}

@media (max-width: 1800px) {
  .ym-header__inner {
    padding: 36px 96px 0;
  }

  .ym-header__logo {
    font-size: 27px;
  }

  .ym-header__button {
    min-height: 45px;
    padding: 0 23px;
    font-size: 13.5px;
  }

  .ym-header__burger {
    width: 39px;
    height: 29px;
  }
}

@media (max-width: 1650px) {
  .ym-header__inner {
    padding: 34px 84px 0;
  }

  .ym-header__left {
    gap: 26px;
  }

  .ym-header__right {
    gap: 18px;
  }

  .ym-header__logo {
    font-size: 26px;
  }

  .ym-header__button {
    min-height: 43px;
    padding: 0 22px;
    font-size: 13px;
  }

  .ym-header__button img {
    width: 13px;
    height: 13px;
  }

  .ym-header__burger {
    width: 38px;
    height: 28px;
  }
}

@media (max-width: 1450px) {
  .ym-header__inner {
    padding: 30px 72px 0;
  }

  .ym-header__left {
    gap: 24px;
  }

  .ym-header__right {
    gap: 17px;
  }

  .ym-header__logo {
    font-size: 24px;
  }

  .ym-header__socials {
    gap: 12px;
  }

  .ym-header__social {
    width: 23px;
    height: 23px;
  }

  .ym-header__actions {
    gap: 12px;
  }

  .ym-header__button {
    min-height: 40px;
    padding: 0 19px;
    font-size: 12px;
  }

  .ym-header__button img {
    width: 12px;
    height: 12px;
  }

  .ym-lang__button {
    font-size: 13px;
  }

  .ym-lang__error {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    font-size: 7px;
  }

  .ym-header__burger {
    width: 36px;
    height: 26px;
  }
}

@media (max-width: 1280px) {
  .ym-header__inner {
    padding: 28px 64px 0;
  }

  .ym-header__left {
    gap: 22px;
  }

  .ym-header__right {
    gap: 15px;
  }

  .ym-header__actions {
    gap: 10px;
  }

  .ym-header__button {
    min-height: 38px;
    padding: 0 16px;
    font-size: 11px;
  }

  .ym-header__button img {
    width: 11px;
    height: 11px;
  }

  .ym-lang__button {
    font-size: 12px;
  }

  .ym-lang__error {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
  }

  .ym-header__burger {
    width: 34px;
    height: 25px;
  }
}

@media (max-width: 1100px) {
  .ym-header__inner {
    padding: 26px 52px 0;
  }

  .ym-header__left {
    gap: 20px;
  }

  .ym-header__right {
    gap: 14px;
  }

  .ym-header__logo {
    font-size: 23px;
  }

  .ym-header__socials {
    gap: 10px;
  }

  .ym-header__social {
    width: 15px;
    height: 15px;
  }

  .ym-header__button {
    min-height: 36px;
    padding: 0 14px;
    font-size: 10px;
  }

  .ym-header__button img {
    width: 10px;
    height: 10px;
  }

  .ym-header__burger {
    width: 32px;
    height: 24px;
  }
}

@media (max-width: 900px) {
  .ym-header__inner {
    padding: 24px 38px 0;
  }

  .ym-header__left {
    gap: 18px;
  }

  .ym-header__logo {
    font-size: 22px;
  }

  .ym-header__socials {
    gap: 10px;
  }

  .ym-header__social {
    width: 14px;
    height: 14px;
  }

  .ym-header__right {
    gap: 12px;
  }

  .ym-header__actions {
    gap: 9px;
  }

  .ym-header__button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 9.5px;
  }

  .ym-header__button img {
    width: 10px;
    height: 10px;
  }

  .ym-lang__button {
    font-size: 12px;
    gap: 5px;
  }

  .ym-lang__error {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .ym-lang__chevron {
    width: 9px;
    height: 9px;
  }

  .ym-header__burger {
    width: 32px;
    height: 23px;
  }

  .ym-menu__panel {
    width: min(100%, 480px);
    padding: 36px 38px;
  }

  .ym-menu__nav a {
    min-height: 58px;
    font-size: 22px;
  }
}

@media (max-width: 767px) {
  .ym-header__inner {
    padding: 18px 22px 0;
    gap: 12px;
  }

  .ym-header__left {
    display: none;
  }

  .ym-header__right {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 12px;
  }

  .ym-header__burger {
    order: 1;
    width: 36px;
    height: 26px;
  }

  .ym-lang {
    order: 2;
    justify-self: start;
  }

  .ym-lang__button {
    font-size: 13px;
    gap: 5px;
  }

  .ym-lang__error {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
  }

  .ym-lang__chevron {
    width: 10px;
    height: 10px;
  }

  .ym-lang__dropdown {
    left: 0;
    right: auto;
  }

  .ym-header__actions {
    order: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .ym-header__button {
    width: 144px;
    min-height: 40px;
    padding: 0 10px;
    justify-content: space-between;
    font-size: 12px;
    line-height: 1.1;
  }

  .ym-header__button span {
    max-width: 94px;
    white-space: normal;
    text-align: left;
  }

  .ym-header__button:nth-child(2) {
    width: 144px;
  }

  .ym-header__button img {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
  }

  .ym-menu__panel {
    width: min(100%, 402px);
    padding: 28px 28px 32px;
  }

  .ym-menu__close {
    margin-left: 0;
    margin-bottom: 30px;
  }

  .ym-menu__nav a {
    min-height: 54px;
    padding: 15px 0;
    font-size: 18px;
  }

  .ym-menu__actions {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .ym-header__inner {
    padding: 18px 20px 0;
  }

  .ym-header__right {
    gap: 10px;
  }

  .ym-header__button {
    width: 135px;
    min-height: 37px;
    padding: 0 10px;
    font-size: 12px;
  }

  .ym-header__button span {
    max-width: 90px;
  }

  .ym-header__button:nth-child(2) {
    width: 135px;
  }

  .ym-header__burger {
    width: 25px;
    height: 19px;
  }

  .ym-menu__panel {
    width: 100%;
    padding: 26px 31px 30px;
  }

  .ym-menu__close {
    width: 32px;
    height: 32px;
    margin-bottom: 25px;
  }

  .ym-menu__close span {
    width: 31px;
  }

  .ym-menu__nav a {
    min-height: 54px;
    font-size: 18px;
  }
}

@media (max-width: 390px) {
    .ym-header__burger {
        width: 20px;
        height: 15px;
    }

  .ym-header__inner {
    padding: 16px 18px 0;
  }

  .ym-header__right {
    gap: 8px;
  }

  .ym-header__button {
        width: 100px;
        min-height: 36px;
        font-size: 8px;
  }

  .ym-header__button span {
    max-width: 84px;
  }

  .ym-header__button:nth-child(2) {
    width: 100px;
  }

  .ym-lang__code {
    display: none;
  }

  .ym-menu__panel {
    padding-left: 24px;
    padding-right: 24px;
  }

  .ym-menu__nav a {
    font-size: 17px;
  }
}
