.site-footer:not(.site-footer--unified) {
  display: none !important;
}

/* "Войти" — белая кнопка слева от "Начать бесплатно" */
body .main-header__link--login,
.main-header__link--login {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 24px !important;
  margin-left: auto !important;
  margin-right: 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #e6e6e6 !important;
  color: #2f3031 !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  letter-spacing: 0.2px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  align-self: center !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 26px rgba(255, 255, 255, 0.08) !important;
  transition: opacity 0.25s ease !important;
}

body .main-header__link--login:hover,
.main-header__link--login:hover {
  opacity: 0.7 !important;
}

/* Desktop: center nav so logo stays left, login+CTA group right */
@media (min-width: 1025px) {
  body .main-header__nav,
  .main-header__nav {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body .main-header__link--login,
  .main-header__link--login {
    margin-left: 0 !important;
  }
}

/* Mobile burger: hidden when closed, full-width button when open */
@media (max-width: 1024px) {
  body .main-header__link--login,
  .main-header__link--login {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: max-height 260ms ease, opacity 220ms ease !important;
  }

  body .main-header.is-open .main-header__link--login,
  .main-header.is-open .main-header__link--login {
    max-height: 44px !important;
    margin-top: 8px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

.site-footer--unified {
  width: min(1204px, calc(100% - 40px)) !important;
  min-height: 0 !important;
  margin: 120px auto 0 !important;
  padding: 64px 0 68px !important;
  display: grid !important;
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(120px, 1fr)
    minmax(190px, 1.4fr)
    minmax(200px, 1.2fr) !important;
  grid-template-areas:
    "brand nav-primary nav-legal support"
    "legal legal legal legal";
  column-gap: 32px !important;
  row-gap: 28px !important;
  color: #fff;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  position: relative;
  isolation: isolate;
}

.site-footer--unified::before,
.site-footer--unified::after {
  content: none !important;
  display: none !important;
}

.site-footer--unified .site-footer__cell {
  min-width: 0;
  padding: 0;
  border-right: 0;
  border-bottom: 0;
  min-height: 0;
}

.site-footer--unified .site-footer__brand {
  grid-area: brand;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.site-footer--unified .site-footer__logo {
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.site-footer--unified .site-footer__nav {
  display: grid;
  align-content: start;
  gap: 14px;
}

.site-footer--unified .site-footer__nav--primary { grid-area: nav-primary; }
.site-footer--unified .site-footer__nav--legal { grid-area: nav-legal; }

.site-footer--unified .site-footer__support {
  grid-area: support;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
}

.site-footer--unified .site-footer__label {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.2px;
}

.site-footer--unified .site-footer__link,
.site-footer--unified .site-footer__mail {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: color 0.22s ease, opacity 0.22s ease;
}

.site-footer--unified .site-footer__mail {
  display: inline-block;
  width: fit-content;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  margin-top: 4px;
}

.site-footer--unified .site-footer__link:hover,
.site-footer--unified .site-footer__link:focus-visible,
.site-footer--unified .site-footer__mail:hover,
.site-footer--unified .site-footer__mail:focus-visible,
.site-footer--unified .site-footer__tg:hover,
.site-footer--unified .site-footer__tg:focus-visible {
  color: #fff;
}

.site-footer--unified .site-footer__legal {
  grid-area: legal;
  margin: 0;
  padding: 0;
  border-right: 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.2px;
  align-self: end;
  justify-self: center;
  text-align: center;
}

.site-footer--unified .site-footer__tg {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  min-height: 32px;
  width: fit-content;
  min-width: 0;
  padding: 5px 8px 5px 4px;
  max-width: none;
  box-sizing: border-box;
  border: 1px solid rgba(117, 123, 134, 0.9);
  border-radius: 12px;
  background: linear-gradient(180deg, #f3f3f4 0%, #d9dbde 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.18);
  color: #3a3c40;
  font-size: 9px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.1px;
  text-decoration: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease;
}

.site-footer--unified .site-footer__tg:hover,
.site-footer--unified .site-footer__tg:focus-visible {
  background: linear-gradient(180deg, #fafafb 0%, #e4e6e9 100%);
  color: #232529;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 18px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.site-footer--unified .site-footer__tg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #42b8f4 0%, #229ed9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex: 0 0 20px;
}

.site-footer--unified .site-footer__tg-icon svg {
  width: 11px;
  height: 11px;
  fill: #fff;
}

.site-footer--unified .site-footer__tg-text {
  white-space: nowrap;
}

/* Tablet: brand left, 4 link/support columns to the right */
@media (max-width: 1024px) {
  .site-footer--unified {
    width: min(1204px, calc(100% - 48px)) !important;
    margin-top: 96px !important;
    padding: 56px 0 60px !important;
    grid-template-columns:
      minmax(0, 0.7fr)
      minmax(0, 1fr)
      minmax(0, 1.3fr)
      minmax(0, 1.1fr) !important;
    grid-template-areas:
      "brand nav-primary nav-legal support"
      "legal legal legal legal" !important;
    column-gap: 20px !important;
    row-gap: 24px !important;
  }

  .site-footer--unified .site-footer__tg {
    width: fit-content;
    min-width: 0;
    max-width: none;
    padding: 5px 8px 5px 7px;
    font-size: 11px;
    gap: 7px;
    min-height: 32px;
  }

  .site-footer--unified .site-footer__tg-text {
    white-space: nowrap;
    line-height: 14px;
  }
}

/* Mobile: 2-column reflow per reference */
@media (max-width: 767px) {
  .site-footer--unified {
    width: calc(100% - 32px) !important;
    margin-top: 0 !important;
    padding: 40px 0 48px !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "brand brand"
      "nav-primary nav-legal"
      "support support"
      "legal legal" !important;
    column-gap: 24px !important;
    row-gap: 28px !important;
  }

  .site-footer--unified .site-footer__logo {
    font-size: 20px;
    font-weight: 800;
    line-height: 22px;
    letter-spacing: 0.2px;
    text-transform: none;
  }

  .site-footer--unified .site-footer__link,
  .site-footer--unified .site-footer__mail,
  .site-footer--unified .site-footer__tg {
    font-size: 13px;
    line-height: 17px;
  }

  .site-footer--unified .site-footer__nav {
    gap: 12px;
  }

  .site-footer--unified .site-footer__tg {
    width: fit-content;
    min-width: 0;
    max-width: none;
    min-height: 32px;
    padding: 5px 8px 5px 7px;
    font-size: 11px;
    gap: 7px;
  }

  .site-footer--unified .site-footer__tg-text {
    white-space: nowrap;
    line-height: 14px;
  }

  .site-footer--unified .site-footer__legal {
    align-self: start;
    margin-top: 8px;
  }
}

/* Home page footer adjustments preserved */
.page--home {
  min-height: calc(100vh - 48px) !important;
  display: flex !important;
  flex-direction: column !important;
}

.page--home > .site-footer--home {
  margin-top: auto !important;
}

body.body-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

body.body-home .page--home {
  flex: 1 0 auto !important;
  min-height: calc(100vh - 48px) !important;
  display: flex !important;
  flex-direction: column !important;
}

body.body-home .site-footer--home {
  min-height: 0 !important;
  align-content: start !important;
  margin-top: 180px !important;
  padding-top: 0 !important;
  padding-bottom: 8px !important;
}

@media (min-width: 1181px) {
  body.body-home .page--home {
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100vh - 48px) !important;
  }

  body.body-home .site-footer--home {
    min-height: 0 !important;
    align-content: start !important;
    margin-top: 256px !important;
    padding-bottom: 0 !important;
    position: relative !important;
    transform: translateY(220px) !important;
    align-items: start !important;
  }

  body.body-home .site-footer--home .site-footer__brand,
  body.body-home .site-footer--home .site-footer__nav,
  body.body-home .site-footer--home .site-footer__support {
    padding-top: 0 !important;
    align-self: start !important;
  }
}

body.body-home .final-hero {
  min-height: 360px;
  margin-bottom: 0 !important;
}

body.body-home .final-hero__content {
  min-height: 360px;
  justify-content: flex-start;
  padding-top: 0px;
}

@media (max-width: 1024px) {
  body.body-home {
    min-height: 0;
    display: block;
  }

  body.body-home .page--home {
    flex: initial !important;
    min-height: 0 !important;
    display: block !important;
  }

  body.body-home .site-footer--home {
    width: var(--tablet-page-width) !important;
    max-width: var(--tablet-page-width) !important;
    margin: 96px auto 0 !important;
    transform: none !important;
  }

  body.body-home .final-hero {
    min-height: 320px;
  }

  body.body-home .final-hero__content {
    min-height: 320px;
    padding-top: 40px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  body.body-home .site-footer--home {
    width: var(--tablet-page-width) !important;
    max-width: var(--tablet-page-width) !important;
    margin: 88px auto 0 !important;
    padding: 0 0 20px !important;
    grid-template-columns:
      minmax(110px, 0.9fr)
      minmax(0, 1fr)
      minmax(0, 1fr)
      minmax(150px, 1.1fr) !important;
    grid-template-areas:
      "brand nav-primary nav-secondary support"
      ". nav-legal nav-legal support"
      "legal legal legal legal" !important;
    column-gap: 28px !important;
    row-gap: 18px !important;
    align-items: start !important;
  }

  body.body-home .site-footer--home .site-footer__logo {
    font-size: 18px !important;
    line-height: 20px !important;
  }

  body.body-home .site-footer--home .site-footer__nav {
    gap: 10px !important;
  }

  body.body-home .site-footer--home .site-footer__link,
  body.body-home .site-footer--home .site-footer__mail,
  body.body-home .site-footer--home .site-footer__label {
    font-size: 12px !important;
    line-height: 16px !important;
  }

  body.body-home .site-footer--home .site-footer__support {
    width: fit-content !important;
    gap: 10px !important;
  }

  body.body-home .site-footer--home .site-footer__tg {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 32px !important;
    padding: 5px 8px 5px 7px !important;
    font-size: 11px !important;
    line-height: 14px !important;
  }

  body.body-home .site-footer--home .site-footer__tg-text {
    white-space: nowrap !important;
  }
}

@media (max-width: 767px) {
  body.body-home .page--home {
    min-height: auto;
  }

  body.body-home .site-footer--home {
    margin-top: 125px !important;
  }

  body.body-home .final-hero {
    min-height: auto;
  }

  body.body-home .final-hero__content {
    min-height: auto;
    padding-top: 60px;
  }
}

@media (max-width: 767px) {
  body .main-header,
  .main-header {
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  body .main-header,
  .main-header {
    left: 24px !important;
    right: 24px !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
}
