/* Скрыть все три меню до тех пор, пока JS не добавит .open */
.uc-1,
.uc-2,
.uc-3      {display:none !important;}

/* Показать, когда JS добавил класс .open */
.uc-1.open,
.uc-2.open,
.uc-3.open {display:block !important;}

/* десктоп ≥1200 px */
#custom-menu{
  position:absolute; left:144px; top:-19px; width:572px;
}
#custom-menu .menu-item{
  display:block; width:572px; height:51px; line-height:51px;
  font-family:"centurygothic",sans-serif; font-size:20px; font-weight:400;
  padding-left:20px; background:#F4F4F4; color:#294483;
  text-decoration:none; cursor:pointer; user-select:none;
  transition:background .15s,color .15s;
}
#custom-menu .menu-item.active{background:#123076!important; color:#F4F4F4!important;}

/* планшет 960–1200 px */
@media (min-width:960px) and (max-width:1200px){
  #custom-menu{left:150px!important; top:-12px!important; width:361px!important;}
  #custom-menu .menu-item{
    width:361px!important; height:40px!important; line-height:40px!important;
    font-size:16px!important; padding-left:12px!important;
  }
}


/* 1) Сам Zero-block и «холст» внутри него */
#rec1088092261,                   /* внешний контейнер блока */
#rec1088092261 .t396__artboard {  /* внутренний холст Zero-block'а */
  overflow: visible !important;   /* меню может выходить наружу */
  position: relative;            /* чтобы z-index работал гарантированно */
  z-index: 9000 !important;     /* выше, чем у любых баннеров/слайдеров */
}

/* 2) Само меню (оставляем то, что было, + z-index для надёжности) */
#custom-menu{
  position:absolute;
  left:144px; top:-19px; width:572px;
  z-index: 9100;          /* чуть выше, чем у родителя */
}

/* высота шапки = 90 px; показываем меню сразу под ней */
@media (min-width:961px){          /* десктоп */
  .uc-1,
  .uc-2{
    position:fixed !important;
    top:90px; left:0; width:100%;
    z-index:9900;                /* чуть ниже шапки, выше всего остального */
  }
}

/*  шапка (замените recHEADER на id своего блока-хедера)  */
#rec967579951{
  z-index:10100 !important;   /* выше, чем z-index:9999 у .panel */
}

.panel{
  top:var(--hdr-h,90px);
  height:calc(100vh - var(--hdr-h,90px));
}

/* === Переменные === */
:root {
  --c-main: #123076;
  --h: 60px;
  --font-size: 20px;

  /* Десктоп */
  --w-1: 120px;
  --w-2: 120px;
  --w-3: 130px;
  --w-4: 130px;
  --w-5: 160px;
  --w-6: 290px;
  --btn-w: 170px;      /* уменьшили на 40px (210 → 170) */

  /* Адаптив (960x1200) —
     будут переопределены ниже */
  --h-sm: 45px;
  --font-sm: 18px;
  --btn-w-sm: 155px;   /* уменьшили на 40px (195 → 155) */
}

/* === Базовые стили (десктоп) === */
#rec967829051 {
  position: relative !important;
  z-index: 100 !important;
  overflow: visible !important;
}

#rec967829051 .form-desktop {
  width: 1200px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;   /* выравниваем по центру */
}

#rec967829051 .t-form__inputsbox {
  width: calc(100% - 230px) !important; /* исходное вычитание */
  height: var(--h) !important;
  border: 2px solid var(--c-main) !important;
  border-radius: 15px !important;
  background: white !important;
  display: flex !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

#rec967829051 .t-input-group,
#rec967829051 .t-input-group_ph {
  position: relative !important;
  height: var(--h) !important;
  display: inline-block !important;
  vertical-align: top !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-left: none !important;
}

/* Вертикальные разделители (общие) */
#rec967829051 .t-input-group:not(:first-child)::before,
#rec967829051 .t-input-group_ph::before {
  content: '';
  position: absolute;
  top: 2px;    /* изначально было 2px */
  bottom: 2px; /* изначально было 2px */
  left: 0;
  width: 2px;
  background: var(--c-main);
}

/* Ширины полей (десктоп) */
#rec967829051 .t-input-group:nth-child(1) { width: var(--w-1) !important; }
#rec967829051 .t-input-group:nth-child(2) { width: var(--w-2) !important; }
#rec967829051 .t-input-group:nth-child(3) { width: var(--w-3) !important; }
#rec967829051 .t-input-group:nth-child(4) { width: var(--w-4) !important; }
#rec967829051 .t-input-group:nth-child(5) { width: var(--w-5) !important; }
#rec967829051 .t-input-group_ph { width: var(--w-6) !important; }

/* Поля ввода */
#rec967829051 .t-input {
  width: 100% !important;
  height: 100% !important;
  padding: 0 20px !important;
  font-size: var(--font-size) !important;
  color: rgba(0, 0, 0, 0.6) !important;
  border: none !important;
  background: transparent !important;
}

/* Кнопка (десктоп) */
#rec967829051 .tn-form__submit {
  margin-left: 30px !important;
}
#rec967829051 .t-submit {
  width: var(--btn-w) !important;
  height: var(--h) !important;
  background: var(--c-main) !important;
  color: white !important;
  border-radius: 15px !important;
  font-size: 24px !important;
  cursor: pointer !important;
  transition: opacity 0.2s !important;
  align-self: center !important;  /* на всякий случай */
}

/* === Адаптив (≤1200px) === */
@media (max-width: 1200px) {
  /* Переопределяем размеры */
  :root {
    --w-1-sm: 88px;      /* +10 к предыдущему 78 */
    --w-2-sm: 83px;      /* +5 к 78 */
    --w-3-sm: 91px;      /* +5 к 86 */
    --w-4-sm: 91px;      /* +5 к 86 */
    --w-5-sm: 114px;     /* +5 к 109 */
    --w-6-sm: 225px;     /* +10 к 215 */
    --btn-w-sm: 155px;   /* кнопка на 40px меньше */
  }

  /* Общая ширина и выравнивание */
  #rec967829051 .form-desktop {
    width: 877px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
  }

  /* Блок ячеек */
  #rec967829051 .t-form__inputsbox {
    width: calc(877px - var(--btn-w-sm) - 20px) !important; /* 20px отступ кнопки */
    height: var(--h-sm) !important;
    font-size: var(--font-sm) !important;
  }

  #rec967829051 .t-input-group,
  #rec967829051 .t-input-group_ph {
    height: var(--h-sm) !important;
  }

  /* Не трогаем разделители — они берут настройки из базовых */
  
  /* Ширины полей (адаптив) */
  #rec967829051 .t-input-group:nth-child(1) { width: var(--w-1-sm) !important; }
  #rec967829051 .t-input-group:nth-child(2) { width: var(--w-2-sm) !important; }
  #rec967829051 .t-input-group:nth-child(3) { width: var(--w-3-sm) !important; }
  #rec967829051 .t-input-group:nth-child(4) { width: var(--w-4-sm) !important; }
  #rec967829051 .t-input-group:nth-child(5) { width: var(--w-5-sm) !important; }
  #rec967829051 .t-input-group_ph { width: var(--w-6-sm) !important; }

  /* Поля ввода (адаптив) */
  #rec967829051 .t-input {
    padding: 0 10px !important;
    font-size: var(--font-sm) !important;
  }

  /* Кнопка (адаптив) */
  #rec967829051 .tn-form__submit {
    margin-left: 20px !important;
  }
  #rec967829051 .t-submit {
    width: var(--btn-w-sm) !important;
    height: var(--h-sm) !important;
    font-size: var(--font-sm) !important;
    align-self: center !important;
  }
}

/* Устранение ошибок */
#rec967829051 .t-form__errorbox-middle {
  display: none !important;
}
#rec967829051 .t-input-group:not(:first-child)::before,
#rec967829051 .t-input-group_ph::before {
  top:    0 !important;
  bottom: 0 !important;
}

@media screen and (min-width: 640px) and (max-width: 960px) {
  /* Контейнер Тильды фиксированной ширины 640px */
  #rec967829051 {
    width: 640px !important;
    position: relative !important;
  }

  /* Форма с полями шириной 625px с отступом слева 10px внутри контейнера */
  #rec967829051 .t-form__inputsbox {
    width: 625px !important;
    margin-left: 10px !important;
    margin-right: auto !important;
    display: block !important;
    position: relative !important;
    font-size: 14px !important;
  }

  /* Ячейки формы: ширина и высота, выравнивание текста по вертикали */
  #rec967829051 .t-input-block {
    display: inline-block !important;
    width: 146px !important;
    height: 49px !important;
    margin: 0 5px 10px 0 !important;
    box-sizing: border-box !important;
    float: none !important;
  }
  #rec967829051 .t-input-block input,
  #rec967829051 .t-input-block textarea,
  #rec967829051 .t-input-block select {
    height: 49px !important;
    padding-top: 7px !important;
    padding-bottom: 12px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    line-height: normal !important;
    vertical-align: middle !important;
  }



  /* Кнопка: ширина фиксирована, центрирование по центру внутри формы */
  #rec967829051 .t-form__submit,
  #rec967829051 .tn-form__submit {
    clear: both !important;
    width: 625px !important; /* совпадает с формой */
    margin: 20px -5px !important; /* сверху 20px, слева и справа 10px */
    display: block !important;
    position: relative !important; /* НЕ fixed */
    text-align: center !important;
  }

  #rec967829051 .t-form__submit button,
  #rec967829051 .tn-form__submit button {
    width: 160px !important;
    height: 49px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 0 15px !important;
    display: inline-block !important;
  }
}

