/* ===== HEADER ===== */
.site_header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  height: 70px;

  background: rgba(255,255,255,.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  /* обычное состояние */
  border-bottom: 1px solid #e3e3e3;
  border-radius: 0;

  transition:
    transform .35s cubic-bezier(.2,.8,.2,1),
    background .25s ease,
    box-shadow .25s ease,
    border-radius .25s ease,
    opacity .25s ease;

  transform-origin: top center;

  z-index: 1000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.site_header + .header-dropdown {
  top: 70px;
}


/* ===== CONTAINER ===== */
.header_container {
  width: calc(100% - 24px);
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;

  display: flex;
  align-items: center;
  gap: 40px;
}

.header_left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* ===== LOGO ===== */
.logo img {
  width: 140px;
  height: 60px;
  object-fit: contain;
}

/* ===== SWITCH VERSION BUTTON ===== */
.switch-version-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #444 !important;
  text-transform: math-auto;

  background: rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 14px;

  cursor: pointer;
  white-space: nowrap;

  transition:
    background .25s ease,
    color .25s ease,
    border-color .25s ease,
    opacity .25s ease,
    transform .2s ease;
}

.switch-version-btn:hover {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.3);
  color: #000;
  transform: translateY(-1px);
}

.switch-version-btn:active {
  transform: translateY(0);
  opacity: .85;
}

/* ===== NAV ===== */
.header_nav {
  display: flex;
  gap: 28px;
  transition:
  margin-left .3s cubic-bezier(.2,.8,.2,1);
}

@media (max-width: 1200px) {
  .header_nav {
    gap: 18px;
  }
}

.nav-item {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  cursor: pointer;
  position: relative;
  padding: 8px 14px;
  border-radius: 12px;
  transition:
    background .25s ease,
    color .25s ease;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #00a943;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width .25s ease;
}

.nav-item:hover {
  background: rgba(0,0,0,.05);
}

.nav-item.active::after,
.nav-item:hover::after {
  width: 24px;
}

/* ===== SPACER ===== */
.header_spacer {
  flex: 1;
}

/* ===== ACTIONS ===== */
.header_actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.phone {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  font-size: 18pt !important;
  font-family: Roboto;
  font-weight: 500;

  opacity: .75;
  transition: opacity .2s ease;
}

.phone:hover {
  opacity: 1;
}

.cabinet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 16px;

  font-size: 14px;
  font-weight: 500;
  color: #111;
  text-decoration: none;

  background: rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;

  transition:
    background .25s ease,
    box-shadow .25s ease,
    transform .2s ease,
    color .2s ease;
}

.cabinet-btn:hover {
  background: rgba(0,169,67,.12);
  border-color: rgba(0,169,67,.35);
  color: #00a943;

  transform: translateY(-1px);
}

.cabinet-btn:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,.12);
}


.burger_mobile {
  display: none;
}

/* ===== состояние COMPACT ===== */
.site_header--compact {
  transform: translateX(-50%) translateY(20px);

  width: calc(100% - 24px);
  max-width: 1400px;

  background: rgba(255,255,255,.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid #e3e3e3;
  border-radius: 22px 22px 0 0;
}

.site_header--compact + .header-dropdown {
  top: 90px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid #e3e3e3;
  border-radius: 0 0 22px 22px;
  border-top-width: 0px;
  box-shadow: 0 30px 60px rgba(0,0,0,.18);
}

.site_header:not(.site_header--compact) + .header-dropdown {
  top: 70px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}

.site_header--compact .switch-version-btn {
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;

  width: 0;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  border-width: 0;
}

/* контейнер */
.site_header--compact .header_container {
  height: 70px;
}

/* NAV растягивается */
.site_header--compact .header_nav {
  flex: 1;
  margin-left: -12px;
}

/* скрываем лишнее */
.site_header--compact .snow-switch {
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}

/* ЛК уезжает вправо */
.site_header--compact .cabinet-btn {
  margin-left: auto;
}

.site_header--compact.dropdown-open {
  border-radius: 22px 22px 0 0;
  background: rgba(255,255,255,.85);
}

.site_header--compact.dropdown-open + .header-dropdown {
  background: rgba(255,255,255,.7);
}

.site_header--compact:not(.dropdown-open) {
  box-shadow: 0 20px 50px rgba(0,0,0,.12);
  border-radius: 22px;
}


/* ===== BODY OFFSET ===== */
body {
  padding-top: 70px;
}


/* ===== dropdown-контейнер ===== */
.header-dropdown {
  position: fixed;
  left: 50%;
  transform:translateX(-50%)
    translateY(-6px)
    scale(.98);

  width: calc(100% - 24px);
  max-width: 1400px;

  opacity: 0;
  pointer-events: none;

  background: rgba(255,255,255,.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 0 0 18px 18px;
  border: none;

  transition:
    opacity .25s ease,
    transform .25s cubic-bezier(.2,.8,.2,1),
    backdrop-filter .25s ease;

  z-index: 900;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.header-dropdown.active {
  opacity: 1;
  pointer-events: auto;
  transform:
    translateX(-50%)
    translateY(0)
    scale(1);
}

/* ===== INNER ===== */
.header-dropdown__inner {
  width: calc(100% - 24px);
  max-width: 1400px;

  margin: 0 auto;
  padding: 20px 32px;

  display: flex;
  gap: 40px;
}

@media (max-width: 1200px) {
  .header-dropdown__inner {
    gap: 24px;
  }

  .dropdown-panel {
    gap: 16px 24px;
  }
}

/* ===== PANELS ===== */
.dropdown-panel {
  display: none;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.dropdown-panel.active {
  display: flex;
}

/* ===== LINKS ===== */
.dropdown-panel a {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  white-space: nowrap;

  padding: 6px 10px;
  border-radius: 10px;
  transition: background .2s ease;
}

.dropdown-panel a:hover {
  color: #00a943;
  background: rgba(0,0,0,.05);
}


@media (max-width: 1350px) {
  .header_container {
    gap: 25px;
  }

  .nav-item {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 10px;
  }

  .header_actions {
    gap: 16px;
  }

  .phone {
    font-size: 15pt !important;
  }

  .cabinet-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 12px;
  }

  .dropdown-panel.active {
    gap: 16px 36px;
  }

  .dropdown-panel a {
    font-size: 13px;
  }

  .snow-switch {
    font-size: 13px;
  }

  .switch-version-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}


/* ===== MOBILE ===== */
.mobile-menu {
  display: none;
}


@media (max-width: 1100px) {

  /* header фиксированный */
  .site_header {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;

    transform: none !important;

    background: rgba(255,255,255,.75);
    backdrop-filter: blur(12px);

    border: 1px solid #e3e3e3;
    border-radius: 22px;

    box-shadow: 0 20px 50px rgba(0,0,0,.12);
    z-index: 1000;
  }

  .site_header.mobile-menu-open {
    border-radius: 22px 22px 0 0;
    box-shadow: none;
  }
  
  /* скрываем desktop */
  .header_nav,
  .header_actions,
  .switch-version-btn {
    display: none !important;
  }

  .header-dropdown {
    pointer-events: none;
    opacity: 0;
  }


  /* ===== MOBILE MENU ===== */
  .mobile-menu {
    display: flex;
    position: fixed;
    top: calc(12px + 70px);
    left: 12px;
    right: 12px;
    bottom: 18px;

    background: rgba(255,255,255,.75);
    backdrop-filter: blur(12px);

    border-radius: 0 0 22px 22px;
    border-top: none;
    border: 1px solid #e3e3e3;
    

    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;

    transition:
      opacity .25s ease,
      transform .25s ease;

    z-index: 900;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
  }

  .mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    border-top-width: 0px;
  }

  /* ===== INNER LAYOUT ===== */
  .mobile-menu__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 20px;
    gap: 20px;
    width: 100%;
  }

  /* скроллим ТОЛЬКО контент */
  .mobile-menu__content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* снег ВСЕГДА ВНИЗУ */
  .mobile-snow {
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,.08);
    opacity: .8;
  }

  /* бургер */
  .burger_mobile {
    display: flex;
    margin-left: auto;
    width: 28px;
    height: 20px;
    padding: 0;
    background: none;
    border: none;

    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    -webkit-appearance: none; /* Safari / iOS */
    appearance: none;  
    position: relative;
    z-index: 10;
  }

  .burger_mobile span {
    display: block;
    width: 100%;
    height: 2px;
    background: #000;

    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
    will-change: transform, opacity;
  }

  .burger_mobile.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .burger_mobile.active span:nth-child(2) {
    opacity: 0;
  }
  .burger_mobile.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .mobile-tab-content {
    display: none;
    flex-direction: column;
    gap: 14px;
  }

  .mobile-tab-content.active {
    display: flex;
  }

  body.no-scroll {
    overflow: hidden;
    touch-action: none;
  }
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-tabs {
  display: flex;
  background: rgba(0,0,0,.04);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.mobile-tabs button {
  flex: 1;
  padding: 10px 0;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-size: 10px;
  font-weight: 500;
  color: #444 !important;
}

.mobile-tabs button.active {
  background: #ffffff;
  color: #000000 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  border-bottom: 1px solid #00a943;
}

.mobile-links {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.mobile-links.active {
  display: flex;
}

.mobile-link {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,.04);
  text-decoration: none;
  color: #000;
  font-weight: 500;
}

.mobile-primary-link {
  display: block;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,.06);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #000;
}

.mobile-contact {
  text-align: center;
  font-size: 14px;
  opacity: .7;
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.mobile-contact a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  font-size: 20pt !important;
  font-family: Roboto;
  font-weight: 500;
}


.mobile-switch-version {
  width: 100%;
  margin-bottom: 14px;

  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(0,0,0,.25);

  background: rgba(255,255,255,.6);
  font-size: 15px;
  font-weight: 500;
  color: #000 !important;
  text-transform: math-auto;

  cursor: pointer;
}


/* ===== Снег (кнопка) ===== */
.snow-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}

/* toggle */
.switch {
  position: relative;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: .3s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
}

.switch input:checked + .slider {
  background: #00a943;
  box-shadow:
    0 0 0 4px rgba(0,169,67,.15);
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
  animation: snow-bounce .3s ease;
}

@keyframes snow-bounce {
  0% { transform: translateX(18px) scale(1); }
  50% { transform: translateX(18px) scale(1.15); }
  100% { transform: translateX(18px) scale(1); }
}

/* ===== Контейнер снега ===== */
#snow-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2000;
}

/* ===== Снежинки ===== */
.snowflake {
  position: absolute;
  top: -10px;
  background: rgba(255, 255, 255, 0.9); /* чуть прозрачные */
  border-radius: 50%;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6))
         drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
  box-shadow: 0 0 6px rgb(0 0 0 / 51%);
  will-change: transform;
}

/* ===== Дополнительно: разные размеры для глубины ===== */
.snowflake[data-depth="0.1"] { width: 2px; height: 2px; opacity: 0.3; }
.snowflake[data-depth="0.3"] { width: 4px; height: 4px; opacity: 0.5; }
.snowflake[data-depth="0.5"] { width: 6px; height: 6px; opacity: 0.7; }
.snowflake[data-depth="0.7"] { width: 8px; height: 8px; opacity: 0.85; }
.snowflake[data-depth="0.9"] { width: 10px; height: 10px; opacity: 0.95; }

.snow-warning {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
}

.snow-warning.active {
  display: block;
}

.snow-warning__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
}

.snow-warning__modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90%, 360px);
  background: #323232;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,.25);
}

.snow-warning__modal h3 {
  margin-bottom: 12px;
  text-align: center;
  font-size: 17pt !important;
  font-family: Roboto !important;
  padding-bottom: 20px;
  color: white;
}

.snow-warning__modal p {
  font-size: 10pt;
  line-height: 1.5;
  color: #ffffff;
}

.snow-warning__modal button {
  margin: 16px 6px 5px 6px;
  cursor: pointer;
  color: #ffffff !important;
  padding: 7px 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, .35);
  border: 1px solid rgb(216 216 216 / 71%);
  border-radius: 15px;
}