/* Sportmed — общий слой доработок: шрифты, размеры текста, кнопки, мобильная панель действий.
   Подключается последним, правит только то, что перечислено ниже. */

:root {
    --sm-font-head: 'Montserrat', Arial, sans-serif;
    --sm-font-body: 'Roboto', Arial, sans-serif;
}

/* ---------- Шрифты: два — Montserrat (заголовки, кнопки, метки) и Roboto (текст) ---------- */
html body { font-family: var(--sm-font-body); }
h1, h2, h3, h4, h5, h6, .logo, .logo-text,
.btn, .rd-btn, .rd-title, .rd-eyebrow, .section-title h1, .section-title h2,
.sm-topbar-book, .sm-mobile-bar { font-family: var(--sm-font-head); }
input, select, textarea, button { font-family: inherit; }

/* ---------- Размеры текста: ничего мельче 13px, подписи и кнопки на мобильном — от 14px ---------- */
.site-footer .fci-label, .site-footer .footer-maps__title { font-size: .8125rem; }
.sm-crumbs a i, .sm-breadcrumbs ol { font-size: 13px; }
.sma-spec { font-size: 13px; }
@media (max-width: 700px) {
    .sm-breadcrumbs ol { font-size: 13px; }
    .sma-spec { font-size: 12.5px; }
    .rd-eyebrow { font-size: 13px; }
}
.sm-header-actions .btn { font-size: .875rem !important; }
@media (max-width: 480px) {
    .sm-header-actions .btn { font-size: .8125rem !important; padding-inline: 12px !important; }
    .sm-topbar { font-size: .8125rem; }
}
/* Панель «Доступность»: подписи кнопок читаемы */
[class*="sm-a11y"] button, [class*="sm-a11y"] label { font-size: max(1em, 14px); }

/* ---------- Зоны нажатия: минимум 44×44 для иконок и кнопок в шапке ---------- */
.sm-topbar .top-social-icon { min-width: 40px; min-height: 40px; }
.sm-search-toggle, .sm-nav-toggle, .sm-fab__top { min-width: 44px; min-height: 44px; }

/* ---------- Заголовки служебных окон (не участвуют в иерархии заголовков страницы) ---------- */
.sm-search-heading .sm-dialog-title { margin: 0; color: #003366; font: 700 1.25rem/1.4 var(--sm-font-head); }
#info-modal-title:empty { display: none; }

/* ---------- Мобильная панель действий (до 820px): позвонить, записаться, скорая ---------- */
.sm-mobile-bar { display: none; }
@media (max-width: 820px) {

    .sm-mobile-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1450;
        display: grid; grid-template-columns: auto 1fr auto; gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        background: #ffffffF2; border-top: 1px solid #d6e2ec;
        box-shadow: 0 -8px 24px #00224418; backdrop-filter: blur(10px);
    }
    .sm-mobile-bar a, .sm-mobile-bar button {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        min-height: 48px; padding: 8px 14px; border: 0; border-radius: 12px;
        font: 700 14px/1.2 var(--sm-font-head); text-decoration: none; cursor: pointer; text-align: center;
    }
    .sm-mobile-bar__call { background: #edf4fa; color: #003366; border: 1px solid #c9d9e8; }
    .sm-mobile-bar__book { background: var(--accent, #cd163f); color: #fff; }
    .sm-mobile-bar__sos { background: #b00020; color: #fff; }
    .sm-mobile-bar i { font-size: 15px; }
    body { padding-bottom: 72px; }
    /* Плавающие кнопки поднимаем над панелью; контакты уже в панели — круглую «гарнитуру» прячем */
    .sm-fab { bottom: 84px; right: 14px; }
    .sm-fab__contacts { display: none; }
}
@media (max-width: 360px) {
    .sm-mobile-bar { gap: 6px; padding-inline: 6px; }
    .sm-mobile-bar a, .sm-mobile-bar button { padding-inline: 10px; font-size: 13px; }
    .sm-mobile-bar__call span { display: none; }
}

/* Кнопка записи в шапке: полное название на широких экранах, короткое на узких */
.sm-btn-short { display: none; }
@media (max-width: 1100px) { .sm-btn-long { display: none; } .sm-btn-short { display: inline; } }

/* Страница отделения: фото не на всю ширину, а рядом с текстом */
.sdp-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 400px); gap: 32px; align-items: start; padding: 24px 0 8px; }
.sdp-intro .single-dept-content { order: 1; min-width: 0; }
.sdp-intro .single-dept-photo { order: 2; margin: 0; }
.sdp-intro .single-dept-photo img, .sdp-intro .dept-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 480px; object-fit: cover; object-position: center 25%; border-radius: 20px; box-shadow: 0 18px 40px #0a2a4a1f; }
.sdp-intro--photo-only { grid-template-columns: minmax(0, 520px); justify-content: center; }
@media (max-width: 820px) {
    .sdp-intro { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .sdp-intro .single-dept-photo { order: -1; }
    .sdp-intro .single-dept-photo img, .sdp-intro .dept-photo { aspect-ratio: 16 / 10; max-height: 280px; }
}

/* Выбранная услуга в окне записи */
.sm-modal-service { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #c9d9e8; border-radius: 12px; background: #eef5fb; color: #16314a; font-size: 14px; line-height: 1.4; }
.sm-modal-service[hidden] { display: none; }
.sm-modal-service b { font-weight: 700; overflow-wrap: anywhere; }
.sm-modal-service button { margin-left: auto; border: 0; background: transparent; color: var(--accent, #cd163f); font: 700 13px/1.2 'Montserrat', Arial, sans-serif; cursor: pointer; text-decoration: underline; }

/* Контакты: быстрые кнопки и единый стиль заголовков блоков */
.smc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 28px; }
.smc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; border: 2px solid #c9d9e8; border-radius: 14px; background: #fff; color: #003366; font: 700 15px/1.2 'Montserrat', Arial, sans-serif; text-decoration: none; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.smc-btn:hover { background: #003366; border-color: #003366; color: #fff; transform: translateY(-2px); }
.smc-btn--primary { background: var(--accent, #cd163f); border-color: var(--accent, #cd163f); color: #fff; }
.smc-btn--primary:hover { background: #a90f33; border-color: #a90f33; }
.smc-btn--sos { border-color: #f0c6cd; color: #a31235; }
.smc-btn--sos:hover { background: #b00020; border-color: #b00020; }
.contact-text h4 { margin: 0 0 6px; color: #0b2f57; font: 800 19px/1.3 'Montserrat', Arial, sans-serif; }
.contact-text p { margin: 0 0 4px; color: #33485c; font-size: 16px; line-height: 1.6; }
.contact-text a { color: #003366; font-weight: 600; text-decoration: none; }
.contact-text a:hover { text-decoration: underline; }
.contact-form-box h3 { color: #0b2f57; font: 800 22px/1.3 'Montserrat', Arial, sans-serif; }
@media (max-width: 640px) { .smc-actions .smc-btn { flex: 1 1 100%; } }

/* Общее: мелкий текст — от 13px (бейджи, счётчики, подписи) */
.sma-dept-no, .abstract-badge, .science_publications-badge, .sma-tab .n, .sma-chip small, .smv-topic small,
.sm-service-heading > span, .sma-more__btn small, .smv-more__btn small { font-size: 13px !important; }
.sm-service-item small, .sm-catalog-sidebar small { font-size: 13px !important; }

/* Общее: служебные подписи в карточках */
.sma-page small, .sma-stat small { font-size: 13px; }

/* Заголовки блоков (h4 внутри карточек) выглядят как часть общей иерархии */
.contact-text h4, .journal-sidebar-box h4 { font-family: 'Montserrat', Arial, sans-serif; }

/* ---------- Контакты: «Как добраться» и кнопки над картой ---------- */
.smc-route { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 44px; padding: 20px 24px; border-radius: 20px; background: #eef5fb; }
.smc-route__text h2 { margin: 0 0 4px; color: #0b2f57; font: 800 22px/1.3 'Montserrat', Arial, sans-serif; }
.smc-route__text p { margin: 0; color: #33485c; font-size: 15.5px; line-height: 1.5; }
.smc-route__text i { color: var(--accent, #cd163f); margin-right: 6px; }
.smc-route__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.smc-route .smc-btn { min-height: 46px; padding: 10px 18px; font-size: 14.5px; }
.smc-map { position: relative; margin-top: 14px; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px #0a2a4a1f; background: #e9f2f9; }
.smc-map iframe { display: block; width: 100%; height: 440px; }
@media (max-width: 700px) {
    .smc-route { padding: 18px 16px; margin-top: 32px; }
    .smc-route__actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .smc-route__actions .smc-btn { min-height: 48px; padding: 10px 12px; font-size: 13.5px; }
    .smc-route__actions .smc-btn--primary { grid-column: 1 / -1; }
    .smc-map iframe { height: 340px; }
}

/* ---------- Контакты: форма «Онлайн запись» в стиле сайта ---------- */
.contact-form-box { padding: 30px; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 18px 40px #0a2a4a1a, 0 0 0 1px #0a2a4a0a; }
.contact-form-box label { display: block; margin: 14px 0 6px; color: #0b2f57; font: 700 14px/1.3 'Montserrat', Arial, sans-serif; }
.contact-form-box input[type="text"], .contact-form-box input[type="tel"], .contact-form-box input[type="email"] { width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid #c9d9e8; border-radius: 12px; background: #fff; color: #16314a; font: 500 16px/1.3 'Roboto', Arial, sans-serif; transition: border-color .18s, box-shadow .18s; }
.contact-form-box input:focus { outline: 0; border-color: #003366; box-shadow: 0 0 0 3px #00336622; }
.contact-form-box input::placeholder { color: #8a9bab; }
.contact-form-box button[type="submit"] { min-height: 52px; margin-top: 18px; border: 0; border-radius: 12px; background: var(--accent, #cd163f); color: #fff; font: 800 15px/1.2 'Montserrat', Arial, sans-serif; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; transition: background .18s, transform .18s; }
.contact-form-box button[type="submit"]:hover { background: #a90f33; transform: translateY(-1px); }
.contact-form-box #form-message { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; }

/* ---------- Меню: полоса под пунктом — в цвете сайта ---------- */
.sm-primary-nav > ul > li > a::after { background: var(--accent, #cd163f); height: 3px; border-radius: 3px; }
.sm-primary-nav > ul > li:hover > a::after, .sm-primary-nav > ul > li:focus-within > a::after { transform: scaleX(1); opacity: 1; }


/* ---------- Верхняя полоса (топбар) ---------- */
.sm-topbar { padding: 2px 0; }
/* 1. Телефон регистратуры — главный акцент; «Доступность» — спокойная кнопка с рамкой */
.sm-topbar .sm-topbar-phone { font-size: 14px; }
.sm-topbar .sm-topbar-phone strong { font: 800 15px/1.2 'Montserrat', Arial, sans-serif; letter-spacing: .01em; }
.sm-sticky-header .sm-topbar .top-socials .sm-a11y-trigger { background: transparent !important; color: #fff !important; border: 1.5px solid #ffffff73 !important; border-radius: 999px !important; min-height: 34px; padding: 5px 14px; font: 600 13px/1.2 'Roboto', Arial, sans-serif; }
.sm-sticky-header .sm-topbar .top-socials .sm-a11y-trigger:hover, .sm-sticky-header .sm-topbar .top-socials .sm-a11y-trigger[aria-expanded="true"] { background: #ffffff24 !important; color: #fff !important; border-color: #fff !important; }
/* 2. Соцсети: все четыре иконки на месте, компактнее (32px) */
.sm-topbar .top-social-icon { width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
/* 3. Статус «Открыто / Закрыто» */
.sm-topbar-status { display: inline-flex; align-items: center; gap: 8px; color: #d4e4f1; font: 500 13px/1.2 'Roboto', Arial, sans-serif; white-space: nowrap; }
.sm-topbar-status[hidden] { display: none; }
.sm-topbar-status__dot { width: 9px; height: 9px; border-radius: 50%; background: #7a8a99; }
.sm-topbar-status.is-open .sm-topbar-status__dot { background: #3ddc84; box-shadow: 0 0 0 3px #3ddc8433; }
.sm-topbar-status.is-closed .sm-topbar-status__dot { background: #ff9f5a; }
.sm-topbar-status.is-open { color: #fff; }
/* 5. Скорая — заметная плашка */
.sm-topbar .sm-topbar-emergency { min-height: 30px; padding: 3px 12px; border-radius: 999px; background: #b00020; color: #fff !important; font-weight: 700; }
.sm-topbar .sm-topbar-emergency:hover { background: #d1002a; text-decoration: none !important; }
.sm-topbar .sm-topbar-emergency i { color: #fff; }
.sm-topbar .sm-topbar-emergency strong { font-family: 'Montserrat', Arial, sans-serif; }
/* 4. Телефон: телефоны уже в нижней панели, в топбаре остаются статус и «Доступность» */
@media (max-width: 820px) {
    .sm-topbar .sm-topbar-contacts > *:not(.sm-topbar-status) { display: none !important; }
    .sm-topbar .top-socials a[aria-label] { display: none !important; }
    .sm-topbar .top-bar-content { flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
    .sm-topbar .sm-topbar-contacts { flex: 1 1 auto; justify-content: flex-start; }
    .sm-topbar .top-socials { flex: 0 0 auto; margin: 0; }
}

/* Контакты: форма не растягивается на высоту левой колонки, подпись под кнопкой */
.contact-grid { align-items: start; }
.contact-form-box { align-self: start; }
.smc-form-note { margin: 12px 0 0; color: #526e80; font-size: 14px; line-height: 1.5; }
.smc-form-note i { margin-right: 6px; color: var(--accent, #cd163f); }
.contact-form-box #form-message:empty { display: none; }
/* На странице контактов плавающая кнопка связи не нужна (контакты уже на странице) и не перекрывает форму */
body.page-template-page-contacts .sm-fab__contacts { display: none; }

/* Телефоны в топбаре: без подчёркивания при наведении (нажатие понятно по цвету и курсору) */
.sm-sticky-header .sm-topbar a:hover, .sm-sticky-header .sm-topbar a:focus-visible { text-decoration: none !important; }
.sm-topbar .sm-topbar-phone:hover, .sm-topbar .sm-topbar-diagnostics:hover { color: #fff; opacity: .86; }
/* МСКТ/МРТ: подпись и иконка «позвонить», сам номер скрыт визуально (остаётся для скринридеров и в подсказке) */
.sm-topbar .sm-topbar-diagnostics { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: #fff; }
.sm-topbar .sm-topbar-diagnostics i { color: var(--accent, #cd163f); font-size: 13px; }
.sm-topbar .sm-topbar-diagnostics span { color: #d4e4f1; }
.sm-sr-number { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
