/* ===== DIALOG v20 – финальная версия с декоративными элементами и идеальным выравниванием ===== */
.dialog-v20 {
  padding: 16px 0; /* минимальные отступы */
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

/* Плавные переходы сверху и снизу */
.dialog-v20::before,
.dialog-v20::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 40px;
  pointer-events: none;
  z-index: 1;
}
.dialog-v20::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
}
.dialog-v20::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}

/* Фоновые декоративные элементы */
.v20-bg-dots {
  position: absolute;
  top: 5%;
  right: 2%;
  width: 200px;
  height: 200px;
  background-image: radial-gradient(#f4a261 2px, transparent 2px);
  background-size: 25px 25px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}
.v20-bg-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f4a261, transparent);
  opacity: 0.15;
  z-index: 0;
}
.v20-line-1 {
  width: 60%;
  top: 15%;
  left: 5%;
  transform: rotate(-3deg);
}
.v20-line-2 {
  width: 40%;
  bottom: 20%;
  right: 10%;
  transform: rotate(2deg);
}

.v20-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Заголовок */
.v20-header {
  text-align: center;
  margin-bottom: 20px;
}
.v20-subhead {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #f4a261;
  margin-bottom: 6px;
}
.v20-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: #1e2a3a;
  margin: 0 0 6px;
}
.v20-header p {
  color: #5a6a7a;
  font-size: 15px;
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Две колонки одинаковой высоты */
.v20-two-columns {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: stretch;
}

/* Левая колонка: VK виджет (структура без изменений, но растягивается) */
.v20-vk-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid #e9eef2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.02);
}
.v20-vk-card .v6-cardhead--vk {
  background: #f8fafc;
  padding: 14px 16px;
  border-bottom: 1px solid #e9eef2;
  flex-shrink: 0;
}
.v20-vk-card .v6-cardtitle {
  color: #1e2a3a;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v20-vk-card .v6-dot {
  width: 7px;
  height: 7px;
  background: #f4a261;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(244, 162, 97, 0.2);
}
.v20-vk-card .v6-open {
  color: #8a9bb0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.v20-vk-card .v6-open:hover {
  color: #f4a261;
}
.v20-vk-card .v6-vkframe {
  flex: 1;
  min-height: 0;
  position: relative;
}
.v20-vk-card .v6-vkcrop {
  height: 100%;
  overflow: hidden;
}
.v20-vk-card #vk_wall {
  height: 100%;
}
.v20-vk-card #vk_wall iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block;
  transform: translateY(-100px) !important; /* подберите значение */
}
.v20-vk-card .v6-vkfooter {
  padding: 10px 16px;
  font-size: 12px;
  color: #6f7d8e;
  border-top: 1px solid #e9eef2;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.v20-vk-card .v6-miniDot {
  width: 5px;
  height: 5px;
  background: #f4a261;
  border-radius: 50%;
}

/* Правая колонка: flex-колонка с уменьшенными отступами */
.v20-right {
  display: flex;
  flex-direction: column;
  gap: 16px; /* уменьшили gap для компактности */
  height: 100%;
}

/* Блок быстрой связи (карточка с декором) */
.v20-quick-card {
  background: #f8fafc;
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid #e9eef2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  position: relative;
  overflow: hidden;
}
.v20-quick-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(244,162,97,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.v20-quick-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}
.v20-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.v20-quick-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 40px;
  background: #ffffff;
  border: 1px solid #d0dae8;
  text-decoration: none;
  color: #1e2a3a;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s, border-color 0.2s;
}
.v20-quick-item:hover {
  background: #f8fafc;
  border-color: #f4a261;
  transform: translateY(-1px);
}
.v20-quick-item i, .v20-quick-item svg {
  font-size: 15px;
  width: 15px;
  height: 15px;
}
.v20-vk i { color: #4a76a8; }
.v20-tg i { color: #229ED9; }
.v20-avito .v20-icon svg circle:first-child { fill: #00A0FF; }
.v20-max .v20-icon svg rect { fill: #7B3FE4; }

/* Декоративный разделитель (три точки) */
.v20-divider {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0;
}
.v20-divider-dot {
  width: 5px;
  height: 5px;
  background: #f4a261;
  border-radius: 50%;
  opacity: 0.4;
}

/* Блок формы (карточка) */
.v20-form-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid #e9eef2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  position: relative;
}
.v20-form-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f4a261, transparent);
  opacity: 0.3;
}
.v20-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.v20-field {
  position: relative;
  flex: 1 1 160px;
}
.v20-field input, .v20-field select {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #d0dae8;
  background: #ffffff;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.v20-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6a7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.v20-field input:focus, .v20-field select:focus {
  border-color: #f4a261;
  box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.1);
}
.v20-field label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  padding: 0 4px;
  color: #8a9bb0;
  font-size: 15px;
  transition: 0.2s;
  pointer-events: none;
}
.v20-field input:focus + label,
.v20-field input:not(:placeholder-shown) + label {
  top: 0;
  transform: translateY(-50%) scale(0.85);
  color: #f4a261;
  font-weight: 600;
}
.v20-field input::placeholder {
  color: transparent;
}
.v20-field-select select:valid + label,
.v20-field-select select:focus + label {
  display: none;
}
.v20-submit {
  height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  border: none;
  background: #1e2a3a;
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.v20-submit:hover {
  background: #f4a261;
  transform: translateY(-1px);
}

/* Преимущества (три в ряд) */
.v20-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.v20-benefit {
  background: #fafafa;
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e9eef2;
  transition: transform 0.2s;
  height: 100%;
}
.v20-benefit:hover {
  transform: translateY(-2px);
}
.v20-benefit-icon {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f4a261;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.v20-benefit-content h4 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 700;
  color: #1e2a3a;
}
.v20-benefit-content p {
  margin: 0;
  font-size: 12px;
  color: #6f7d8e;
}

/* Адреса в две колонки */
.v20-offices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.v20-office {
  background: #fafafa;
  border: 1px solid #e9eef2;
  border-radius: 16px;
  padding: 16px;
  transition: transform 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.v20-office:hover {
  transform: translateY(-2px);
}
.v20-office-city {
  font-weight: 700;
  color: #f4a261;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  font-size: 15px;
}
.v20-office-address {
  font-size: 13px;
  color: #1e2a3a;
  margin-bottom: 5px;
}
.v20-office-hours {
  font-size: 12px;
  color: #6f7d8e;
  margin-bottom: 10px;
}
.v20-office-contacts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #e9eef2;
  padding-top: 10px;
  margin-top: auto;
}
.v20-office-phone {
  color: #1e2a3a;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.v20-office-phone:hover {
  color: #f4a261;
}
.v20-office-route {
  color: #8a9bb0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.v20-office-route:hover {
  color: #f4a261;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .v20-two-columns {
    grid-template-columns: 1fr;
  }
  .v20-vk-card {
    margin-bottom: 20px;
    height: auto;
  }
  .v20-right {
    gap: 16px;
  }
  .v20-benefits {
    grid-template-columns: 1fr 1fr;
  }
  .v20-offices {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .v20-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .v20-submit {
    width: 100%;
    justify-content: center;
  }
  .v20-benefits {
    grid-template-columns: 1fr;
  }
  .v20-quick-list {
    justify-content: center;
  }
}
.v20-vk-card .v6-vkfooter {
  display: none !important;
}
/* Уменьшаем внутренний отступ секции */
.dialog-v20 {
  padding-top: 3px;  /* или 0, если нужно совсем убрать */
}

/* Убираем или уменьшаем градиент сверху */
.dialog-v20::before {
  height: 20px;      /* уменьшаем высоту */
  opacity: 0.5;      /* можно сделать менее заметным */
  /* или полностью скрыть: */
  /* display: none; */
}

/* Уменьшаем отступ заголовка */
.v20-header {
  margin-bottom: 6px;  /* было 20px */
}
/* Вариант 1 – заголовок с линиями */
.v20-header-style1 .v20-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 8px;
}
.v20-header-style1 .v20-title-line {
  flex: 0 1 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f4a261, transparent);
}
.v20-header-style1 h2 {
  margin: 0;
  font-size: 34px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .v20-header-style1 .v20-title-wrapper {
    gap: 10px;
  }
  .v20-header-style1 .v20-title-line {
    flex: 0 1 40px;
  }
  .v20-header-style1 h2 {
    font-size: 28px;
    white-space: normal;
  }
}
.v20-header {
  margin-bottom: 40px; /* или нужное вам значение */
}
/* ===== lead form inside dialog ===== */
.dialog-modal { position: relative; }
.dialog-close{
  position:absolute; top:14px; right:14px;
  width:40px; height:40px; border-radius:12px;
  border:1px solid rgba(0,0,0,.1);
  background:#fff; cursor:pointer; font-size:22px; line-height:1;
}

.dialog-head{ padding:28px 28px 10px; }
.dialog-kicker{
  font-size:11px; letter-spacing:.18em; font-weight:700;
  color:#FF6B00; text-transform:uppercase; margin-bottom:8px;
}
.dialog-title{ margin:0 0 6px; font-size:24px; }
.dialog-subtitle{ margin:0; color:#5a6a7a; font-size:14px; }

.lead-form{ padding: 18px 28px 22px; display:grid; gap:14px; }
.lead-field span{ display:block; font-size:12px; opacity:.75; margin-bottom:6px; }
.lead-field input, .lead-field select{
  width:100%; padding:14px 14px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px; outline:none;
}
.lead-field input:focus, .lead-field select:focus{
  border-color:#FF6B00; box-shadow:0 0 0 3px rgba(255,107,0,.12);
}

.lead-submit{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-radius:14px;
  border:none; cursor:pointer; color:#fff;
  background: linear-gradient(135deg, #FF6B00, #FF8E53);
  font-weight:700;
}

.lead-note{ font-size:12px; color:#8a9bb0; line-height:1.35; }

.dialog-fastlinks{
  padding: 0 28px 26px;
  display:flex; gap:10px; flex-wrap:wrap;
}
.fastlink{
  display:inline-flex; padding:10px 12px;
  border:1px solid rgba(0,0,0,.1);
  border-radius:999px; text-decoration:none;
  color:#1a1a1a; font-weight:600; font-size:13px;
}
.fastlink:hover{ border-color:#FF6B00; color:#FF6B00; }
/* ===== MODAL (всплывающая форма) ===== */
#dialogOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;              /* важно: чтобы не стояло внизу */
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 99999;
}

#dialogOverlay.active{ display:flex; }

#dialogOverlay .dialog-modal{
  width: min(560px, 100%);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: none;              /* важно: показываем только активную */
  position: relative;
}

#dialogOverlay .dialog-modal.active{ display:block; }

#dialogOverlay .dialog-close{
  position:absolute;
  top:14px; right:14px;
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-size:22px;
  line-height:1;
}

/* форма */
#dialogOverlay .dialog-head{ padding:28px 28px 10px; }
#dialogOverlay .dialog-kicker{
  font-size:11px; letter-spacing:.18em; font-weight:700;
  color:#FF6B00; text-transform:uppercase; margin-bottom:8px;
}
#dialogOverlay .dialog-title{ margin:0 0 6px; font-size:24px; }
#dialogOverlay .dialog-subtitle{ margin:0; color:#5a6a7a; font-size:14px; }

#dialogOverlay .lead-form{
  padding: 18px 28px 22px;
  display:grid;
  gap:14px;
}
#dialogOverlay .lead-field span{
  display:block; font-size:12px; opacity:.75; margin-bottom:6px;
}
#dialogOverlay .lead-field input,
#dialogOverlay .lead-field select{
  width:100%;
  padding:14px 14px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  outline:none;
}
#dialogOverlay .lead-field input:focus,
#dialogOverlay .lead-field select:focus{
  border-color:#FF6B00;
  box-shadow:0 0 0 3px rgba(255,107,0,.12);
}

#dialogOverlay .lead-submit{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border-radius:14px;
  border:none;
  cursor:pointer;
  color:#fff;
  background: linear-gradient(135deg, #FF6B00, #FF8E53);
  font-weight:700;
}

#dialogOverlay .lead-note{ font-size:12px; color:#8a9bb0; line-height:1.35; }

#dialogOverlay .dialog-fastlinks{
  padding: 0 28px 26px;
  display:flex; gap:10px; flex-wrap:wrap;
}
#dialogOverlay .fastlink{
  display:inline-flex;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.1);
  border-radius:999px;
  text-decoration:none;
  color:#1a1a1a;
  font-weight:600;
  font-size:13px;
}
#dialogOverlay .fastlink:hover{ border-color:#FF6B00; color:#FF6B00; }
/* Увеличиваем поле комментария */
/* Поле комментария */
#dialogOverlay textarea{
  width: 100%;
  min-height: 140px;
  height: 140px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
}
#dialogOverlay textarea{
  width:100%;
  min-height:140px;
  padding:14px 16px;
  border-radius:12px;
  resize:none;
  line-height:1.5;
}

#dialogOverlay textarea::placeholder{
  color:#8a8a8a;
  line-height:1.6;
}
/* ===== FIX: показывать только одну форму, не две ===== */
#dialogOverlay{
  display: none;
}

#dialogOverlay.active{
  display: flex;
}

/* ВСЕ модалки по умолчанию скрыты */
#dialogOverlay .dialog-modal{
  display: none !important;
}

/* показываем только активную */
#dialogOverlay .dialog-modal.active{
  display: block !important;
}

/* на всякий случай — если где-то есть стили opacity */
#dialogOverlay:not(.active){
  opacity: 0 !important;
  pointer-events: none !important;
}