/* Header bar. Labels stay on one line. Narrow screens open a menu card. */

body .header > .container {
  max-width: 1780px;
  width: 100%;
}

.header__wrapper {
  align-items: center;
  background: rgba(32, 20, 16, 0.94);
  border: 1px solid rgba(255, 253, 251, 0.16);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(21, 12, 10, 0.18);
  gap: 12px;
  padding: 6px 8px 6px 18px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header__logo {
  color: #fffdfb;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.header__buttons {
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  position: relative;
  z-index: 6;
}

.header__logo {
  position: relative;
  z-index: 6;
}

.header .signin-btn.btn_header_light {
  background: #fffdfb;
  border-radius: 12px;
  color: #3b2925;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  padding: 12px 16px;
  white-space: nowrap;
}

.header .signin-btn.btn_header_light:hover {
  background: #fae3b1;
  color: #3b2925;
}

.header .acount-btn.btn_header_dark {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 253, 251, 0.32);
  border-radius: 12px;
  box-shadow: none;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.header .acount-btn.btn_header_dark:hover {
  background: rgba(255, 253, 251, 0.12);
  border-color: rgba(255, 253, 251, 0.7);
}

@media (min-width: 1320px) {
  .header__nav {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
  }

  .header__links {
    align-items: center;
    gap: 2px;
    justify-content: center;
    margin: 0;
    padding: 0;
  }

  .header__link {
    border-radius: 999px;
    color: rgba(255, 253, 251, 0.92);
    font-size: 14px;
    font-weight: 550;
    line-height: 1;
    padding: 8px 10px;
    text-decoration: none;
    white-space: nowrap;
  }

  .header__link:hover {
    background: rgba(255, 253, 251, 0.1);
    color: #fffdfb;
  }
}

@media (max-width: 1319px) {
  .header {
    z-index: 30;
  }

  .header__wrapper {
    position: relative;
  }

  .header .burger-btn,
  .header .burger-btn.active {
    align-items: center;
    background: transparent;
    background-image: none;
    border: 1px solid rgba(255, 253, 251, 0.32);
    border-radius: 12px;
    box-shadow: none;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    max-width: 42px;
    padding: 0;
    position: relative;
    width: 42px;
  }

  .header .burger-btn::before,
  .header .burger-btn::after {
    background: #fffdfb;
    border-radius: 1px;
    content: "";
    height: 2px;
    position: absolute;
    width: 16px;
  }

  .header .burger-btn::before {
    box-shadow: 0 -6px 0 #fffdfb, 0 6px 0 #fffdfb;
  }

  .header .burger-btn.active::before,
  .header .burger-btn.active::after {
    box-shadow: none;
  }

  .header .burger-btn.active::before {
    transform: rotate(45deg);
  }

  .header .burger-btn.active::after {
    transform: rotate(-45deg);
  }

  .header .burger-btn:hover {
    background: rgba(255, 253, 251, 0.12);
    border-color: rgba(255, 253, 251, 0.7);
  }

  .header .signin-btn.btn_header_light {
    display: inline-flex !important;
    font-size: 13px;
    padding: 10px 12px;
  }

  .header__nav,
  .header__nav.active {
    background: #201410;
    background-color: #201410;
    border: 1px solid rgba(255, 253, 251, 0.16);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(21, 12, 10, 0.28);
    height: auto;
    left: auto;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(360px, 100%);
    z-index: 7;
  }

  .header__nav {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: hidden;
  }

  .header__nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .header__links {
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
  }

  .header__link {
    border-radius: 12px;
    color: #fffdfb;
    display: flex;
    font-size: 16px;
    font-weight: 550;
    line-height: 1.2;
    min-height: 44px;
    padding: 10px 14px;
    text-decoration: none;
  }

  .header__link:hover {
    background: rgba(255, 253, 251, 0.1);
    color: #fffdfb;
  }
}
