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

.lang-switch {
  position: relative;
}

.lang-switch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #593ec3;
  font: 700 15px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}

.lang-switch-btn::-webkit-details-marker {
  display: none;
}

.lang-switch-btn::marker {
  content: "";
}

.lang-switch-btn:focus-visible {
  outline: 2px solid #693f44;
  outline-offset: 2px;
}

.lang-chevron path {
  stroke: currentColor;
}

.lang-flag {
  display: block;
  width: 22px;
  height: 15px;
  flex: 0 0 auto;
}

.lang-flag svg {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  overflow: hidden;
}

.lang-chevron {
  display: block;
  transition: transform 0.2s ease;
}

.lang-switch[open] .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: 100%;
  left: -12px;
  right: auto;
  z-index: 30;
  box-sizing: border-box;
  width: calc(100% + 12px);
  min-width: calc(100% + 12px);
  max-height: calc(100vh - 96px);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 6px 0 0;
  padding: 6px 0 6px 12px;
  list-style: none;
  background: #f6e8eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(105, 63, 68, 0.16);
  color: #593ec3;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #593ec3;
  font: 700 15px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.04em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

a.lang-option:hover,
a.lang-option:focus-visible {
  color: #c02039;
}

.lang-option[aria-current="page"] {
  cursor: default;
}

@media (min-width: 768px) {
  .menu-container {
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  .burger-wrapper {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-tools,
  .burger-menu-content {
    transform: translateY(-14px);
  }

  .header-container .list {
    margin: 0;
  }

  .header-tools {
    order: 2;
  }
}

@media (max-width: 767px) {
  .header-wrapper {
    display: flex;
    align-items: flex-start;
    height: 152px;
  }

  .header-container {
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    padding: 0 16px 0 14px;
  }

  .page-title-container {
    padding-top: 130px;
  }

  .logo a img,
  .logo img {
    max-width: 118px;
  }

  .menu-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    height: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .header-tools {
    gap: 8px;
  }

  .header-container .ref-buttons [role="button"][aria-label="mmb4gdf3cl"] {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .lang-switch-btn {
    gap: 6px;
    font-size: 15px;
  }

  .burger-menu,
  .burger-menu.active {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    width: 86px;
    height: 43px;
    margin: 0;
    padding: 12px 0 0;
    border-radius: 86px 86px 0 0;
    background: #ee5ba2;
    box-shadow: none;
    transform: translateX(-50%);
  }

  .burger-menu span {
    width: 22px;
    background: #fff;
  }

  .burger-wrapper.active {
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    justify-content: stretch;
  }

  .burger-menu-content,
  .burger-menu-content.active {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 360px) {
  .logo a img,
  .logo img {
    max-width: 72px;
  }

  .header-container .ref-buttons [role="button"][aria-label="mmb4gdf3cl"] {
    padding: 8px 10px;
    font-size: 11px;
  }

  .lang-switch-btn {
    font-size: 13px;
  }
}
