

/* =========================================================
   CONSULTATION — FORMIT ERRORS
   ========================================================= */

.consultation-form__error {
  display: block;
  color: #b3261e;
  font-family: "Nata Sans", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

.consultation-form__error:empty,
.consultation-form__message:empty {
  display: none;
}

.consultation-form [data-formit-success-message] {
  display: none !important;
}

/* Отправка */

.consultation-form.formit-loading
.consultation-form__submit {
  opacity: 0.55;
  cursor: wait;
}

/* =========================================================
   CONSULTATION — SUCCESS TRANSITION
   ========================================================= */

[data-consultation-content] {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

[data-consultation-content].is-leaving {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

[data-consultation-content][hidden],
.consultation__success[hidden] {
  display: none !important;
}

/* Блок благодарности */

.consultation__success {
  width: 100%;
  min-height: 280px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;

  padding: 30px 0;

  opacity: 0;
  transform: translateY(16px);

  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.consultation__success.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.consultation__success-icon {
  margin-bottom: 20px;
  color: #d66b18;
  font-size: 30px;
  font-weight: 300;
}

.consultation__success-title {
  margin: 0 0 18px;

  font-family: "Mak", serif;
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.1;
}

.consultation__success-text {
  margin: 0;
  max-width: 440px;

  font-family: "Nata Sans", Arial, sans-serif;
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: 1.45;
}

.consultation__success-caption {
  margin: 14px 0 0;

  font-family: "Nata Sans", Arial, sans-serif;
  font-size: 13px;
  opacity: 0.6;
}

/* MOBILE */

@media (max-width: 767px) {
  .consultation__success {
    min-height: 220px;
    padding: 24px 0;
  }

  .consultation__success-title {
    font-size: 42px;
  }

  .consultation__success-text {
    font-size: 15px;
  }
}

/* Доступность */

@media (prefers-reduced-motion: reduce) {
  [data-consultation-content],
  .consultation__success {
    transition: none;
  }
}




/* =========================================================
   CONSULTATION
   DESKTOP
   ========================================================= */

.consultation {
  display: grid;

  grid-template-columns:
    minmax(0, .85fr)
    minmax(430px, 1.15fr);

  margin-top: 38px;
  margin-bottom: 38px;

  padding:
    10px
    var(--page-right-gap)
    0
    var(--page-left-gap);

  color: #fff;
  background: var(--page-bg);
}


/* =========================================================
   CONSULTATION — CONTENT
   Именно этот блок задает высоту всей строки
   ========================================================= */

.consultation__content {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;

  min-width: 0;

  overflow: hidden;
  isolation: isolate;

  /* Нужные нам 60px сверху и снизу */
  padding:
    75px
    var(--page-right-gap)
    75px
    var(--page-left-gap);

  background-color: var(--sidebar-bg);

  text-align: left;
}

/* =========================================================
   CONSULTATION — BLUE PATTERN
   ========================================================= */

.blue-pattern--consultation {
  position: absolute;
  z-index: 0;

  display: block;

  width: 125%;
  height: 125%;
  max-width: none;

  left: -12%;
  top: -12%;

  object-fit: cover;

  opacity: .24;

  pointer-events: none;
  user-select: none;
}


/*
 * Весь реальный контент держим
 * поверх декоративного паттерна.
 */
.consultation__content > *:not(.blue-pattern--consultation) {
  position: relative;
  z-index: 2;
}

/* =========================================================
   CONSULTATION — TYPOGRAPHY
   ========================================================= */

.consultation__content h2 {
  margin: 0;

  font-size: clamp(22px, 1.65vw, 30px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -.9px;

  text-align: left;
}


.consultation__lead {
  width: 100%;
  max-width: 580px;

  margin:
    22px
    0
    0;

  font-size: 16px;
  font-weight: 300;
  line-height: 1.35;

  opacity: .96;

  text-align: left;
}


/* =========================================================
   CONSULTATION — FORM
   ========================================================= */

.consultation-form {
  display: grid;

  gap: 18px;

  width: min(100%, 480px);

  margin:
    34px
    0
    0;
}


.consultation-form label {
  display: block;
}


.consultation-form input {
  width: 100%;
  height: 42px;

  padding:
    0
    8px;

  border: 0;
  border-bottom:
    1px solid
    rgb(255 255 255 / 72%);

  border-radius: 0;

  outline: none;

  color: #fff;
  background: transparent;

  text-align: center;

  font-size: 16px;
}


.consultation-form input::placeholder {
  color: #fff;
  opacity: .92;
}


.consultation-form input:focus {
  border-bottom-color: var(--accent);
}


.consultation-form button {
  min-height: 54px;

  margin-top: 2px;

  border: 0;
  border-radius: 999px;

  color: #111;
  background: #fff;

  font-size: 17px;

  cursor: pointer;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}


.consultation-form button:hover,
.consultation-form button:focus-visible {
  transform: translateY(-1px);

  box-shadow:
    0 8px 20px
    rgb(0 0 0 / 12%);

  outline: none;
}


.consultation-form__message {
  min-height: 18px;

  margin:
    -4px
    0
    0;

  text-align: center;

  font-size: 13px;

  opacity: .9;
}


/* =========================================================
   CONSULTATION — VISUAL
   Картинка больше НЕ определяет высоту grid
   ========================================================= */

.consultation__visual {
  position: relative;

  min-width: 0;
  min-height: 0;

  overflow: hidden;
}


.consultation__visual img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: 55% 50%;
}

/* =========================================================
   CONSULTATION
   DESKTOP HEIGHT
   ========================================================= */

@media (min-width: 1025px) {

  .consultation {
    /*
     * Убираем дополнительные 10px сверху,
     * чтобы высоту блока определял непосредственно контент.
     */
    padding-top: 0;
  }


  .consultation__content {
    /*
     * Высота блока:
     * содержимое + 60px сверху + 60px снизу.
     */
    padding:
      60px
      var(--page-right-gap)
      60px
      var(--page-left-gap);
  }


  .consultation__visual {
    /*
     * Убираем фиксирующий минимальный размер 430px.
     * Теперь высоту всей строки задает текстовая колонка.
     */
    min-height: 0;
    height: 100%;
  }


  .consultation__visual img {
    width: 100%;
    height: 100%;

    object-fit: cover;
  }

}


/* =========================================================
   CONSULTATION
   TABLET — max-width: 1024px
   ========================================================= */

@media (max-width: 1024px) {

  .consultation {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);
  }


  .consultation__content {
    /*
     * Вертикальное центрирование
     * сохраняется из desktop.
     */

    padding-left: var(--tablet-gap);
    padding-right: 34px;
  }


  .blue-pattern--consultation {
    width: 132%;
    height: 132%;

    left: -16%;
    top: -16%;
  }


  .consultation-form {
    margin-left: 0;
  }

}



/* =========================================================
   CONSULTATION
   MOBILE — max-width: 760px
   ========================================================= */

@media (max-width: 760px) {

  .consultation {
    grid-template-columns:
      minmax(0, 1fr);

    margin-top: var(--section-space);

    padding: 0;
  }


  .consultation__content {
    /*
     * На mobile также сохраняем
     * вертикальную логику блока,
     * но используем мобильные отступы.
     */

    justify-content: center;

    padding:
      42px
      var(--mobile-gap)
      46px;

    text-align: left;
  }


  .blue-pattern--consultation {
    width: 145%;
    height: 145%;

    left: -22%;
    top: -20%;

    opacity: .28;
  }


  .consultation__content h2 {
    font-size: 30px;

    text-align: left;
  }


  .consultation__lead {
    font-size: 15px;

    text-align: left;
  }


  .consultation-form {
    width: 100%;

    margin:
      28px
      0
      0;
  }


  .consultation__visual {
    min-height: 360px;
  }

}



/* =========================================================
   CONSULTATION
   SMALL MOBILE — max-width: 480px
   ========================================================= */

@media (max-width: 480px) {
    
  .consultation {

  margin-top: 20px;
  margin-bottom: 20px;

}

  .blue-pattern--consultation {
    width: 155%;
    height: 155%;

    left: -28%;
    top: -24%;
  }


  .consultation__content h2 {
    font-size: 27px;
  }


  .consultation__visual {
    min-height: 300px;
  }

}










/* =========================================================
   VIVARO — GIFT CERTIFICATE SUCCESS
   ========================================================= */

#gift-consultation [data-gift-content] {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

#gift-consultation [data-gift-content].is-leaving {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

#gift-consultation [data-gift-content][hidden],
#gift-consultation [data-gift-success][hidden] {
  display: none !important;
}

/* Используем существующие
   .consultation__success и .is-visible */

#gift-consultation
[data-formit-success-message] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #gift-consultation [data-gift-content] {
    transition: none;
  }
}