/* New header for the test templates only. Sized from the desktop/mobile PSD. */
body.ft-newhead {
  padding-top: 0 !important;
}

body.ft-newhead #container {
  padding-top: 0 !important;
}

.ft-head,
.ft-head *,
.ft-measure,
.ft-measure * {
  box-sizing: border-box;
}

.ft-head {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  font-family: Montserrat, Arial, sans-serif;
  transition: transform 0.25s ease;
}

.ft-head.is-away {
  transform: translateY(-100%);
}

.ft-head__bar {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1150px;
  height: 104px;
  margin: 0 auto;
  padding: 0 46px 0 0;
}

.ft-head__logo {
  flex: 0 0 auto;
  line-height: 0;
}

.ft-head__logo img {
  display: block;
  width: auto;
  height: 64px;
}

.ft-head__menu {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-head__menu li,
.ft-head__menu li:hover,
.ft-head__menu a,
.ft-head__menu a:hover,
.ft-head__menu a:focus,
.ft-head__menu a:active {
  background: transparent !important;
  box-shadow: none !important;
}

.ft-head__menu a {
  color: #515151;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.ft-head__menu a:hover,
.ft-head__menu a:focus {
  color: #69c33c;
  background: transparent !important;
}

.ft-head__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

@media (min-width: 1200px) {
  .ft-head__bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 28px;
  }

  .ft-head__menu {
    justify-content: center;
  }

  .ft-head__tools {
    margin-left: 0;
  }
}

.ft-phone {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #383838;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.ft-phone svg {
  flex: 0 0 auto;
  display: block;
}

.ft-phone__b {
  color: #515151;
}

.ft-phone__c {
  color: #5e923d;
  font-weight: 600;
}

.ft-phone:hover,
.ft-phone:focus {
  color: #383838;
  text-decoration: none;
}

.ft-soc {
  display: inline-flex;
  line-height: 0;
}

.ft-soc img {
  display: block;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  object-fit: cover;
}

.ft-cta {
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #7cb342;
  border-radius: 4px;
  background: #fff;
  color: #2b2b2b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.ft-cta:hover,
.ft-cta:focus {
  background: #f3f8ec;
}

.ft-head__flysoc,
.ft-burger {
  display: none;
}

.ft-drawer {
  display: none;
}

@media (max-width: 1199px) {
  /* Fixed: footer is outside #container, so sticky unsticks above the footer. */
  body.ft-newhead {
    padding-top: 94px !important;
  }

  .ft-head {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease;
    will-change: transform;
  }

  .ft-head__bar {
    gap: 12px;
    height: auto;
    min-height: 74px;
    padding: 10px 14px;
  }

  .ft-head__bar .ft-head__logo img {
    height: 70px;
  }

  .ft-head__menu,
  .ft-head__tools .ft-soc,
  .ft-cta {
    display: none;
  }

  .ft-head__tools {
    gap: 8px;
    flex-shrink: 0;
  }

  .ft-head__logo,
  .ft-burger {
    flex-shrink: 0;
  }

  .ft-phone {
    font-size: 16px;
    white-space: nowrap;
  }

  .ft-burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 42px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
  }

  .ft-burger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0;
    background: #888;
  }

  .ft-head__flysoc {
    display: none;
    align-items: center;
    gap: 6px;
  }

  .ft-head.is-fly .ft-head__bar .ft-head__logo {
    display: none;
  }

  .ft-head.is-fly .ft-head__flysoc {
    display: flex;
  }

  .ft-head__flysoc img {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
  }

  .ft-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    font-family: Montserrat, Arial, sans-serif;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
  }

  .ft-head.is-open .ft-drawer {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .ft-drawer__top {
    display: flex;
    align-items: center;
    gap: 12px;
    height: auto;
    min-height: 74px;
    padding: 10px 14px;
  }

  .ft-drawer__top .ft-head__logo {
    margin-right: auto;
  }

  .ft-drawer__top .ft-head__logo img {
    height: 70px;
  }

  .ft-drawer__top .ft-phone svg {
    width: 28px;
    height: 28px;
  }

  .ft-drawer__x {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .ft-drawer__x span {
    position: absolute;
    width: 22px;
    height: 2px;
    background: #9a9a9a;
  }

  .ft-drawer__x {
    position: relative;
  }

  .ft-drawer__x span:first-child {
    transform: rotate(45deg);
  }

  .ft-drawer__x span:last-child {
    transform: rotate(-45deg);
  }

  .ft-drawer__nav {
    flex: 0 0 auto;
    margin: 16px 0 0;
    padding: 0 22px;
    overflow: visible;
    list-style: none;
  }

  .ft-drawer__nav li,
  .ft-drawer__nav li:hover,
  .ft-drawer__nav a,
  .ft-drawer__nav a:hover,
  .ft-drawer__nav a:focus,
  .ft-drawer__nav a:active,
  .ft-drawer__toggle,
  .ft-drawer__toggle:hover,
  .ft-drawer__toggle:focus {
    background: transparent !important;
    box-shadow: none !important;
  }

  .ft-drawer__nav > li > a,
  .ft-drawer__toggle {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 11px 0;
    border: 0;
    background: transparent;
    color: #333;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .ft-drawer__nav > li > a:hover,
  .ft-drawer__nav > li > a:focus {
    color: #69c33c;
    background: transparent !important;
  }

  .ft-drawer__toggle {
    color: #69c33c;
    gap: 10px;
  }

  .ft-drawer__toggle svg,
  .ft-drawer__toggle svg * {
    pointer-events: none;
  }

  .ft-drawer__toggle svg {
    transition: transform 0.2s ease;
  }

  .ft-drawer__item.is-open .ft-drawer__toggle svg {
    transform: rotate(180deg);
  }

  .ft-drawer__sub {
    display: block;
    max-height: 0;
    margin: 0;
    padding: 0 0 0 2px;
    overflow: hidden;
    list-style: none;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  }

  .ft-drawer__item.is-open .ft-drawer__sub {
    max-height: 720px;
    padding-bottom: 8px;
    opacity: 1;
  }

  .ft-drawer__sub a {
    display: block;
    padding: 7px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .ft-drawer__sub a:hover,
  .ft-drawer__sub a:focus {
    color: #69c33c;
    background: transparent !important;
  }

  .ft-drawer__foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding: 10px 18px 24px;
  }

  .ft-drawer__foot .ft-phone {
    margin-right: auto;
    font-size: 16px;
  }

  .ft-drawer__mess {
    display: inline-flex;
    line-height: 0;
  }

  .ft-drawer__mess img {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
  }
}

.ft-measure[hidden] {
  display: none !important;
}

.ft-measure {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  font-family: Montserrat, Arial, sans-serif;
}

.ft-measure__card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px 34px 30px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #0d0d0d;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.26);
}

.ft-measure__x {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 2;
  margin: 0;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.ft-measure__title {
  margin: 0 0 22px;
  color: #0d0d0d;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.ft-measure__control {
  display: block;
  width: 100%;
  min-height: 56px;
  margin: 0 0 16px;
  padding: 0 16px 0 50px;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  background-color: #fff;
  background-position: 17px center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  box-shadow: none;
  color: #0d0d0d;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.ft-measure__control:focus {
  border-color: #019901;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(1, 153, 1, 0.08);
}

.ft-measure__control--name {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20c.7-4 3.1-6 7-6s6.3 2 7 6'/%3E%3C/svg%3E");
}

.ft-measure__control--phone {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='1.8'%3E%3Cpath d='M7.2 3.5 4.8 5.9c-.8.8-.5 3.1.7 5.4 1.7 3.2 4.1 5.6 7.3 7.3 2.3 1.2 4.6 1.5 5.4.7l2.3-2.4-4.4-3-2.1 2.1c-2.5-1.2-4.8-3.5-6-6L10.2 8 7.2 3.5Z'/%3E%3C/svg%3E");
}

.ft-measure__control--comment {
  min-height: 92px;
  padding-top: 17px;
  resize: vertical;
  background-position: 17px 17px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='1.8'%3E%3Cpath d='M5 4h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H10l-5 3v-3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z'/%3E%3Cpath d='M8 9h8M8 12h6'/%3E%3C/svg%3E");
}

.ft-measure__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 18px;
  color: #555;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}

.ft-measure__consent input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: #019901;
}

#ft-measure .ft-measure__consent a,
#ft-measure .ft-measure__consent a:hover,
#ft-measure .ft-measure__consent a:focus,
#zvonok .v3-consent a,
#zvonok .v3-consent a:hover,
#zvonok .v3-consent a:focus {
  color: #046502 !important;
  background: transparent !important;
  text-decoration: underline !important;
  margin: 0 !important;
  font-size: inherit !important;
  border: 0 !important;
}

.ft-measure .smart-captcha,
body.ft-newhead .smart-captcha {
  margin: 0;
  min-height: 0;
}
.ft-measure .smart-captcha[hidden],
body.ft-newhead .smart-captcha[hidden],
body.ft-newhead .smart-captcha[aria-hidden="true"] {
  display: none !important;
}

.ft-measure__submit {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #01a001 0%, #056903 100%);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.ft-measure__submit:hover,
.ft-measure__submit:focus {
  background: linear-gradient(90deg, #019001 0%, #045802 100%);
  color: #fff;
}

.ft-measure__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ft-measure__ok,
.ft-measure .alert-success {
  margin-top: 12px;
  color: #046502;
  font-size: 14px;
}

@media (max-width: 640px) {
  .ft-measure__card {
    padding: 24px 22px 24px;
  }

  .ft-measure__title {
    font-size: 19px;
  }
}

.ft-measure__err,
.ft-measure .alert-danger {
  margin: 0 0 12px;
  color: #c62828;
  font-size: 14px;
}

body.ft-lock {
  overflow: hidden;
}

.ft-yandex-reviews {
  display: block;
  width: 180px;
  height: 60px;
  color: inherit;
  text-decoration: none !important;
  margin: 0 0 15px;
  overflow: hidden;
  border-radius: 8px;
  background: #f6f6f6;
  position: relative;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ft-yandex-reviews:hover {
  opacity: 1;
  transform: scale(1.02);
}

.ft-yandex-reviews iframe {
  position: absolute;
  width: 150px;
  height: 50px;
  border: 0;
  transform: scale(1.2);
  transform-origin: top left;
  left: 0;
  top: 0;
  pointer-events: none;
}

#ft-yandex-map {
  display: block;
  width: 100%;
  height: 300px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  filter: none;
}

.ft-dock {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 450;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

body.ft-newhead .ft-dock > .amo-button-holder {
  position: relative !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  float: none !important;
  transform: none !important;
}

body.ft-newhead .ft-dock .amo-button.amo-button--main {
  width: 54px !important;
  height: 54px !important;
  margin-right: -6px !important;
}

body.ft-newhead .amo-livechat_chat {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: 88px !important;
  bottom: 24px !important;
  margin: 0 !important;
  width: 360px !important;
  height: min(620px, calc(100vh - 140px)) !important;
  max-height: calc(100vh - 140px) !important;
  min-height: 280px !important;
}

@media (max-width: 767px) {
  body.ft-newhead .amo-livechat_chat {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
  }

  body.ft-newhead .amo-livechat_hidden {
    pointer-events: none !important;
  }

  body.ft-newhead .amo-livechat_chat iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border: 0 !important;
  }

  html[class*="amo-livechat-iframe-"] body.ft-newhead > .ft-dock {
    display: flex !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
  }

  html[class*="amo-livechat-iframe-"] body.ft-newhead > .ft-dock .amo-livechat,
  html[class*="amo-livechat-iframe-"] body.ft-newhead > .ft-dock .amo-button--main {
    pointer-events: auto;
  }
}

.ft-dock__grow {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: grid-template-rows 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease;
}

.ft-dock.is-on .ft-dock__grow {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 10px;
  overflow: visible;
}

.ft-dock__grow > * {
  min-height: 0;
}

.ft-dock__mess {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  overflow: hidden;
}

.ft-dock.is-on .ft-dock__mess {
  overflow: visible;
}

.ft-dock__pop {
  display: grid;
  grid-template-rows: 0fr;
  margin-bottom: 0;
  transition: grid-template-rows 0.4s ease, margin-bottom 0.4s ease;
}

.ft-dock__mess.is-open .ft-dock__pop {
  grid-template-rows: 1fr;
  margin-bottom: 10px;
}

.ft-dock__pop-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.ft-dock__mess.is-open .ft-dock__pop-in {
  overflow: visible;
}

.ft-dock__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px) scale(0.86);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.ft-dock__mess.is-open .ft-dock__icon {
  opacity: 1;
  transform: none;
}

.ft-dock__mess.is-open .ft-dock__icon:nth-child(4) { transition-delay: 0.02s; }
.ft-dock__mess.is-open .ft-dock__icon:nth-child(3) { transition-delay: 0.08s; }
.ft-dock__mess.is-open .ft-dock__icon:nth-child(2) { transition-delay: 0.14s; }
.ft-dock__mess.is-open .ft-dock__icon:nth-child(1) { transition-delay: 0.2s; }

.ft-dock__icon img,
.ft-dock__icon > svg {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: cover;
}

.ft-dock__icon--call > svg {
  width: 26px;
  height: 26px;
}

.ft-dock__icon--call {
  background: #f5a623;
}

.ft-dock__main,
.ft-dock__up {
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.ft-dock__main {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #69c33c;
  transition: background 0.25s ease, transform 0.25s ease;
}

.ft-dock__main:hover,
.ft-dock__mess.is-open .ft-dock__main {
  background: #046502;
}

.ft-dock__bubble {
  display: block;
  width: 26px;
  height: 26px;
}

.ft-dock__x {
  display: none;
}

.ft-dock__mess.is-open .ft-dock__bubble {
  display: none;
}

.ft-dock__mess.is-open .ft-dock__x {
  display: block;
}

.ft-dock__up {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: #fff;
  transition: background 0.25s ease;
}

.ft-dock__up:hover {
  background: #69c33c;
}

.ft-dock__up:hover path {
  stroke: #fff;
}

@media (min-width: 768px) {
  .ft-dock__grow--mess {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 10px;
    overflow: visible;
  }

  .ft-dock__grow--mess .ft-dock__mess {
    overflow: visible;
  }
}

@media (max-width: 767px) {
  .ft-dock__grow--mess {
    display: none !important;
  }
}

/* Заборы 3.0: шапка ft-head уже над <main>, без старого navbar-offset */
body.ft-newhead.ft-v3-page > main {
  padding-top: 0 !important;
}
