/* ==========================================================================
   site.css
   Стили сайта: цвета, сетка, шапка, секции, формы, страницы.
   Править этот файл при изменениях вёрстки.
   ========================================================================== */

:root {
  --color-green: #097a3b;
  --color-red: #b02429;
  --color-bg: #f5f5f5;
  --color-white: #fff;
  --color-text: #000;
  --color-text-muted: #aaa;
  --color-border: #c9c9c9;
  --color-overlay: rgba(0, 0, 0, 0.5);

  --font-main: 'Inter', Arial, Helvetica, sans-serif;

  --container-width: 1200px;
  --header-height: 104px;

  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-pill: 30px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-title {
  margin: 0;
  color: var(--color-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.5px;
  text-align: center;
  text-transform: uppercase;
}

.section-title--green {
  color: var(--color-green);
}

.section-title--main-font {
  font-family: var(--font-main);
}

.section-title__accent {
  color: var(--color-green);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}

.button--primary {
  background-color: var(--color-red);
  color: var(--color-bg);
}

.button--primary:hover {
  background-color: var(--color-green);
}

.button--outline {
  border-color: var(--color-red);
  background-color: var(--color-white);
  color: var(--color-red);
}

.button--outline:hover {
  border-color: var(--color-green);
  color: var(--color-green);
}

.button--light {
  background-color: var(--color-bg);
  color: #050505;
}

.button--light:hover {
  background-color: var(--color-white);
}

.button--wide {
  width: 100%;
}

@media (max-width: 1199px) {
  :root {
    --container-width: 960px;
    --header-height: 75px;
  }

  .container {
    padding: 0 10px;
  }

  .section-title {
    font-size: 32px;
    line-height: 42px;
  }
}

@media (max-width: 959px) {
  :root {
    --container-width: 640px;
    --header-height: 66px;
  }

  .container {
    padding: 0 20px;
  }

  .section-title {
    font-size: 26px;
    line-height: 34px;
  }
}

@media (max-width: 639px) {
  :root {
    --container-width: 100%;
    --header-height: 47px;
  }

  .container {
    padding: 0 12px;
  }

  .section-title {
    font-size: 18px;
    line-height: 24.5px;
    letter-spacing: -0.8px;
  }

  .button {
    min-height: 47px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 21.8px;
  }
}

/* ==========================================================================
   Шапка сайта
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-green);
}

.header__inner {
  display: flex;
  align-items: flex-start;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 4px;
  padding-top: 23px;
  padding-left: 44px;
}

.header__logo-mark {
  display: block;
  width: 72px;
  height: auto;
}

.header__logo-mark--compact {
  display: none;
  width: 34px;
}

.header__logo-text {
  display: block;
  width: 358px;
  height: auto;
}

.header__body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.header__top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 7px;
  padding-right: 32px;
}

.header__contact {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #fefefe;
  font-size: 14px;
  line-height: 20px;
}

.header__contact:first-child {
  margin-right: 25px;
}

.header__contact-icon {
  display: block;
  flex-shrink: 0;
}

.header__contact--address .header__contact-icon {
  width: 25px;
}

.header__contact--address .header__contact-text {
  width: 273px;
  padding-top: 1px;
  font-weight: 500;
}

.header__contact--phone .header__contact-icon {
  width: 15px;
  margin-top: 3px;
}

.header__contact--phone .header__contact-text {
  width: 140px;
  padding-top: 1px;
  text-align: right;
}

.header__phone {
  display: block;
  transition: opacity 0.2s ease-in-out;
}

.header__phone:hover {
  opacity: 0.75;
}

.header__burger {
  flex-shrink: 0;
  width: 41px;
  margin-left: 40px;
}

.header__burger img {
  display: block;
  width: 100%;
}

.header__nav {
  display: flex;
  justify-content: flex-end;
  gap: 45px;
  margin-top: 18px;
  padding-right: 116px;
}

.header__nav-link {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 400;
  line-height: 220%;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.2s ease-in-out;
}

.header__nav-link:hover {
  opacity: 0.7;
}

/* Распорка под фиксированную шапку: на внутренних страницах у Tilda спейсер 73px
   на всех ширинах, на главной — своя высота под каждый брейкпоинт */
.header-offset {
  height: 73px;
}

.header-offset:has(+ main > .hero) {
  height: 103px;
}

@media (max-width: 1199px) {
  .header__logo {
    gap: 9px;
    padding-top: 15px;
    padding-left: 0;
  }

  .header__logo-mark {
    width: 48px;
  }

  .header__logo-text {
    width: 267px;
  }

  .header__top {
    padding-top: 17px;
    padding-right: 6px;
  }

  .header__contact--phone .header__contact-icon {
    margin-top: 2px;
  }

  .header__nav {
    display: none;
  }

  .header-offset:has(+ main > .hero) {
    height: 103px;
  }
}

@media (max-width: 959px) {
  .header__logo {
    padding-top: 8px;
  }

  .header__logo-text {
    display: none;
  }

  .header__top {
    gap: 10px;
    padding-top: 11px;
    padding-right: 9px;
  }

  .header__contact {
    gap: 9px;
    font-size: 12px;
    line-height: 17px;
  }

  .header__contact--address .header__contact-icon {
    width: 34px;
  }

  .header__contact--address .header__contact-text {
    width: auto;
    max-width: 235px;
    padding-top: 0;
  }

  .header__contact--phone .header__contact-icon {
    width: 20px;
    margin-top: 5px;
  }

  .header__contact--phone .header__contact-text {
    width: auto;
    padding-top: 0;
  }

  .header-offset:has(+ main > .hero) {
    height: 103px;
  }
}

/* На мобильных шапка превращается в «таблетку» с отступами от краёв ------- */

@media (max-width: 639px) {
  .header {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    height: 47px;
    border-radius: 15px;
  }

  .header__inner {
    align-items: center;
    padding: 0 7px 0 6px;
  }

  .header__logo {
    padding-top: 0;
  }

  .header__logo-mark {
    display: none;
  }

  .header__logo-mark--compact {
    display: block;
    width: 40px;
    height: 40px;
  }

  .header__body {
    padding-top: 0;
  }

  .header__top {
    align-items: center;
    gap: 7px;
    padding: 0;
  }

  .header__contact--address {
    display: none;
  }

  .header__contact {
    font-size: 12.9px;
    line-height: 17.6px;
    align-items: center;
  }

  .header__contact--phone .header__contact-icon {
    width: 15px;
    margin-top: 0;
  }

  .header__contact--phone .header__contact-text {
    width: 129px;
  }

  .header__burger {
    width: 29px;
    margin-left: 8px;
  }

  /* Распорка: на внутренних страницах у Tilda спейсер 73px в реальных пикселях,
     на главной — 58px, растущие вместе с шапкой (см. блок масштабирования ниже) */
  .header-offset {
    height: 73px;
  }

  .header-offset:has(+ main > .hero) {
    height: 58px;
  }
}

/* 480–639px: у Tilda здесь отдельный артборд шапки — сплошная полоса 41px без
   масштабирования, элементы расставлены внутри центрированных 480px */
@media (min-width: 480px) and (max-width: 639px) {
  :root {
    --header-height: 41px;
  }

  .header {
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 41px;
    border-radius: 0;
  }

  .header__inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 0 72px;
  }

  .header__logo-mark--compact {
    width: 29px;
    height: 29px;
  }

  .header__body {
    flex: 0 0 auto;
    margin-left: 100px;
  }

  .header__top {
    justify-content: flex-start;
    gap: 7px;
  }

  .header__contact {
    gap: 6px;
    font-size: 11px;
    line-height: 15px;
  }

  .header__contact--phone .header__contact-icon {
    width: 13px;
  }

  .header__contact--phone .header__contact-text {
    width: 110px;
  }

  .header__burger {
    width: 25px;
    margin-left: 0;
  }

  .header-offset:has(+ main > .hero) {
    height: 103px;
  }
}

/* ==========================================================================
   Layout: side menu, footer, contact widget
   ========================================================================== */

/* Side menu --------------------------------------------------------------- */

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  visibility: hidden;
  width: 100%;
  max-width: 500px;
  height: 100%;
  padding: 48px 40px 38px;
  overflow-y: auto;
  background-color: var(--color-bg);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.side-menu.is-open {
  visibility: visible;
  transform: translateX(0);
}

.side-menu__overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  background-color: var(--color-overlay);
  opacity: 0;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.side-menu__overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.side-menu__close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.side-menu__close::before,
.side-menu__close::after {
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  content: '';
}

.side-menu__close::before {
  transform: rotate(45deg);
}

.side-menu__close::after {
  transform: rotate(-45deg);
}

.side-menu__list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.side-menu__link {
  display: inline-block;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  transition: opacity 0.2s ease-in-out;
}

.side-menu__link:hover {
  opacity: 0.6;
}

.side-menu__link--parent {
  position: relative;
  padding-right: 22px;
}

.side-menu__link--parent::after {
  position: absolute;
  top: 8px;
  right: 0;
  border-width: 5px 4px 0;
  border-style: solid;
  border-color: currentColor transparent transparent;
  content: '';
}

[data-accordion-item].is-open > .side-menu__link--parent::after {
  transform: rotate(180deg);
}

.side-menu__sublist {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-left: 16px;
}

[data-accordion-item].is-open > .side-menu__sublist {
  display: flex;
}

.side-menu__sublink {
  display: inline-block;
  font-size: 14px;
  line-height: 18px;
  transition: opacity 0.2s ease-in-out;
}

.side-menu__sublink:hover {
  opacity: 0.6;
}

@media (max-width: 639px) {
  .side-menu {
    padding: 60px 20px 30px;
  }

  .side-menu__link {
    font-size: 14px;
  }

  .side-menu__sublink {
    font-size: 12px;
  }
}

/* Footer ------------------------------------------------------------------ */

.footer {
  margin-top: 103px;
  padding-bottom: 23px;
  background-color: var(--color-green);
  color: var(--color-bg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 399px 276px 1fr;
  min-height: 166px;
  padding: 60px 16px 0;
}

.footer__about {
  max-width: 311px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.footer__phone {
  display: inline-block;
  margin-top: 14px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.footer__email {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: -1px;
}

.footer__email img {
  width: 15px;
}

.footer__socials {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.footer__socials img {
  display: block;
  width: 41px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
}

.footer__nav-link {
  display: inline-flex;
  align-items: center;
  height: 25px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.5px;
  transition: color 0.2s ease-in-out;
}

.footer__nav-link:hover {
  color: #050505;
}

.footer__contacts {
  padding-left: 0;
}

.footer__address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 323px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.footer__address img {
  flex-shrink: 0;
  width: 25px;
  margin-top: 4px;
}

.footer__cta {
  width: 340px;
  margin-top: 32px;
}

.footer__divider {
  height: 1px;
  margin-top: 14px;
  background-color: var(--color-bg);
}

.footer__bottom {
  padding: 21px 0 0 415px;
}

.footer__policy {
  display: inline-block;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.5px;
  transition: color 0.2s ease-in-out;
}

.footer__policy:hover {
  color: #050505;
}

@media (max-width: 1199px) {
  .footer__grid {
    grid-template-columns: 365px 256px 1fr;
    min-height: 176px;
    padding: 60px 0 0;
  }

  .footer__socials {
    margin-top: 25px;
  }

  .footer__address {
    max-width: 290px;
  }

  .footer__cta {
    width: 285px;
    margin-top: 25px;
  }

  .footer__divider {
    margin-top: 4px;
  }

  .footer__bottom {
    padding-left: 365px;
  }
}

@media (max-width: 959px) {
  /* Футер тянется на всю ширину, как в оригинале */
  .footer > .container {
    max-width: none;
    padding: 0 10px;
  }

  .footer__grid {
    grid-template-columns: 1fr auto;
    min-height: 158px;
    padding: 60px 6px 0;
    column-gap: 20px;
  }

  .footer__nav {
    display: none;
  }

  .footer__contacts {
    text-align: right;
  }

  .footer__address {
    max-width: 256px;
    margin-left: auto;
  }

  .footer__socials {
    margin-top: 15px;
  }

  .footer__socials img {
    width: 33px;
  }

  .footer__cta {
    width: 285px;
    margin-top: 26px;
    margin-left: auto;
  }

  .footer__divider {
    margin-top: 22px;
  }

  .footer__bottom {
    padding-left: 4px;
  }
}

/* На мобильных блоки футера идут одной колонкой в другом порядке */

@media (max-width: 639px) {
  .footer {
    margin-top: 73px;
    padding-bottom: 3px;
  }

  .footer__grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 47px 0 0;
  }

  .footer__company {
    display: contents;
  }

  .footer__about {
    order: 1;
    max-width: none;
    font-size: 16.4px;
    line-height: 20px;
  }

  .footer__phone {
    order: 2;
    margin-top: 37px;
    font-size: 30.5px;
    line-height: 36.3px;
  }

  .footer__nav {
    display: grid;
    order: 3;
    grid-template-columns: 188px 1fr;
    gap: 0;
    width: 100%;
    margin-top: 52px;
    padding-top: 0;
  }

  .footer__contacts {
    order: 4;
  }

  .footer__email {
    order: 5;
  }

  .footer__socials {
    order: 6;
  }

  .footer__nav-link {
    height: 26px;
    font-size: 14px;
  }

  .footer__nav-link:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .footer__nav-link:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .footer__nav-link:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }

  .footer__nav-link:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .footer__nav-link:nth-child(5) {
    grid-column: 1;
    grid-row: 3;
  }

  .footer__contacts {
    margin-top: 12px;
    text-align: left;
  }

  .footer__address {
    max-width: 285px;
    margin-left: 0;
    gap: 4px;
    font-size: 14px;
    line-height: 16.4px;
  }

  .footer__address img {
    width: 29px;
    margin-top: 0;
  }

  .footer__email {
    gap: 9px;
    margin-top: 14px;
    font-size: 14px;
    letter-spacing: -0.5px;
  }

  .footer__email img {
    width: 18px;
  }

  .footer__socials {
    margin-top: 18px;
  }

  .footer__socials img {
    width: 39px;
  }

  .footer__cta {
    display: none;
  }

  .footer__divider {
    margin-top: 40px;
  }

  .footer__bottom {
    padding: 13px 0 0;
  }

  .footer__policy {
    font-size: 11.7px;
  }
}

/* Floating contact widget -------------------------------------------------- */

.contact-widget {
  position: fixed;
  right: 65px;
  bottom: 50px;
  z-index: 990;
}

.contact-widget__toggle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #0088cc;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out;
  transition: .2s ease-in-out;
}

.contact-widget__toggle.active {
  background: #fff;
}

.contact-widget__toggle:hover {
  transform: scale(1.05);
}

.contact-widget__icon-close {
  display: none;
}

.contact-widget.is-open .contact-widget__icon-write {
  display: none;
}

.contact-widget.is-open .contact-widget__icon-close {
  display: block;
}

.contact-widget__label {
  position: absolute;
  top: 50%;
  right: 80px;
  padding: 9px 12px;
  border-radius: 3px;
  background-color: #292929;
  opacity: .85;
  color: var(--color-white);
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  transform: translateY(-50%);
  font-weight: 700;
}

.contact-widget__label::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: solid transparent;
    border-width: 10px;
    top: 50%;
    right: -20px;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    border-left-color: #292929;
}

.contact-widget.is-open .contact-widget__label {
  display: none;
}

.contact-widget__links {
  position: absolute;
  right: 5px;
  bottom: 70px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.contact-widget.is-open .contact-widget__links {
  visibility: visible;
  opacity: 1;
}

.contact-widget__link {
  position: relative;
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
}

/* Подпись у иконки: по наведению на десктопе, всегда в открытом состоянии на телефоне */
.contact-widget__link-label {
  position: absolute;
  top: 50%;
  right: 62px;
  transform: translateY(-50%);
  padding: 7px 11px;
  border-radius: 3px;
  background-color: #292929;
  color: var(--color-white);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.contact-widget__link:hover .contact-widget__link-label,
.contact-widget__link:focus-visible .contact-widget__link-label {
  opacity: .9;
  visibility: visible;
}

.contact-widget__link svg {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

@media (max-width: 639px) {
  .contact-widget {
    right: 20px;
    bottom: 20px;
  }

  /* Подпись «Связаться» на телефоне остаётся, как на старом сайте, только компактнее */
  .contact-widget__label {
    right: 72px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .contact-widget.is-open .contact-widget__link-label {
    opacity: .9;
    visibility: visible;
  }
}

/* ==========================================================================
   Components: modal popups, forms
   ========================================================================== */

/* Popup ------------------------------------------------------------------- */

.popup {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  padding: 40px 20px;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.popup.is-open {
  visibility: visible;
  opacity: 1;
}

.popup__container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  padding: 40px 45px;
  background-color: var(--color-white);
}

.popup__close {
  position: fixed;
  top: 16px;
  right: 24px;
  width: 23px;
  height: 23px;
}

.popup__close::before,
.popup__close::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  content: '';
}

.popup__close::before {
  transform: rotate(45deg);
}

.popup__close::after {
  transform: rotate(-45deg);
}

.popup__title {
  margin-bottom: 11px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.23;
  text-align: center;
}

.popup__descr {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
}

.popup__note {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
}

.popup__note a {
  color: #ff8562;
}

@media (max-width: 639px) {
  .popup {
    padding: 0;
  }

  .popup__container {
    max-width: 100%;
    min-height: 100%;
    padding: 60px 20px 30px;
  }

  /* На телефоне белая форма занимает весь экран: крестик поднимаем над ней и делаем тёмным */
  .popup__close {
    z-index: 2;
  }

  .popup__close::before,
  .popup__close::after {
    background-color: #292929;
  }

  .popup__title {
    margin-bottom: 6px;
  }
}

.popup--success {
  padding: 20px;
}

.popup--success .popup__container {
  max-width: 460px;
  padding: 48px 40px 36px;
  border-radius: 16px;
  text-align: center;
}

.popup--success .popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
}

.popup--success .popup__close::before,
.popup--success .popup__close::after {
  background-color: #9a9a9a;
}

.popup-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 20px;
}

.popup-success__text {
  margin: 0 auto 28px;
  max-width: 340px;
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.45;
}

.popup-success__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: 4px;
  background-color: #000;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.popup-success__button:hover {
  background-color: #2a2a2a;
}

@media (max-width: 639px) {
  .popup--success {
    padding: 20px;
  }

  .popup--success .popup__container {
    max-width: 100%;
    min-height: 0;
    padding: 48px 24px 32px;
  }
}

/* Form -------------------------------------------------------------------- */

.form {
  margin-top: 24px;
}

.form__field {
  margin-bottom: 25px;
}

.form__field:last-of-type {
  margin-bottom: 25px;
}

.form__label {
  display: block;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
}

.form__input,
.form__textarea {
  display: block;
  width: 100%;
  height: 60px;
  padding: 0 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.33;
  outline: none;
  transition: border-color 0.2s ease-in-out;
}

.form__textarea {
  height: 102px;
  padding: 17px 20px;
  resize: vertical;
}

/* Телефон: флаг и код страны вынесены из поля ввода, как в оригинале */
.form__input--phone {
  display: flex;
  align-items: center;
}

.form__phone-flag {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 13px;
  background: url("../img/flag-kz.webp") no-repeat center;
  background-size: 18px 13px;
}

/* Стрелка выбора страны — в оригинале это декорация рядом с флагом */
.form__phone-flag::after {
  position: absolute;
  top: 50%;
  left: 26px;
  margin-top: -2px;
  border-width: 4px 4px 0;
  border-style: solid;
  border-color: #9a9a9a transparent transparent;
  content: "";
}

.form__phone-code {
  flex-shrink: 0;
  margin-left: 24px;
}

.form__phone-input {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  margin-left: 5px;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: inherit;
  font: inherit;
  outline: none;
}

.form__phone-input::placeholder {
  color: #a1a1a1;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: #a1a1a1;
}

.form__input:focus,
.form__input--phone:focus-within,
.form__textarea:focus {
  border-color: var(--color-green);
}

.form__input.has-error,
.form__textarea.has-error {
  border-color: var(--color-red);
}

.form__error {
  display: none;
  margin-top: 6px;
  color: var(--color-red);
  font-size: 13px;
  line-height: 1.4;
}

.form__error.is-visible {
  display: block;
}

.form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: var(--color-red);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.2s ease-in-out;
}

.form__submit:hover {
  background-color: var(--color-green);
}

.form__success {
  display: none;
  padding: 20px 0;
  color: var(--color-green);
  font-size: 18px;
  line-height: 1.55;
  text-align: center;
}

.form__success.is-visible {
  display: block;
}

.form.is-sent .form__body {
  display: none;
}

/* Checkbox list ----------------------------------------------------------- */

.form__checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
  cursor: pointer;
}

.form__checkbox input {
  position: absolute;
  opacity: 0;
}

.form__checkbox-indicator {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  background-color: var(--color-white);
  transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.form__checkbox input:checked + .form__checkbox-indicator {
  border-color: var(--color-green);
  background-color: var(--color-green);
}

.form__checkbox input:checked + .form__checkbox-indicator::after {
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  content: '';
  transform: rotate(45deg);
}

.form__checkbox-own {
  width: 100%;
  max-width: 220px;
  margin-left: 10px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: none;
  font-size: 14px;
  outline: none;
}

@media (max-width: 639px) {
  .form__input,
  .form__textarea {
    height: 50px;
    font-size: 16px;
  }

  .form__textarea {
    height: 90px;
  }

  .form__submit {
    height: 50px;
    font-size: 16px;
  }

  .form__field {
    margin-bottom: 20px;
  }
}

/* Inline lead form (used inside sections) --------------------------------- */

.lead-form {
  margin-top: 0;
}

.lead-form__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.lead-form__field {
  flex: 1 1 220px;
  min-width: 0;
  margin-bottom: 0;
}

.lead-form .form__input {
  height: 50px;
  border-color: #000;
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  color: #232323;
}

.lead-form__field:last-of-type {
  margin-bottom: 0;
}

.lead-form .form__input::placeholder {
  color: #a5a5a5;
}

.lead-form__submit {
  flex: 0 0 auto;
  width: 365px;
  max-width: 100%;
  height: 50px;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.lead-form__submit--green {
  background-color: var(--color-green);
}

.lead-form__submit--green:hover {
  background-color: var(--color-red);
}

.lead-form--stacked .lead-form__body {
  flex-direction: column;
  gap: 10px;
}

.lead-form--stacked .lead-form__field,
.lead-form--stacked .lead-form__submit {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}


.lead-form__note {
  width: 100%;
  margin-top: 5px;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.2;
}

.lead-form__note a {
  color: inherit;
}

@media (max-width: 959px) {
  .lead-form__body {
    flex-direction: column;
    gap: 10px;
  }

  .lead-form__field,
  .lead-form__submit {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* ==========================================================================
   Секции главной страницы
   ========================================================================== */

/* Hero --------------------------------------------------------------------- */

.hero {
  padding: 152px 0 8px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 578fr 561fr;
  gap: 20px;
  max-width: 1159px;
  margin: 0 auto;
}

.hero__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 540px;
  padding: 158px 41px 0;
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
}

.hero__title {
  max-width: 496px;
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: -0.5px;
  text-align: center;
  text-transform: uppercase;
}

.hero__title-accent {
  color: var(--color-green);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 340px;
  margin-top: 128px;
}

.hero__media {
  height: 540px;
  border-radius: var(--radius-lg);
  background-image: url('../img/ispytanieobrazcovbet.webp');
  background-repeat: no-repeat;
  background-position: 100% 0;
  background-size: cover;
}

@media (max-width: 1199px) {
  .hero {
    padding: 131px 0 41px;
  }

  .hero__grid {
    grid-template-columns: 472fr 460fr;
    max-width: none;
    gap: 8px;
  }

  .hero__card {
    height: 398px;
    padding: 99px 9px 0;
  }

  .hero__title {
    max-width: 444px;
    font-size: 22px;
    line-height: 31px;
  }

  .hero__actions {
    width: 340px;
    max-width: 100%;
    margin-top: 23px;
  }

  .hero__media {
    height: 398px;
  }
}

@media (max-width: 959px) {
  .hero {
    padding: 102px 0 29px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .hero__card {
    height: 398px;
    padding: 76px 16px 0;
  }

  .hero__actions {
    margin-top: 35px;
  }

  .hero__media {
    height: 393px;
    background-position: center center;
  }
}

@media (max-width: 639px) {
  /* Артборд Tilda на мобильных: высота = max(высота экрана, 668px), карточка
     прижата к верху, кнопки держатся середины (центр − 35px), фото — у низа */
  .hero {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: max(668px, calc(100vh / var(--mz, 1)));
    padding: 70px 12px 10px 12px;
  }

  .hero .container {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .hero__grid {
    position: relative;
    display: block;
    flex: 1;
  }

  .hero__card {
    position: static;
    display: block;
    height: auto;
    padding: 0;
    background-color: transparent;
  }

  /* Белая подложка заканчивается выше кнопок — как в оригинале */
  .hero__card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 309px;
    border-radius: var(--radius-lg);
    background-color: var(--color-white);
    content: '';
  }

  .hero__title {
    position: relative;
    max-width: none;
    padding-top: 82px;
    font-size: 16.4px;
    line-height: 23.5px;
  }

  .hero__actions {
    position: absolute;
    top: calc(50% - 65px);
    right: 0;
    left: 0;
    width: 328px;
    max-width: 100%;
    margin: 0 auto;
    gap: 12px;
    transform: translateY(-50%);
  }

  .hero__media {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 264px;
    margin-top: 0;
  }
}

/* Преимущества ------------------------------------------------------------- */

.advantages {
  padding: 0 0 2px;
}

.advantages__title {
  max-width: 802px;
  margin: 0 auto;
}

.advantages__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  margin-top: 62px;
}

.advantage {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 25px 22px 0;
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
}

.advantage__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
}

.advantage__icon img {
  display: block;
  width: auto;
  height: 54px;
}

.advantage__icon--lg img {
  height: 67px;
}

.advantage__text {
  margin-top: 46px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.5px;
}

/* Ширины подписей повторяют оригинал, чтобы совпадали переносы строк */
.advantage:nth-child(1) .advantage__text {
  max-width: 235px;
}

.advantage:nth-child(2) .advantage__text {
  max-width: 218px;
}

.advantage:nth-child(3) .advantage__text {
  max-width: 246px;
}

.advantage:nth-child(4) .advantage__text {
  max-width: 232px;
}

@media (max-width: 1199px) {
  .advantages__list {
    gap: 10px;
  }

  .advantage {
    min-height: 250px;
    padding: 23px 12px 0;
  }

  .advantage__icon {
    height: 67px;
  }

  .advantage__text {
    margin-top: 69px;
    font-size: 12px;
    line-height: 17px;
  }

  .advantage:nth-child(1) .advantage__text {
    max-width: 189px;
  }

  .advantage:nth-child(2) .advantage__text {
    max-width: 173px;
  }

  .advantage:nth-child(3) .advantage__text {
    max-width: 181px;
  }

  .advantage:nth-child(4) .advantage__text {
    max-width: 147px;
  }
}

@media (max-width: 959px) {
  .advantages__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 54px;
  }

  .advantage {
    min-height: 200px;
    padding: 38px 17px 0;
  }

  .advantage__text {
    margin-top: 34px;
  }

  .advantage:nth-child(1) .advantage__text {
    max-width: 261px;
  }

  .advantage:nth-child(2) .advantage__text {
    max-width: 237px;
  }

  .advantage:nth-child(3) .advantage__text {
    max-width: 270px;
  }

  .advantage:nth-child(4) .advantage__text {
    max-width: 226px;
  }
}

/* На мобильных карточка становится горизонтальной: иконка слева, текст справа */

@media (max-width: 639px) {
  .advantages__list {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 73px;
  }

  .advantage {
    flex-direction: row;
    align-items: center;
    gap: 25px;
    min-height: 94px;
    padding: 0 14px;
  }

  .advantage__icon {
    flex-shrink: 0;
    width: 29px;
    height: auto;
  }

  .advantage__icon img,
  .advantage__icon--lg img {
    height: 23px;
  }

  .advantage__icon--lg img {
    height: 29px;
  }

  .advantage__text {
    margin-top: 0;
    font-size: 14px;
    line-height: 20px;
  }

  /* Ширины подписей повторяют оригинал, чтобы совпадали переносы строк */
  .advantage:nth-child(1) .advantage__text {
    max-width: 267px;
  }

  .advantage:nth-child(2) .advantage__text {
    max-width: 236px;
  }

  .advantage:nth-child(3) .advantage__text {
    max-width: 232px;
  }

  .advantage:nth-child(4) .advantage__text {
    max-width: 227px;
  }
}

/* Материалы ---------------------------------------------------------------- */

.materials {
  padding: 100px 0 37px;
}

.materials__list {
  display: grid;
  grid-auto-rows: 303px;
  grid-template-columns: repeat(3, 370px);
  justify-content: center;
  gap: 16px 10px;
  margin-top: 72px;
}

.materials__footer {
  margin-top: 45px;
  text-align: center;
}

.materials__cta {
  width: 353px;
  min-height: 50px;
  animation: pulse 1s linear infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  } 50% {
    transform: scale(1.05);
  } 100% {
    transform: scale(1);
  }
}

.material-card {
  display: flex;
  flex-direction: column;
}

.material-card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
}

.material-card__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 370 / 253;
  object-fit: cover;
}

.material-card__overlay {
  position: absolute;
  inset: 0;
}

/* Прозрачные «чипы»: сами подписи нарисованы на картинке карточки,
   ссылки лишь повторяют их положение. */
.material-card__tag {
  position: absolute;
  top: var(--tag-top);
  left: var(--tag-left);
  width: var(--tag-width);
  height: var(--tag-height);
  border-radius: var(--radius-pill);
  color: transparent;
  font-size: 0;
}

.material-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding-top: 8px;
  color: #050505;
}

.material-card__title {
  flex: 1;
  /* ширина подписи взята из оригинала — от неё зависят переносы строк */
  max-width: 341px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.material-card__title:hover {
  color: #b02429;
}

.material-card__arrow {
  flex-shrink: 0;
  width: 13px;
  height: 12px;
}

/* .material-card:hover .material-card__title {
  color: var(--color-green);
} */

@media (max-width: 1199px) {
  .materials {
    padding: 100px 0 40px;
  }

  .materials__list {
    grid-auto-rows: auto;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px 12px;
    margin-top: 62px;
  }

  .materials__footer {
    margin-top: 70px;
  }

  .materials__cta {
    width: 340px;
    min-height: 48px;
  }

  .material-card__image {
    aspect-ratio: 289 / 208;
  }

  .material-card__title {
    font-size: 14px;
  }

  .material-card__arrow {
    width: 13px;
    height: 12px;
  }
}

@media (max-width: 959px) {
  .materials {
    padding: 70px 0 70px;
  }

  .materials__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px 10px;
    margin-top: 108px;
  }

  .material-card__image {
    aspect-ratio: 300 / 205;
  }

  .materials__footer {
    margin-top: 68px;
  }
}

@media (max-width: 639px) {
  .materials {
    padding: 77px 0 48px;
  }

  .materials__list {
    grid-template-columns: min(328px, 100%);
    justify-content: center;
    gap: 8px;
    margin-top: 97px;
  }

  .materials__footer {
    margin-top: 33px;
  }

  .materials__cta {
    width: 328px;
    max-width: 100%;
    min-height: 47px;
  }

  .material-card__image {
    aspect-ratio: 328 / 220;
  }

  .material-card__footer {
    align-items: flex-start;
    min-height: 43px;
    padding-top: 1px;
  }

  .material-card__arrow {
    align-self: flex-start;
    margin-top: 11px;
  }

  /* На мобильном артборде Tilda карточки 7↔8 и 10↔11 поменяны местами
     относительно десктопа; повторяем, чтобы порядок совпадал на всех ширинах */
  .materials__item:nth-child(7) { order: 8; }
  .materials__item:nth-child(8) { order: 7; }
  .materials__item:nth-child(9) { order: 9; }
  .materials__item:nth-child(10) { order: 11; }
  .materials__item:nth-child(11) { order: 10; }
  .materials__item:nth-child(n+12) { order: 12; }

  .material-card__title {
    font-size: 14px;
    line-height: 16.9px;
    text-align: left;
  }

  .material-card__arrow {
    width: 15px;
    height: 14px;
  }
}

/* Баннер с формой ---------------------------------------------------------- */

.cta-banner {
  padding: 25px 0 10px;
}

.cta-banner__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 535px;
  padding: 206px 40px 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-image: url('../img/whatsapp-image-2024-4.webp');
  background-position: center center;
  background-size: cover;
}

.cta-banner__inner::before {
  position: absolute;
  inset: 0;
  background-color: #000;
  opacity: 0.5;
  content: '';
}

.cta-banner__title {
  position: relative;
  max-width: 846px;
  color: var(--color-white);
}

.cta-banner__form {
  position: relative;
  width: 100%;
  max-width: 1119px;
  margin-top: 40px;
}

@media (max-width: 1199px) {
  .cta-banner {
    padding: 31px 0 4px;
  }

  .cta-banner__inner {
    min-height: 535px;
    padding: 162px 22px 0;
  }

  .cta-banner__form {
    max-width: 897px;
    margin-top: 60px;
  }
}

@media (max-width: 959px) {
  .cta-banner {
    padding: 21px 0 14px;
  }

  .cta-banner__inner {
    min-height: 535px;
    padding: 123px 12px 0;
  }

  .cta-banner__title {
    max-width: 583px;
  }

  .cta-banner__form {
    width: 376px;
    max-width: 100%;
    margin-top: 37px;
  }
}

@media (max-width: 639px) {
  .cta-banner {
    padding: 24px 0 5px;
  }

  .cta-banner__inner {
    min-height: 627px;
    padding: 264px 20px 0;
  }

  .cta-banner__title {
    max-width: 313px;
  }

  .cta-banner__form {
    margin-top: 31px;
  }
}

/* История компании --------------------------------------------------------- */

.history {
  padding: 13px 0 20px;
}

.history__card {
  padding: 60px 45px 42px;
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
}

.history__title {
  max-width: 723px;
  margin: 0 auto;
}

.history__grid {
  display: grid;
  grid-template-columns: 555fr 537fr;
  gap: 30px;
  margin-top: 74px;
}

.history__media {
  height: 325px;
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
  background-position: center center;
  background-size: cover;
}

.history__media--top {
  background-image: url('../img/whatsapp-image-2024-5.webp');
}

.history__media--bottom {
  background-image: url('../img/whatsapp-image-2024-15.webp');
  background-position: 0 35.5%;
  background-size: 100%;
}

.history__text {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.5px;
}

.history__text p + p {
  margin-top: 20px;
}

.history__text ul {
  margin: 4px 0;
  padding-left: 18px;
  list-style: disc;
}

.history__text--right {
  max-width: 408px;
}

.history__text--left {
  max-width: 453px;
}

@media (max-width: 1199px) {
  .history {
    padding: 13px 0 4px;
  }

  .history__card {
    padding: 60px 30px 61px;
  }

  .history__grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px 46px;
    margin-top: 75px;
  }

  .history__media {
    height: 303px;
  }

  /* На 960 колонки зеркальны десктопным */
  .history__text--right {
    grid-row: 1;
    grid-column: 1;
    max-width: none;
  }

  .history__media--top {
    grid-row: 1;
    grid-column: 2;
  }

  .history__media--bottom {
    grid-row: 2;
    grid-column: 1;
  }

  .history__text--left {
    grid-row: 2;
    grid-column: 2;
    max-width: none;
  }
}

@media (max-width: 959px) {
  .history {
    padding: 10px 0 10px;
  }

  .history > .container {
    max-width: none;
    padding: 0 10px;
  }

  .history__card {
    padding: 60px 15px 40px;
  }

  .history__title {
    max-width: 526px;
  }

  /* Здесь строки делят ширину по-разному, поэтому колонки задаёт flex */
  .history__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 26px 22px;
    margin-top: 56px;
  }

  .history__text--right {
    order: 1;
    width: 334px;
  }

  .history__media--top {
    order: 2;
    width: 229px;
  }

  .history__media--bottom {
    order: 3;
    width: 229px;
  }

  .history__text--left {
    order: 4;
    width: 321px;
  }

  .history__media {
    height: 157px;
  }
}

@media (max-width: 639px) {
  .history {
    padding: 12px 0 7px;
  }

  .history > .container {
    padding: 0 12px;
  }

  .history__card {
    padding: 35px 6px 29px;
  }

  .history__title {
    max-width: none;
  }

  /* Одной колонкой порядок: фото — текст — фото — текст */
  .history__grid {
    flex-direction: column;
    gap: 18px;
    margin-top: 50px;
    padding: 0 5px;
  }

  .history__text--right,
  .history__text--left,
  .history__media--top,
  .history__media--bottom {
    width: auto;
  }

  .history__media--top {
    order: 1;
  }

  .history__text--right {
    order: 2;
  }

  .history__media--bottom {
    order: 3;
  }

  .history__text--left {
    order: 4;
  }

  .history__media {
    height: 220px;
    width: 100%;
  }

  .history__text {
    font-size: 14px;
    line-height: 20px;
  }

  .history__text + .history__media {
    margin-top: 12px;
  }
}

/* Аккредитация ------------------------------------------------------------- */

.accreditation {
  padding: 63px 0 31px;
}

.accreditation__title {
  max-width: 846px;
  margin: 0 auto;
}

@media (max-width: 1199px) {
  .accreditation {
    padding: 60px 0 18px;
  }

}

@media (max-width: 959px) {
  .accreditation {
    padding: 60px 0 12px;
  }

  .accreditation__title {
    max-width: 526px;
  }
}

@media (max-width: 639px) {
  /* Как на Tilda: 16px/21px, блок около 165px высотой */
  .accreditation {
    padding: 35px 0 7px;
  }

  .accreditation__title {
    max-width: none;
    font-size: 16px;
    line-height: 21px;
  }
}

/* Сертификаты -------------------------------------------------------------- */

.certificates {
  padding: 4px 0 59px;
}

.certificates__list {
  display: grid;
  grid-template-columns: repeat(3, 364px);
  justify-content: center;
  gap: 28px;
}

.certificates__item {
  height: 516px;
  overflow: hidden;
}

.certificates__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1199px) {
  .certificates {
    padding: 4px 0 60px;
  }

  .certificates__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 21px;
  }

  .certificates__item {
    height: 434px;
  }
}

@media (max-width: 959px) {
  .certificates {
    padding: 4px 0 40px;
  }

  .certificates__list {
    gap: 19px;
  }

  .certificates__item {
    height: 346px;
  }
}

/* На мобильных сертификаты прокручиваются вбок, как в оригинале */

@media (max-width: 639px) {
  .certificates {
    padding: 5px 0 49px;
  }

  .certificates__list {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .certificates__list::-webkit-scrollbar {
    display: none;
  }

  .certificates__item {
    flex: 0 0 auto;
    width: 248px;
    height: 353px;
    scroll-snap-align: start;
  }
}

/* Блок консультации -------------------------------------------------------- */

.consult {
  margin-top: 58px;
}

.consult__title {
  max-width: 970px;
  margin: 0 auto;
}

.consult__body {
  position: relative;
  margin-top: 31px;
}

.consult__inner {
  min-height: 527px;
  border-radius: var(--radius-lg);
  background-image: url('../img/12.webp');
  background-position: center center;
  background-size: cover;
}

.consult__card {
  position: absolute;
  top: 19px;
  left: 22px;
  width: 555px;
  max-width: calc(100% - 44px);
  min-height: 489px;
  padding: 84px 95px 40px;
  border-radius: var(--radius-lg);
  background-color: rgba(255,255,255,.85);
}

.consult__subtitle {
  max-width: 351px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.consult__form {
  max-width: 365px;
  margin-top: 18px;
}

@media (max-width: 1199px) {
  .consult__inner {
    min-height: 529px;
  }

  .consult__card {
    top: 21px;
    left: 19px;
    width: 394px;
    min-height: 488px;
    padding: 65px 43px 40px;
  }

  .consult__subtitle {
    max-width: 254px;
  }

  .consult__form {
    max-width: 308px;
    margin-top: 19px;
  }
}

@media (max-width: 959px) {
  .consult__title {
    max-width: 583px;
  }

  .consult__body {
    margin-top: 23px;
  }

  .consult__inner {
    min-height: 529px;
  }

  .consult__card {
    top: 20px;
    left: 16px;
    width: 336px;
    min-height: 487px;
    padding: 67px 16px 40px;
  }

  .consult__form {
    max-width: 300px;
    margin-top: 15px;
  }
}

/* На мобильных форма уезжает под фотографию */

@media (max-width: 639px) {
  .consult {
    margin-top: 73px;
    padding-bottom: 16px;
  }

  .consult__body {
    margin-top: 14px;
  }

  .consult__inner {
    min-height: 318px;
  }

  .consult__card {
    position: static;
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 17px 0 0;
    border-radius: 0;
    background-color: transparent;
  }

  .consult__subtitle {
    max-width: none;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
  }

  .consult__form {
    margin-top: 16px;
  }
}

/* Заголовки-разделители ---------------------------------------------------- */

.section-heading {
  padding: 63px 0 25px;
}

.section-heading--partners {
  margin-top: 43px;
}

.section-heading__title {
  max-width: 846px;
  margin: 0 auto;
}

@media (max-width: 1199px) {
  .section-heading {
    padding: 60px 0 22px;
  }

  .section-heading__title {
    max-width: 772px;
  }
}

@media (max-width: 959px) {
  .section-heading {
    padding: 60px 0 14px;
  }

  .section-heading__title {
    max-width: 526px;
  }
}

@media (max-width: 639px) {
  .section-heading {
    padding: 35px 0 11px;
  }

  .section-heading__title {
    max-width: none;
  }

  .section-heading--partners {
    margin-top: 58px;
  }
}

/* Партнёры ----------------------------------------------------------------- */

.partners {
  padding-bottom: 30px;
}

.partners__viewport {
  position: relative;
}

/* Галерея живёт на сетке .t-container, у неё свои точки перелома */
.partners .container {
  padding: 0;
}

.partners__track {
  display: grid;
}

/* Логотипы листаются страницами по шесть */
.partners__page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  grid-area: 1 / 1;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease-in-out, visibility 0.45s ease-in-out;
}

.partners__page.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .partners__page {
    transition: none;
  }
}

.partners__item {
  flex: 0 0 calc(100% / 6 - 40px);
  margin: 20px;
}

.partners__logo {
  display: block;
  width: 100%;
  height: auto;
  /* высокие логотипы оригинал вписывает в квадрат ячейки */
  max-height: 160px;
  margin: 0 auto;
  object-fit: contain;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e8e8e8;
  transform: translateY(-50%);
  transition: background-color 0.2s ease-in-out;
}

.slider-arrow:hover {
  background-color: #c7c7c7;
}

.slider-arrow::before {
  width: 9px;
  height: 9px;
  border: solid #000;
  border-width: 1px 1px 0 0;
  content: '';
}

.slider-arrow--prev {
  left: 30px;
}

.slider-arrow--prev::before {
  margin-left: 3px;
  transform: rotate(-135deg);
}

.slider-arrow--next {
  right: 30px;
}

.slider-arrow--next::before {
  margin-right: 3px;
  transform: rotate(45deg);
}

/* На узких экранах логотипы выстраиваются в две-три строки и листаются вбок */

@media (max-width: 1200px) {
  .partners .container {
    max-width: 960px;
  }

  .partners__item {
    flex: 0 0 calc(100% / 6 - 20px);
    margin: 10px;
  }

  .partners__logo {
    max-height: 140px;
  }
}

@media (max-width: 1199px) {
  .slider-arrow--prev {
    left: 25px;
  }

  .slider-arrow--next {
    right: 25px;
  }
}

@media (max-width: 960px) {
  .partners .container {
    max-width: 640px;
  }

  .partners__page {
    padding: 0 35px;
  }

  .partners__item {
    flex: 0 0 calc(100% / 3 - 20px);
  }

  .partners__logo {
    max-height: 170px;
  }
}

@media (max-width: 639px) {
  .slider-arrow--prev {
    left: 6px;
  }

  .slider-arrow--next {
    right: 6px;
  }
}

@media (min-width: 480px) and (max-width: 639px) {
  .partners {
    padding-bottom: 20px;
  }
}

/* Как у слайдера Tilda: высота блока равна высоте активной страницы, а не самой высокой */
@media (max-width: 639px) {
  .partners__track {
    position: relative;
    display: block;
  }

  .partners__page {
    position: absolute;
    top: 0;
    left: 0;
  }

  .partners__page.is-active {
    position: relative;
  }
}

@media (max-width: 479px) {
  .partners__item {
    flex: 0 0 calc(50% - 20px);
  }

  .partners__logo {
    max-height: 133px;
  }
}

/* Объекты ------------------------------------------------------------------ */

.objects {
  padding: 20px 0 23px;
}

.objects__carousel {
  position: relative;
  width: 782px;
  max-width: 100%;
  margin: 0 auto;
}

.objects__viewport {
  position: relative;
  height: 521px;
  overflow: hidden;
}

.objects__list {
  position: relative;
  height: 100%;
}

.objects__slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease-in-out, visibility 0.35s ease-in-out;
}

.objects__slide.is-active {
  visibility: visible;
  opacity: 1;
}

.objects__image {
  display: block;
  width: 100%;
  height: 475px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.objects__caption {
  width: 80%;
  height: 36px;
  margin: 10px auto 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 21.7px;
  letter-spacing: -0.5px;
  text-align: center;
}

.objects__arrow {
  top: 237px;
}

.objects__arrow--prev {
  left: 20px;
}

.objects__arrow--next {
  right: 20px;
}

@media (max-width: 1199px) {
  .objects {
    padding: 20px 0 27px;
  }

  .objects__carousel {
    width: 820px;
  }

  .objects__viewport {
    height: 571px;
  }

  .objects__image {
    height: 525px;
  }

  .objects__arrow {
    top: 262px;
  }
}

@media (max-width: 959px) {
  .objects {
    padding: 10px 0 19px;
  }

  .objects__carousel {
    width: 460px;
  }

  .objects__viewport {
    height: 348px;
  }

  .objects__image {
    height: 302px;
  }

  .objects__arrow {
    top: 151px;
  }
}

@media (max-width: 639px) {
  .objects {
    padding: 12px 0 43px;
  }

  .objects__viewport {
    height: 276px;
  }

  .objects__image {
    height: 234px;
  }

  .objects__caption {
    width: 100%;
    height: auto;
    margin-top: 6px;
    font-size: 14px;
    line-height: 18.3px;
  }

  .objects__arrow {
    top: 117px;
  }

  .objects__arrow--prev {
    left: 10px;
  }

  .objects__arrow--next {
    right: 10px;
  }
}

/* ==========================================================================
   Внутренние страницы: услуга, блог, статья, политика
   ========================================================================== */

/* Breadcrumbs ------------------------------------------------------------- */

.breadcrumbs {
  padding: 45px 0 19px;
}

.breadcrumbs .container {
  padding: 0 20px;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-size: 12px;
  line-height: 19px;
}

.breadcrumbs__item:not(:last-child)::after {
  color: #858585;
  content: '/';
}

.breadcrumbs__link {
  font-weight: 300;
  transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.breadcrumbs__link:hover {
  color: #9e9e9e;
}

.breadcrumbs__item--current {
  color: var(--color-green);
}

.breadcrumbs__item--article {
  color: #860000;
}

/* Cover / hero of a service page ------------------------------------------ */

.cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-white);
  text-align: center;
}

.cover__media,
.cover__filter {
  position: absolute;
  inset: 0;
}

.cover__media {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.cover__filter {
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
}

.cover__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.cover__title {
  margin: 0 auto;
  padding-top: 20px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.23;
}

.cover__descr {
  max-width: 640px;
  margin: 24px auto 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}

.cover-form {
  margin-top: 44px;
}

.cover-form__body {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.cover-form .form__field,
.cover-form__field {
  width: 100%;
  max-width: 477px;
  margin-bottom: 0;
}

.cover-form .form__input {
  height: 56px;
  border: 0;
  border-radius: 3px;
  background-color: var(--color-white);
}

.cover-form__submit {
  flex: 0 0 auto;
  width: 166px;
  height: 56px;
  border-radius: 5px;
  font-size: 16px;
}

.cover-form__hint {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
}

.cover-form__hint a {
  color: #ff8562;
}

/* Service blocks ---------------------------------------------------------- */

.service-block {
  padding: 0 0 10px;
}

.service-block + .service-block {
  margin-top: 90px;
}

/* У Tilda второй (зеркальный) блок начинается на 14px ниже */
.service-block--reverse {
  padding-top: 14px;
}

.service-block__grid {
  display: grid;
  grid-template-columns: 555px 1fr;
  gap: 58px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
}

.service-block--reverse .service-block__grid {
  grid-template-columns: 1fr 555px;
}

.service-block--reverse .service-block__media {
  order: 2;
}

.service-block__media {
  overflow: hidden;
  width: 100%;
  height: 325px;
  border-radius: var(--radius-md);
  background-color: #ddd;
}

.service-block__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-block__title {
  margin: 0 0 10px;
  font-family: Arial, Helvetica, sans-serif;   /* как заголовки зеро-блоков Tilda */
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.service-block__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.service-block__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 24px;
}

.service-block__item::before {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 4.5px;
  background: url('../img/check-mark-23.webp') no-repeat center / contain;
  content: '';
}

.service-block__cta {
  width: 340px;
  max-width: 100%;
  margin-top: 20px;
  min-height: 48px;
}

/* Text pages: blog, article, policy --------------------------------------- */

.page-hero {
  padding: 15px 0 30px;
}

.page-hero__title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
}

.page-hero__meta {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #6f7a86;
}

.page-hero__meta-sep {
  margin: 0 6px;
}

.page-hero__meta-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-hero__meta-link:hover {
  color: var(--color-green);
}

.blog-list__date {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #6f7a86;
}

.blog-list {
  display: flex;
  flex-direction: row;
  gap: 30px;
  padding: 0 0 80px;
}

.blog-list__item {
  flex: 1 1 0;
  min-width: 0;
}

.blog-list__link {
  font-size: 18px;
  line-height: 1.4;
  transition: color 0.2s ease-in-out;
}

.blog-list__link:hover {
  color: var(--color-green);
}

.article {
  padding: 0 0 80px;
  font-size: 14px;
  line-height: 1.6;
}

.article h2 {
  margin-top: 20px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.article h2:first-child {
  font-size: 24px;
}

.article p {
  margin-top: 15px;
}

.article p + ul {
  margin-top: 15px;
}

.article ul {
  margin: 15px 0 0;
  padding-left: 22px;
  list-style: disc;
}

.article li {
  margin-top: 4px;
}

.article p:first-child {
  margin-top: 0;
}

.policy {
  padding: 20px 0 80px;
}

.policy__title {
  margin: 0 0 30px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.policy__body {
  font-size: 14px;
  line-height: 1.55;
}

.policy__body p {
  margin-top: 12px;
}

.policy__body p:first-child {
  margin-top: 0;
}

.policy__body a {
  color: #ff8562;
}

.policy__heading {
  margin-top: 24px;
  font-weight: 500;
}

@media (max-width: 1199px) {
  .service-block__grid,
  .service-block--reverse .service-block__grid {
    grid-template-columns: 422px 1fr;
    gap: 40px;
  }

  .service-block__media {
    height: 303px;
  }
}

@media (max-width: 959px) {
  .cover__title {
    font-size: 30px;
  }

  .service-block__grid,
  .service-block--reverse .service-block__grid {
    grid-template-columns: 298px 1fr;
    gap: 24px;
  }

  .service-block--reverse .service-block__media {
    order: 0;
  }

  .service-block--reverse .service-block__content {
    order: 0;
  }

  .service-block--reverse .service-block__grid {
    grid-template-columns: 1fr 298px;
  }

  .service-block__media {
    height: 204px;
  }

  .service-block__title {
    font-size: 20px;
  }

  .page-hero__title {
    font-size: 26px;
  }

  .blog-list {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 639px) {
  /* Хлебные крошки как t758 на 375px: 45px сверху, 19px снизу, текст 12px */
  .breadcrumbs {
    padding: 45px 0 19px;
  }

  .breadcrumbs .container {
    padding: 0 20px;
  }

  .breadcrumbs__item {
    font-size: 12px;
    line-height: 19px;
  }

  .breadcrumbs__link {
    font-weight: 300;
  }

  /* Обложка как t716 на 375px */
  .cover__content {
    padding: 20px;
  }

  .cover__title {
    padding-top: 20px;
    font-size: 30px;
    line-height: 36.9px;
  }

  .cover__descr {
    margin-top: 24px;
    font-size: 12px;
    line-height: 17.4px;
  }

  .cover-form {
    margin-top: 31px;
  }

  .cover-form__body {
    gap: 20px;
  }

  .cover-form__field,
  .cover-form__submit {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }

  .cover-form__hint {
    margin-top: 20px;
    font-size: 12px;
    line-height: 18.6px;
  }

  /* Блоки услуг как зеро-блоки Tilda на 375px: заголовок, список, фото 328×220,
     кнопка; между блоками спейсер 45px (90px на 480–639) в реальных пикселях */
  .service-block {
    padding: 0 0 5px;
  }

  .service-block--reverse {
    padding-top: 30px;
  }

  .service-block + .service-block {
    margin-top: calc(45px / var(--mz, 1));
  }

  .service-block__grid,
  .service-block--reverse .service-block__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .service-block__content {
    display: contents;
  }

  /* Размеры в реальных px на 375 (у Tilda 16/21 и 12/20 на артборде 320 × 1.172) */
  .service-block__title {
    order: 1;
    margin: 0 0 12px;
    padding: 0 0 0 15px;
    font-size: 18.75px;
    font-weight: 500;
    line-height: 24.6px;
  }

  .service-block__list {
    order: 2;
    gap: 4px;
    padding-left: 15px;
  }

  .service-block__item {
    gap: 11px;
    padding: 2.3px 0;
    font-size: 14.06px;
    line-height: 18.75px;
  }

  .service-block__item::before {
    width: 14px;
    height: 14px;
    margin-top: 4.7px;
  }

  .service-block__media,
  .service-block--reverse .service-block__media {
    order: 3;
    align-self: center;
    width: 328px;
    max-width: 100%;
    height: 220px;
    margin-top: 31px;
  }

  .service-block__cta {
    order: 4;
    align-self: center;
    width: 328px;
    min-height: 47px;
    margin-top: 12px;
  }

  .page-hero__title {
    font-size: 22px;
  }

  .blog-list__link {
    font-size: 16px;
  }
}

/* На 480–639px спейсер между блоками услуг у Tilda 90px */
@media (min-width: 480px) and (max-width: 639px) {
  .service-block + .service-block {
    margin-top: calc(90px / var(--mz, 1));
  }
}

.services-links {
  padding: 40px 0;
}
.services-links__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}
.services-links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.services-links__list a {
  font-size: 16px;
}

/* Мобильный масштаб как на Tilda -------------------------------------------
   Tilda ниже 640px рисует макет на артборде 320px и растягивает его целиком:
   zoom = ширина экрана / 320. Наша мобильная вёрстка собрана под 375px
   (= артборд Tilda × 1.172), поэтому масштабируем её множителем ширина/375.
   Значение --mz ставит инлайн-скрипт в <head> (layouts/app.blade.php).
   Как и у Tilda, не масштабируются: обложка и хлебные крошки внутренних страниц,
   галерея партнёров, блог, боковое меню, попапы и виджет связи. */
@media (max-width: 639px) {
  :root {
    --mz: 1;
  }

  .hero,
  .advantages,
  .materials,
  .cta-banner,
  .history,
  .accreditation,
  .certificates,
  .consult,
  .section-heading,
  .objects,
  .service-block,
  .footer {
    zoom: var(--mz);
  }

  html {
    scroll-padding-top: calc(var(--header-height) * var(--mz));
  }
}

/* Шапка масштабируется только до 480px: с 480 до 639 у Tilda она в реальных пикселях */
@media (max-width: 479px) {
  .header,
  .header-offset:has(+ main > .hero) {
    zoom: var(--mz);
  }
}

@media (max-width: 639px) {
  /* Размеры текста на базе 375px (артборд Tilda 320px × 1.172) */
  .section-title {
    font-size: 18.75px;      /* 16px @320 */
    line-height: 24.6px;     /* 21px */
    letter-spacing: -0.59px; /* -0.5px */
  }

  .hero__title {
    font-size: 16.4px;       /* 14px */
    line-height: 23.45px;    /* 20px */
  }

  .advantage__text,
  .history__text,
  .history__text p,
  .history__text li,
  .consult__subtitle,
  .objects__caption,
  .footer__email,
  .footer__address,
  .footer__nav-link {
    font-size: 14.06px;      /* 12px */
    line-height: 19.9px;     /* 17px */
  }

  .material-card__title {
    font-size: 14.06px;      /* 12px */
    line-height: 16.4px;     /* 14px */
  }

  .button {
    font-size: 14.06px;      /* 12px */
  }

  .footer__company {
    font-size: 16.4px;       /* 14px */
    line-height: 19.9px;     /* 17px */
  }

  .footer__phone {
    font-size: 30.5px;       /* 26px */
    line-height: 36.3px;     /* 31px */
  }

  .footer__policy {
    font-size: 11.7px;       /* 10px */
    line-height: 11.7px;
  }
}
