/* ============================================
   ФОРМА ЗАПИСИ НА ЭКСКУРСИЮ (TOUR FORM)
   ============================================ */

/* Скрываем стандартный выпадающий список intl-tel-input */
.iti__country-container,
.iti__country-list,
.iti__country-list-wrapper,
.iti__country-list-box,
.iti__country-list-dropdown,
.iti__search-box,
.iti__search-input,
.iti__selected-flag {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Скрываем стрелку выпадающего списка intl-tel-input */
.iti__arrow {
  display: none !important;
}

/* Убираем возможность клика на флаг intl-tel-input */
.iti__selected-flag {
  pointer-events: none !important;
}

.tour-form {
  max-width: var(--page-width);
  width: 100%;
  margin: 0 auto;
  margin-top: 0;
  text-align: center;
  box-sizing: border-box;
}

/* ВАЖНО: дропдауны выбора кода страны должны быть поверх следующих секций.
   Если у соседних блоков есть свой stacking-context, высокий z-index внутри селектора не помогает —
   поднимаем всю секцию формы. */
.tour-form,
.trial-day-form {
  position: relative;
  z-index: 900;
}

.form_content {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form_bg {
  position: relative;
  width: 100vw;
  max-width: none;
  min-height: 300px;
  height: auto;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: visible;
}

.form_bg img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* Темное размытое наложение для block18 - как на главной странице */
.block18 .form_bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.698);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
  pointer-events: none;
}

@media (min-width: 1440px) {
  .form_bg img {
    object-fit: cover;
    object-position: center;
  }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 1023px) {
  .form_bg {
    width: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
  .form_hover {
    padding: clamp(20px, 4vw, 30px) 24px !important;
  }
  
  .form_hover_step2 {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  
  .input_group {
    max-width: 100%;
    gap: clamp(10px, 2vw, 20px);
  }
}

/* Дополнительное правило для 768px */
@media (max-width: 768px) {
  .form_hover {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
  }
  
  .form_hover_step2 {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
  }
  
  /* form_txt выравнивание слева при 768px */
  .form_txt {
    text-align: left !important;
  }
  
  /* Размеры шрифтов 14px для элементов в form_hover при 768px */
  .form_hover .number,
  .form_hover .capcha,
  .form_hover .phone_flag_selector .phone-code,
  .form_hover input[type="tel"],
  .form_hover .submit,
  .form_hover .alt_text,
  .tour-form .form_hover .number,
  .tour-form .form_hover .capcha,
  .tour-form .form_hover .phone_flag_selector .phone-code,
  .tour-form .form_hover input[type="tel"],
  .tour-form .form_hover .submit,
  .tour-form .form_hover .alt_text {
    font-size: 14px !important;
  }
  
  /* Общие стили для всех форм при 768px - как на главной странице */
  .form_hover .input_column_left,
  .tour-form .form_hover .input_column_left {
    align-items: center;
  }
  
  .form_hover .input_column_right,
  .tour-form .form_hover .input_column_right {
    align-items: center;
    width: 100%;
    max-width: 100%;
    flex: 1;
  }
  
  /* comment во всю ширину при 768px */
  .form_hover .input_submit_wrapper,
  .tour-form .form_hover .input_submit_wrapper {
    max-width: 100%;
    width: 100%;
  }

  .form_hover .input_submit_wrapper .comment,
  .tour-form .form_hover .input_submit_wrapper .comment {
    width: 100%;
  }
  
  /* Настраиваем grid так, чтобы input_column_left начинал сужаться только когда input_column_right достигнет 160px */
  .form_hover .input_group,
  .tour-form .form_hover .input_group {
    grid-template-columns: minmax(0, max-content) minmax(160px, 1fr) !important;
  }
  
  
  /* Убираем overflow: hidden у input_column_left и phone_wrapper для form_hover, чтобы modal был виден */
  .form_hover .input_column_left,
  .tour-form .form_hover .input_column_left {
    overflow: visible !important;
  }
  
  .form_hover .phone_wrapper,
  .tour-form .form_hover .phone_wrapper {
    overflow: visible !important;
  }
  
  /* Выравнивание колонок по верху при 768px */
  .input_column_left,
  .input_column_right {
    align-items: flex-start !important;
  }
  
  /* Исправление для input_group - чтобы не выходил за рамки form_hover и form_content */
  .form_content .input_group,
  .form_hover .input_group,
  .tour-form .form_content .input_group,
  .tour-form .form_hover .input_group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    min-width: 0; /* Позволяет grid-элементам сжиматься */
    grid-template-columns: max-content 1fr; /* Две колонки - как в оригинале */
    align-items: start; /* Выравнивание элементов по верху */
  }
  
  .block18 .input_column_right {
    margin-top: 0 !important;
  }
  
  /* Исправление для колонок внутри input_group */
  .form_content .input_group .input_column_left,
  .form_content .input_group .input_column_right,
  .form_hover .input_group .input_column_left,
  .form_hover .input_group .input_column_right,
  .tour-form .form_content .input_group .input_column_left,
  .tour-form .form_content .input_group .input_column_right,
  .tour-form .form_hover .input_group .input_column_left,
  .tour-form .form_hover .input_group .input_column_right {
    min-width: 0; /* Позволяет элементам сжиматься */
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Убираем все отступы у input_column_right при 768px */
  .input_column_right {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Для block20 делаем верхний отступ 10px */
  .block20 .input_column_right {
    margin-top: 10px !important;
  }
  
  /* Стили для block20 capcha при 768px */
  .block20 .capcha {
    margin-bottom: 21px !important;
  }

  .alt_text {
    margin-top: 20px !important;
  }

  .form_bg {
    min-height: 10px;
  }
  
  /* Выравнивание элементов в input_column_right по верху */
  .input_column_right .capcha {
    align-self: flex-start !important;
  }
  
  /* Стили для phone_wrapper и его элементов при 768px - как на главной странице */
  .phone_flag_selector,
  .tour-form .phone_flag_selector {
    gap: 2px;
    width: fit-content !important;
  }
  .phone_flag_selector {
    padding: 0px 5px !important;
  }

  .phone_flag_selector .flag-arrow {
    font-size: 14px !important;
  }
  
  /* Убираем margin-left: auto у стрелочки при 768px */
  .phone_flag_selector .flag-arrow,
  .tour-form .phone_flag_selector .flag-arrow {
    margin-left: 0 !important;
  }
  
  /* Делаем ширину phone_flag_selector_wrapper адаптивной, чтобы она подстраивалась под содержимое */
  .phone_flag_selector_wrapper,
  .tour-form .phone_flag_selector_wrapper {
    width: auto !important;
    min-width: 1px !important;
    max-width: none;
  }
  
  input[type="tel"],
  .tour-form input[type="tel"],
  .trial-day-form input[type="tel"],
  .testing-form input[type="tel"],
  .block18 input[type="tel"] {
    padding: 9px 10px 9px 3px;
  }
  
  /* Padding для phone_number input в form_hover_step2 при 768px */
  .form_hover_step2 .form_step2_input_wrapper .phone_number input,
  .trial-day-form .form_hover_step2 .form_step2_input_wrapper .phone_number input,
  .testing-form .form_hover_step2 .form_step2_input_wrapper .phone_number input,
  .block18 .form_hover_step2 .form_step2_input_wrapper .phone_number input {
    padding: 12.5px 10px 15px 0 !important;
  }

  .phone_number {
    align-items: center;
  }
  
  /* Восстанавливаем phone_modal_wrapper для form_hover как на 769px+ */
  .form_hover .phone_flag_selector .phone_modal_wrapper,
  .tour-form .form_hover .phone_flag_selector .phone_modal_wrapper {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    transform: none !important;
    z-index: 10000 !important;
    /* Убираем ограничения ширины, чтобы modal был нормальной ширины */
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    right: auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
  }
  
  /* Восстанавливаем стандартную ширину phone_modal внутри form_hover */
  .form_hover .phone_flag_selector .phone_modal_wrapper .phone_modal,
  .tour-form .form_hover .phone_flag_selector .phone_modal_wrapper .phone_modal {
    width: min(280px, calc(100vw - 40px)) !important;
    max-width: 280px !important;
    margin: 0 !important;
  }
  
  .form_hover .phone_flag_selector.active .phone_modal_wrapper,
  .tour-form .form_hover .phone_flag_selector.active .phone_modal_wrapper {
    pointer-events: auto !important;
  }
  
  /* Размеры шрифтов 14px для элементов в form_hover_step2 при 768px */
  .form_hover_step2 .form_step2_input_wrapper,
  .form_hover_step2 .form_step2_input_wrapper *,
  .form_hover_step2 .form_step2_field_parent,
  .form_hover_step2 .form_step2_field_parent *,
  .form_hover_step2 .form_step2_submit,
  .form_hover_step2 .form_step2_alt_text,
  .tour-form .form_hover_step2 .form_step2_input_wrapper,
  .tour-form .form_hover_step2 .form_step2_input_wrapper *,
  .tour-form .form_hover_step2 .form_step2_field_parent,
  .tour-form .form_hover_step2 .form_step2_field_parent *,
  .tour-form .form_hover_step2 .form_step2_submit,
  .tour-form .form_hover_step2 .form_step2_alt_text {
    font-size: 14px !important;
  }
  
  /* Стили для phone_step2_tour при 768px */
  #phone_step2_tour {
    padding-bottom: 15px !important;
    padding-left: 0 !important;
  }
}

/* Как на главной: в step2 модалка выбора кода страны не выходит за экран */
@media (max-width: 620px) {
  .form_hover_step2 .phone_flag_selector .phone_modal_wrapper,
  .trial-day-form .form_hover_step2 .phone_flag_selector .phone_modal_wrapper,
  .tour-form .form_hover_step2 .phone_flag_selector .phone_modal_wrapper,
  .testing-form .form_hover_step2 .phone_flag_selector .phone_modal_wrapper,
  .block18 .form_hover_step2 .phone_flag_selector .phone_modal_wrapper {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(calc(-50% - 10px)) !important;
    z-index: 10000 !important;
    width: auto !important;
    max-width: calc(100vw - 48px) !important;
    min-width: auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
  }

  .form_hover_step2 .phone_flag_selector .phone_modal_wrapper .phone_modal,
  .trial-day-form .form_hover_step2 .phone_flag_selector .phone_modal_wrapper .phone_modal,
  .tour-form .form_hover_step2 .phone_flag_selector .phone_modal_wrapper .phone_modal,
  .testing-form .form_hover_step2 .phone_flag_selector .phone_modal_wrapper .phone_modal,
  .block18 .form_hover_step2 .phone_flag_selector .phone_modal_wrapper .phone_modal {
    width: min(280px, calc(100vw - 48px)) !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .form_hover_step2 .phone_flag_selector.active .phone_modal_wrapper,
  .trial-day-form .form_hover_step2 .phone_flag_selector.active .phone_modal_wrapper,
  .tour-form .form_hover_step2 .phone_flag_selector.active .phone_modal_wrapper,
  .testing-form .form_hover_step2 .phone_flag_selector.active .phone_modal_wrapper,
  .block18 .form_hover_step2 .phone_flag_selector.active .phone_modal_wrapper {
    pointer-events: auto !important;
  }
}

/* При 768px-1024px - изменяем padding для form_step2_input_wrapper */
@media (min-width: 768px) and (max-width: 1024px) {
  .form_step2_input_wrapper input,
  .form_step2_input_wrapper select,
  .tour-form .form_step2_input_wrapper input,
  .tour-form .form_step2_input_wrapper select {
    padding-left: 15px !important;
  }
  
  .form_step2_input_wrapper .phone_number,
  .tour-form .form_step2_input_wrapper .phone_number {
    padding-left: 20px !important;
  }
}

/* При 385px и ниже - одна колонка */
@media (max-width: 385px) {
  .form_hover .input_group,
  .tour-form .form_hover .input_group,
  .block18 .form_hover .input_group {
    grid-template-columns: 1fr !important; /* Одна колонка - элементы друг под другом */
  }
  
  .form_hover .input_column_left,
  .tour-form .form_hover .input_column_left,
  .block18 .form_hover .input_column_left {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .form_hover .input_column_right,
  .tour-form .form_hover .input_column_right,
  .block18 .form_hover .input_column_right {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .form_hover .input_column_left .phone_wrapper,
  .tour-form .form_hover .input_column_left .phone_wrapper,
  .block18 .form_hover .input_column_left .phone_wrapper {
    width: 100%;
    max-width: 100%;
  }
  
  .form_hover .input_column_left .phone_number,
  .tour-form .form_hover .input_column_left .phone_number,
  .block18 .form_hover .input_column_left .phone_number {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
  }
  
  .form_hover .input_column_left .phone_number input,
  .tour-form .form_hover .input_column_left .phone_number input,
  .block18 .form_hover .input_column_left .phone_number input {
    width: 100%;
    box-sizing: border-box;
    padding-left: 23px;
  }
  
  /* Убираем overflow: hidden у input_column_left и phone_wrapper для form_hover, чтобы modal был виден */
  .form_hover .input_column_left,
  .tour-form .form_hover .input_column_left,
  .block18 .form_hover .input_column_left {
    overflow: visible !important;
  }
  
  .form_hover .phone_wrapper,
  .tour-form .form_hover .phone_wrapper,
  .block18 .form_hover .phone_wrapper {
    overflow: visible !important;
  }
}

.form_hover {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: clamp(20px, 4vw, 40px) clamp(15px, 3vw, 20px);
  box-sizing: border-box;
  overflow: visible;
}

/* Специальные стили для block18 - белый текст как на главной странице */
.block18 .form_hover {
  position: relative;
  z-index: 2;
}

.block18 .form_txt {
  color: #FFFFFF !important;
}

.block18 .alt_text {
  color: #FFFFFF !important;
}

.block18 .alt_text a {
  color: #D2232A !important;
}

.block18 .number,
.block18 .capcha {
  color: #FFFFFF !important;
}

/* Все label в block18 должны быть белыми */
.block18 label {
  color: #FFFFFF !important;
}

/* form_step2_alt_text в block18 должен быть белым */
.block18 .form_step2_alt_text {
  color: #FFFFFF !important;
}

.form_txt {
  font-family: Lora, serif;
  font-weight: 500;
  font-size: clamp(28px, 5vw, 32px);
  line-height: 1.2;
  color: var(--color-black);
  margin-bottom: 24px;
  text-align: center;
  width: 100%;
}

.input_group {
  display: grid;
  justify-content: center;
  grid-template-columns: max-content 1fr;
  gap: clamp(15px, 3vw, 20px);
  margin-bottom: clamp(20px, 3vw, 30px);
  width: 100%;
  max-width: min(750px, 100%);
  box-sizing: border-box;
}

.input_column_left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
  min-width: max-content;
  max-width: 100%;
}

.input_column_right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
}

.input_submit_wrapper {
  display: flex;
  gap: 0;
  width: 100%;
}

.number {
  font-weight: 400;
  font-size: 16px;
  color: var(--color-black);
  display: block;
  margin-bottom: 8px;
}

.required {
  color: #dc3545 !important;
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Универсальное правило для всех звездочек */
span.required,
.required {
  color: #dc3545 !important;
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  background: transparent !important;
  text-shadow: none !important;
}

/* Специфичный стиль для звездочек в form_hover_step2 */
.form_step2_input_wrapper label .required,
.form_step2_input_wrapper label span.required,
.form_hover_step2 label .required,
.form_hover_step2 label span.required,
.tour-form .form_step2_input_wrapper label .required,
.tour-form .form_step2_input_wrapper label span.required,
.tour-form .form_hover_step2 label .required,
.tour-form .form_hover_step2 label span.required,
label .required,
label span.required,
.number .required,
.number span.required,
label.number .required,
label.number span.required {
  color: #dc3545 !important;
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  background: transparent !important;
  text-shadow: none !important;
}

.phone_wrapper {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  height: 48px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 8px;
  overflow: visible;
  position: relative;
}

/* phone_modal_wrapper всегда выравнивается по левому краю phone_wrapper */
.phone_wrapper .phone_flag_selector .phone_modal_wrapper {
  left: 0 !important;
  transform: none !important;
}

.phone_flag_selector_wrapper {
  position: relative;
  display: block;
  flex-shrink: 0;
  min-width: 75px;
  width: 75px;
}

.phone_flag_selector {
  padding: 0 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  height: 48px;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  flex-wrap: nowrap;
}

.phone_flag_selector .phoneFlagImg,
.phone_flag_selector .flag,
.phone_flag_selector .flag-emoji {
  position: relative;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: contain;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  align-self: center;
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Emoji-флаги: шрифт Twemoji Country Flags (country-flag-emoji-polyfill) — как на главной странице */
.phone_flag_selector .flag-emoji,
.phone_country_option .flag-emoji {
  font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 20px;
  object-fit: none;
  max-width: none !important;
}

.phone_flag_selector .phone-code {
  font-size: 16px;
  color: var(--color-black);
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  display: inline-block;
  align-self: center;
}

.phone_flag_selector .flag-arrow {
  color: #D2232A;
  font-size: 17px;
  margin-left: auto;
  transition: transform 0.2s;
  line-height: 1;
  flex-shrink: 0;
  display: inline-block;
  align-self: center;
}

.phone_flag_selector.active .flag-arrow {
  transform: rotate(180deg);
}

/* Выпадающее окно для выбора кода страны */
.phone_flag_selector .phone_modal_wrapper {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  transform: none;
  z-index: 10000;
  pointer-events: none;
}

.phone_flag_selector.active .phone_modal_wrapper {
  pointer-events: auto;
}

/* Увеличиваем z-index для формы на странице детского сада, чтобы модальное окно было поверх всех элементов */
.kindergarten-page .tour-form .phone_flag_selector .phone_modal_wrapper,
.kindergarten-page .form_hover .phone_flag_selector .phone_modal_wrapper {
  z-index: 99999 !important;
}

.kindergarten-page .phone_modal {
  z-index: 99999 !important;
}

@media (max-width: 768px) {
  .phone_wrapper {
    position: relative;
  }

  .phone_flag_selector .phone_modal_wrapper {
    position: absolute;
    left: 0;
    right: auto;
    transform: none;
    width: min(280px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    padding: 0;
    box-sizing: border-box;
  }

  .phone_flag_selector .phone_modal_wrapper .phone_modal {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

.phone_modal {
  width: min(280px, calc(100vw - 40px));
  max-width: 280px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s ease;
}

.phone_modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.phone_modal_header {
  padding: 20px 24px;
  padding-right: 60px;
  font-size: 15px;
  line-height: 1.5;
  color: #000000;
  border-bottom: 1px solid #eee;
  text-transform: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone_country_options {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f5f5f5;
}

.phone_country_options::-webkit-scrollbar {
  width: 6px;
}

.phone_country_options::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.phone_country_options::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.phone_country_options::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.phone_country_option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
  flex: 0 0 calc(50% - 6px);
  min-width: 0;
  box-sizing: border-box;
  width: calc(50% - 6px);
}

.phone_country_option:hover {
  background: #f9f9f9;
}

.phone_country_option .flag,
.phone_country_option .flag-emoji {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  align-self: center;
  position: relative;
  font-size: 20px;
  line-height: 1;
}

.phone_country_option > span:not(.flag-emoji) {
  font-size: 16px;
  font-weight: 500;
  color: #000000;
  line-height: 1.5;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  display: inline-block;
  align-self: center;
}

.phone_close_btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  min-width: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 24px;
  color: #999;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
  margin: 0;
  z-index: 10;
}

.phone_close_btn:hover {
  background: #f0f0f0;
  color: #666;
}

.phone_number {
  display: inline-flex;
  width: auto;
  flex: 1;
  min-width: 0;
  background: transparent;
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  align-items: center;
}

input[type="tel"] {
  width: 12ch;
  border: none;
  padding: 12.5px 10px 9px 30px;
  font-size: 16px;
  outline: none;
  box-sizing: content-box;
  background: transparent;
  border-radius: 0 8px 8px 0;
}

input[type="tel"]::placeholder {
  color: #adb5bd;
}

/* trial-day-form: уменьшаем зазор между кодом страны и вводом номера */
.trial-day-form .form_hover .phone_number input[type="tel"],
.trial-day-form .form_hover_step2 .form_step2_input_wrapper .phone_number input[type="tel"] {
  /* Как в block7 на главной: единое выравнивание placeholder относительно стрелки/кода */
  padding-left: 30px !important;
}

/* trial-day-form (desktop): как в block7 на главной */
.trial-day-form .phone_flag_selector_wrapper {
  min-width: 75px !important;
  width: 75px !important;
}

@media (max-width: 768px) {
  .trial-day-form .phone_flag_selector_wrapper {
    min-width: 86px !important;
    width: 86px !important;
  }

  .trial-day-form .form_hover .phone_number input[type="tel"],
  .trial-day-form .form_hover_step2 .form_step2_input_wrapper .phone_number input[type="tel"] {
    padding-left: 12px !important;
  }
}

.capcha {
  font-weight: 400;
  font-size: 16px;
  color: var(--color-black);
  display: block;
  margin-bottom: 8px;
}

.comment {
  flex: 1;
  min-width: 0;
  height: 49px;
  font-size: 16px;
  border: 1px solid #fff;
  border-radius: 8px 0 0 8px;
  border-right: none;
  padding: 14px 16px;
  outline: none;
}

.submit {
  background: #dc3545;
  color: white;
  border: none;
  min-width: 99px;
  width: 99px;
  height: 49px;
  font-size: 17px;
  font-weight: 500;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  opacity: 1 !important;
}

.submit:hover:not(:disabled) {
  background: #c82333;
}

.submit:disabled {
  opacity: 1 !important;
  cursor: not-allowed;
  background: #dc3545;
}

.alt_text {
  font-weight: 400;
  font-size: 16px;
  color: var(--color-black);
  margin-top: 30px;
  text-align: left;
  line-height: 18px;
}

.alt_text a {
  color: #dc3545;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

.alt_text a:hover {
  text-decoration: underline;
}

/* ============================================
   ВТОРАЯ СТРАНИЦА ФОРМЫ (STEP 2)
   ============================================ */
.form_hover_step2 {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding-top: 65px;
  padding-bottom: 90px;
  padding-left: clamp(15px, 3vw, 20px);
  padding-right: clamp(15px, 3vw, 20px);
  box-sizing: border-box;
  overflow: visible;
}

.form_step2_content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.form_step2_left {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
}

.form_step2_content_wrapper {
  display: flex;
  flex-direction: column;
  gap: 35px;
  flex: 1;
  min-width: 0;
}

.form_step2_fields_wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

/* По умолчанию показываем старые row на десктопе */
.form_step2_row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch !important;
}

/* Скрываем новые колонки по умолчанию */
.form_step2_left_column,
.form_step2_right_column {
  display: none;
}

.form_step2_campus_image_wrapper {
  display: none;
}

/* На десктопе (769px+) - порядок полей: Телефон, Родитель, Email | Ребенок, Дата, Кампус */
@media (min-width: 769px) {
  .form_step2_row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    align-items: stretch !important;
  }
  
  .form_step2_field_parent {
    order: 2;
  }
  
  .form_step2_field_phone {
    order: 1;
  }
  
  .form_step2_field_email {
    order: 3;
  }
  
  .form_step2_field_child {
    order: 4;
  }
  
  .form_step2_field_birth {
    order: 5;
  }
  
  .form_step2_field_campus {
    order: 6;
  }
  
  .form_step2_left_column,
  .form_step2_right_column {
    display: none !important;
  }
  
  .form_step2_campus_image_wrapper {
    display: none !important;
  }
}

.form_step2_input_wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

/* Выравниваем инпуты и селекторы по низу блока */
.form_step2_input_wrapper input,
.form_step2_input_wrapper select,
.form_step2_input_wrapper .phone_wrapper,
.form_step2_input_wrapper .form_step2_select_container {
  margin-top: auto !important;
}

.form_step2_input_wrapper label {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #000000;
  text-align: left;
}

.form_step2_input_wrapper input,
.form_step2_input_wrapper select {
  width: 100%;
  height: 49px;
  font-size: 16px;
  border: 1px solid #fff;
  border-bottom: 2px solid #D2232A;
  border-radius: 8px;
  padding: 0px 10px 2px 45px;
  outline: none;
  background: #fff;
  box-sizing: border-box;
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  color: #000000;
  line-height: 21px;
  vertical-align: middle;
}

.form_step2_input_wrapper input:read-only {
  background: #f5f5f5;
  cursor: not-allowed;
}

.form_step2_select_wrapper {
  position: relative;
}

.form_step2_select_container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 49px;
  border: 1px solid #fff;
  border-bottom: 2px solid #D2232A;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.form_step2_select_container select {
  flex: 1;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  border: none;
  outline: none;
  padding: 0px 16px;
  padding-right: 10px;
  cursor: pointer;
  background: transparent;
  font-size: 16px;
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  color: #000000;
  line-height: 21px;
  height: 100%;
  box-sizing: border-box;
}

.form_step2_select_container select option {
  padding: 0 20px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.171875em;
  color: #231F20;
  min-height: 36px;
  height: 36px;
  background: #fff;
}

.form_step2_select_container select option:checked {
  background: #EFEFEF;
  font-weight: 700;
}

.form_step2_select_container select option:hover {
  background: #f9f9f9;
}

.form_step2_select_arrow {
  color: #D2232A;
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-block;
  align-self: center;
  padding-right: 16px;
  pointer-events: none;
}

.form_step2_input_wrapper .phone_wrapper {
  width: 100%;
  height: 49px;
  border-bottom: 2px solid #D2232A;
}

.form_step2_input_wrapper .phone_number {
  padding-left: 30px;
}

.form_step2_input_wrapper .phone_number input {
  height: 49px;
  font-size: 16px;
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  color: #000000;
  border-bottom: none;
  padding-left: 10px !important;
  padding-right: 10px;
  padding-top: 12.5px;
  padding-bottom: 9px;
}

.form_step2_input_wrapper input:focus,
.form_step2_input_wrapper select:focus {
  border-color: #dc3545;
}

.form_step2_input_wrapper input:focus::placeholder {
  opacity: 0;
}

.form_step2_input_wrapper input.error,
.form_step2_input_wrapper select.error {
  border-color: #dc3545;
}

.form_step2_bottom {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* На десктопе (769px+) делаем grid layout: submit слева (1 колонка), text справа (2 колонки) */
@media (min-width: 769px) {
  .form_step2_bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: center;
  }
  
  .form_step2_submit {
    grid-column: 1;
    width: 100% !important;
    min-width: 0;
  }
  
  .form_step2_alt_text {
    grid-column: 2 / 4;
    width: 100% !important;
    min-width: 0;
  }
}

.form_step2_submit {
  background: #dc3545;
  color: white;
  border: none;
  border-bottom: 2px solid #D2232A;
  width: calc((100% - 40px) / 3);
  height: 39px;
  font-size: 16px;
  font-weight: 400;
  font-family: Roboto, Arial, sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0 30px;
  box-sizing: border-box;
  line-height: 21px;
  flex-shrink: 0;
  opacity: 1 !important;
}

.form_step2_submit:hover {
  background: #c82333;
}

.form_step2_alt_text {
  font-weight: 400;
  font-size: 16px;
  color: var(--color-black);
  margin: 0;
  text-align: left;
}

.form_step2_alt_text a {
  color: #dc3545;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

.form_step2_alt_text a:hover {
  text-decoration: underline;
}

.form_step2_image {
  flex-shrink: 0;
  width: 233px;
  height: 261px;
  z-index: 2;
  display: block;
  position: relative;
  align-self: flex-start;
  margin-top: 0;
}

.form_step2_image img {
  width: 233px !important;
  height: 261px !important;
  border-radius: 12px;
  filter: brightness(1.4) contrast(1.25) !important;
  display: block;
}

.form_step2_caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  border-radius: 0 0 12px 12px;
  font-family: Roboto, Arial, sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 16px;
  color: #FFFFFF;
  text-align: center;
  z-index: 3;
}

@media (max-width: 1024px) {
  .form_step2_row {
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: stretch !important;
  }
  
  .form_step2_bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .form_step2_submit {
    width: 100%;
  }
  
  .form_step2_image {
    width: 100%;
    max-width: 233px;
    height: 261px;
    margin: 20px auto 0;
  }
  
  .form_step2_image img {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

@media (max-width: 768px) {
  /* Скрываем фото во всех блоках с form_hover_step2 */
  .form_hover_step2 .form_step2_image,
  .tour-form .form_hover_step2 .form_step2_image {
    display: none !important;
  }
  
  /* Новая структура полей: 2 колонки (3 слева, 3 справа) */
  .form_step2_fields_wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .form_step2_row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
    align-items: stretch !important;
  }
  
  /* Порядок полей на мобильных: Родитель, Телефон, Email | Ребенок, Дата, Кампус */
  .form_step2_field_parent {
    order: 1;
  }
  
  .form_step2_field_phone {
    order: 2;
    justify-content: space-between;
  }
  
  .form_step2_field_email {
    order: 3;
  }
  
  .form_step2_field_child {
    order: 4;
  }
  
  .form_step2_field_birth {
    order: 5;
  }
  
  .form_step2_field_campus {
    order: 6;
    justify-content: space-between;
  }
  
  /* Убираем padding-left у phone_number */
  .form_step2_input_wrapper .phone_number {
    padding-left: 0 !important;
  }
  
  /* Изменяем внутренний отступ у инпутов и кнопок в form_step2_row с 45px на 10px */
  .form_step2_row input[type="text"],
  .form_step2_row input[type="email"],
  .form_step2_row input[type="tel"],
  .form_step2_row select {
    padding-left: 10px !important;
  }
  
  .form_step2_row .form_step2_submit {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .form_step2_left_column,
  .form_step2_right_column {
    display: none !important;
  }
  
  /* Показываем новое фото кампуса на мобильных */
  .form_step2_bottom .form_step2_campus_image_wrapper,
  .form_hover_step2 .form_step2_campus_image_wrapper,
  .form_step2_content_wrapper .form_step2_campus_image_wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    position: relative !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin-top: 20px !important;
    height: auto !important;
    min-height: 269px !important;
  }
  
  .form_step2_campus_image {
    width: 100%;
    height: 269px;
    object-fit: cover;
    display: block;
  }
  
  .form_step2_campus_image_overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 27px;
    background: linear-gradient(180deg, rgba(102, 102, 102, 0) 0%, rgba(0, 0, 0, 1) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .form_step2_campus_name {
    font-family: Roboto, Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.2857142857142858em;
  }
  
  .form_step2_campus_info_icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Roboto, Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #FFFFFF;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  
  .form_step2_campus_info_icon:hover {
    opacity: 0.8;
    transform: scale(1.05);
  }
  
  .form_step2_campus_info_icon:active {
    transform: scale(0.95);
  }
  
  /* Убеждаемся, что form_step2_alt_text внизу */
  .form_step2_bottom {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: stretch !important;
  }
  
  .form_step2_alt_text {
    order: 3;
    margin-top: 0;
  }
}

