/*
 * vladdavydovbari.ru — аккуратное обновление оформления (прототип, 07.11.2026)
 *
 * Принцип: один дополнительный файл стилей поверх существующей темы linkci.
 * Структура, тексты, фото, URL и палитра не меняются. Каждый раздел (R1…R8)
 * можно принять или отклонить отдельно. Для внедрения: подключить файл
 * последним в теме (wp_enqueue_style с зависимостью от остальных стилей).
 *
 * Палитра оригинала: тёмно-синий #133B50, бордовый #A51E24, линии #E3E7EB, фон #F5F7F9.
 */
:root {
  --rf-navy: #133B50;
  --rf-navy-2: #1B4A63;
  --rf-text-2: #4E6372;      /* вторичный текст: контраст ≥ 4.5:1 (было #5A6E7B / #8A98A2) */
  --rf-muted: #66788A;
  --rf-accent: #A51E24;
  --rf-accent-2: #8C181D;
  --rf-line: #E3E7EB;
  --rf-bg: #F5F7F9;
  --rf-radius: 10px;
  --rf-radius-sm: 8px;
  --rf-shadow: 0 1px 2px rgba(19, 59, 80, .06), 0 8px 24px -14px rgba(19, 59, 80, .25);
  --rf-font: 'Geometria', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ============ R1. Типографика ============ */
/* Запасные шрифты: сейчас указан только 'Geometria' — без него браузер берёт шрифт с засечками. */
body { font-family: var(--rf-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body, p, li { line-height: 1.6; }

/* Единый стиль заголовков секций: без капса, одинаковый размер и отступы */
.services .services__title,
.results__heading h2,
.results .results__title,
.trust__title,
.complex-case__title,
.footer2-cta__title {
  font-size: 32px !important;
  line-height: 1.2 !important;
  letter-spacing: -.01em;
  text-transform: none !important;
  font-weight: 700;
}
/* «НАПРАВЛЕНИЯ ХИРУРГИИ» набрано капсом в самом тексте: показываем как обычное предложение.
   (Лучше исправить текст в админке — тогда это правило не нужно.) */
.services .services__title { text-transform: lowercase !important; }
.services .services__title::first-letter { text-transform: uppercase; }

/* Подзаголовки и мелкий текст — читаемый контраст */
.services__subtitle, .results__subtitle, .main-banner__description { color: var(--rf-text-2); }
.main-banner__eyebrow { color: var(--rf-text-2); letter-spacing: .08em; }
.main-banner__consent, .complex-case__note, .results__review-label { color: var(--rf-muted); }
.main-banner__consent { font-size: 13px; }

/* Первый экран: чуть компактнее заголовок, ровный ритм */
@media (min-width: 1200px) {
  .main-banner .main-banner__title { font-size: 52px; }
  .main-banner__subtitle { font-size: 21px; margin-top: 18px; }
}
.main-banner .main-banner__title { letter-spacing: -.015em; }

/* ============ R2. Шапка и верхнее меню ============ */
.h-info .topmenu > li > a { text-transform: none !important; font-size: 14px !important; font-weight: 500 !important; letter-spacing: 0 !important; white-space: nowrap; }
.h-info .topmenu { flex-wrap: nowrap; white-space: nowrap; }
.h-info .topmenu > li > a:hover { color: #fff; opacity: .8; }
.h-phones__item { font-size: 16px; line-height: 24px; letter-spacing: .01em; }
/* Выпадающее меню: мягкая тень, скругление, читаемые пункты */
.h-info .topmenu .sub-menu { border-radius: var(--rf-radius-sm); box-shadow: 0 18px 40px -18px rgba(0,0,0,.35); overflow: visible; white-space: normal; }
.h-info .topmenu .sub-menu a { text-transform: none !important; letter-spacing: 0 !important; }

/* ============ R3. Кнопки — один стиль для всех ============ */
.wpcf7-submit, input[type="submit"].wpcf7-form-control,
.h-link, .footer2-btn, .results__button, .complex-case__button, .complex-case__card .btn, .complex-case__content button {
  border-radius: var(--rf-radius-sm) !important;
  box-shadow: none !important;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s !important;
  letter-spacing: .01em;
}
.wpcf7-submit, input[type="submit"].wpcf7-form-control, .footer2-btn--primary, .complex-case__content button {
  background-color: var(--rf-accent) !important;
}
.wpcf7-submit:hover, input[type="submit"].wpcf7-form-control:hover, .footer2-btn--primary:hover, .complex-case__content button:hover, .h-link:hover {
  background-color: var(--rf-accent-2) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}
.main-banner__form input[type="submit"] { height: 54px !important; line-height: 54px !important; font-size: 17px !important; }
/* «Заказать звонок» — без капса, нормальный размер касания */
.h-link { width: auto !important; height: 40px !important; line-height: 40px !important; padding: 0 18px; text-transform: none !important; font-size: 15px !important; }
.results__button { border-radius: var(--rf-radius-sm) !important; }
:focus-visible { outline: 3px solid rgba(165, 30, 36, .45); outline-offset: 2px; }

/* ============ R4. Поля форм ============ */
.wpcf7-form-control:not(.wpcf7-submit):not([type="file"]) {
  border-radius: var(--rf-radius-sm) !important;
  border: 1px solid #CFD8DF !important;
  transition: border-color .15s, box-shadow .15s;
}
.wpcf7-form-control:not(.wpcf7-submit):focus { border-color: var(--rf-navy) !important; box-shadow: 0 0 0 3px rgba(19, 59, 80, .12) !important; outline: none; }
.main-banner__form .wpcf7-form-control:not(.wpcf7-submit) { height: 54px; }
/* Дублирующая подпись внутри формы первого экрана («Оставляйте заявку…»): над формой уже есть «Оставьте номер — администратор свяжется с вами» */
.main-banner__form .form_name { display: none; }
.modal-content { border-radius: 14px !important; }

/* ============ R5. Фотографии ============ */
/* Плашка с именем на фото первого экрана — легче и аккуратнее */
.main-banner__card { border-radius: var(--rf-radius); background-color: rgba(255,255,255,.9); box-shadow: var(--rf-shadow); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.main-banner__card-note { font-size: 15px; color: var(--rf-text-2); }
/* Результаты: одинаковые скругления карточек */
.results__pair, .results__video, .results__shot img { border-radius: var(--rf-radius); }

/* ============ R6. Карточки направлений ============ */
.services__grid { gap: 20px; }
.services__card { border-radius: 14px; padding: 26px 26px 22px; transition: border-color .2s, box-shadow .2s; }
.services__card:hover { border-color: #C9D3DB; box-shadow: var(--rf-shadow); }
/* Иконки одного размера во всех карточках (сейчас 51–96 px и разные стили) */
.services__icon { width: 64px; margin-right: 22px; }
.services__icon img, .services__icon svg { width: 64px !important; height: 64px !important; max-height: 64px; object-fit: contain; }
.services .services__name { font-size: 18px; margin-bottom: 14px; }
.services__link { padding: 10px 2px 10px 0; font-size: 15px; }

/* ============ R7. Ритм секций (объём страницы не растёт) ============ */
.services { padding: 48px 0 52px; }
.trust__items { row-gap: 28px; }
.trust__value { letter-spacing: -.01em; }

/* ============ R8. Мобильная версия ============ */
@media (max-width: 991px) {
  .services .services__title, .results__heading h2, .trust__title, .complex-case__title, .footer2-cta__title { font-size: 28px !important; }
  /* Фото врача на первом экране — сейчас на мобильных скрыто полностью */
  .main-banner--has-photo .main-banner__media { display: block !important; order: -1; }
  .main-banner__photo { max-width: 190px !important; margin: 0 auto -6px; }
  .main-banner { padding-top: 18px !important; }
  .main-banner__card { display: none; } /* имя уже есть в заголовке рядом */
  .rf-sub-toggle { position: absolute; right: 0; top: 0; width: 56px; height: 48px; border: 0; background: transparent; cursor: pointer; }
  .mobileboxin .menu-item-has-children { position: relative; }

}
@media (max-width: 767px) {
  .main-banner .main-banner__title { font-size: 30px; }
  .main-banner__subtitle { font-size: 18px; }
  .services .services__title, .results__heading h2, .trust__title, .complex-case__title, .footer2-cta__title { font-size: 25px !important; }
  .services__card { padding: 18px 16px 12px; }
  .services .services__name { margin-bottom: 10px; }
  .services__link { padding: 9px 2px 9px 0; }
  .top_after_head { min-height: 96px;}
  body:not(.home) .top_after_head { padding-top: 55px; }

  .services__icon { width: 44px; margin-right: 14px; }
  .services__icon img, .services__icon svg { width: 44px !important; height: 44px !important; }
  /* Мобильное меню: без капса, крупные зоны нажатия (≥ 44 px) */
  .mobileboxin ul li a { text-transform: none !important; font-size: 16px !important; padding: 13px 20px !important; }
  .mobileboxin .sub-menu a { padding-left: 34px !important; font-size: 15px !important; }
  .mobileboxin .menu-item-has-children { position: relative; }
  .rf-sub-toggle { position: absolute; right: 0; top: 0; width: 56px; height: 48px; border: 0; background: transparent; cursor: pointer; }
  .rf-sub-toggle::before { content: ''; position: absolute; left: 22px; top: 17px; width: 9px; height: 9px; border-right: 2px solid var(--rf-navy); border-bottom: 2px solid var(--rf-navy); transform: rotate(45deg); transition: transform .2s; }
  .rf-sub-toggle[aria-expanded="true"]::before { transform: rotate(-135deg); top: 22px; }
  .mobileboxin .menu-item-has-children > a { padding-right: 60px !important; }
  .mobileboxin .menu-item-has-children > a::after { display: none !important; }
}

/* R8 (продолжение): компенсация высоты на телефоне — «Почему мне доверяют» сеткой 2×2 вместо четырёх строк */
@media (max-width: 575px) {
  .trust__items, .trust__items--2, .trust__items--3, .trust__items--4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px 14px !important; }
  .trust__item { display: flex; flex-direction: column; align-items: flex-start; }
  .trust__icon { width: 40px !important; margin: 0 0 8px !important; }
  .trust__icon img { width: 40px !important; height: 40px !important; }
  .trust__value { font-size: 16px; }
  .trust__label { font-size: 14px; }
}

/* R2 (продолжение): на ширинах 992–1279 px шапка остаётся высотой 96 px (в оригинале меню здесь переносится в 2 строки и шапка закрывает контент) */
@media (min-width: 992px) and (max-width: 1279px) {
  .h-phones__item { font-size: 15px; line-height: 21px; }
  .h-info .h-adres { font-size: 12px; line-height: 1.3; }
  .h-info .topmenu > li > a { font-size: 13.5px !important; }
}
