.site-header { --sm-nav-ready: 1; }
/* Compact contact group: all numbers remain available without shrinking text. */
.sm-topbar { padding: 4px 0; font-size: .8125rem; }
.sm-topbar .top-bar-content { gap: 12px 20px; flex-wrap: wrap; }
.sm-topbar-contacts { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; min-width: 0; flex: 1 1 auto; }
.sm-topbar-address { display: inline-flex; align-items: center; gap: 7px; max-width: 190px; line-height: 1.4; }
.sm-topbar-address i { color: var(--accent); }
.sm-topbar-mri { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: #fff; }
.sm-topbar-mri span { color: #d4e4f1; font-size: .9em; }
.sm-topbar-mri:hover { color: #fff; text-decoration: underline !important; }
.sm-topbar-phone, .sm-topbar-emergency { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; color: #fff; }
.sm-topbar-phone:hover, .sm-topbar-emergency:hover { color: #fff; text-decoration: underline !important; }
.sm-topbar-phone i { color: var(--accent); }
.sm-topbar-emergency i { color: #ffbf66; }
.sm-topbar-label { color: #d4e4f1; }
.sm-top-contacts { position: relative; }
.sm-top-contacts summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 5px 10px; border: 1px solid #ffffff40; border-radius: 7px; list-style: none; cursor: pointer; }
.sm-top-contacts summary::-webkit-details-marker { display: none; }
.sm-top-contacts-compact { display: none; }
.sm-top-contacts summary i { font-size: .7em; }
.sm-top-contacts[open] summary { background: #ffffff1a; }
.sm-top-contacts[open] summary i { transform: rotate(180deg); }
.sm-top-contacts-panel { position: absolute; top: calc(100% + 10px); left: 0; width: min(340px,calc(100vw - 32px)); max-height: min(65dvh,520px); overflow-y: auto; z-index: 1300; padding: 8px 18px; border: 1px solid #d6e2ec; border-radius: 12px; box-shadow: 0 16px 40px #00224430; background: #fff; color: #16314a; font-size: .9375rem; line-height: 1.5; }
.sm-top-contacts-panel > div { display: grid; gap: 4px; padding: 12px 0; }
.sm-top-contacts-panel > div + div { border-top: 1px solid #e2eaf2; }
.sm-top-contacts-panel a { display: block; padding: 6px 0; color: #003366; font-weight: 600; }
.sm-top-contacts-panel p { margin: 0 0 8px; }
.sm-topbar-book { padding: 10px 12px; border: 1px solid #003366; border-radius: 7px; background: #edf4fa; color: #003366; font: inherit; cursor: pointer; }
.sm-topbar .top-socials { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
.sm-topbar .top-social-icon { width: 36px; height: 36px; font-size: .875rem; }
.sm-topbar .lang-item { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 40px; padding: 4px; color: #fff; font-weight: 600; }
.sm-topbar .top-socials .lang-item.lang-active { text-decoration: underline !important; text-underline-offset: 5px; color: var(--sm-a11y-fg,#fff) !important; }
.sm-topbar .top-divider { margin: 0 5px; }
@media (max-width: 1240px) { .sm-topbar-address { display: none; } }
@media (max-width: 1100px) { .sm-topbar-label { display: none; } .sm-topbar-contacts { gap: 4px 12px; } }
@media (max-width: 900px) { .sm-topbar-mri { display: none; } }
@media (max-width: 820px) {
    .sm-topbar .top-bar-content { justify-content: space-between; gap: 4px; }
    .sm-topbar-contacts { flex: 1 1 100%; justify-content: space-between; }
    .sm-topbar .top-socials { flex: 1 1 100%; justify-content: space-between; margin: 0; }
    .sm-top-contacts-panel { position: fixed; left: 16px; right: 16px; top: auto; margin-top: 10px; width: auto; }
}
@media (max-width: 380px) { .sm-topbar { font-size: .75rem; } .sm-topbar-contacts { gap: 2px 6px; } .sm-topbar-emergency span { display: none; } }
@media (max-width: 480px) {
    .sm-topbar-emergency span, .sm-top-contacts-label { display: none; }
    .sm-top-contacts-compact { display: inline; }
    .sm-topbar-contacts { gap: 4px 6px; }
    .sm-top-contacts summary { gap: 5px; padding-inline: 6px; }
    .sm-topbar .top-socials { gap: 2px; }
    .sm-topbar .top-social-icon { width: 32px; height: 32px; }
    .sm-topbar .lang-item { min-width: 28px; }
    .sm-topbar .top-divider { margin-inline: 2px; }
}
/* Keep the contact bar and navigation together as one sticky header. */
.sm-sticky-header { position: sticky; top: 0; z-index: 1000; }
.sm-sticky-header > header.site-header { position: relative; top: auto; }
@media (min-width: 783px) {
    .admin-bar .sm-sticky-header { top: 32px; }
}
@media (min-width: 601px) and (max-width: 782px) {
    .admin-bar .sm-sticky-header { top: 46px; }
}
.sm-header-actions { display: flex; align-items: center; gap: 15px; }
.sm-topbar-hours { display: none; align-items: center; gap: 8px; color: #d4e4f1; white-space: nowrap; }
.sm-topbar-hours i { color: #fff; }
@media (min-width: 1600px) { .sm-topbar-hours { display: inline-flex; } }
.sm-language-switcher { position: relative; flex: 0 0 auto; font-size: .875rem; }
.sm-language-switcher summary { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border: 1px solid #d6e2ec; border-radius: 8px; color: #003366; background: #fff; font-weight: 600; list-style: none; cursor: pointer; }
.sm-language-switcher summary::-webkit-details-marker { display: none; }
.sm-language-switcher summary > .fa-chevron-down { font-size: .7em; }
.sm-language-switcher[open] summary > .fa-chevron-down { transform: rotate(180deg); }
.sm-language-options { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1300; min-width: 175px; max-width: calc(100vw - 24px); list-style: none; padding: 6px; margin: 0; border: 1px solid #d6e2ec; border-radius: 10px; background: #fff; box-shadow: 0 12px 32px #00224426; }
.sm-language-options a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; min-height: 44px; border-radius: 6px; color: #003366; font-weight: 600; }
.sm-language-options a:hover, .sm-language-options a[aria-current] { background: #e6f0fa; color: var(--primary); }
@media (max-width: 1024px) {
    .sm-nav-popover > .sm-language-switcher { margin-bottom: 10px; }
    .sm-nav-popover > .sm-language-switcher summary { justify-content: flex-start; }
    .sm-nav-popover .sm-language-options { position: static; min-width: 0; margin-top: 6px; box-shadow: none; }
    .sm-header-actions > .sm-language-switcher { display: none; }
}
/* WordPress wp_nav_menu */
.sm-primary-nav { display: flex; gap: 20px; }
:is(.sm-primary-nav, .sm-nav-popover) ul { list-style: none; margin: 0; padding: 0; }
:is(.sm-primary-nav, .sm-nav-popover) li { position: relative; margin: 0; padding: 0; }
:is(.sm-primary-nav, .sm-nav-popover) a { text-decoration: none; }
.sm-primary-nav > ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.sm-primary-nav li { position: relative; }
.sm-primary-nav li a { font-weight: 600; font-size: 1.1rem; color: var(--text-dark); position: relative; padding: 10px 0; display: block; }
.sm-primary-nav > ul > li > a:hover,
.sm-primary-nav > ul > li.current-menu-item > a,
.sm-primary-nav > ul > li.current-menu-ancestor > a,
.sm-primary-nav > ul > li.current-menu-parent > a { color: var(--accent); }
.sm-primary-nav > ul > li.current-menu-item > a::after,
.sm-primary-nav > ul > li.current-menu-ancestor > a::after,
.sm-primary-nav > ul > li.current-menu-parent > a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--accent);
}

/* Shared surface and rows for ordinary dropdowns and the overflow menu. */
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) {
    background: var(--white);
    border: 1px solid #e2eaf2;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,34,68,.16);
    padding: 8px;
}
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li > a {
    display: block;
    min-height: 44px;
    padding: 11px 12px;
    border: 0;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-dark);
    white-space: normal;
    overflow-wrap: anywhere;
    background: transparent;
    transition: color .15s ease, background-color .15s ease;
}
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li > a::after { display: none; }
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li > a:hover,
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li > a:focus-visible {
    background: #f1f6fb;
    color: var(--primary);
}
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li:is(.current-menu-item, .current-menu-ancestor, .current-menu-parent) > a {
    background: var(--blue-light);
    color: var(--primary);
    box-shadow: inset 3px 0 var(--accent);
}
.sm-primary-nav .sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 1200;
}

/* Уровень 3: открывается вправо */
.sm-primary-nav .sub-menu .sub-menu {
    top: -8px;
    left: 100%;
    margin-left: 8px;
}

@media (min-width: 1025px) {
    .sm-primary-nav li > .sub-menu::before {
        content: '';
        position: absolute;
        top: -14px;
        left: 0;
        right: 0;
        height: 14px;
    }
    .sm-primary-nav .sub-menu .sub-menu::before {
        content: '';
        position: absolute;
        left: -10px;
        top: 0;
        width: 10px;
        height: 100%;
    }
    .sm-primary-nav .sub-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }
    .sm-primary-nav .sub-menu .sub-menu {
        transform: translateX(8px);
    }
    .sm-primary-nav li:hover > .sub-menu,
    .sm-primary-nav li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(0, 0);
    }
}

/* Header navigation: one row, with a compact overflow popover. */
.site-header .sm-header-layout { gap: 18px; padding-inline: 12px; }
.logo-box, .sm-header-actions { flex-shrink: 0; }
.logo-box { min-width: 0; max-width: 40%; }
.logo-box .logo-text { min-width: 0; overflow-wrap: anywhere; }
.logo-box .custom-logo-link { display: block; }
.logo-box .custom-logo { width: auto; max-height: 64px; object-fit: contain; }
.sm-header-navigation { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 16px; flex: 1 1 auto; min-width: 0; }
.sm-nav-has-overflow .sm-header-navigation { justify-content: flex-end; }
.sm-primary-nav { flex: 0 0 auto; }
.sm-primary-nav a, .logo-box a { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.sm-primary-nav > ul { flex-wrap: nowrap; }
.sm-primary-nav > ul > li > a { white-space: nowrap; }
.sm-primary-nav .sub-menu { width: 300px; min-width: 0; max-width: calc(100vw - 24px); }
.sm-primary-nav .sub-menu li a { white-space: normal; overflow-wrap: anywhere; }
.sm-primary-nav .sub-menu.sm-nav-submenu--flip { left: auto; right: 0; }
.sm-primary-nav .sub-menu .sub-menu.sm-nav-submenu--flip { left: auto; right: 100%; margin-left: 0; margin-right: 8px; }
.sm-primary-nav .sub-menu .sub-menu.sm-nav-submenu--flip::before { left: auto; right: -10px; }
.sm-nav-submenu-toggle { display: none; }
.sm-primary-nav[hidden], .sm-nav-toggle[hidden] { display: none !important; }
.sm-nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
    width: 44px; height: 44px; padding: 10px; border: 1px solid #e2eaf2; border-radius: 8px;
    background: #f4f7fb; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: background-color 0.2s ease, border-color 0.2s ease;
}
.sm-nav-toggle:hover, .sm-nav-toggle[aria-expanded="true"] { background: var(--blue-light); border-color: #b7cde0; }
.sm-nav-toggle .sm-nav-chevron { flex-shrink: 0; font-size: 18px; line-height: 1; transition: transform 0.2s ease; }
.sm-nav-toggle[aria-expanded="true"] .sm-nav-chevron { transform: rotate(180deg); }
.sm-nav-lines { display: none; }
.sm-nav-toggle:focus-visible, .sm-nav-submenu-toggle:focus-visible, :is(.sm-primary-nav, .sm-nav-popover) a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Both an explicit open state and removal of hidden are required. */
.site-header #sm-overflow-navigation {
    display: none; position: absolute; inset: calc(100% + 16px) 0 auto auto;
    width: min(300px, calc(100vw - 24px)); max-height: min(480px, var(--nav-panel-height, 70vh));
    overflow-y: auto; overscroll-behavior: contain; z-index: 1250;
}
.sm-nav-is-open #sm-overflow-navigation:not([hidden]) { display: block; }
.site-header #sm-overflow-navigation[hidden] { display: none !important; }
.site-header #sm-overflow-navigation > ul { display: block; }
.site-header #sm-overflow-navigation .menu-item-has-children > a { padding-right: 54px; }
.site-header #sm-overflow-navigation .sub-menu {
    display: none; position: static; width: auto; min-width: 0; margin: 2px 0 6px 12px; padding: 0 0 0 8px;
    border: 0; border-left: 2px solid #e2eaf2; border-radius: 0; box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: none;
}
.site-header #sm-overflow-navigation .sub-menu::before { display: none; }
.site-header #sm-overflow-navigation .sub-menu.is-open { display: block; }
.sm-nav-popover .sm-nav-submenu-toggle {
    display: flex; align-items: center; justify-content: center; position: absolute; right: 0; top: 0;
    width: 44px; height: 44px; border: 0; border-radius: 6px; color: var(--primary); background: transparent;
    font-size: 1.35rem; cursor: pointer;
}
.sm-nav-popover .sm-nav-submenu-toggle:hover { background: var(--blue-light); }
/* Measurement never changes the live, potentially focused menu. */
.site-header .sm-primary-nav.sm-nav-measure {
    display: flex !important; position: fixed; inset: 0 auto auto 0; width: max-content;
    max-height: none; overflow: visible; padding: 0; border: 0; box-shadow: none; visibility: hidden; pointer-events: none;
}
.site-header .sm-nav-measure > ul { display: flex; flex-direction: row; flex-wrap: nowrap; }
.site-header .sm-nav-measure > ul > li > a { padding: 8px 0; white-space: nowrap; font-size: .84rem; border: 0; }
.site-header .sm-nav-measure a { transition: none !important; }
.site-header .sm-primary-nav.sm-nav-measure .sub-menu, .site-header .sm-nav-measure .sm-nav-submenu-toggle { display: none; }
.sm-nav-toggle--measure { position: fixed; inset: 0 auto auto 0; visibility: hidden; pointer-events: none; }
@media (max-width: 1024px) {
    .site-header .sm-header-layout { display: grid; grid-template-columns: minmax(0,1fr) auto 44px; gap: 10px; padding: 12px; align-items: center; }
    .site-header .logo-box { max-width: none; min-width: 0; justify-content: flex-start; gap: 8px; }
    .site-header .logo-icon { width: 34px; height: 36px; flex: 0 0 34px; }
    .site-header .logo-icon img { width: 32px; height: 32px; }
    .site-header .logo-text { font-size: .95rem; white-space: nowrap; }
    .site-header .custom-logo { max-width: 150px; max-height: 42px; }
    .sm-header-navigation { position: static; grid-column: 3; grid-row: 1; justify-content: flex-end; }
    .sm-header-actions { grid-column: 2; grid-row: 1; margin: 0; min-width: 0; }
    .sm-header-actions .btn { min-height: 44px; padding: 10px 14px !important; font-size: .75rem !important; letter-spacing: .03em !important; white-space: nowrap; }
    .sm-nav-toggle { width: 44px; padding: 10px; border-color: transparent; background: transparent; }
    .sm-nav-chevron { display: none; }
    .sm-nav-lines { display: flex; flex-direction: column; gap: 5px; }
    .sm-nav-lines > span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform 0.2s ease, opacity 0.2s ease; }
    .sm-nav-toggle[aria-expanded="true"] .sm-nav-lines > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .sm-nav-toggle[aria-expanded="true"] .sm-nav-lines > span:nth-child(2) { opacity: 0; }
    .sm-nav-toggle[aria-expanded="true"] .sm-nav-lines > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .site-header #sm-overflow-navigation { inset: 100% 0 auto; width: 100%; max-height: var(--nav-panel-height, 70vh); padding: 10px 12px 16px; border-radius: 0 0 14px 14px; border-top: 1px solid #e2eaf2; box-shadow: 0 18px 32px #00224426; }
    .site-header #sm-overflow-navigation > ul > li + li { border-top: 1px solid #eef2f6; }
}
@media (max-width: 380px) {
    .site-header .sm-header-layout { gap: 6px; }
    .site-header .logo-text { font-size: .82rem; }
    .site-header .logo-box { gap: 4px; }
    .site-header .logo-icon { width: 28px; flex-basis: 28px; }
    .site-header .logo-icon img { width: 27px; height: 30px; }
    .sm-header-actions .btn { padding-inline: 10px !important; font-size: .7rem !important; }
}
@media (prefers-reduced-motion: reduce) {
    .sm-nav-toggle, .sm-nav-chevron, .sm-nav-lines > span { transition: none; }
}
/* Keep related shortcuts together instead of stretching the gaps. */
.sm-sticky-header .sm-topbar .top-bar-content { justify-content: center; gap: 12px 24px; }
.sm-sticky-header .sm-topbar .sm-topbar-contacts { flex: 0 1 auto; gap: 6px 18px; }
.sm-sticky-header .sm-topbar .top-socials { margin-left: 0; gap: 6px; }
.sm-sticky-header .sm-topbar .top-socials .sm-a11y-trigger { margin-inline-end: 12px; }
.sm-sticky-header .sm-topbar .sm-top-contacts summary { border-color: transparent; border-radius: 6px; background: transparent; padding-inline: 6px; gap: 7px; }
.sm-sticky-header .sm-topbar .sm-top-contacts summary > .fa-address-book { color: var(--accent); font-size: 1em; }
.sm-sticky-header .sm-topbar .sm-top-contacts summary > .fa-chevron-down { color: #d4e4f1; }
.sm-sticky-header .sm-topbar .sm-top-contacts summary:hover, .sm-sticky-header .sm-topbar .sm-top-contacts[open] summary { background: #ffffff14; }
.sm-topbar-diagnostics { display: none; align-items: center; gap: 8px; min-height: 40px; color: #fff; white-space: nowrap; }
.sm-topbar-diagnostics > span { color: #d4e4f1; }
.sm-topbar-diagnostics:hover { color: #fff; text-decoration: underline !important; }
@media (min-width: 1280px) { .sm-topbar-diagnostics { display: inline-flex; } }
@media (min-width: 1280px) {
    .sm-topbar-label, .sm-topbar-emergency > span { display: none; }
}
.sm-topbar-phone strong, .sm-topbar-emergency strong, .sm-top-contacts summary { white-space: nowrap; }
@media (max-width: 820px) {
    .sm-sticky-header .sm-topbar .sm-topbar-contacts { flex-basis: 100%; justify-content: center; gap: 6px 16px; }
    .sm-sticky-header .sm-topbar .top-socials { flex-basis: 100%; justify-content: center; gap: 12px; }
    .sm-sticky-header .sm-topbar .top-bar-content { gap: 4px; }
}
@media (max-width: 480px) {
    .sm-sticky-header .sm-topbar .sm-topbar-contacts { justify-content: space-between; gap: 4px; }
    .sm-sticky-header .sm-topbar .sm-top-contacts summary { gap: 5px; padding-inline: 2px; }
    .sm-sticky-header .sm-topbar .sm-top-contacts summary > .fa-address-book { display: none; }
    .sm-sticky-header .sm-topbar .top-socials { gap: 12px; }
}


/* ============================================================
   Меню: типографика в духе логотипа (олимпийские кольца)
   ============================================================ */
.sm-primary-nav > ul > li > a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .84rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1.35;
    padding: 8px 0;
}

.sm-primary-nav > ul > li > a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--primary); transform: scaleX(0); transform-origin: left center; transition: transform .28s ease, opacity .28s ease; opacity: 0; }

.sm-primary-nav > ul > li:hover > a::after,
.sm-primary-nav > ul > li:focus-within > a::after,
.sm-primary-nav > ul > li.current-menu-item > a::after,
.sm-primary-nav > ul > li.current-menu-ancestor > a::after,
.sm-primary-nav > ul > li.current-menu-parent > a::after {
    transform: scaleX(1);
}

.sm-primary-nav > ul > li > a:hover,
.sm-primary-nav > ul > li.current-menu-item > a,
.sm-primary-nav > ul > li.current-menu-ancestor > a,
.sm-primary-nav > ul > li.current-menu-parent > a {
    color: var(--primary);
}

/* ============================================================
   Доступность: крупный шрифт не ломает топбар и меню
   ============================================================ */
html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar .top-bar-content {
    align-items: flex-start;
    row-gap: 8px;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar-contacts {
    gap: 8px 18px;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar :is(.sm-topbar-phone, .sm-topbar-emergency, .sm-topbar-diagnostics, .sm-topbar-hours) {
    min-height: 0;
    height: auto;
    flex-wrap: wrap;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar .top-social-icon {
    width: auto;
    min-width: 38px;
    height: auto;
    min-height: 38px;
    padding: 9px 10px;
    font-size: 1rem;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-top-contacts summary {
    min-height: 0;
    padding: 8px 12px;
    flex-wrap: wrap;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-top-contacts-panel {
    max-height: min(82dvh, 680px);
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-header-layout {
    flex-wrap: wrap;
    row-gap: 10px;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-primary-nav > ul {
    flex-wrap: wrap;
    gap: 6px 20px;
}

@media (max-width: 767px) {
    html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar .top-bar-content {
        flex-direction: column;
        align-items: stretch;
    }
    html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar .top-socials {
        justify-content: flex-start;
        gap: 6px;
    }
    html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar-contacts {
        justify-content: flex-start;
    }
    html[data-sm-font]:not([data-sm-font="100"]) .sm-primary-nav > ul {
        gap: 4px 16px;
    }
}

/* ============================================================
   Шапка: поиск, переключатель языка и кнопка «Запись» — единый вид
   ============================================================ */
.sm-header-actions {
    gap: 10px;
}

.sm-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    border: 1px solid #d6e2ec;
    border-radius: 10px;
    background: #fff;
    color: #003366;
    font-size: 1rem;
    text-decoration: none !important;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.sm-search-toggle:hover { background: #e6f0fa; border-color: #b7cde0; color: var(--primary); text-decoration: none !important; }

.sm-language-switcher {
    font-size: .8125rem;
}

.sm-language-switcher summary {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    color: #003366;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .04em;
    gap: 6px;
    transition: background-color .2s ease, border-color .2s ease;
}

.sm-language-switcher summary:hover {
    background: #e6f0fa;
    border-color: #b7cde0;
}

.sm-header-actions .btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.2;
    box-shadow: none !important;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.sm-header-actions .btn-accent:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 14px rgba(205,22,63,.24) !important;
}

/* Ховер и активный пункт меню — одна спокойная линия */
.sm-primary-nav > ul > li:hover > a::after,
.sm-primary-nav > ul > li:focus-within > a::after {
    transform: scaleX(1);
    opacity: .4;
}

.sm-primary-nav > ul > li.current-menu-item > a::after,
.sm-primary-nav > ul > li.current-menu-ancestor > a::after,
.sm-primary-nav > ul > li.current-menu-parent > a::after {
    transform: scaleX(1);
    opacity: 1;
    height: 3px;
}

/* ============================================================
   Доступность: крупный шрифт не разъезжается в топбаре
   ============================================================ */
html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar .top-bar-content {
    align-items: flex-start;
    gap: 8px 16px;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar-contacts {
    flex: 1 1 100%;
    gap: 6px 16px;
    align-items: flex-start;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar .top-socials {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 6px;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-topbar-hours {
    white-space: normal;
}

html[data-sm-font]:not([data-sm-font="100"]) .sm-search-toggle,
html[data-sm-font]:not([data-sm-font="100"]) .sm-language-switcher summary,
html[data-sm-font]:not([data-sm-font="100"]) .sm-header-actions .btn-accent {
    min-height: 40px;
}

/* Подменю и свёрнутое меню — обычный кегль, без верхнего регистра */
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li > a {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.45;
    color: var(--text-dark);
}

:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li > a:hover,
:is(.sm-primary-nav .sub-menu, .sm-nav-popover) li > a:focus-visible {
    color: var(--primary);
}
