/* ══════════════════════════════════════════════
   Site header (shell + header + mega-menu)
   ══════════════════════════════════════════════ */

:root {
  --shadow-1: 0 2px 16px rgba(0, 0, 0, 0.06);
}

body.site-nav-open {
  overflow: hidden;
}

/* --- Shell: placement inside hero/cover section --- */

.site-header-shell {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
}

.site-header-shell__backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0.16) 62%,
    rgba(0, 0, 0, 0) 100%
  );
}

.site-header-shell__backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 56%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 56%, transparent 100%);
}

.site-header-section--nav-open {
  overflow: visible;
  z-index: 100;
}

.site-header-section--nav-open .site-header-shell__backdrop {
  opacity: 0;
  visibility: hidden;
}

.site-header-shell .site-header {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  pointer-events: auto;
}

/* --- Header bar --- */

.site-header {
  position: relative;
  z-index: 2;
  padding: 15px 0;
  background: transparent;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header__blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  backdrop-filter: blur(64px);
  -webkit-backdrop-filter: blur(64px);
  background: linear-gradient(
    180deg,
    rgba(0, 8, 20, 0.38) 0%,
    rgba(0, 8, 20, 0.16) 42%,
    rgba(0, 8, 20, 0) 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 18%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 18%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.site-header.site-header--mega-open {
  background: #fff;
  box-shadow: var(--shadow-1);
}

.site-header.site-header--mega-open .site-header__blur {
  opacity: 0;
  visibility: hidden;
}

.site-header.site-header--mega-open .header-link {
  color: #000;
}

.site-header.site-header--mega-open .header__menu-btn-chevron {
  color: #000;
}

.site-header.site-header--mega-open .header-how {
  color: #000;
}

.site-header.site-header--mega-open .header-btn--outline {
  border-color: #93683b;
  color: #000;
  background: transparent;
}

.site-header.site-header--mega-open .header-btn--outline:hover {
  border-color: #7a5631;
  color: #4a4f5e;
}

.site-header.site-header--mega-open .header-btn--solid {
  background: #93683b;
  color: #fff;
}

.site-header.site-header--mega-open .header-btn--solid:hover {
  background: #7a5631;
}

.site-header.site-header--mega-open .header-cart img {
  filter: brightness(0);
}

.site-header.site-header--mega-open .header-logo img {
  filter: brightness(0);
}

.site-header.site-header--mega-open .header-burger .hamburger-inner,
.site-header.site-header--mega-open .header-burger .hamburger-inner::before,
.site-header.site-header--mega-open .header-burger .hamburger-inner::after {
  background-color: #000;
}

.header-container {
  position: relative;
  z-index: 1;
  max-width: 1390px;
  margin: 0 auto;
  padding: 0 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 33px;
}

.header-logo img {
  height: 35px;
  width: 130px;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  color: #fff;
  font-family: "Onest", sans-serif;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.25s;
  user-select: none;
}

.header-link:hover,
.header-link:hover .header__menu-btn-chevron {
  color: #fb0953;
}

.header__menu-btn-chevron {
  display: block;
  flex-shrink: 0;
  color: #fff;
}

@media (min-width: 1160px) {
  .header__menu-btn-chevron {
    transition: transform 0.25s, color 0.25s;
  }

  .header__menu-btn-chevron.open {
    transform: rotate(-180deg);
  }
}

@media (max-width: 1260px) {
  .header-link {
    font-size: 14px;
    line-height: 1.36;
  }
}

@media (max-width: 1159px) {
  .header-link {
    display: none;
  }

  .header-logo img {
    margin-bottom: 0;
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-how {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-family: "Onest", sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.header-how-icon {
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.header-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 9999px;
  font-family: "Onest", sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.header-btn--outline {
  border: 1px solid #fff;
  color: #fff;
  background: transparent;
}

.header-btn--outline:hover {
  border-color: #bec7d2;
  color: #bec7d2;
  background: transparent;
}

.header-btn--solid {
  background: #fff;
  color: #000;
}

.header-btn--solid:hover {
  background: #bec7d2;
}

.header-cart {
  position: relative;
  display: flex;
}

.header-cart img {
  width: 28px;
  height: 28px;
}

.header-cart__badge {
  position: absolute;
  top: -7px;
  left: 20px;
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ff2b2b;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-cart__badge[hidden] {
  display: none !important;
}

.header-mobile {
  display: none;
}

.header-burger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1159px) {
  .header-burger {
    display: flex;
  }
}

.header-burger .hamburger {
  display: flex;
  cursor: pointer;
  transition-property: opacity, filter;
  transition-duration: 0.15s;
  transition-timing-function: linear;
  font: inherit;
  color: inherit;
  text-transform: none;
  background-color: transparent;
  border: 0;
  margin: 0;
  overflow: visible;
}

.header-burger .hamburger-box {
  width: 30px;
  height: 30px;
  display: inline-block;
  position: relative;
}

.header-burger .hamburger-inner {
  display: block;
  bottom: 6px;
  width: 70%;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  position: absolute;
  transform-origin: center;
  transition:
    0.13s 0.13s cubic-bezier(0.55, 0.055, 0.675, 0.19),
    background-color 0.25s;
}

.header-burger .hamburger-inner::before,
.header-burger .hamburger-inner::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  transform-origin: center;
  background-color: #fff;
  border-radius: 2px;
  position: absolute;
}

.header-burger .hamburger-inner::before {
  top: -8px;
  transition:
    top 0.12s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1),
    transform 0.13s cubic-bezier(0.55, 0.055, 0.675, 0.19),
    background-color 0.25s;
}

.header-burger .hamburger-inner::after {
  top: -16px;
  transition:
    top 0.2s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1),
    opacity 0.1s linear,
    background-color 0.25s;
}

.header-burger .hamburger.is-active .hamburger-inner {
  width: 30px;
  bottom: 50%;
  transform: rotate(-45deg);
  transition:
    0.13s 0.22s cubic-bezier(0.215, 0.61, 0.355, 1),
    background-color 0.25s;
}

.header-burger .hamburger.is-active .hamburger-inner::after {
  top: 0;
  opacity: 0;
  transition:
    top 0.2s cubic-bezier(0.33333, 0, 0.66667, 0.33333),
    opacity 0.1s 0.22s linear,
    background-color 0.25s;
}

.header-burger .hamburger.is-active .hamburger-inner::before {
  top: 0;
  transform: rotate(-90deg);
  transition:
    top 0.1s 0.16s cubic-bezier(0.33333, 0, 0.66667, 0.33333),
    transform 0.13s 0.25s cubic-bezier(0.215, 0.61, 0.355, 1),
    background-color 0.25s;
}

.header-burger:hover .hamburger-inner,
.header-burger:hover .hamburger-inner::before,
.header-burger:hover .hamburger-inner::after {
  background-color: #fb0953;
}

.header-account {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-account img {
  width: 35px;
  height: 35px;
}

.header-account__img--open {
  display: none;
}

@media (max-width: 1159px) {
  .site-header.site-header--mega-open .header-account__img--default {
    display: none;
  }

  .site-header.site-header--mega-open .header-account__img--open {
    display: block;
  }
}

@media (max-width: 1159px) {
  .header-desktop {
    display: none;
  }

  .header-mobile {
    display: flex;
    padding: 0 20px;
  }

  .header-mobile .header-left {
    gap: 30px;
  }

  .header-mobile .header-right {
    gap: 13px;
  }
}

/* ══════════════════════════════════════════════
   Mega menu (genotek.ru header__menu), document flow — не fixed
   ══════════════════════════════════════════════ */

.header__menu {
  display: block;
  width: 100%;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  overflow-y: auto;
  position: absolute;
  z-index: 2;
  top: 100%;
  left: 0;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 54px 54px rgba(0, 0, 0, 0.1);
  transition: 0.1s;
}

.header__menu.open {
  opacity: 1;
  visibility: visible;
  max-height: 700px;
}

@media (max-height: 800px) {
  .header__menu.open {
    max-height: calc(100vh - 97px);
  }
}

@media (max-height: 800px) and (max-width: 1159px) {
  .header__menu.open {
    max-height: calc(100vh - 84px);
  }
}

.header__menu-container {
  display: block;
  width: 100%;
  max-width: 1390px;
  margin: auto;
  padding: 50px 45px;
}

@media (max-width: 1024px) {
  .header__menu-container {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .header__menu-container {
    padding-right: 30px;
    padding-left: 30px;
  }
}

@media (max-width: 430px) {
  .header__menu-container {
    padding-right: 20px;
    padding-left: 20px;
  }
}

.header__menu-row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

@media (max-width: 576px) {
  .header__menu-row {
    margin: 0;
    width: 100%;
    flex-direction: column;
    row-gap: 20px;
  }
}

.header__menu-column {
  flex: 1 0 0;
  display: inline-block;
  order: 0;
}

.header__menu-column:first-child {
  order: 1;
}

.header__menu-column:nth-child(4) {
  order: 4;
}

.header__menu-column--analyses {
  order: 2;
}

@media (max-width: 576px) {
  .header__menu-column--analyses {
    order: 3;
  }
}

.header__menu-column--genealogy {
  order: 3;
}

@media (max-width: 576px) {
  .header__menu-column--genealogy {
    order: 2;
  }
}

@media (max-width: 992px) {
  .header__menu-column {
    flex-basis: calc(50% - 60px);
  }
}

@media (max-width: 576px) {
  .header__menu-column {
    flex-basis: 100%;
    display: block;
  }
}

.header__menu-title {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

.header__menu-title--label-new {
  position: relative;
  display: block;
}

@media (max-width: 1400px) {
  .header__menu-title--label-new {
    max-width: 230px;
  }
}

@media (max-width: 992px) {
  .header__menu-title--label-new {
    max-width: 100%;
  }
}

@media (max-width: 770px) {
  .header__menu-title--label-new {
    max-width: 230px;
  }
}

@media (max-width: 576px) {
  .header__menu-title--label-new {
    max-width: 100%;
    white-space: nowrap;
  }
}

.header__menu-title--label-new a {
  letter-spacing: -0.3px;
  margin-right: 1px;
}

.header__menu-title--label-popular {
    display: flex;
    align-items: flex-start;
    column-gap: 8px;
}

@media (max-width: 1400px) {
    .header__menu-title--label-popular {
        max-width: 220px;
    }
}

@media (max-width: 992px) {
    .header__menu-title--label-popular {
        max-width: 100%;
    }
}

@media (max-width: 770px) {
    .header__menu-title--label-popular {
        max-width: 230px;
    }
}

@media (max-width: 576px) {
    .header__menu-title--label-popular {
        max-width: 100%;
    }
}

.header__menu-title a {
  color: #262626;
  font-size: 18px;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: solid 1px rgba(138, 124, 93, 0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.header__menu-title a:hover {
  color: #e20c4a;
  border-bottom-color: rgba(206, 15, 86, 0.29);
}

.header__menu-title-label-new {
  display: inline;
  padding: 4px 9px;
  border-radius: 8px;
  background: linear-gradient(95deg, #ff53b4, #ff6713);
  font-size: 14px;
  line-height: 1.43;
  color: #fff;
  letter-spacing: -0.2px;
  vertical-align: middle;
}

.header__menu-nav {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
}

.header__menu-nav li {
  margin-bottom: 5px;
  margin-top: 0;
  vertical-align: top;
  list-style-type: none;
  font-size: 14px;
  color: #8a7c5d;
}

.header__menu-nav li::before {
  content: none;
}

.header__menu-nav li a {
  font-size: 14px;
  color: #bd995b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.header__menu-nav li a:hover {
  color: #e20c4a;
}

.header__menu-nav li.active {
  font-weight: 600;
}

.header__menu-nav + .header__menu-title {
  margin-top: 30px;
}

.header__menu-demo-block-m {
  display: none;
}

@media (max-width: 1159px) {
  .header__menu-demo-block-m {
    display: block;
  }
}

@media (max-width: 576px) {
  .header__menu-demo-block-m {
    padding-top: 20px;
  }
}

.header__menu-demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 22px;
  background: transparent;
  transition: all 0.3s ease-in-out;
  border: 1px solid #8a7c5d;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.56;
  color: #8a7c5d;
  outline: 0;
  margin: 5px 0 10px;
  padding: 0 20px;
  white-space: nowrap;
  position: relative;
  text-decoration: none;
}

.header__menu-demo-btn:hover {
  background: #e20c4a;
  color: #fff;
  border-color: #e20c4a;
}

.header__menu-demo-btn:active {
  background: #ca0b42;
  border-color: #ca0b42;
}
