/*
 * Linkci VGD — правки по итогам просмотра дизайна страниц (09.11.2026).
 * Подключается последним. Стиль VGD не меняется: только расположение фото, подвал,
 * кнопка помощника, ссылка на результаты, «Статьи по теме», поиск и темы блога.
 */

/* ======================================================================
   1. Фото врача в баннере внутренних страниц (.m_1)
   Было: колонка 525 px с фото «по низу колонки» — верх фото (макушка) уходил под полосу
   с адресом (на 35 px), низ висел на 92 px выше края баннера, при 992–1240 px фото пропадало,
   на телефоне фото не было совсем.
   ====================================================================== */
@media (min-width: 992px) {
  body:not(.home) .m_1 .container { position: relative; }
  body:not(.home) .m_1 .m_1_img {
    position: absolute !important;
    top: 76px;                 /* 56 px — заход баннера под полосу с адресом + 20 px воздуха над головой */
    bottom: 0;
    right: 15px;
    width: 36%;
    height: auto !important;
    min-height: 0 !important;
    float: none;
    padding: 0;
    background: url(../img/davydov-hero-desktop.webp) no-repeat center bottom / contain !important;
    filter: drop-shadow(0 0 22px rgba(92, 192, 179, .18)) drop-shadow(0 30px 40px rgba(0, 0, 0, .40));
  }
  /* Мягкое свечение за фигурой — как на главной */
  body:not(.home) .m_1 .m_1_img::before {
    content: ""; position: absolute; z-index: -1; left: 50%; bottom: 8%; width: 120%; height: 95%;
    transform: translateX(-50%); pointer-events: none;
    background: radial-gradient(closest-side at 50% 30%, rgba(169, 207, 216, .22), rgba(46, 140, 131, .12) 55%, transparent 100%);
  }
  /* Плашка с ФИО — в нижнем левом углу фото, не закрывает лицо и бейдж */
  body:not(.home) .m_1 .m_1_inf_text {
    left: -64px !important; right: auto !important; bottom: 22px !important;
    margin-left: 0 !important; width: 270px !important;
  }
  body:not(.home) .m_1_inf_inside { padding-right: 24px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  /* Узкий компьютер: плашка внутри фото, чтобы не касаться формы */
  body:not(.home) .m_1 .m_1_inf_text { left: 0 !important; width: 230px !important; padding: 10px 12px !important; }
}

@media (max-width: 991px) {
  body:not(.home) .m_1 .row { display: flex; flex-direction: column; }
  body:not(.home) .m_1 .m_1_inf { order: 2; }
  body:not(.home) .m_1 .m_1_img {
    order: 1;
    display: block !important;
    position: relative !important;
    width: 100%;
    height: 260px !important;
    min-height: 0 !important;
    margin: 4px 0 -6px;
    background: url(../img/davydov-hero-mobile.webp) no-repeat center bottom / auto 100% !important;
    filter: none;
    /* Низ фото растворяется в фоне баннера — как на главной */
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  }
  body:not(.home) .m_1 .m_1_inf_text { display: none !important; }
  body:not(.home) .m_1 .m_1_inf_inside { padding-top: 0; }
}

/* ======================================================================
   2. Единый подвал: три телефона, читаемость на телефоне
   ====================================================================== */
.footer2 .footer2__phones { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.footer2 .footer2__phones .footer2__phone {
  display: inline-flex; align-items: center; min-height: 40px;
  font-family: var(--v-display); font-weight: 500; font-size: 17px; letter-spacing: -.01em;
  color: var(--v-fg) !important; text-decoration: none;
}
.footer2 .footer2__phones .footer2__phone:hover { color: var(--v-sea-text) !important; }
@media (max-width: 767px) {
  .footer2 .footer2__phones { align-items: center; }
  .footer2 .footer2__phones .footer2__phone { min-height: 48px; font-size: 19px; padding: 0 6px; }
  /* Мелкий текст подвала: крупнее и контрастнее */
  .footer2 .footer2__role, .footer2 .footer2__line, .footer2 .footer2__contacts,
  .footer2 .footer2__col a, .footer2 .footer2__col li { font-size: 15px !important; line-height: 1.5 !important; color: rgba(231, 235, 232, .86) !important; }
  .footer2 .footer2__legal, .footer2 .footer2__legal-item, .footer2 .footer2__legal-link { font-size: 14px !important; line-height: 1.5 !important; color: rgba(231, 235, 232, .78) !important; }
  .footer2 .footer2__legal-link { display: inline-block; padding: 6px 0; }
  .footer2 .footer2__heading { font-size: 17px !important; }
  .footer2 .footer2__col a { display: inline-block; padding: 5px 0; }
}

/* ======================================================================
   4. Ссылка на результаты и отзывы (вместо карусели на страницах направлений и услуг)
   ====================================================================== */
.vgd-results-link {
  background:
    radial-gradient(50% 120% at 0% 0%, rgba(30, 68, 72, .9), transparent 65%),
    radial-gradient(40% 120% at 100% 100%, rgba(108, 106, 156, .2), transparent 70%),
    var(--v-ink);
  color: var(--v-fg); padding: 56px 0;
}
.vgd-results-link__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.vgd-results-link__text { max-width: 640px; }
.vgd-results-link__eyebrow { font: 400 12px/1.4 var(--v-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--v-fg-subtle); margin: 0 0 10px; }
.vgd-results-link__title { font: 500 30px/1.15 var(--v-display) !important; letter-spacing: -.03em !important; color: var(--v-fg) !important; margin: 0 0 10px !important; text-transform: none !important; }
.vgd-results-link__note { color: var(--v-fg-muted); font-size: 16px; line-height: 1.6; margin: 0; }
.vgd-results-link__btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 28px; border-radius: 999px;
  background: var(--v-spectrum); color: var(--v-ink) !important; font-weight: 600; font-size: 16px; text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 30px -12px var(--v-sea);
}
.vgd-results-link__btn:hover { filter: brightness(1.05); }
@media (max-width: 767px) {
  .vgd-results-link { padding: 44px 0; }
  .vgd-results-link__title { font-size: 24px !important; }
  .vgd-results-link__btn { width: 100%; justify-content: center; text-align: center; }
}

/* ======================================================================
   5. «Статьи по теме»
   ====================================================================== */
.vgd-related { padding: 56px 0 64px; }
.vgd-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.vgd-related__title { font: 500 30px/1.15 var(--v-display) !important; letter-spacing: -.03em !important; color: var(--v-fg-l) !important; margin: 0 !important; text-transform: none !important; }
.vgd-related__all { font-weight: 600; color: #1E6E68 !important; text-decoration: none !important; border-bottom: 1px solid rgba(30, 110, 104, .35); padding-bottom: 2px; }
.vgd-related__all:hover { border-bottom-color: currentColor; }
.vgd-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.vgd-related__card {
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; text-decoration: none !important;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--v-line-l); box-shadow: 0 30px 60px -40px rgba(138, 90, 28, .3);
  transition: transform .2s, box-shadow .2s;
}
.vgd-related__card:hover { transform: translateY(-2px); box-shadow: 0 30px 60px -30px rgba(30, 68, 72, .35); }
.vgd-related__img { width: 100%; height: 190px; object-fit: cover; display: block; }
.vgd-related__name { padding: 16px 18px 20px; color: var(--v-fg-l); font-weight: 600; font-size: 16px; line-height: 1.4; }
@media (max-width: 991px) { .vgd-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .vgd-related { padding: 40px 0 48px; }
  .vgd-related__title { font-size: 24px !important; }
  .vgd-related__grid { grid-template-columns: 1fr; gap: 14px; }
  .vgd-related__img { height: 170px; }
}

/* ======================================================================
   6. Блог: поиск и темы
   ====================================================================== */
.vgd-blog-filter { margin: 8px 0 26px; }
.vgd-blog-filter__search { display: flex; gap: 10px; }
.vgd-blog-filter__input {
  flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--v-line-l); background: rgba(255, 255, 255, .85); color: var(--v-fg-l); font: 400 16px var(--v-text);
}
.vgd-blog-filter__input:focus { outline: 2px solid var(--v-sea); outline-offset: 1px; border-color: transparent; }
.vgd-blog-filter__submit {
  flex: 0 0 auto; height: 52px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--v-spectrum); color: var(--v-ink); font: 600 16px var(--v-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 30px -12px var(--v-sea);
}
.vgd-blog-filter__topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vgd-chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--v-line-l); background: rgba(255, 255, 255, .7); color: var(--v-fg-l) !important;
  font-size: 14px; font-weight: 600; text-decoration: none !important; transition: background .15s, border-color .15s;
}
.vgd-chip:hover { border-color: var(--v-sea); background: #fff; }
.vgd-chip.is-active { background: var(--v-deep); border-color: var(--v-deep); color: var(--v-fg) !important; }
.vgd-blog-filter__status { margin: 14px 0 0; color: var(--v-fg-l-muted); font-size: 15px; }
.vgd-blog-empty { padding: 40px 0 60px; color: var(--v-fg-l-muted); font-size: 16px; }
.vgd-blog-empty__title { font: 500 24px/1.2 var(--v-display); color: var(--v-fg-l); margin: 0 0 8px; }
@media (max-width: 600px) {
  .vgd-blog-filter__search { flex-direction: column; }
  .vgd-blog-filter__submit { width: 100%; }
  .vgd-blog-filter__topics { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -15px; }
  .vgd-chip { flex: 0 0 auto; }
}

/* Якорь секции направлений на главной (пункт меню «Направления хирургии»): не прятать под шапкой */
#napravleniya { scroll-margin-top: 110px; }

/* ======================================================================
   7. Карточки видов операций / подразделов направления («Какие операции выполняются»)
   Было: тёмно-бирюзовые плашки старой темы, текст почти не читался (тёмный цвет абзацев из
   vgd-inner.css поверх тёмного фона). Тексты карточек не меняются.
   ====================================================================== */
body:not(.home) .subcat h2 {
  font: 500 30px/1.15 var(--v-display) !important; letter-spacing: -.03em !important;
  text-transform: none !important; color: var(--v-fg-l) !important; padding-bottom: 6px;
}
body:not(.home) .subcat > .row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 18px 0 0;
}
body:not(.home) .subcat > .row::before, body:not(.home) .subcat > .row::after,
body:not(.home) .subcat > .row > .clearfix { display: none !important; }
body:not(.home) .subcat > .row > [class*="col-"] { width: auto !important; float: none !important; padding: 0 !important; margin: 0 !important; }
body:not(.home) .col_subcat_in {
  display: flex !important; flex-direction: column; height: 100%;
  padding: 22px 22px 24px !important; text-align: left !important; border-radius: 20px !important;
  background: rgba(255, 255, 255, .78) !important; border: 1px solid var(--v-line-l);
  box-shadow: 0 30px 60px -40px rgba(138, 90, 28, .3); color: var(--v-fg-l) !important; text-decoration: none !important;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
body:not(.home) .col_subcat_in:hover { transform: translateY(-2px); border-color: rgba(46, 140, 131, .45); box-shadow: 0 30px 60px -30px rgba(30, 68, 72, .35); }
body:not(.home) .col_subcat_in img { width: 100% !important; height: 170px !important; object-fit: contain; border-radius: 14px !important; margin: 0 0 14px !important; background: #F3EFE6; }
body:not(.home) .col_subcat_in strong {
  display: block; padding: 0 0 10px !important; font: 500 18px/1.25 var(--v-display); letter-spacing: -.02em; color: var(--v-fg-l) !important;
}
body:not(.home) .col_subcat_in strong::after {
  content: ""; display: block; width: 44px; height: 2px; margin-top: 10px; border-radius: 2px; background: var(--v-spectrum-line);
}
body:not(.home) .col_subcat_in, body:not(.home) .col_subcat_in p, body:not(.home) .col_subcat_in li {
  color: #3A413E !important; font-size: 15px !important; line-height: 1.55 !important;
}
@media (max-width: 991px) {
  body:not(.home) .subcat > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Телефон: лента карточек с перелистыванием */
@media (max-width: 600px) {
  body:not(.home) .subcat h2 { font-size: 24px !important; }
  body:not(.home) .subcat > .row {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin: 14px -15px 0; padding: 0 15px 10px; scroll-padding: 0 15px;
  }
  body:not(.home) .subcat > .row > [class*="col-"] { flex: 0 0 82%; scroll-snap-align: start; }
}

/* ======================================================================
   8. Квиз «Какая операция по похудению Вам подходит?» — кнопки и поля в стиле VGD
   (было: красные прямоугольные кнопки старой темы)
   ====================================================================== */
html body .m_calc .o_1_send, html body .m_calc .o_1_send_prev {
  height: 52px !important; line-height: 52px !important; width: auto !important; min-width: 220px; padding: 0 30px;
  border-radius: 999px !important; font: 600 16px/52px var(--v-text) !important; text-transform: none !important;
  cursor: pointer; text-align: center; transition: filter .2s, background .2s;
}
html body .m_calc .o_1_send {
  background: var(--v-spectrum) !important; color: var(--v-ink) !important; border: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 30px -12px var(--v-sea) !important;
}
html body .m_calc .o_1_send:hover { filter: brightness(1.05); }
html body .m_calc .o_1_send_prev {
  background: rgba(255, 255, 255, .75) !important; color: var(--v-fg-l) !important; border: 1px solid rgba(30, 68, 72, .28) !important;
  margin-right: 10px;
}
html body .m_calc .o_1_input {
  height: 52px !important; border-radius: 14px !important; border: 1px solid var(--v-line-l) !important;
  background: rgba(255, 255, 255, .85) !important; color: var(--v-fg-l) !important; font: 400 17px var(--v-text) !important; padding: 0 16px !important;
}
html body .m_calc .o_1_input:focus { outline: 2px solid var(--v-sea); outline-offset: 1px; border-color: transparent !important; }
@media (max-width: 600px) {
  html body .m_calc .o_1_send, html body .m_calc .o_1_send_prev { width: 100% !important; margin: 0 0 8px; }
}

/* Консультация и квиз — самостоятельные блоки с реальными изображениями.
   Общие сбросы background у .o_1 больше не убирают фото и иллюстрацию. */
html body .vgd-consultation-section { padding: 24px 0 !important; }
html body .vgd-quiz-section { padding: 0 0 32px !important; scroll-margin-top: 110px; }
html body .o_1.vgd-consultation,
html body .o_1.vgd-weight-quiz {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .65fr);
  overflow: hidden;
  background: #FFF !important;
  color: var(--v-fg-l, #1F2421) !important;
  border: 1px solid var(--v-line-l, rgba(42, 47, 44, .12));
  border-radius: 22px;
  box-shadow: 0 16px 44px -28px rgba(30, 68, 72, .24);
}
html body .vgd-consultation .o_1_form,
html body .vgd-weight-quiz .o_1_form {
  min-width: 0;
  min-height: 0;
  padding: clamp(24px, 3.5vw, 44px);
}
html body .vgd-consultation .o_1_form_in,
html body .vgd-weight-quiz .o_1_form_in { width: auto; max-width: none; }
html body .vgd-consultation .o_1_name,
html body .vgd-weight-quiz .o_1_name {
  margin: 0 0 14px;
  padding: 0;
  color: var(--v-fg-l, #1F2421) !important;
  font: 500 clamp(23px, 2.5vw, 32px)/1.25 var(--v-display, sans-serif);
  letter-spacing: -.02em;
  text-transform: none;
}
html body .vgd-weight-quiz .o_1_dop_name {
  margin: 0 0 26px;
  color: var(--v-fg-l-muted, #454C49);
  font: 400 15px/1.5 var(--v-text, sans-serif);
}
html body .vgd-consultation .form_name {
  margin-bottom: 16px;
  color: var(--v-fg-l-muted, #454C49);
  font: 400 17px/1.5 var(--v-text, sans-serif);
}
html body .vgd-consultation .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-acceptance),
html body .vgd-weight-quiz .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-acceptance) {
  background: var(--v-ivory, #FAF7F0) !important;
  color: var(--v-fg-l, #1F2421) !important;
  border: 1px solid rgba(30, 68, 72, .22) !important;
  border-radius: 12px !important;
}
html body .vgd-consultation .wpcf7-submit,
html body .vgd-weight-quiz .wpcf7-submit {
  height: auto !important;
  min-height: 52px;
  padding: 14px 22px !important;
  font: 600 16px/1.5 var(--v-text, sans-serif) !important;
  white-space: normal;
}
html body .vgd-consultation .confid,
html body .vgd-consultation .pd-consent,
html body .vgd-weight-quiz .confid,
html body .vgd-weight-quiz .pd-consent {
  color: var(--v-fg-l-muted, #454C49) !important;
  font-size: 13px;
  line-height: 1.5;
}
html body .vgd-consultation__media,
html body .vgd-weight-quiz__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  background: radial-gradient(ellipse at bottom, rgba(92, 192, 179, .17), transparent 75%);
}
html body .vgd-consultation__media img,
html body .vgd-weight-quiz__media img {
  display: block !important;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
html body .vgd-consultation__media img { max-height: 430px; }
html body .vgd-weight-quiz__media { align-items: center; padding: 24px; }
html body .vgd-weight-quiz__media img { max-height: 280px; }
html body .vgd-weight-quiz .o_1_selecter { margin-bottom: 22px; }
html body .vgd-weight-quiz .o_1_current_line {
  margin: 0 0 12px;
  color: var(--v-fg-l, #1F2421);
  font: 600 18px/1.4 var(--v-text, sans-serif);
}
html body .vgd-weight-quiz .o_option_line {
  margin-bottom: 10px;
  padding-left: 30px;
  font: 400 16px/1.5 var(--v-text, sans-serif);
}
html body .vgd-weight-quiz .o_option_line::after { border-color: var(--v-sea, #2E8C83); }
html body .vgd-weight-quiz .o_option_line::before { background: var(--v-sea, #2E8C83); }
html body .vgd-weight-quiz .o_option_list_line form { max-width: none; }
html body .vgd-weight-quiz__actions { display: flex; flex-wrap: wrap; gap: 12px; }
html body .m_calc .vgd-weight-quiz .o_1_send,
html body .m_calc .vgd-weight-quiz .o_1_send_prev {
  min-width: 140px;
  margin: 0;
  box-shadow: none;
}
@media (max-width: 767px) {
  html body .o_1.vgd-consultation,
  html body .o_1.vgd-weight-quiz { grid-template-columns: minmax(0, 1fr); }
  html body .vgd-consultation .o_1_form,
  html body .vgd-weight-quiz .o_1_form { padding: 24px 20px; }
  html body .vgd-consultation__media img { width: auto; max-height: 230px; }
  html body .vgd-weight-quiz__media { padding: 0 20px 24px; }
  html body .vgd-weight-quiz__media img { width: auto; max-height: 150px; }
  html body .vgd-weight-quiz__actions { flex-direction: column; }
  html body .m_calc .vgd-weight-quiz .o_1_send,
  html body .m_calc .vgd-weight-quiz .o_1_send_prev { width: 100% !important; }
}
