/*
Theme Name: ГБУЗС Городская больница №4 Севастополь
Theme URI: https://gb4.sevastopol.ru
Author: Разработчик
Description: Современный сайт для государственной больницы с анимациями и адаптивным дизайном
Version: 4.0
*/

/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
    --primary: #0a5c8e;
    --primary-dark: #064269;
    --primary-light: #eef5fa;
    --primary-gradient: linear-gradient(135deg, #0a5c8e 0%, #0a3d5c 100%);
    --accent: #2ecc71;
    --accent-blue: #3498db;
    --accent-gold: #f08c1f;
    --accent-red: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --gray-bg: #f8fafc;
    --gray-light: #ecf0f1;
    --gray-dark: #bdc3c7;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: var(--text-dark);
    background: var(--gray-bg);
    overflow-x: hidden;
	margin: 0;
    padding: 0;
}

.container {
	max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 30px 24px;
}

.container-menu {
	max-width: 1280px;
    margin: 0 auto;
    padding: 5px 20px;
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fade-up { animation: fadeInUp 0.8s ease forwards; }
.fade-left { animation: fadeInLeft 0.8s ease forwards; }
.fade-right { animation: fadeInRight 0.8s ease forwards; }
.zoom-in { animation: zoomIn 0.6s ease forwards; }
.slide-down { animation: slideInDown 0.6s ease forwards; }

/* ========== ХЕДЕР ========== */
.header {
    background: var(--primary-gradient);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 1%, transparent 1%);
    background-size: 40px 40px;
    transform: rotate(15deg);
    pointer-events: none;
}

.header__top {
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
    padding: 10px 30px;
    font-size: 13px;
}

.header__top .container-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.vision-link,
.bvi-button-wrapper .bvi-open {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 25px !important;
    text-decoration: none !important;
    color: white !important;
    font-size: 13px !important;
    transition: all 0.3s !important;
    cursor: pointer !important;
    border: none !important;
}

.vision-link:hover,
.bvi-button-wrapper .bvi-open:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

.header__main {
    padding: 12px 40px 8px 40px;
    position: relative;
    z-index: 2;
    /* Контейнеру внутри шапки не нужен глобальный нижний отступ 30px — иначе большой зазор под соцсетями */
}
.header__main .container {
    padding-bottom: 0;
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 3px;
    white-space: nowrap;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    font-size: 13px;
    opacity: 0.85;
}

/* ========== СПЛЭШ-СКРИН ========== */
html.splash-lock,
html.splash-lock body {
    overflow: hidden;
}

.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a5c8e 0%, #064269 60%, #04304d 100%);
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.splash-screen--hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-screen__inner {
    text-align: center;
    padding: 0 20px;
    animation: splashIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash-screen__logo {
    width: 150px;
    height: auto;
    animation: splashLogo 2.2s ease-in-out infinite;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.35));
}

.splash-screen__title {
    margin-top: 22px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.splash-screen__tagline {
    margin-top: 8px;
    font-size: 15px;
    color: rgba(255,255,255,0.8);
}

.splash-screen__bar {
    width: 220px;
    height: 4px;
    margin: 26px auto 0;
    border-radius: 4px;
    background: rgba(255,255,255,0.18);
    overflow: hidden;
}

.splash-screen__bar span {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-gold, #f08c1f), #ffb35c);
    animation: splashBar 1.3s ease-in-out infinite;
}

/* Splash на узких экранах: меньше логотип и текст, чтобы ничего не обрезалось */
@media (max-width: 768px) {
    .splash-screen__logo { width: 104px; }
    .splash-screen__title { font-size: 17px; line-height: 1.35; padding: 0 24px; }
    .splash-screen__tagline { font-size: 12px; padding: 0 20px; }
    .splash-screen__bar { width: 150px; }
}

@keyframes splashIn {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

@keyframes splashLogo {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-8px) scale(1.04); }
}

@keyframes splashBar {
    0%   { transform: translateX(-110%); }
    100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
    .splash-screen__logo,
    .splash-screen__bar span,
    .splash-screen__inner {
        animation-duration: 0.01s;
        animation-iteration-count: 1;
    }
}

/* ========== ПЛАВНЫЕ ПЕРЕХОДЫ МЕЖДУ СТРАНИЦАМИ ========== */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
    html { view-transition-name: root; }
}
/* Глобальная защита от горизонтального скролла на мобильных */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    body { max-width: 100vw; }
}
/* Fallback: плавное появление контента при загрузке */
@keyframes gb4PageIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
body.gb4-page-enter main {
    animation: gb4PageIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.gb4-page-leaving {
    opacity: 0.35;
    transition: opacity 0.18s ease;
}
@media (prefers-reduced-motion: reduce) {
    body.gb4-page-enter main { animation: none; }
    body.gb4-page-leaving { opacity: 1; transition: none; }
}

/* ========== УПРОЩЁННАЯ МОБИЛЬНАЯ ШАПКА ========== */
/* На мобильных: только логотип, название, телефон и иконки соцсетей — без дублирующих блоков */
@media (max-width: 768px) {
    .header__top {
        font-size: 10px;
        padding: 6px 0;
    }
    .header__top .container-top span {
        display: none; /* длинную строку «ГБЗУ…» скрываем */
    }
    .header__top .container-top {
        justify-content: center;
        padding: 0 12px;
    }
    .header__main {
        padding-left: 14px;
        padding-right: 14px;
    }
    .header__main .container {
        padding: 0 10px 0;
    }
    .logo-link {
        max-width: 100%;
    }
    .logo-text h1 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .mobile-org-name {
        display: block;
        text-align: center;
        font-size: 11px;
        opacity: 0.85;
        padding: 6px 16px 0;
    }
    /* В мобильной шапке прячем номера — они открываются кнопкой «Позвонить нам» */
    .emergency-contacts > div:not(.social-links):not(.mobile-call-wrap) {
        display: none;
    }
    .social-links strong {
        display: none;
    }
    .social-links__row {
        justify-content: center;
        margin-top: 4px;
    }
    .logo-img {
        max-height: 64px;
    }
    .logo-text h1 {
        font-size: 17px;
    }
    .logo-text p {
        display: none; /* описание прячем — экономим место */
    }
    .header__main {
        padding: 10px 0 12px;
    }
    /* Кнопка немедленного звонка + выпадающая панель номеров и графика */
    .mobile-call-wrap { position: relative; width: 100%; }
    .mobile-call-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 10px auto 0;
        padding: 11px 22px;
        width: 100%;
        max-width: 320px;
        background: rgba(255,255,255,0.16);
        border: 1.5px solid rgba(255,255,255,0.55);
        border-radius: 40px;
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        backdrop-filter: blur(4px);
        transition: background 0.25s;
        cursor: pointer;
        font-family: inherit;
    }
    .mobile-call-btn:active { background: rgba(255,255,255,0.3); }
    .mobile-call-panel {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        width: min(340px, calc(100vw - 28px));
        background: #fff;
        border-radius: 18px;
        box-shadow: 0 18px 48px rgba(8,42,66,0.35);
        padding: 14px;
        z-index: 1300;
        animation: gb4PanelIn 0.3s cubic-bezier(0.22,1,0.36,1);
    }
    .mcp-row {
        display: flex; align-items: center; gap: 12px;
        padding: 10px 8px; border-radius: 12px;
        text-decoration: none; color: #2c3e50; transition: background 0.2s;
    }
    .mcp-row:hover { background: #eef6fb; }
    .mcp-ic { font-size: 22px; flex: none; }
    .mcp-row b { display: block; font-size: 15px; color: #0a5c8e; }
    .mcp-row small { display: block; font-size: 11.5px; color: #7f8c8d; }
    .mcp-sched {
        margin-top: 8px; padding-top: 10px;
        border-top: 1px dashed #e2e9f0;
        display: flex; flex-direction: column; gap: 4px;
    }
    .mcp-sched b { font-size: 12.5px; color: #2c3e50; }
    .mcp-sched span { font-size: 12px; color: #7f8c8d; }
}
@media (min-width: 769px) {
    .mobile-org-name, .mobile-call-wrap { display: none; }
}

/* ========== (слайдер новостей в шапке удалён по запросу) ========== */
@keyframes gb4PanelIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Соцсети в шапке: всегда раскрыты (переключатель удалён по запросу) */

/* Слайд 11 «Госуслуги»: мобильный размер знака (SS3 не масштабирует SVG) */
@media (max-width: 700px) {
    div#n2-ss-2 .n-uc-gb4k33gologo img,
    div#n2-ss-2 .n-uc-gb4k33gologo svg {
        width: 84px !important;
        height: 84px !important;
    }
    div#n2-ss-2 .n-uc-gb4k33gologo {
        margin-bottom: 4px;
    }
}

/* Умный живой поиск: группированные подсказки */
.search-smart-results {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: min(420px, calc(100vw - 32px));
    background: #fff; border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15,40,70,0.22);
    z-index: 1300; padding: 10px; max-height: 60vh; overflow-y: auto;
}
.search-smart-results:not([hidden]) { animation: gb4SocialIn 0.25s ease; }
.ssr-head { font-size: 12px; color: #7f8c8d; padding: 6px 10px 8px; border-bottom: 1px solid #f0f4f8; margin-bottom: 6px; }
.ssr-group { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #93a7b8; padding: 8px 10px 4px; }
.ssr-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; transition: background 0.15s; }
.ssr-item:hover { background: #eef6fb; }
.ssr-ic { font-size: 18px; flex: none; }
.ssr-tt { min-width: 0; }
.ssr-tt b { display: block; font-size: 13.5px; color: #2c3e50; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssr-tt small { display: block; font-size: 11.5px; color: #93a7b8; }
.ssr-all { display: block; text-align: center; font-size: 13px; font-weight: 700; color: #0a5c8e; text-decoration: none; padding: 9px; margin-top: 4px; border-top: 1px dashed #edf2f6; }
.ssr-all:hover { color: #f08c1f; }
.ssr-empty { text-align: center; color: #7f8c8d; font-size: 13.5px; padding: 16px 12px; line-height: 1.6; }
.ssr-empty a { color: #0a5c8e; font-weight: 700; }

/* Индикатор раскрывания подменю в мобильном меню: ненавязчивый серый кружок
   (только мобильные/тач — на десктопе подменю открывается по hover) */
@media (max-width: 992px) {
    .mobile-submenu-arrow {
        float: right;
        display: inline-flex;
        align-items: center;
        transition: transform 0.25s ease;
    }
    .mobile-submenu-arrow .sub-dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #c3cdd6;
        box-shadow: inset 0 1px 2px rgba(15, 40, 70, 0.18);
        transition: background 0.25s ease, box-shadow 0.25s ease;
    }
    .nav-menu .menu-item-has-children > a[aria-expanded="true"] .sub-dot {
        background: var(--primary, #0a5c8e);
        box-shadow: 0 0 0 3px rgba(10, 92, 142, 0.15);
    }
}
@media (min-width: 993px) {
    .mobile-submenu-arrow { display: none; }
}
.nav-menu .sub-menu { transition: opacity 0.25s ease, transform 0.25s ease; }
.nav-menu .sub-menu.open-mobile {
    display: block;
    animation: gb4SubOpen 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes gb4SubOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* ========== ЛОГОТИП ========== */
.logo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    max-width: 620px;
}
.header__content .emergency-contacts { margin-left: auto; }
@media (max-width: 768px) {
    .header__content .emergency-contacts { margin-left: 0; width: 100%; }
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    max-height: 120px;
    width: auto;
    background: transparent;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
    transition: transform 0.4s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05) rotate(-2deg);
}

.logo-text h1 {
    font-size: 21px;
    margin: 0;
    line-height: 1.25;
    color: white;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.logo-text p {
    font-size: 17px;
    margin: 6px 0 0;
    opacity: 0.9;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .logo-link {
        flex-direction: column;
        text-align: center;
    }
    .logo-img {
        max-height: 72px;
    }
    .logo-text h1 {
        font-size: 19px;
    }
    .logo-text p {
        font-size: 13px;
    }
}

.emergency-contacts {
    text-align: right;
}

.emergency-contacts div {
    margin-bottom: 8px;
}

.emergency-contacts strong {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    margin-bottom: 4px;
}

.hotline {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hotline:hover {
    transform: scale(1.03);
    color: #ffa94d;
}

.social-links {
    margin-top: 8px;
}

.social-links strong {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    margin-bottom: 4px;
}

/* Соцсети в шапке: всегда раскрыты (без переключателя) */
.social-links__row {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    justify-content: flex-end;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: white;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
}

.social-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.social-icon--vk {
    background: rgba(10, 92, 142, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
}

.social-icon--max {
    background: rgba(10, 92, 142, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 18px rgba(0,0,0,0.3);
    color: #fff;
}

.social-icon svg {
    transition: transform 0.3s ease;
}

.social-icon:hover svg,
.social-icon:hover img {
    transform: scale(1.12);
}


/* ========== ГЛАВНОЕ МЕНЮ ========== */
.main-nav {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
}

.nav-menu > li {
    position: relative;
    flex-shrink: 0;
}

.nav-menu > li > a {
    display: block;
    padding: 16px 12px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    white-space: nowrap;
}

/* Убираем стрелки у пунктов с подменю */
.nav-menu .menu-item-has-children > a::after {
    display: none;
}

.nav-menu > li > a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Адаптация для экранов 1200-1400px */
@media (max-width: 1280px) {
    .nav-menu > li > a {
        padding: 16px 8px;
        font-size: 12px;
    }
}

/* Адаптация для экранов 992-1200px */
@media (max-width: 1100px) {
    .nav-menu > li > a {
        padding: 16px 6px;
        font-size: 11px;
    }
}

/* Выпадающее подменю */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 12px 12px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
    border-top: 3px solid var(--primary);
}

.nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    position: relative;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Третий уровень */
.nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: -8px;
    border-radius: 12px;
}

.nav-menu .sub-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Кнопка поиска */
.search-wrapper {
    position: relative;
    flex-shrink: 0;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 30px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.search-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.search-toggle svg {
    width: 20px;
    height: 20px;
}

.search-form-container {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.search-form-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 30px;
    font-size: 13px;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(10,92,142,0.1);
}

.search-form button {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* Мобильная версия */
@media (max-width: 992px) {
    .nav-wrapper {
        flex-wrap: wrap;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        display: none;
        order: 2;
        /* Меню уходит вниз от кнопки: верхний пункт больше не прилипает к панели */
        padding-top: 14px;
        margin-top: 12px;
        border-top: 1px solid rgba(10,92,142,0.12);
    }

    .nav-menu.active {
        display: flex;
        animation: gb4MenuOpen 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes gb4MenuOpen {
        from { opacity: 0; transform: translateY(-10px); }
        to   { opacity: 1; transform: none; }
    }
    .nav-menu > li { animation: gb4MenuItemIn 0.4s both; }
    .nav-menu > li:nth-child(1) { animation-delay: 0.03s; }
    .nav-menu > li:nth-child(2) { animation-delay: 0.06s; }
    .nav-menu > li:nth-child(3) { animation-delay: 0.09s; }
    .nav-menu > li:nth-child(4) { animation-delay: 0.12s; }
    .nav-menu > li:nth-child(5) { animation-delay: 0.15s; }
    .nav-menu > li:nth-child(6) { animation-delay: 0.18s; }
    .nav-menu > li:nth-child(7) { animation-delay: 0.21s; }
    .nav-menu > li:nth-child(n+8) { animation-delay: 0.24s; }
    @keyframes gb4MenuItemIn {
        from { opacity: 0; transform: translateX(-10px); }
        to   { opacity: 1; transform: none; }
    }
    
    .nav-menu > li > a {
        white-space: normal;
        padding: 12px 15px;
        font-size: 14px;
    }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        background: var(--gray-bg);
        border-top: none;
    }

    .nav-menu .sub-menu.active {
        display: block;
    }
}

.mobile-menu-toggle {
    display: none; /* мобильная кнопка создаётся из JS; стили панели — в блоке max-width:992 */
    width: auto;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
}

/* Единый стиль ссылок в контенте страниц: фирменный голубой, без браузерного синего */
.entry-content a:not(.btn):not(.doc-link-btn):not(.doc-link):not(.download-link):not(.more-link):not(.all-link):not(.assistant-link):not(.review-card a):not(.rcn-link):not(.popular-card):not(.patient-card):not(.quick-link-hero):not(.hotline):not(.social-icon),
.page-content a:not(.btn):not(.doc-link-btn):not(.doc-link):not(.download-link):not(.more-link):not(.all-link):not(.hotline):not(.social-icon):not(.assistant-link),
.info-card a, .privacy-section a, .quality-section a, .anticorruption-section a,
.history-content a, .achievements-intro a, .appointment-page a, .hosp-card a {
    color: var(--primary, #0a5c8e);
    text-decoration: none;
    border-bottom: 1px solid rgba(10, 92, 142, 0.25);
    transition: color 0.25s, border-color 0.25s;
}
.entry-content a:hover:not(.btn):not(.doc-link-btn):not(.doc-link):not(.download-link),
.page-content a:hover:not(.btn):not(.doc-link-btn):not(.doc-link):not(.download-link),
.info-card a:hover, .privacy-section a:hover, .quality-section a:hover, .anticorruption-section a:hover,
.history-content a:hover, .achievements-intro a:hover, .appointment-page a:hover, .hosp-card a:hover {
    color: var(--primary-dark, #064269);
    border-bottom-color: rgba(6, 66, 105, 0.5);
}

/* ========== HERO СЕКЦИЯ ========== */
.hero {
    background: linear-gradient(135deg, #0a5c8e 0%, #0a3d5c 50%, #052b40 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--gray-bg), transparent);
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 36px;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
}

.hero-stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== КНОПКИ ========== */
.btn {
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background: #ff9d33;
    color: #ffffff;
}

.btn-secondary {
    background: var(--accent);
    color: var(--white);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background: #27ae60;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-small {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-small:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========== ЗАГОЛОВКИ ========== */
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: var(--primary);
    margin: 16px auto 0;
    border-radius: 4px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 35px;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 4px;
}

/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
.breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* ========== ГЛАВНЫЙ ВРАЧ ========== */
.chief-section {
    padding: 80px 0;
    background: var(--white);
}

.chief-card {
    background: var(--gray-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.chief-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.chief-photo {
    flex: 0 0 300px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    overflow: hidden;
}

.chief-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.chief-photo img:hover {
    transform: scale(1.02);
}

.chief-info {
    flex: 1;
    padding: 40px 40px 40px 0;
}

.chief-name {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.chief-position {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 16px;
}

.reception-info {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary);
    margin-top: 24px;
}

.reception-info p {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========== СТАТИСТИКА ========== */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-card {
    background: var(--white);
    padding: 35px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.stat-label {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 500;
}

/* ========== НОВОСТИ ========== */
/* ========== СТРАНИЦА НОВОСТЕЙ (ARCHIVE) ========== */
.news-archive { padding: 40px 0 80px; background: #f5f7fb; min-height: 60vh; }
.news-search-wrapper { margin-bottom: 25px; }
.news-search-input { width: 100%; padding: 14px 20px; border: none; border-radius: 50px; font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); background: white; }
.news-search-input:focus { outline: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.news-categories { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 35px; }
.news-cat-btn { padding: 8px 22px; background: white; border: none; border-radius: 30px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.08); color: #2c3e50; }
.news-cat-btn.active, .news-cat-btn:hover { background: #0a5c8e; color: white; transform: translateY(-2px); }
.news-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 30px; }
.news-archive-card { background: white; border-radius: 20px; overflow: hidden; transition: all 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.news-archive-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.news-archive-link { text-decoration: none; color: inherit; display: block; }
.news-archive-image { position: relative; height: 220px; overflow: hidden; background: linear-gradient(135deg, #0a5c8e, #0a3d5c); }
.news-archive-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-archive-card:hover .news-archive-img { transform: scale(1.05); }
.news-archive-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 60px; color: white; }
.news-archive-date { position: absolute; top: 15px; left: 15px; background: white; border-radius: 12px; padding: 6px 12px; text-align: center; min-width: 55px; }
.date-day { display: block; font-size: 18px; font-weight: bold; color: #0a5c8e; }
.date-month { display: block; font-size: 10px; color: #7f8c8d; text-transform: uppercase; }
.news-archive-content { padding: 20px; }
.news-archive-content h3 { font-size: 18px; margin-bottom: 10px; line-height: 1.4; color: #2c3e50; }
.news-archive-meta { display: flex; gap: 15px; margin-bottom: 12px; font-size: 12px; color: #7f8c8d; }
.news-archive-content p { font-size: 14px; color: #7f8c8d; line-height: 1.5; margin-bottom: 15px; }
.news-archive-readmore { display: inline-block; color: #0a5c8e; font-size: 13px; font-weight: 600; transition: all 0.3s; }
.news-archive-readmore:hover { transform: translateX(5px); }
.no-news { text-align: center; padding: 60px; background: white; border-radius: 20px; color: #7f8c8d; }
.pagination { margin-top: 50px; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 10px 16px; margin: 0 4px; background: white; border-radius: 10px; text-decoration: none; color: #2c3e50; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: #0a5c8e; color: white; transform: translateY(-2px); }

/* ========== СТРАНИЦА ОТДЕЛЬНОЙ НОВОСТИ (SINGLE) ========== */
.single-news { padding: 40px 0 80px; background: #f5f7fb; }
.single-news-article { max-width: 900px; margin: 0 auto; background: white; border-radius: 24px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.single-news-header { padding: 40px 45px 20px; }
@media (max-width: 768px) { .single-news-header { padding: 25px; } }
.single-news-header h1 { font-size: 32px; margin-bottom: 15px; color: #2c3e50; line-height: 1.3; }
@media (max-width: 768px) { .single-news-header h1 { font-size: 24px; } }
.single-news-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #7f8c8d; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.single-news-meta a { color: #0a5c8e; text-decoration: none; font-weight: 500; transition: all 0.3s; }
.single-news-meta a:hover { color: #0a3d5c; text-decoration: underline; }
.single-news-image { margin: 0 45px 30px; }
@media (max-width: 768px) { .single-news-image { margin: 0 25px 20px; } }
.single-news-img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.single-news-content { padding: 0 45px 30px; font-size: 16px; line-height: 1.8; color: #444; }
@media (max-width: 768px) { .single-news-content { padding: 0 25px 25px; } }
.single-news-content p { margin-bottom: 20px; }
.single-news-content h2 { font-size: 24px; margin: 30px 0 15px; color: #0a5c8e; }
.single-news-content h3 { font-size: 20px; margin: 25px 0 12px; color: #2c3e50; }
.single-news-content ul, .single-news-content ol { margin-left: 20px; margin-bottom: 20px; }
.single-news-content li { margin-bottom: 8px; }
.single-news-footer { padding: 20px 45px 30px; border-top: 1px solid #f0f0f0; background: #fafafa; }
@media (max-width: 768px) { .single-news-footer { padding: 20px 25px; } }
.single-news-tags { margin-bottom: 15px; font-size: 14px; color: #555; }
.single-news-share { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin-top: 20px; padding-top: 15px; border-top: 1px solid #f0f0f0; }
.share-link { padding: 6px 14px; border-radius: 30px; text-decoration: none; font-size: 12px; font-weight: 500; transition: all 0.3s; display: inline-flex; align-items: center; gap: 6px; }
.share-link img { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; background: #fff; display: block; }
.share-tg { background: #29a9eb; color: white; }
.share-vk { background: #45668e; color: white; }
.share-max { background: #9B59D6; color: white; }
.share-link:hover { transform: translateY(-2px); opacity: 0.9; }
.single-news-navigation { display: flex; justify-content: space-between; padding: 25px 45px; background: white; border-top: 1px solid #f0f0f0; flex-wrap: wrap; gap: 15px; }
@media (max-width: 768px) { .single-news-navigation { padding: 20px 25px; flex-direction: column; text-align: center; } }
.single-news-navigation a { color: #0a5c8e; text-decoration: none; font-weight: 500; transition: all 0.3s; }
.single-news-navigation a:hover { color: #0a3d5c; text-decoration: underline; }

/* ========== УСЛУГИ ========== */
.services-section {
    padding: 80px 0;
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--gray-bg);
    padding: 40px 25px;
    text-align: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.service-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ========== ЗАПИСЬ ========== */
.booking-section {
    padding: 80px 0;
    background: var(--primary-gradient);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.booking-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') repeat-x bottom;
    background-size: cover;
    opacity: 0.3;
}

.booking-section h2 {
    font-size: 36px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.booking-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.booking-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* ========== КАРТА ========== */
.map-section {
    padding: 80px 0;
    background: var(--white);
}

.map-container {
    background: var(--gray-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: none;
}

.map-address {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--white);
    border-top: 1px solid var(--gray-light);
}

/* ========== ПОДВАЛ ========== */
.footer {
    background: #1a252f;
    color: var(--white);
    padding: 30px 0 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 18px;
}

.footer h4 {
    font-size: 15px;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--accent-gold);
}

/* Компактный футер: сбрасываем большие межстрочные отступы абзацев */
.footer p { margin: 0 0 3px; }

/* !important — глобальное правило ссылок a:not(...) имеет специфичность выше .footer a */
.footer p a, .footer .registry-item p, .footer div a {
    font-size: 14px;
    color: #d9e2ec !important;
    text-decoration: none;
    line-height: 1.6;
    transition: var(--transition);
}

.footer div a:hover {
    color: #ffb35c !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12.5px;
    color: #aebacb;
}

/* Единая панель режимов работы (все часы приёма в одном месте) */
.footer-strip {
    margin-top: 14px;
    margin-bottom: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.footer-strip .strip-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 9px 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.25s;
}
.footer-strip .strip-item:hover { background: rgba(255,255,255,0.09); }
.footer-strip .strip-item b {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
}
.footer-strip .strip-item span {
    font-size: 12px;
    color: #aebacb;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .footer-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
    .footer-strip .strip-item { padding: 8px 11px; }
}
@media (max-width: 480px) {
    .footer-strip { grid-template-columns: 1fr; }
}

.footer-social {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.social-link {
    padding: 5px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 30px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.social-link img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    background: #fff;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ========== БЫСТРЫЕ ССЫЛКИ ========== */
.quick-links {
    padding: 50px 0;
    background: white;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--gray-bg);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
}

.quick-link:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.quick-icon {
    font-size: 24px;
}

/* ========== ОТДЕЛЕНИЯ ========== */
.departments {
    padding: 50px 0;
    background: var(--gray-bg);
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.department-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.department-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ========== СПЕЦИАЛЬНОСТИ ========== */
.specialties {
    padding: 50px 0;
    background: white;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.specialty-card {
    background: var(--gray-bg);
    padding: 25px;
    border-radius: 16px;
}

.specialty-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.specialty-card ul {
    list-style: none;
    padding: 0;
}

.specialty-card li {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

/* ========== ОТЗЫВЫ ========== */
.reviews-section {
    padding: 50px 0;
    background: var(--gray-bg);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.review-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

.review-text {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--text-light);
}

.review-author {
    font-weight: bold;
    color: var(--primary);
}

/* ========== СТРАНИЦА ВРАЧА ========== */
.doctor-single {
    padding: 40px 0 80px;
}

.doctor-single-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.doctor-single-photo {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-single-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-single-info h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.doctor-single-specialty {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 20px;
}

.doctor-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
    background: var(--gray-bg);
    padding: 20px;
    border-radius: 16px;
}

.detail-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.detail-icon {
    font-size: 24px;
}

/* ========== FAQ ========== */
/* ========== СТИЛИ ДЛЯ FAQ АККОРДЕОНА ========== */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    background: white;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question .faq-title {
    flex: 1;
    padding-right: 15px;
}

.faq-question .toggle {
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: #0a5c8e;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.faq-question:hover .toggle {
    background: #064269;
    transform: scale(1.05);
}

.faq-answer {
    padding: 0 20px 20px;
    /* display:none убран: аккордеон теперь на max-height (templates/template-help.php) */
    line-height: 1.7;
    color: #555;
    font-size: 15px;
    background: #fafcfd;
}

.faq-answer p {
    margin-bottom: 12px;
}

.faq-answer ul, .faq-answer ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.faq-answer li {
    margin-bottom: 6px;
}

/* Полезные ссылки в FAQ */
.faq-useful-links {
    margin-top: 18px;
    padding: 14px 16px;
    background: #e8f4f8;
    border-radius: 12px;
    font-size: 13px;
}

.faq-useful-links strong {
    display: block;
    margin-bottom: 8px;
    color: #0a5c8e;
}

.faq-useful-links a {
    color: #0a5c8e;
    text-decoration: none;
    display: inline-block;
    margin: 4px 12px 4px 0;
    padding: 4px 8px;
    background: white;
    border-radius: 20px;
    transition: all 0.2s;
}

.faq-useful-links a:hover {
    background: #0a5c8e;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Форма вопроса - широкая */
.question-form-container {
    max-width: 100%;
    margin: 0 auto;
}

.question-form-container .ask-question-container {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.question-form-container .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.question-form-container .form-group {
    margin-bottom: 20px;
}

.question-form-container input,
.question-form-container textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
}

.question-form-container input:focus,
.question-form-container textarea:focus {
    outline: none;
    border-color: #0a5c8e;
    box-shadow: 0 0 0 3px rgba(10,92,142,0.1);
}

.question-form-container textarea {
    resize: vertical;
    min-height: 120px;
}

.question-form-container button {
    background: #0a5c8e;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: auto;
    min-width: 200px;
}

.question-form-container button:hover {
    background: #064269;
    transform: translateY(-2px);
}

/* Мои обращения (вопросы пользователя) */
.user-questions-list {
    margin-top: 20px;
}

.user-questions-list .question-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid #0a5c8e;
    transition: all 0.2s;
}

.user-questions-list .question-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.user-questions-list .question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #7f8c8d;
}

.user-questions-list .question-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.user-questions-list .status-new {
    background: #fff3cd;
    color: #856404;
}

.user-questions-list .status-answered {
    background: #d4edda;
    color: #155724;
}

.user-questions-list .question-question {
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c3e50;
    cursor: pointer;
    line-height: 1.5;
}

.user-questions-list .question-question:hover {
    color: #0a5c8e;
}

.user-questions-list .question-answer {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 12px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.user-questions-list .question-answer strong {
    color: #0a5c8e;
    display: block;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }
    .faq-answer {
        padding: 0 16px 16px;
        font-size: 14px;
    }
    .question-form-container .form-row {
        grid-template-columns: 1fr;
    }
}
/* ========== СТРАНИЦЫ ПОМОЩИ (HELP PAGES) ========== */
.help-content-page {
    padding: 40px 0 80px;
    background: #f5f7fb;
}

.help-content-page .page-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.help-content-page h2 {
    color: #0a5c8e;
    font-size: 24px;
    margin: 30px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f4f8;
}

.help-content-page h3 {
    color: #2c3e50;
    font-size: 20px;
    margin: 25px 0 12px;
}

.help-content-page h4 {
    color: #0a5c8e;
    font-size: 18px;
    margin: 20px 0 10px;
}

.help-content-page p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #444;
}

.help-content-page ul, .help-content-page ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.help-content-page li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Таблицы на страницах помощи */
.help-content-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.help-content-page th,
.help-content-page td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: left;
}

.help-content-page th {
    background: #f0f7ff;
    font-weight: 600;
    color: #0a5c8e;
}

/* Блоки с контактами */
.help-contacts-block {
    background: #f0f7ff;
    border-radius: 16px;
    padding: 20px 25px;
    margin: 25px 0;
}

.help-contacts-block p {
    margin-bottom: 8px;
}

.help-contacts-block a {
    color: #0a5c8e;
    text-decoration: none;
    font-weight: 500;
}

.help-contacts-block a:hover {
    text-decoration: underline;
}

/* PDF документы */
.pdf-documents-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.pdf-doc-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border: 1px solid #e8f4f8;
}

.pdf-doc-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    background: white;
}

.pdf-doc-icon {
    font-size: 40px;
}

.pdf-doc-info {
    flex: 1;
}

.pdf-doc-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 15px;
}

.pdf-doc-meta {
    font-size: 11px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.pdf-doc-link {
    color: #0a5c8e;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    margin-right: 12px;
}

.pdf-doc-link:hover {
    text-decoration: underline;
}

.pdf-preview-btn {
    background: none;
    border: none;
    color: #0a5c8e;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 20px;
    transition: all 0.2s;
}

.pdf-preview-btn:hover {
    background: #e8f4f8;
}

.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.pdf-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    position: relative;
    cursor: default;
    overflow: hidden;
}

.pdf-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 30px;
    color: white;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pdf-modal-close:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.05);
}

.pdf-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .pdf-documents-list {
        grid-template-columns: 1fr;
    }
    .pdf-modal-content {
        width: 95%;
        height: 80vh;
    }
}

/* ========== АРХИВ НОВОСТЕЙ ========== */
.news-archive {
    padding: 40px 0 80px;
}

.news-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.news-archive-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.4s;
}

.news-archive-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.news-archive-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.news-archive-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-archive-card:hover .news-archive-img {
    transform: scale(1.08);
}

.news-archive-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    min-width: 55px;
}

.date-day {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: var(--primary);
}

.date-month {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
}

.news-archive-content {
    padding: 24px;
}

.news-archive-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.news-archive-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.news-archive-readmore {
    display: inline-block;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.news-archive-readmore:hover {
    transform: translateX(5px);
}

.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ========== КНОПКА НАВЕРХ ========== */
.scroll-top {
    position: fixed;
    bottom: 27px;
    right: 92px; /* левее кнопки онлайн-чата */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 22px;
    /* Выезжает влево из-под кнопки чата при прокрутке */
    opacity: 0;
    visibility: hidden;
    transform: translateX(26px) scale(0.5);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.22,1,0.36,1), transform 0.35s cubic-bezier(0.22,1,0.36,1), visibility 0.35s;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* ========== ОВЕРЛЕЙ ПЕРЕХОДА МЕЖДУ СТРАНИЦАМИ (белый + логотип) ========== */
#gb4-leave-overlay {
    position: fixed;
    inset: 0;
    z-index: 99000;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.42s ease, visibility 0.42s;
    pointer-events: none;
}
#gb4-leave-overlay.go {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
#gb4-leave-overlay img {
    width: 120px;
    animation: gb4LeaveLogo 1.1s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes gb4LeaveLogo {
    0%   { transform: scale(0.82); opacity: 0.55; }
    50%  { transform: scale(1.0); opacity: 1; }
    100% { transform: scale(0.82); opacity: 0.55; }
}
body.gb4-page-leaving .header__main,
body.gb4-page-leaving .hero,
body.gb4-page-leaving main {
    transition: opacity 0.3s ease;
    opacity: 0.75;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
.mobile-menu-toggle {
    display: none; /* базовое состояние; внутри media 992 ниже — панель [Меню|поиск] */
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }

    /* Единая панель навигации: [☰ Меню | 🔍] в одну строку */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        width: auto;
        flex: 1;
        padding: 11px 18px;
        margin: 8px 0;
        background: linear-gradient(135deg, var(--primary), #0d6ea8);
        color: white;
        border: none;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
        border-radius: 40px;
        box-shadow: 0 3px 10px rgba(10, 92, 142, 0.25);
        transition: all 0.25s ease;
    }

    .mobile-menu-toggle .mmt-icon { font-size: 16px; line-height: 1; }
    .mobile-menu-toggle.open { background: var(--primary-dark); }

    /* Поиск — вторая кнопка в той же строке */
    .search-wrapper {
        margin: 8px 0 8px 10px;
        width: auto;
        flex-shrink: 0;
    }

    .search-toggle {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 40px;
        background: linear-gradient(135deg, var(--primary), #0d6ea8);
        color: white;
        box-shadow: 0 3px 10px rgba(10, 92, 142, 0.25);
    }

    .search-toggle:hover { background: var(--primary-dark); color: white; }

    .search-form-container {
        position: absolute;
        right: 0;
        top: calc(100% + 6px);
        width: min(340px, calc(100vw - 32px));
        background: #ffffff;
        border-radius: 14px;
        border: 1px solid rgba(10,92,142,0.12);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        display: block;
        padding: 12px;
        box-shadow: 0 14px 34px rgba(15, 40, 70, 0.22);
        transition: all 0.22s ease;
        z-index: 1050;
    }

    .search-form-container.active {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-wrapper {
        flex-wrap: nowrap;
        align-items: center;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li > a {
        white-space: normal;
        padding: 12px 15px;
    }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        background: var(--gray-bg);
        border-top: none;
    }

    .nav-menu .sub-menu.active {
        display: block;
    }

    .stats-grid,
    .services-grid,
    .specialties-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .chief-card {
        flex-direction: column;
    }
    
    .chief-photo {
        flex: 0 0 200px;
        min-height: 200px;
    }
    
    .chief-info {
        padding: 20px;
    }
    
    .doctor-single-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .news-archive-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== СТИЛИ ДЛЯ КОНТЕНТА СТРАНИЦ ========== */
.page-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin: 40px 0;
}

.page-content h1, 
.page-content h2, 
.page-content h3, 
.page-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--primary);
}

.page-content h1:first-child,
.page-content h2:first-child,
.page-content h3:first-child {
    margin-top: 0;
}

.page-content p {
    margin-bottom: 1em;
    line-height: 1.7;
    color: var(--text-dark);
}

.page-content ul, 
.page-content ol {
    margin-left: 20px;
    margin-bottom: 1em;
}

.page-content li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.page-content a {
    color: var(--primary);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.page-content th,
.page-content td {
    border: 1px solid var(--gray-light);
    padding: 10px;
    text-align: left;
}

.page-content th {
    background: var(--primary-light);
    font-weight: 600;
}

.site-header, .header {
    margin: 0;
    padding: 0;
}

.inner-page {
    padding: 0;
    margin: 0;
}

/* ========== BVI В ПОДВАЛЕ (в тему футера, десктоп + моб) ========== */
.footer-bvi { display: inline-flex; }
/* Обёртка шорткода от плагина — красная с паддингами; убираем, оставляем только нашу кнопку */
.footer-bvi .bvi-shortcode {
    display: inline-flex !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.footer-bvi .bvi-open {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 5px 16px !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    color: #fff !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    cursor: pointer !important;
    border: none !important;
    width: auto !important;
    margin: 0 !important;
    font-family: inherit !important;
    line-height: 1.6 !important;
}
.footer-bvi .bvi-open:hover {
    background: var(--primary) !important;
    transform: translateY(-2px) !important;
}
.footer-bvi .bvi-open svg { width: 17px; height: 17px; fill: currentColor; flex: none; }

/* ========== BVI В ПОДВАЛЕ (МОБИЛЬНАЯ ВЕРСИЯ) ========== */
.footer-bvi-mobile {
    text-align: center;
    margin: 30px 0 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bvi-mobile .bvi-open {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 12px 24px !important;
    background: #0a5c8e !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    cursor: pointer !important;
    border: none !important;
    width: auto !important;
    max-width: 280px !important;
    margin: 0 auto !important;
}

.footer-bvi-mobile .bvi-open:hover {
    background: #0a3d5c !important;
    transform: translateY(-2px) !important;
}

@media (min-width: 993px) {
    .footer-bvi-mobile {
        display: none;
    }
}

@media (max-width: 992px) {
    .footer-bvi-mobile {
        display: block;
    }
}

/* ========== ЛИЧНЫЙ КАБИНЕТ ПАЦИЕНТА ========== */
.patient-appointments {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.patient-appointments h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #0a5c8e;
}

.appointments-table {
    overflow-x: auto;
}

.appointments-list {
    width: 100%;
    border-collapse: collapse;
}

.appointments-list th,
.appointments-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.appointments-list th {
    background: #f5f7fb;
    font-weight: 600;
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.cancel-appointment-btn {
    padding: 5px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.cancel-appointment-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.quick-booking {
    margin-top: 25px;
    text-align: center;
}

.um-guest-message {
    background: #f5f7fb;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
}

.um-guest-message a {
    color: #0a5c8e;
    text-decoration: none;
    font-weight: 500;
}

.um-guest-message a:hover {
    text-decoration: underline;
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ ========== */

/* Hero секция со слайдером */
.hero { padding: 40px 0; background: white; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hero-content h1 { font-size: 32px; color: #2c3e50; margin-bottom: 20px; line-height: 1.3; }
.hero-content p { font-size: 18px; color: #7f8c8d; margin-bottom: 30px; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-slider { border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); min-height: 350px; }
.hero-slider .n2-ss-slider { border-radius: 20px !important; }
/* Слайд «Сообщить о проблеме»: фирменный градиент POS-баннера Госуслуг */
.hero-slider div#n2-ss-2 .n2-ss-slide-11 { background: linear-gradient(138.4deg, #38bafe 26.49%, #2d73bc 79.45%) !important; }
@media (max-width: 992px) { 
    .hero-grid { grid-template-columns: 1fr; text-align: center; } 
    .hero-buttons { justify-content: center; }
    .hero-slider { min-height: 250px; }
}
@media (max-width: 576px) {
    .hero-content h1 { font-size: 24px; }
    .hero-content p { font-size: 16px; }
}

/* Разделы сайта */
.sections-showcase { padding: 60px 0; background: #f5f7fb; }
.sections-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin-top: 30px; }
@media (max-width: 992px) { .sections-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .sections-grid { grid-template-columns: 1fr; } }
.section-card { background: white; padding: 30px 25px; border-radius: 20px; text-decoration: none; transition: all 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.05); display: block; }
.section-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.section-icon { font-size: 48px; margin-bottom: 15px; }
.section-card h3 { font-size: 20px; margin-bottom: 12px; color: #0a5c8e; }
.section-card p { font-size: 14px; color: #666; line-height: 1.5; margin-bottom: 15px; }
.section-link { font-size: 13px; color: #0a5c8e; font-weight: 500; display: inline-block; transition: transform 0.3s; }
.section-card:hover .section-link { transform: translateX(5px); }

/* Отзывы */
.reviews-section { padding: 60px 0; background: #f5f7fb; }
.reviews-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }
.reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; margin-top: 30px; }
@media (max-width: 768px) { .reviews-grid { grid-template-columns: 1fr; } }
.review-card { background: white; padding: 25px; border-radius: 16px; border-left: 4px solid #0a5c8e; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.3s; }
.review-card:hover { transform: translateY(-3px); }
.review-rating { margin-bottom: 10px; font-size: 18px; color: #f1c40f; letter-spacing: 2px; }
.review-text { font-style: italic; margin-bottom: 15px; color: #555; line-height: 1.5; }
.review-author { font-weight: bold; color: #0a5c8e; margin-bottom: 5px; }
.review-date { font-size: 11px; color: #999; }

/* Форма добавления отзыва */
.review-form-container { margin-top: 40px; padding: 30px; background: white; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.review-form-container h3 { margin-bottom: 20px; color: #0a5c8e; }
.review-form input, .review-form select, .review-form textarea { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 12px; font-size: 14px; }
.review-form input:focus, .review-form textarea:focus { outline: none; border-color: #0a5c8e; }
.rating-select { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; flex-wrap: wrap; }
.rating-select label { margin-right: 10px; font-weight: 500; }
.rating-stars { display: flex; gap: 5px; cursor: pointer; }
.rating-stars span { font-size: 24px; color: #ddd; transition: color 0.2s; }
.rating-stars span.active { color: #f1c40f; }
.rating-stars span:hover { color: #f1c40f; }

/* Стили для страницы "Все отзывы" */
.reviews-archive { padding: 40px 0 80px; background: #f5f7fb; }
.reviews-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; margin-top: 30px; }
.reviews-pagination { margin-top: 40px; text-align: center; }

/* Отделения архив */
.departments-archive { padding: 40px 0 80px; background: #f5f7fb; }
.departments-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-top: 30px; }
.department-archive-card { background: white; border-radius: 20px; overflow: hidden; transition: all 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.department-archive-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.department-archive-image { height: 200px; overflow: hidden; }
.department-archive-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.department-archive-card:hover .department-archive-image img { transform: scale(1.05); }
.department-archive-placeholder { height: 200px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a5c8e, #0a3d5c); color: white; font-size: 64px; }
.department-archive-content { padding: 20px; }
.department-archive-content h2 { font-size: 20px; margin-bottom: 10px; color: #0a5c8e; }
.department-archive-content p { color: #666; margin-bottom: 15px; line-height: 1.5; }
@media (max-width: 768px) { .departments-archive-grid { grid-template-columns: 1fr; } }

.question-tip { background: #e8f4f8; padding: 12px 15px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; }
.question-tip a { color: #0a5c8e; }

/* График работы врача на странице врача */
.doctor-detailed-schedule {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.doctor-detailed-schedule h3 {
    color: #0a5c8e;
    margin-bottom: 20px;
    font-size: 20px;
}

.schedule-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.schedule-day-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.2s;
    border-left: 3px solid #0a5c8e;
}

.schedule-day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.schedule-day-name {
    font-weight: 700;
    font-size: 16px;
    color: #0a5c8e;
    margin-bottom: 6px;
}

.schedule-day-time {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.schedule-day-room {
    font-size: 12px;
    color: #7f8c8d;
}

.schedule-day-note {
    font-size: 12px;
    color: #e67e22;
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px dashed #f0f0f0;
}

.schedule-placeholder-info {
    text-align: center;
    padding: 20px;
    background: #fff8e7;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .schedule-days-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ И ПЛАВАЮЩАЯ НАВИГАЦИЯ ========== */
/* Кнопка [☰ Меню] создаётся из JS; её базовые стили — в блоке max-width:992 выше.
   Здесь — поведение плавающей панели при скролле: панель ВСЕГДА на экране
   (position:fixed), при прокрутке вниз становится компактной и полупрозрачной,
   при открытии меню — снова полноценной. Кнопка меню больше никогда не пропадает. */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, transform 0.3s ease;
    }

    /* Приклеенное состояние сразу после начала прокрутки */
    .main-nav.gb4-nav-compact {
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 2px 16px rgba(15, 40, 70, 0.14);
    }

    .main-nav.gb4-nav-compact .nav-wrapper {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .main-nav.gb4-nav-compact .mobile-menu-toggle,
    .main-nav.gb4-nav-compact .search-toggle {
        padding-top: 7px;
        padding-bottom: 7px;
        box-shadow: none;
    }

    /* Открытое меню — максимально читаемое, плотный фон */
    .main-nav.nav-open {
        background: #ffffff;
        box-shadow: 0 6px 24px rgba(15, 40, 70, 0.18);
        /* Не даём панели уехать под статус-бар/«чёлку» на телефонах */
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Длинное меню (с раскрытыми подпунктами) прокручивается внутри,
       верхний пункт всегда доступен */
    .nav-menu.active {
        max-height: calc(100dvh - 160px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    @keyframes gb4NavIn {
        from { transform: translateY(-100%); opacity: 0.4; }
        to   { transform: translateY(0); opacity: 1; }
    }
}

/* Слайд «Диспансеризация» (Smart Slider): на мобильном картинка-баннер
   масштабируется по ширине слайда, чтобы не обрезалась по бокам.
   (Фикс высоты .n2-section-smartslider 240px удалён — он обрезал низ слайдов
   на мобильном: SS3 считает полную высоту контента сам.) */
@media (max-width: 700px) {
    .hero-slider .n2-ss-layer.n-uc-HiX0MrOwoDHh {
        width: 100% !important;
        left: 0 !important;
    }
    .hero-slider .n2-ss-layer.n-uc-HiX0MrOwoDHh img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
}

/* Плавающая кнопка меню (для мобильных при скролле) */
.floating-menu-btn {    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #0a5c8e;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.floating-menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s;
}

.floating-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.floating-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.floating-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.floating-menu-btn:hover {
    transform: scale(1.05);
    background: #064269;
}

/* Уменьшенный header для мобильных */
@media (max-width: 768px) {
    .header__top .container-top {
        padding: 8px 16px;
        font-size: 11px;
    }
    /* Кнопка «Версия для слабовидящих» на мобильном: компактная, всегда видна */
    .header__top .bvi-button-wrapper { display: inline-flex; }
    .header__top .bvi-button-wrapper .bvi-open {
        font-size: 11.5px !important;
        padding: 5px 10px !important;
        white-space: nowrap;
    }
    /* «Админ-панель» в мобильной шапке не нужна — она есть в меню пользователя */
    .header__top .gb4-admin-top-link { display: none; }

    .hospital-name-mobile {
        display: block;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header__main {
        padding: 15px 0;
    }
    
    .logo-link {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        max-width: 100%;
    }
    
    .logo-img {
        max-height: 64px;
    }

    .logo-text h1 {
        font-size: 17px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .logo-text p {
        display: none; /* упрощённая мобильная шапка — описание скрыто */
    }

    .social-links__row {
        justify-content: center;
    }
    
    .emergency-contacts {
        text-align: center;
        width: 100%;
    }
    
    .emergency-contacts div {
        margin-bottom: 8px;
    }
    
    .hotline {
        font-size: 18px;
    }

    /* Мобильное меню (панель [Меню|поиск] описана в блоке max-width:992) */
    .nav-wrapper {
        flex-wrap: nowrap;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        z-index: 1000;
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
        max-height: 72vh;
        overflow-y: auto;
        border-radius: 18px;
        margin-top: 8px;
    }

    .nav-menu > li {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a {
        padding: 14px 20px;
        white-space: normal;
        font-size: 14px;
    }

    .nav-menu .sub-menu {
        background: #f8fafc;
    }

    /* Плавающая кнопка больше не используется — навигация сама липнет к верху */
    .floating-menu-btn {
        display: none !important;
    }
}

/* На десктопе плавающая кнопка не нужна */
@media (min-width: 769px) {
    .floating-menu-btn {
        display: none !important;
    }
}

/* Стили для активного состояния плавающей кнопки */
.floating-menu-btn.active {
    background: #064269;
}

/* ========== ULTIMATE MEMBER ========== */

/* Контейнер профиля */
.um-profile,
.um-login,
.um-account {
    background: white !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    margin: 0 auto !important;
}

/* СТРАНИЦА ВХОДА */
.um-login {
    max-width: 450px !important;
    margin: 50px auto !important;
}

.um-login .um-form {
    padding: 35px !important;
}

.um-login .um-field-label {
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin-bottom: 8px !important;
}

.um-login input[type="text"],
.um-login input[type="password"],
.um-login input[type="email"] {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    background: white !important;
}

.um-login input:focus {
    border-color: #0a5c8e !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(10,92,142,0.1) !important;
}

.um-login .um-button {
    background: #0a5c8e !important;
    border-radius: 40px !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    width: 100% !important;
    transition: all 0.3s !important;
}

.um-login .um-button:hover {
    background: #064269 !important;
    transform: translateY(-2px) !important;
}

.um-login .um-alert {
    border-radius: 12px !important;
    margin-bottom: 20px !important;
}

/* СТРАНИЦА ПРОФИЛЯ */
.um-profile {
    max-width: 800px !important;
    margin: 50px auto !important;
}

.um-profile .um-header {
    background: linear-gradient(135deg, #0a5c8e, #0a3d5c) !important;
    padding: 30px !important;
    text-align: center !important;
}

.um-profile .um-profile-photo {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto 15px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 3px solid white !important;
}

.um-profile .um-profile-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.um-profile .um-name {
    font-size: 24px !important;
    color: white !important;
    margin-bottom: 5px !important;
}

.um-profile .um-meta {
    color: rgba(255,255,255,0.8) !important;
    font-size: 14px !important;
}

/* Навигация профиля */
.um-profile-nav {
    background: #f8fafc !important;
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.um-profile-nav-item {
    padding: 12px 24px !important;
    color: #2c3e50 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    border-radius: 30px !important;
    transition: all 0.3s !important;
}

.um-profile-nav-item.active,
.um-profile-nav-item:hover {
    background: #0a5c8e !important;
    color: white !important;
}

/* Тело профиля */
.um-profile-body {
    padding: 30px !important;
}

.um-field {
    margin-bottom: 20px !important;
}

.um-field-label {
    font-weight: 600 !important;
    color: #0a5c8e !important;
    margin-bottom: 8px !important;
}

.um-field-value {
    color: #555 !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.um-field input,
.um-field textarea,
.um-field select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
}

/* Кнопки */
.um-button {
    background: #0a5c8e !important;
    border-radius: 40px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s !important;
}

.um-button:hover {
    background: #064269 !important;
    transform: translateY(-2px) !important;
}

/* Убираем ненужные элементы */
.um-register-link {
    display: none !important;
}

.um-login-register {
    display: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .um-profile {
        margin: 20px auto !important;
        border-radius: 16px !important;
    }
    .um-profile-body {
        padding: 20px !important;
    }
    .um-profile-nav-item {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
}


.login-link { background: #f08c1f; color: #ffffff !important; }
.login-link:hover { background: #ff9d33; color: #ffffff !important; }



/* Ссылки: единый фирменный стиль по всему сайту (голубые, без браузерного синего и подчёркивания).
   Исключения — интерактивные элементы со своими стилями. */
a:not(.btn):not(.btn-outline):not(.btn-primary):not(.btn-secondary):not(.section-card):not(.department-archive-card):not(.review-card):not(.review-card-new):not(.quick-link):not(.quick-link-hero):not(.more-link):not(.section-link):not(.hotline):not(.social-icon):not(.doc-link):not(.doc-link-btn):not(.download-link):not(.assistant-link):not(.assistant-result):not(.patient-card):not(.popular-card):not(.rcn-link):not(.mobile-submenu-arrow):not(.mobile-call-btn):not(.nav-menu a):not(.sub-menu a):not(.contacts-nav-link):not(.about-nav-link):not(.all-link):not(.way-card__link):not(.kids-link):not(.phone-tile__number):not(.hs-arrow):not(.pop-arrow):not(.btn-small):not(.help-nav-link):not(.user-btn):not(.logout-btn):not(.login-link):not(.awall-item):not(.pdf-doc-btn):not(.sgroup-item):not(.doc-download) {
    color: #0a5c8e;
    text-decoration: none;
    transition: color 0.3s;
}
a:not(.btn):not(.btn-outline):not(.btn-primary):not(.btn-secondary):not(.section-card):not(.department-archive-card):not(.review-card):not(.review-card-new):not(.quick-link):not(.quick-link-hero):not(.more-link):not(.section-link):not(.hotline):not(.social-icon):not(.doc-link):not(.doc-link-btn):not(.download-link):not(.assistant-link):not(.assistant-result):not(.patient-card):not(.popular-card):not(.rcn-link):not(.mobile-submenu-arrow):not(.mobile-call-btn):not(.nav-menu a):not(.sub-menu a):not(.contacts-nav-link):not(.about-nav-link):not(.all-link):not(.way-card__link):not(.kids-link):not(.phone-tile__number):not(.hs-arrow):not(.pop-arrow):not(.doc-download):hover {
    color: #064269;
    text-decoration: none;
}
.btn, .btn-outline, .btn-primary, .btn-secondary, .more-link, .section-link { text-decoration: none; }