/* ==========================================================================
   Premium polish layer — Artstom 32
   Global refinements on top of the Denart theme: micro-interactions,
   navigation, buttons, cards, footer, accessibility.
   Loaded after style.css / article-content.css.
   ========================================================================== */

/* ------------------------------ Foundations ------------------------------ */

::selection {
    color: #fff;
    background: #6a6e76;
}

::-moz-selection {
    color: #fff;
    background: #6a6e76;
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(106, 110, 118, 0.55) #f2f2f3;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: #f2f2f3;
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6a6e76, #575a61);
    border-radius: 10px;
    border: 2px solid #f2f2f3;
}

:focus-visible {
    outline: 2px solid #6a6e76;
    outline-offset: 3px;
    border-radius: 4px;
}

img {
    -webkit-user-drag: none;
}

/* монохромная тема: логотип обесцвечиваем под серо-белую гамму */
.logo-img {
    filter: grayscale(1) contrast(1.05);
}

/* телефон в шапке не должен переноситься после увеличения логотипа */
.navbar .navbar-right .phonex {
    white-space: nowrap;
}

/* ------------------------------- Navigation ------------------------------ */

.navbar {
    transition: background 360ms cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 360ms ease,
                padding 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar.nav-scroll {
    z-index: 1050; /* шапка всегда поверх плавающих элементов страницы */
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 10px 34px rgba(38, 40, 43, 0.09);
    border-bottom: 1px solid rgba(106, 110, 118, 0.1);
}

/* animated underline for top-level links */
.navbar .navbar-nav .nav-link {
    position: relative;
    white-space: nowrap;
}

/* после увеличения логотипа и добавления пунктов шапка не помещалась:
   до 1850px (порог поднят после добавления переключателя языка) уплотняем
   меню, телефон, кнопку и слегка ужимаем логотип */
@media (min-width: 992px) and (max-width: 1849px) {
    .navbar .navbar-nav .nav-link {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 14.5px;
    }

    .logo-img {
        width: 232px;
    }

    .navbar .navbar-right .phonex {
        margin-right: 14px !important;
        font-size: 15px;
    }

    .navbar .navbar-right .phonex i {
        width: 34px;
        height: 34px;
        font-size: 14px;
        line-height: 34px;
    }

    .navbar .navbar-right .durubtn5 {
        padding: 12px 16px;
        font-size: 13px;
    }

    .tg-nav-link {
        width: 34px;
        height: 34px;
        font-size: 34px;
    }
}

/* широкий ярус: логотип полный (×2), но отступы меню чуть уже —
   после добавления переключателя языка запас при 1920px был всего 5px */
@media (min-width: 1850px) {
    .navbar .navbar-nav .nav-link {
        padding-left: 10px;
        padding-right: 10px;
    }

    .navbar .navbar-right .phonex {
        margin-right: 20px !important;
    }
}

/* узкий десктоп (до схлопывания в бургер): прячем telegram и телефон;
   порог поднят с 1120 до 1280 после добавления переключателя языка */
@media (min-width: 992px) and (max-width: 1279px) {
    .tg-nav-link,
    .navbar .navbar-right .phonex {
        display: none;
    }

    .navbar .navbar-nav .nav-link {
        padding-left: 4px;
        padding-right: 4px;
        font-size: 13px;
    }

    .navbar .navbar-right .durubtn5 {
        padding: 10px 12px;
        font-size: 12.5px;
    }
}

/* на средних экранах номер сворачивается до иконки-трубки (клик = звонок);
   порог поднят с 1330 до 1480: переключатель языка занял ~70px в шапке */
@media (min-width: 992px) and (max-width: 1479px) {
    .navbar .navbar-right .phonex {
        font-size: 0 !important;
    }

    .navbar .navbar-right .phonex i {
        margin-right: 0;
    }

    .lang-switch__caret {
        display: none;
    }

    .lang-switch__btn {
        padding: 7px 9px;
    }
}

@media (min-width: 1280px) and (max-width: 1399px) {
    .logo-img {
        width: 200px;
    }
}

@media (min-width: 992px) and (max-width: 1279px) {
    .logo-img {
        width: 145px;
    }
}

.navbar .navbar-nav > .nav-item > .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6a6e76, #90939a);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar .navbar-nav > .nav-item > .nav-link:hover::after,
.navbar .navbar-nav > .nav-item > .nav-link.active::after {
    width: calc(100% - 30px);
}

/* dropdown refinement.
   Меню открывается по hover: убираем «мёртвую» щель между пунктом и меню
   (из-за неё меню пропадало при движении мыши вниз) и даём задержку
   закрытия, чтобы субменю выбиралось спокойно. */
.navbar .dropdown-menu {
    margin-top: 0;
    padding: 10px;
    border: 1px solid rgba(106, 110, 118, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(38, 40, 43, 0.14);
}

@media screen and (min-width: 992px) {
    /* невидимый «мост» перекрывает зазор между ссылкой и меню */
    .navbar .dropdown-menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -22px;
        height: 22px;
    }

    /* плавное закрытие с задержкой: случайный уход мыши не прячет меню */
    .navbar .dropdown-menu {
        transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 350ms !important;
    }

    .navbar .dropdown:hover > .dropdown-menu {
        transition: opacity 220ms ease, transform 220ms ease, visibility 0s !important;
    }

    /* расширяем зону наведения самого пункта меню */
    .navbar .navbar-nav > .nav-item.dropdown > .nav-link {
        padding-bottom: 18px;
        margin-bottom: -8px;
    }
}

/* пункты подменю: при наведении только цветовая подсветка, без сдвига */
.navbar .dropdown-menu .dropdown-item {
    border-radius: 10px;
    padding-left: 12px;
    padding-right: 12px;
    transition: background 200ms ease, color 200ms ease;
}

.navbar .dropdown-menu .dropdown-item:hover {
    background: rgba(106, 110, 118, 0.12);
}

/* ---------------------------- Telegram nav icon --------------------------- */

/* размер в пару к иконке телефона (40px круг); глиф fa-telegram сам круглый,
   поэтому без фоновой подложки — она конфликтует с геометрией глифа */
.tg-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #777b84;
    font-size: 40px;
    line-height: 1;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), color 220ms ease;
}

.tg-nav-link:hover {
    color: #6a6e75;
    transform: translateY(-2px) scale(1.08);
}

/* Telegram в футере: крупнее и не исчезает при наведении */
.footer-top .item .social-list a {
    width: auto;
    height: auto;
    color: #777b84;
    font-size: 38px;
    line-height: 1;
    background: transparent;
    border: 0;
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), color 220ms ease;
}

.footer-top .item .social-list a:hover {
    color: #6a6e75;
    background: transparent;
    transform: translateY(-3px) scale(1.08);
}

/* -------------------- Контраст: против серого-на-сером -------------------- */

/* бейджи на фото-хиро («Пациентам», «Связаться», «Наши направления»):
   белый текст на тёмном стекле вместо светлого на светлом */
.article-hero .article-hero__eyebrow,
.banner-header h5 {
    color: #ffffff !important;
    background: rgba(22, 23, 25, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.article-hero .article-hero__eyebrow::before {
    background: #d4d4d8;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

/* мета-чипы хиро — тоже на тёмном стекле */
.article-hero__meta .meta-chip {
    background: rgba(22, 23, 25, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

.article-hero__meta .meta-chip i {
    color: #d4d4d8 !important;
}

/* иконки в карточках контактов: были бледно-серые на белом */
.contact-box .item > i.icon {
    color: #3a3c40 !important;
}

/* маркер онлайн у ИИ-чата остаётся зелёным, но точка бейджа теперь серая */

/* ------------------- Glowing border: кайма за курсором -------------------- */
/* Ванильный порт GlowingEffect: серебристый сегмент conic-градиента,
   повёрнутый к курсору, маской ограничен рамкой элемента */

.glow-border {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    opacity: var(--active, 0);
    transition: opacity 300ms ease;
}

/* кайма-«прожектор»: подсвеченный участок рамки в точке курсора */
.glow-border::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 3px solid transparent;
    background: radial-gradient(
        240px circle at var(--mx, 50%) var(--my, 50%),
        #26282b 0%,
        rgba(74, 77, 83, 0.9) 30%,
        rgba(106, 110, 118, 0.35) 60%,
        transparent 100%
    ) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* мягкий внутренний отсвет вокруг курсора */
.glow-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        280px circle at var(--mx, 50%) var(--my, 50%),
        rgba(38, 40, 43, 0.06),
        transparent 70%
    );
}

/* на тёмных блоках и кнопках — белое свечение */
.article-cta__inner > .glow-border::after,
.aichat__panel > .glow-border::after,
.durubtn2 > .glow-border::after,
.durubtn5 > .glow-border::after,
.article-cta__btn > .glow-border::after {
    background: radial-gradient(
        220px circle at var(--mx, 50%) var(--my, 50%),
        #ffffff 0%,
        rgba(255, 255, 255, 0.75) 30%,
        rgba(255, 255, 255, 0.25) 60%,
        transparent 100%
    ) border-box;
}

.article-cta__inner > .glow-border::before,
.aichat__panel > .glow-border::before,
.durubtn2 > .glow-border::before,
.durubtn5 > .glow-border::before,
.article-cta__btn > .glow-border::before {
    background: radial-gradient(
        260px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.12),
        transparent 70%
    );
}

/* --------------------------------- Buttons ------------------------------- */

.durubtn,
.durubtn2,
.durubtn3,
.durubtn4,
.durubtn5 {
    /* 200ms и усиленный ease-out: отклик мгновенный, без «резины» темы (all .7s) */
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 200ms ease,
                background 200ms ease,
                border-color 200ms ease !important;
}

.durubtn:hover,
.durubtn2:hover,
.durubtn3:hover,
.durubtn4:hover,
.durubtn5:hover {
    transform: translateY(-2px);
}

.durubtn:active,
.durubtn2:active,
.durubtn3:active,
.durubtn4:active,
.durubtn5:active {
    transform: translateY(0) scale(0.98);
}

/* ---------------------------------- Cards -------------------------------- */

.services .owl-carousel .item,
.services3 .item,
.blog .item {
    transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 380ms ease;
}

.services .owl-carousel .item:hover,
.services3 .item:hover,
.blog .item:hover {
    transform: translateY(-6px);
    /* мягче: меньше смещение, шире размытие, ниже плотность */
    box-shadow: 0 12px 44px rgba(38, 40, 43, 0.07) !important;
}

.services .owl-carousel .item:hover .img img {
    transform: scale(1.06);
}

/* ------------------------- Word wrapping in headings ----------------------- */
/* Тема ставит word-wrap: break-word на все элементы — заголовки ломались
   посреди слова («стоматологическ / их»). Разрешаем перенос только по словам. */

h1, h2, h3, h4, h5, h6,
.section-title, .price-list-modern__intro h1 {
    /* перенос длинных слов по слогам с дефисом (lang=ru);
       break-word — аварийный вариант, срабатывает только если слово
       целиком не помещается в строку (текст не выйдет за картинку) */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* --------------------- Equal-height cards: последние материалы ------------- */

.blog .owl-carousel .owl-stage {
    display: flex;
}

.blog .owl-carousel .owl-item {
    display: flex;
    float: none;
}

.blog .owl-carousel .item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.blog .owl-carousel .item .cont {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.blog .owl-carousel .item .cont h4 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 52px;
    line-height: 1.3;
}

.blog .owl-carousel .item .cont .author {
    margin-top: auto;
}

/* ---------------------------- Map strip над футером ------------------------ */

.map-strip {
    position: relative;
    width: 100%;
    height: 420px;
    /* тёмная подложка на время загрузки тёмной карты */
    background: #1b1c1e;
}

.map-strip iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* монохром: приглушаем цветные метки тёмной карты Яндекса */
.map-strip iframe,
iframe[src*="map-widget"] {
    filter: grayscale(1);
}

.map-strip__badge {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    padding: 10px 22px;
    color: #f4f4f5;
    font-size: 14px;
    font-weight: 700;
    background: rgba(28, 29, 31, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .map-strip { height: 300px; }
}

/* --------------------- Doctor details: инфо-строки карточки ---------------- */
/* Подпись и значение слипались («Специализацияпрактики…») — добавляем зазор,
   значение прижимаем к правому краю, запрещаем наложение при переносе строк */

.team-details .item .wrap .cont {
    gap: 20px;
    align-items: flex-start;
}

.team-details .item .wrap .cont .coll:first-child {
    flex: 0 0 auto;
}

.team-details .item .wrap .cont .coll:first-child h6 {
    white-space: nowrap;
}

.team-details .item .wrap .cont .coll:last-child {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}

.team-details .item .wrap .cont .coll:last-child p {
    margin: 0;
    text-align: right;
    line-height: 1.5;
    overflow-wrap: break-word;
}

/* ------------------------------ Doctor cards ------------------------------ */
/* Uniform card size: photos come in different aspect ratios and role text
   wraps to 1-2 lines, so both zones get a fixed geometry. */

.team .item .wrapper .img {
    aspect-ratio: 3 / 4;
}

.team .item .wrapper .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}

.team .item .text {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.team .item .text .name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    line-height: 1.22;
}

.team .item .text .position {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

/* ------------------------------- About stats ------------------------------ */

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-stats__item {
    position: relative;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid rgba(106, 110, 118, 0.12);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(38, 40, 43, 0.06);
    overflow: hidden;
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease;
}

.about-stats__item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6a6e76, rgba(106, 110, 118, 0.15));
}

.about-stats__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(38, 40, 43, 0.06);
}

.about-stats__value {
    color: #26282b;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.about-stats__value::after {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    margin: 8px 0 10px;
    background: #6a6e76;
    border-radius: 3px;
}

.about-stats__label {
    color: #737780;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 991px) {
    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .about-stats__item {
        flex: 1 1 calc(50% - 14px);
        min-width: 150px;
    }
}

/* ---------------------------------- Footer ------------------------------- */

.footer .links ul li a,
.footer .social-list a {
    transition: color 220ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background 220ms ease;
}

.footer .social-list a:hover {
    transform: translateY(-3px);
}

/* --------------------------- Medflex round button ------------------------- */
/* Third-party widget: repositioned to the bottom-right corner and recolored
   to the brand cyan. Overrides must win over the widget's own stylesheet. */

.medflex-round-widget__button {
    left: auto !important;
    right: 26px !important;
    bottom: 26px !important;
    background: linear-gradient(135deg, #6a6e76 0%, #575a61 100%) !important;
    border-radius: 50% !important;
    /* тень задаётся в keyframes: box-shadow с !important заглушил бы анимацию */
    animation: medflexPulse 2.6s cubic-bezier(0.45, 0, 0.35, 1) infinite !important;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* the widget paints the circle via ::before — recolor it as well */
.medflex-round-widget__button::before,
.medflex-round-widget__button::after {
    background: linear-gradient(135deg, #6a6e76 0%, #575a61 100%) !important;
}

.medflex-round-widget__button:hover {
    transform: translateY(-3px) scale(1.04);
}

@keyframes medflexPulse {
    0% {
        box-shadow: 0 14px 34px rgba(106, 110, 118, 0.45),
                    0 0 0 0 rgba(106, 110, 118, 0.5);
    }
    65% {
        box-shadow: 0 14px 34px rgba(106, 110, 118, 0.45),
                    0 0 0 24px rgba(106, 110, 118, 0);
    }
    100% {
        box-shadow: 0 14px 34px rgba(106, 110, 118, 0.45),
                    0 0 0 0 rgba(106, 110, 118, 0);
    }
}

/* ------------------------------ AI chat widget ---------------------------- */

.aichat {
    position: fixed;
    left: 26px;
    bottom: 26px;
    z-index: 1085;
    font-family: "Jost", sans-serif;
}

.aichat__fab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 22px 0 16px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #26282b 0%, #393b3f 100%);
    border: 1px solid rgba(106, 110, 118, 0.35);
    border-radius: 30px;
    box-shadow: 0 14px 34px rgba(38, 40, 43, 0.35);
    cursor: pointer;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}

.aichat__fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(38, 40, 43, 0.3);
}

.aichat__fab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 17px;
    /* иконка была серой на тёмном фоне и сливалась — делаем белой */
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

.aichat--open .aichat__fab {
    display: none;
}

.aichat__panel {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border: 1px solid rgba(106, 110, 118, 0.16);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(38, 40, 43, 0.3);
    overflow: hidden;
    animation: aichatIn 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes aichatIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.aichat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: #fff;
    background: linear-gradient(135deg, #26282b 0%, #393b3f 100%);
}

.aichat__head-title {
    font-size: 16px;
    font-weight: 700;
}

.aichat__head-sub {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.65);
}

.aichat__head-sub::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    background: #848890;
    border-radius: 50%;
}

.aichat__close {
    width: 34px;
    height: 34px;
    color: #fff;
    font-size: 17px;
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background 200ms ease;
}

.aichat__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.aichat__body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f7f7f8;
    scrollbar-width: thin;
}

.aichat__msg {
    max-width: 85%;
    margin-bottom: 10px;
    padding: 10px 14px;
    font-size: 14.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-radius: 16px;
    animation: aichatIn 220ms ease;
}

.aichat__msg--assistant {
    color: #35373b;
    background: #fff;
    border: 1px solid rgba(106, 110, 118, 0.14);
    border-bottom-left-radius: 6px;
    box-shadow: 0 3px 10px rgba(38, 40, 43, 0.05);
}

.aichat__msg--user {
    margin-left: auto;
    color: #fff;
    background: linear-gradient(120deg, #6a6e76, #81858d);
    border-bottom-right-radius: 6px;
}

.aichat__typing span {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    background: rgba(106, 110, 118, 0.6);
    border-radius: 50%;
    animation: aichatDot 1.1s infinite;
}

.aichat__typing span:nth-child(2) { animation-delay: 0.18s; }
.aichat__typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes aichatDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.aichat__hint {
    padding: 7px 16px;
    color: #93979e;
    font-size: 11.5px;
    line-height: 1.4;
    background: #f3f4f5;
    border-top: 1px solid rgba(106, 110, 118, 0.1);
}

.aichat__form {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid rgba(38, 40, 43, 0.06);
}

.aichat__input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    color: #35373b;
    font-family: inherit;
    font-size: 14.5px;
    background: #f6f6f7;
    border: 1px solid rgba(106, 110, 118, 0.18);
    border-radius: 14px;
    outline: none;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.aichat__input:focus {
    border-color: #6a6e76;
    box-shadow: 0 0 0 3px rgba(106, 110, 118, 0.14);
}

.aichat__send {
    width: 44px;
    height: 44px;
    color: #fff;
    font-size: 15px;
    background: linear-gradient(120deg, #6a6e76, #81858d);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 200ms ease, opacity 200ms ease;
}

.aichat__send:hover { transform: translateY(-2px); }
.aichat__send:disabled { opacity: 0.55; cursor: default; }

@media (max-width: 767px) {
    .aichat {
        left: 14px;
        bottom: 86px;
    }

    .aichat__fab {
        height: 50px;
        padding: 0 18px 0 12px;
        font-size: 14px;
    }

    .aichat__panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 84px;
        width: auto;
        height: min(560px, calc(100vh - 160px));
    }
}

/* ----------------------------- Back-to-top ring --------------------------- */

.progress-wrap {
    position: fixed;
    right: 40px;
    bottom: 148px;
    z-index: 1060;
    display: block;
    width: 46px;
    height: 46px;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 30px rgba(38, 40, 43, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 340ms cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.progress-wrap::after {
    content: "\f106";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #26282b;
    font-family: "Font Awesome 6 Pro", "FontAwesome";
    font-size: 17px;
    font-weight: 300;
    transition: color 220ms ease;
}

.progress-wrap:hover::after {
    color: #6a6e76;
}

.progress-wrap svg path {
    fill: none;
}

.progress-wrap svg.progress-circle path {
    stroke: #6a6e76;
    stroke-width: 4;
    box-sizing: border-box;
}

/* ------------------------------ Section titles ---------------------------- */

.section-title span {
    position: relative;
    /* nowrap убран: длинная акцентная часть заголовка должна переноситься,
       иначе текст уезжает под соседние картинки */
}

/* ------------------------------- Reduced motion --------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------- Medflex booking popup -------------------------- */

.medflex-popup .mfp-content {
    width: 100%;
    max-width: 480px;
}

.medflex-popup .mfp-iframe-scaler {
    height: min(680px, 88vh);
    padding-top: 0;
    overflow: visible;
}

.medflex-popup .mfp-iframe-scaler iframe {
    position: static;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(38, 40, 43, 0.35);
}

.medflex-popup .mfp-close {
    top: -44px;
    right: 0;
    color: #fff;
    font-size: 34px;
    opacity: 0.85;
}

/* ---------------------------- Mobile CTA bar ------------------------------ */

.mobile-cta-bar {
    display: none;
}

@media (max-width: 767px) {
    .mobile-cta-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1080;
        display: flex;
        gap: 10px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        border-top: 1px solid rgba(106, 110, 118, 0.14);
        box-shadow: 0 -10px 34px rgba(38, 40, 43, 0.12);
    }

    .mobile-cta-bar a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1;
        height: 48px;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        border-radius: 14px;
        transition: transform 200ms ease;
    }

    .mobile-cta-bar a:active {
        transform: scale(0.97);
    }

    .mobile-cta-bar__call {
        color: #26282b;
        background: #f6f6f7;
        border: 1px solid rgba(106, 110, 118, 0.2);
    }

    .mobile-cta-bar__book {
        color: #fff;
        background: linear-gradient(120deg, #6a6e76, #81858d);
        box-shadow: 0 8px 22px rgba(106, 110, 118, 0.4);
    }

    body {
        padding-bottom: 72px;
    }

    /* нижняя панель заменяет круглую кнопку на телефонах */
    .medflex-round-widget__button {
        display: none !important;
    }

    .progress-wrap {
        right: 16px;
        bottom: 92px;
        width: 42px;
        height: 42px;
    }
}

/* ----------------------- Переключатель языка (шапка) ---------------------- */

.lang-switch {
    position: relative;
}

.lang-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(106, 110, 118, 0.35);
    border-radius: 999px;
    background: transparent;
    color: #26282b;
    font-family: "Jost", sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 250ms ease, background 250ms ease;
}

.lang-switch__btn:hover {
    border-color: #6a6e76;
    background: rgba(106, 110, 118, 0.08);
}

.lang-switch__btn .fa-globe {
    font-size: 14px;
}

.lang-switch__caret {
    font-size: 9px;
    opacity: 0.6;
}

.lang-switch__list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1010;
    min-width: 160px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(106, 110, 118, 0.15);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(22, 23, 25, 0.14);
}

.lang-switch__list li {
    padding: 9px 14px;
    border-radius: 9px;
    font-family: "Jost", sans-serif;
    font-size: 14px;
    color: #26282b;
    cursor: pointer;
    transition: background 180ms ease;
}

.lang-switch__list li:hover {
    background: #f2f3f4;
}

.lang-switch__list li.is-active {
    background: #eceded;
    font-weight: 600;
}

.lang-switch__list li.is-active::after {
    content: "\2713";
    float: right;
    color: #6a6e76;
}

/* мобильный экземпляр: в выпадающем меню, десктопный скрыт медиа-правилом style.css */
.lang-switch--mobile {
    display: none;
}

@media (max-width: 991px) {
    .lang-switch--mobile {
        display: block;
        padding: 12px 0 4px;
    }

    .lang-switch--mobile .lang-switch__list {
        position: static;
        margin-top: 8px;
        box-shadow: none;
        border-color: rgba(106, 110, 118, 0.2);
    }
}

/* узкие десктопные шапки: компактнее кнопка языка */
@media (min-width: 992px) and (max-width: 1649px) {
    .lang-switch__btn {
        padding: 7px 10px;
        font-size: 12px;
    }
}

@media (min-width: 992px) and (max-width: 1119px) {
    .lang-switch__caret {
        display: none;
    }

    .lang-switch__btn {
        padding: 7px 9px;
    }
}

/* -------------------------- Согласие на cookie ---------------------------- */

/* разметка рендерится сервером со скрытым атрибутом — display:flex ниже
   перебил бы UA-стиль [hidden], поэтому прячем явно */
.cookie-bar[hidden] {
    display: none !important;
}

.cookie-bar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    /* ниже шапки (99): раскрытое мобильное меню не должно перекрываться баннером */
    z-index: 98;
    transform: translate(-50%, 24px);
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: min(760px, calc(100vw - 32px));
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(106, 110, 118, 0.18);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(22, 23, 25, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 380ms ease, transform 380ms cubic-bezier(0.22, 1, 0.36, 1), visibility 380ms;
}

.cookie-bar.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.cookie-bar__text {
    font-family: "Jost", sans-serif;
    font-size: 13.5px;
    line-height: 1.55;
    color: #26282b;
}

.cookie-bar__text a {
    color: #4a4d53;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-bar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-bar__btn {
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(120deg, #26282b, #4a4d53);
    color: #fff;
    font-family: "Jost", sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.4px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}

.cookie-bar__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(38, 40, 43, 0.2);
}

.cookie-bar__btn--ghost {
    background: transparent;
    color: #4a4d53;
    border: 1px solid rgba(106, 110, 118, 0.35);
}

.cookie-bar__btn--ghost:hover {
    box-shadow: none;
    border-color: #6a6e76;
}

/* не упираться левым краем в кнопку ИИ-чата на узких десктопах */
@media (min-width: 768px) {
    .cookie-bar {
        max-width: min(760px, calc(100vw - 380px));
    }
}

@media (max-width: 767px) {
    .cookie-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        bottom: 150px; /* над мобильной CTA-панелью и кнопкой ИИ-чата */
        padding: 14px 16px;
    }

    .cookie-bar__actions {
        justify-content: flex-end;
    }

    .cookie-bar__btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ------------------------- Личная страница врача -------------------------- */

.doctor-hero {
    padding: 150px 0 70px;
    background: linear-gradient(180deg, #f6f6f7 0%, #ffffff 100%);
}

.doctor-hero__crumbs {
    margin-bottom: 34px;
}

/* базовый стиль крошек рассчитан на тёмный фон — здесь фон светлый */
.doctor-hero__crumbs a,
.doctor-hero__crumbs .sep,
.doctor-hero__crumbs .current {
    color: #6a6e76 !important;
}

.doctor-hero__crumbs a:hover {
    color: #26282b !important;
}

.doctor-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.doctor-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.doctor-hero__badge {
    padding: 7px 14px;
    border: 1px solid rgba(106, 110, 118, 0.35);
    border-radius: 999px;
    font-family: "Jost", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #4a4d53;
    background: #fff;
}

.doctor-hero__name {
    font-family: "Jost", sans-serif;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 600;
    line-height: 1.12;
    color: #26282b;
    margin-bottom: 18px;
}

.doctor-hero__slogan {
    font-size: 18px;
    line-height: 1.6;
    color: #4a4d53;
    max-width: 520px;
    margin-bottom: 28px;
}

.doctor-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

.doctor-hero__cta,
.doctor-hero__ghost {
    display: inline-flex;
    align-items: center;
    padding: 15px 26px;
    border-radius: 999px;
    font-family: "Jost", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease, background 240ms ease, color 240ms ease;
}

.doctor-hero__cta {
    background: linear-gradient(120deg, #26282b, #4a4d53);
    color: #fff;
    box-shadow: 0 12px 30px rgba(38, 40, 43, 0.25);
}

.doctor-hero__cta:hover {
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 12px 32px rgba(38, 40, 43, 0.24);
}

.doctor-hero__ghost {
    border: 1px solid rgba(106, 110, 118, 0.4);
    color: #26282b;
    background: #fff;
}

.doctor-hero__ghost:hover {
    transform: translateY(-3px);
    border-color: #6a6e76;
    color: #26282b;
}

.doctor-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.doctor-hero__fact {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: "Jost", sans-serif;
    font-size: 14px;
    color: #4a4d53;
}

.doctor-hero__fact i {
    color: #6a6e76;
    font-size: 16px;
}

/* соцсети врача: заголовок + круглые монохромные иконки */
.doctor-hero__socials-title {
    margin-top: 26px;
    margin-bottom: 10px;
    font-family: "Jost", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #6a6e76;
}

.doctor-hero__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.doctor-hero__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(106, 110, 118, 0.35);
    background: #fff;
    color: #4a4d53;
    font-size: 17px;
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), border-color 200ms ease, color 200ms ease;
}

.doctor-hero__social:hover {
    transform: translateY(-3px);
    border-color: #6a6e76;
    color: #26282b;
}

@media (hover: none) {
    .doctor-hero__social:hover {
        transform: none;
    }
}

/* заглушка: ссылка ещё не заполнена в админке */
.doctor-hero__social--off {
    opacity: 0.35;
    border-style: dashed;
    cursor: default;
}

.doctor-hero__social--off:hover {
    transform: none;
    border-color: rgba(106, 110, 118, 0.35);
    color: #4a4d53;
}

.doctor-hero__photo {
    position: relative;
}

.doctor-hero__photo img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    object-position: top center;
    border-radius: 28px;
    background: linear-gradient(160deg, #e4e5e7, #cfd1d4);
    box-shadow: 0 30px 70px rgba(38, 40, 43, 0.18);
}

/* --- карточки о враче --- */

.doctor-about__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.doctor-about__card {
    background: #fff;
    border: 1px solid rgba(106, 110, 118, 0.14);
    border-radius: 22px;
    padding: 30px 32px;
    box-shadow: 0 14px 36px rgba(38, 40, 43, 0.06);
}

.doctor-about__card h3 {
    font-family: "Jost", sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: #26282b;
    margin: 14px 0 12px;
}

.doctor-about__card--dark {
    background: linear-gradient(135deg, #26282b, #3c3f44);
    border-color: transparent;
}

.doctor-about__card--dark h3,
.doctor-about__card--dark .doctor-copy,
.doctor-about__card--dark .doctor-copy p,
.doctor-about__card--dark .doctor-copy li {
    color: #f2f2f3 !important;
}

.doctor-about__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(106, 110, 118, 0.12);
    color: #4a4d53;
    font-size: 22px;
}

.doctor-about__card--dark .doctor-about__icon {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* --- сертификаты врача --- */

/* --- коллаж блока «Более 15 лет заботы об улыбках» ---
   пропорции ячеек = пропорции фотографий, поэтому кадры не обрезаются,
   а высоты левой и правой колонок сходятся сами */

.about-collage {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.about-collage__cell {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
}

.about-collage__cell--main {
    aspect-ratio: 1 / 1;
    border-radius: 20px 20px 20px 0;
}

.about-collage__cell--wide {
    aspect-ratio: 1400 / 764;
}

.about-collage__cell--tall {
    grid-column: 2;
    grid-row: 1 / span 2;
    aspect-ratio: 768 / 1376;
}

.about-collage__cell > .reveal-effect,
.about-collage__cell img {
    width: 100%;
    height: 100%;
}

/* кадр стал меньше прежнего — соразмерно уменьшаем круглую кнопку
   (вслед за внешним размером пересчитаны и вложенные элементы) */
.about .about-collage__cell--main .icon {
    width: 132px;
    height: 132px;
    padding: 12px;
}

.about .about-collage__cell--main .circle-button .rotate-circle svg {
    width: 108px;
}

.about .about-collage__cell--main .circle-button.in-bord:after {
    top: 27px;
    left: 27px;
    right: 27px;
    bottom: 27px;
}

.about .about-collage__cell--main .circle-button .in-circle {
    font-size: 29px;
}

.about-collage__cell img {
    object-fit: cover;
    display: block;
}

@media (max-width: 991px) {
    .about-collage {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    /* на планшете круглая кнопка съедает узкий кадр — прячем её */
    .about .about-collage__cell--main .icon {
        display: none;
    }
}

@media (max-width: 575px) {
    /* на телефоне — колонка из трёх кадров в их родных пропорциях,
       чтобы вертикальный снимок не резался по логотипу */
    .about-collage {
        grid-template-columns: 1fr;
    }
    .about-collage__cell--tall {
        grid-column: 1;
        grid-row: auto;
    }
}

.doctor-certs__hint {
    margin: 12px 0 0;
    color: var(--muted, #6a6e76);
    font-size: 15px;
}

.doctor-certs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 22px;
    margin-top: 10px;
}

.doctor-certs__item {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

/* документы приходят и в книжной, и в альбомной ориентации —
   рамка фиксированной высоты, картинка вписывается целиком (contain) */
.doctor-certs__frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(106, 110, 118, 0.16);
    box-shadow: 0 6px 18px rgba(38, 40, 43, 0.05);
    transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 260ms ease, border-color 260ms ease;
}

.doctor-certs__item:hover .doctor-certs__frame,
.doctor-certs__item:focus-visible .doctor-certs__frame {
    transform: translateY(-4px);
    border-color: rgba(38, 40, 43, 0.28);
    box-shadow: 0 16px 34px rgba(38, 40, 43, 0.14);
}

.doctor-certs__frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.doctor-certs__zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(38, 40, 43, 0.42);
    color: #fff;
    font-size: 26px;
    opacity: 0;
    transition: opacity 220ms ease;
}

.doctor-certs__item:hover .doctor-certs__zoom,
.doctor-certs__item:focus-visible .doctor-certs__zoom {
    opacity: 1;
}

.doctor-certs__caption {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
    color: var(--muted, #6a6e76);
}

@media (max-width: 767px) {
    .doctor-certs {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
}

/* --- кейсы до/после --- */

.doctor-cases__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 34px;
}

.doctor-cases__tab {
    padding: 10px 20px;
    border: 1px solid rgba(106, 110, 118, 0.3);
    border-radius: 999px;
    background: #fff;
    color: #4a4d53;
    font-family: "Jost", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.doctor-cases__tab.is-active {
    background: linear-gradient(120deg, #26282b, #4a4d53);
    color: #fff;
    border-color: transparent;
}

.doctor-case {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 34px;
    align-items: center;
}

.hidden-case {
    display: none;
}

.doctor-case__text {
    background: linear-gradient(135deg, #26282b, #3c3f44);
    border-radius: 22px;
    padding: 34px 36px;
    color: #f2f2f3;
}

.doctor-case__text h3 {
    font-family: "Jost", sans-serif;
    font-size: 21px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.doctor-case__text p {
    color: #d4d4d8;
    margin-bottom: 8px;
}

.doctor-case__text strong {
    color: #fff;
}

.doctor-case__single {
    width: 100%;
    border-radius: 20px;
}

.ba-slider {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(38, 40, 43, 0.16);
    user-select: none;
}

.ba-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-slider__beforewrap {
    position: absolute;
    inset: 0;
    clip-path: inset(0 50% 0 0);
}

.ba-slider__handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #26282b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(38, 40, 43, 0.35);
    pointer-events: none;
    z-index: 3;
}

.ba-slider__handle::before,
.ba-slider__handle::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 2px;
    background: #fff;
    transform: translateX(-50%);
}

.ba-slider__handle::before {
    bottom: 100%;
    height: 300px;
}

.ba-slider__handle::after {
    top: 100%;
    height: 300px;
}

.ba-slider__tag {
    position: absolute;
    top: 14px;
    z-index: 3;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(22, 23, 25, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    font-family: "Jost", sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
}

.ba-slider__tag--left {
    left: 14px;
}

.ba-slider__tag--right {
    right: 14px;
}

.ba-slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 4;
    margin: 0;
}

/* --- преимущества --- */

.doctor-benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.doctor-benefits__item {
    background: #fff;
    border: 1px solid rgba(106, 110, 118, 0.14);
    border-radius: 20px;
    padding: 28px 26px;
    box-shadow: 0 12px 30px rgba(38, 40, 43, 0.05);
}

.doctor-benefits__item i {
    font-size: 30px;
    color: #4a4d53;
    margin-bottom: 16px;
    display: block;
}

.doctor-benefits__item h4 {
    font-family: "Jost", sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #26282b;
    margin-bottom: 10px;
}

.doctor-benefits__item p {
    font-size: 14.5px;
    line-height: 1.6;
    color: #4a4d53;
    margin: 0;
}

.doctor-benefits__item--dark {
    background: linear-gradient(135deg, #26282b, #3c3f44);
    border-color: transparent;
}

.doctor-benefits__item--dark i,
.doctor-benefits__item--dark h4 {
    color: #fff;
}

.doctor-benefits__item--dark p {
    color: #d4d4d8;
}

/* --- другие специалисты --- */

.doctor-others__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.doctor-others__card {
    display: block;
    background: #fff;
    border: 1px solid rgba(106, 110, 118, 0.14);
    border-radius: 20px;
    padding: 16px 16px 22px;
    text-align: center;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}

.doctor-others__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 34px rgba(38, 40, 43, 0.07);
}

.doctor-others__img img {
    width: 100%;
    aspect-ratio: 1 / 1.05;
    object-fit: cover;
    object-position: top center;
    border-radius: 14px;
    margin-bottom: 16px;
    background: #eceded;
}

.doctor-others__card h4 {
    font-family: "Jost", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #26282b;
    margin-bottom: 6px;
}

.doctor-others__card p {
    font-size: 13px;
    color: #6a6e76;
    margin: 0;
}

/* --- адаптив --- */

@media (max-width: 991px) {
    .doctor-hero {
        padding: 120px 0 50px;
    }

    .doctor-hero__grid,
    .doctor-case {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .doctor-hero__photo {
        order: -1;
    }

    .doctor-hero__photo img {
        max-height: 440px;
    }

    .doctor-about__cards {
        grid-template-columns: 1fr;
    }

    .doctor-benefits__grid,
    .doctor-others__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .doctor-benefits__grid,
    .doctor-others__grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------- Футер: строка «Приём руководителем» -------------------- */
/* базовый макет строк (table-cell + nowrap) рвёт длинный текст за колонку —
   эта строка блочная: заголовок сверху, значение снизу с переносами */

.footer .item .opening ul li.footer-stack .tit,
.footer .item .opening ul li.footer-stack span {
    display: block;
    white-space: normal;
    padding-left: 0;
}

.footer .item .opening ul li.footer-stack .tit {
    margin-bottom: 2px;
}

.footer .item .opening ul li.footer-stack span {
    font-size: 15px;
    line-height: 1.45;
}

.footer-director__note {
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #757982;
}

/* --------------------- Бегущая строка: логотипы партнёров ----------------- */

/* белая полоса вместо серой: логотипы читаются, лента остаётся монохромной */
.scrolling.scrolling-ticker.partners-ticker {
    background: #fff;
    border-top: 1px solid rgba(106, 110, 118, 0.14);
    border-bottom: 1px solid rgba(106, 110, 118, 0.14);
    padding: 30px 0;
}

.scrolling.scrolling-ticker.partners-ticker .wrapper .content {
    align-items: center;
}

.scrolling.scrolling-ticker.partners-ticker .wrapper .content .partners-ticker__item {
    display: inline-flex;
    align-items: center;
    margin: 0 34px;
}

/* перебиваем правило темы span img { max-width: 24px } */
.scrolling.scrolling-ticker.partners-ticker .wrapper .content .partners-ticker__item img {
    height: 46px;
    width: auto;
    max-width: 190px;
    margin-right: 0;
    object-fit: contain;
    /* монохромная гамма: логотипы в градациях серого */
    filter: grayscale(1);
    opacity: 0.65;
    transition: opacity 220ms ease;
}

.scrolling.scrolling-ticker.partners-ticker .wrapper .content .partners-ticker__item img:hover {
    opacity: 1;
}

@media (max-width: 767px) {
    .scrolling.scrolling-ticker.partners-ticker .wrapper .content .partners-ticker__item {
        margin: 0 20px;
    }

    .scrolling.scrolling-ticker.partners-ticker .wrapper .content .partners-ticker__item img {
        height: 36px;
        max-width: 150px;
    }
}

/* ------------------ Курсор pointer на всём кликабельном ------------------- */
/* у <button> и ряда кастомных элементов браузер по умолчанию показывает
   обычную стрелку — приводим всё к единому поведению */

button:not(:disabled),
[role="button"],
summary,
select,
input[type="submit"],
input[type="button"],
input[type="checkbox"],
input[type="radio"],
input[type="range"],
label[for],
.navbar-toggler,
.navbar .dropdown-toggle,
.progress-wrap,
.owl-carousel .owl-nav button,
.owl-carousel .owl-nav div,
.owl-carousel .owl-dot,
.gallery-filter li,
.td-copyable,
.price-hint-mark,
[data-medflex-open],
.aichat__fab,
.aichat__close,
.aichat__send,
.lang-switch__btn,
.lang-switch__list li,
.cookie-bar__btn,
.doctor-cases__tab,
.accordion-box .block .acc-btn {
    cursor: pointer;
}

/* ==================== Motion polish (аудит по Эмилю Ковальски) ============
   Правила: UI-анимации ≤300 мс; ease-out с сильной кривой на входах;
   переходы только по нужным свойствам (не «all»); hover-эффекты не липнут
   на тач-устройствах. Всё — переопределения поверх style.css. */

:root {
    --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
}

/* 1. Выпадающие меню шапки: 500ms all + сдвиг 20px → 180ms и 10px.
   Задержка visibility на закрытии (350ms) сохранена — она держит меню
   открытым при случайном уходе курсора. */
@media screen and (min-width: 992px) {
    .navbar .dropdown-menu {
        transform: translateY(10px);
        transition: opacity 180ms var(--ease-out-strong),
                    transform 180ms var(--ease-out-strong),
                    visibility 0s linear 350ms !important;
    }

    .navbar .dropdown:hover > .dropdown-menu {
        transition: opacity 180ms var(--ease-out-strong),
                    transform 180ms var(--ease-out-strong),
                    visibility 0s !important;
    }
}

/* 2. Пункты верхнего меню: цвет менялся 400ms («all .4s») — теперь 150ms */
.navbar .navbar-nav .nav-link {
    transition: color 150ms ease;
}

/* 3. CTA-кнопки: базовый переход задан в блоке Buttons (200ms, !important);
   здесь — только скольжение подписи 400ms → 260ms */
.durubtn2 .text,
.durubtn2 .slide-down,
.durubtn2 .slide-up,
.navbar .navbar-right .durubtn5 .text,
.navbar .navbar-right .durubtn5 .slide-down,
.navbar .navbar-right .durubtn5 .slide-up {
    transition: transform 260ms var(--ease-out-strong), color 200ms ease;
}

/* 4. Появления при скролле (WOW): 1s → 650ms, контент не «плывёт» */
.wow.fadeInUp,
.wow.fadeIn,
.wow.fadeInLeft,
.wow.fadeInRight,
.wow.zoomIn {
    animation-duration: 650ms !important;
}

/* 5. На тач-устройствах hover-подъёмы не должны залипать после тапа */
@media (hover: none) {
    .durubtn:hover,
    .durubtn2:hover,
    .durubtn3:hover,
    .durubtn4:hover,
    .durubtn5:hover,
    .tg-nav-link:hover,
    .doctor-others__card:hover,
    .doctor-hero__cta:hover,
    .doctor-hero__ghost:hover,
    .cookie-bar__btn:hover {
        transform: none;
    }
}

/* 6. Список языков появлялся мгновенно — мягкий вход 160ms от кнопки */
.lang-switch__list:not([hidden]) {
    animation: langListIn 160ms var(--ease-out-strong);
    transform-origin: top right;
}

@keyframes langListIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
}

/* 7. Переключение кейсов «до/после» на странице врача: мягкая смена */
.doctor-case:not(.hidden-case) {
    animation: caseIn 200ms var(--ease-out-strong);
}

@keyframes caseIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* ------------------ Монохромные градиенты (глубина без цвета) ------------- */

/* светлые секции: едва заметный вертикальный перелив вместо плоского #f7f7f7 */
.bg-lightblue {
    background: linear-gradient(180deg, #f9f9fa 0%, #f1f2f3 100%);
}

/* акцентное слово в заголовках секций: графитовый градиент по тексту */
.section-title span {
    display: inline;
    background: linear-gradient(115deg, #26282b 10%, #7d8189 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #6a6e76; /* фолбэк для старых браузеров перекрывается строкой ниже */
}

@supports not (-webkit-background-clip: text) {
    .section-title span {
        background: none;
        color: #6a6e76 !important;
    }
}

/* 8. Reduced motion: правила с !important выше (кнопки, выпадашки) пробивали
   глобальный выключатель — гасим их здесь явно; декоративные входы убираем */
@media (prefers-reduced-motion: reduce) {
    .navbar .dropdown-menu,
    .navbar .dropdown:hover > .dropdown-menu,
    .durubtn,
    .durubtn2,
    .durubtn3,
    .durubtn4,
    .durubtn5 {
        transition-duration: 0.001ms !important;
        transition-delay: 0s !important;
    }

    .lang-switch__list:not([hidden]),
    .doctor-case:not(.hidden-case) {
        animation: none !important;
    }

    .wow.fadeInUp,
    .wow.fadeIn,
    .wow.fadeInLeft,
    .wow.fadeInRight,
    .wow.zoomIn {
        animation-duration: 0.001ms !important;
    }

    /* лента партнёров — исключение: без прокрутки видна лишь часть
       логотипов; движение медленное, линейное, в узкой полосе */
    .scrolling.scrolling-ticker.partners-ticker .wrapper .content {
        animation: scroll 60s linear infinite !important;
    }
}

/* лента останавливается, пока курсор на ней — можно рассмотреть логотипы */
.scrolling.scrolling-ticker.partners-ticker .wrapper:hover .content {
    animation-play-state: paused;
}

/* ------------------------- Сторис (как в Instagram) ----------------------- */

.stories {
    padding: 26px 0 6px;
    background: #fff;
}

.stories__row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 6px 2px 14px;
    scrollbar-width: none;
}

.stories__row::-webkit-scrollbar {
    display: none;
}

.stories__item {
    flex: 0 0 auto;
    width: 92px;
    background: none;
    border: 0;
    padding: 0;
    text-align: center;
}

.stories__ring {
    display: block;
    width: 86px;
    height: 86px;
    margin: 0 auto 8px;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #26282b, #9a9da3, #4a4d53, #26282b);
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.stories__item:hover .stories__ring {
    transform: scale(1.05);
}

.stories__item:active .stories__ring {
    transform: scale(0.97);
}

.stories__ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    display: block;
}

.stories__label {
    display: block;
    font-family: "Jost", sans-serif;
    font-size: 12.5px;
    line-height: 1.3;
    color: #4a4d53;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- полноэкранный просмотр --- */

.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer[hidden] {
    display: none !important;
}

.story-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 17, 18, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.story-viewer__frame {
    position: relative;
    width: min(420px, 100vw);
    height: min(86vh, 780px);
    border-radius: 20px;
    overflow: hidden;
    background: #202225;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.story-viewer__bars {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 6;
    display: flex;
    gap: 6px;
}

.story-viewer__bar {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.story-viewer__bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 3px;
}

.story-viewer__close {
    position: absolute;
    top: 24px;
    right: 14px;
    z-index: 7;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer__slide {
    position: absolute;
    inset: 0;
    margin: 0;
}

.story-viewer__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-viewer__slide figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 56px 20px 22px;
    background: linear-gradient(180deg, transparent 0%, rgba(16, 17, 18, 0.78) 100%);
    text-align: center;
}

.story-viewer__title {
    display: block;
    color: #fff;
    font-family: "Jost", sans-serif;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.story-viewer__cta {
    display: inline-flex;
    padding: 11px 24px;
    border-radius: 999px;
    background: #fff;
    color: #26282b !important;
    font-family: "Jost", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.story-viewer__cta:hover {
    transform: translateY(-2px);
}

/* невидимые зоны навигации: левая треть — назад, правые две трети — вперёд */
.story-viewer__nav {
    position: absolute;
    top: 60px;
    bottom: 110px;
    z-index: 5;
    border: 0;
    background: transparent;
    padding: 0;
}

.story-viewer__nav--prev {
    left: 0;
    width: 33%;
}

.story-viewer__nav--next {
    right: 0;
    width: 67%;
}

@media (max-width: 575px) {
    .story-viewer__frame {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }

    .stories__row {
        gap: 16px;
    }

    .stories__item {
        width: 78px;
    }

    .stories__ring {
        width: 72px;
        height: 72px;
    }
}

/* --------------------------- Чат с врачом (dchat) ------------------------- */

.dchat-overlay {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1150;
    width: 400px;
    max-width: calc(100vw - 24px);
    height: 620px;
    max-height: calc(100vh - 90px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(22, 23, 25, 0.35);
    animation: dchatIn 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes dchatIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

.dchat {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f2f2f4;
}

.dchat__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #26282b, #3c3f44);
    color: #fff;
    flex-shrink: 0;
}

.dchat__ava {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    background: rgba(255, 255, 255, 0.15);
}

.dchat__ava--stub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.dchat__who {
    flex: 1;
    min-width: 0;
}

.dchat__name {
    font-family: "Jost", sans-serif;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dchat__sub {
    font-size: 12px;
    color: #c9cbcf;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dchat__close {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dchat__body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    scrollbar-width: thin;
    background:
        radial-gradient(circle at 20% 15%, rgba(106, 110, 118, 0.05) 0, transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(106, 110, 118, 0.05) 0, transparent 45%),
        #eef0f1;
}

.dchat__loading,
.dchat__day {
    text-align: center;
    margin: 10px auto;
    font-family: "Jost", sans-serif;
    font-size: 12px;
    color: #6a6e76;
}

.dchat__day {
    display: table;
    padding: 4px 12px;
    background: rgba(106, 110, 118, 0.12);
    border-radius: 999px;
}

.dchat__msg {
    position: relative;
    max-width: 78%;
    margin-bottom: 8px;
    padding: 8px 12px 6px;
    border-radius: 14px;
    font-size: 14.5px;
    line-height: 1.45;
    word-break: break-word;
    clear: both;
}

.dchat__msg--their {
    float: left;
    background: #fff;
    color: #26282b;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(22, 23, 25, 0.08);
}

.dchat__msg--own {
    float: right;
    background: linear-gradient(135deg, #33363a, #4a4d53);
    color: #f4f4f5;
    border-bottom-right-radius: 5px;
}

.dchat__text {
    white-space: pre-wrap;
}

.dchat__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 2px;
    font-size: 11px;
    opacity: 0.65;
    cursor: default;
}

.dchat__ticks i {
    font-size: 11px;
}

.dchat__ticks.is-read i {
    color: #b7d4ff;
}

.dchat__msg--their + .dchat__day,
.dchat__msg--own + .dchat__day {
    clear: both;
}

.dchat__img img {
    max-width: 230px;
    max-height: 260px;
    border-radius: 10px;
    display: block;
    margin-bottom: 4px;
}

.dchat__video {
    max-width: 240px;
    border-radius: 10px;
    display: block;
    margin-bottom: 4px;
}

.dchat__file {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    color: inherit !important;
    text-decoration: none;
}

.dchat__file i {
    font-size: 26px;
}

.dchat__file span {
    display: flex;
    flex-direction: column;
    font-size: 13.5px;
    line-height: 1.3;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dchat__file small {
    opacity: 0.65;
    font-size: 11.5px;
}

.dchat__hint {
    clear: both;
    margin: 0 auto 12px;
    padding: 9px 14px;
    max-width: 92%;
    background: rgba(106, 110, 118, 0.09);
    border: 1px dashed rgba(106, 110, 118, 0.3);
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #4a4d53;
    text-align: center;
}

.dchat__hint i {
    margin-right: 5px;
}

.dchat__uploading {
    clear: both;
    text-align: center;
    font-size: 12.5px;
    color: #6a6e76;
    margin: 8px 0;
}

.dchat__composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid rgba(106, 110, 118, 0.14);
    flex-shrink: 0;
}

.dchat__attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #6a6e76;
    font-size: 19px;
    cursor: pointer;
    transition: background 200ms ease;
    flex-shrink: 0;
}

.dchat__attach:hover {
    background: rgba(106, 110, 118, 0.1);
}

.dchat__input {
    flex: 1;
    border: 0;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.4;
    max-height: 120px;
    padding: 9px 0;
    background: transparent;
}

.dchat__send {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #26282b, #4a4d53);
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.dchat__send:active {
    transform: scale(0.94);
}

/* бейдж непрочитанных на кнопке и в списках */
.dchat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 999px;
    background: #26282b;
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
}

/* мобильный: чат на весь экран */
@media (max-width: 575px) {
    .dchat-overlay {
        right: 0;
        bottom: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
    }
}

/* --------------------- Консоль персонала (/chat-admin/) ------------------- */

.dchat-admin {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: 100vh;
    height: 100dvh;
    background: #f2f2f4;
}

.dchat-admin__side {
    border-right: 1px solid rgba(106, 110, 118, 0.16);
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dchat-admin__title {
    padding: 16px;
    font-family: "Jost", sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #26282b;
    border-bottom: 1px solid rgba(106, 110, 118, 0.12);
}

.dchat-admin__list {
    flex: 1;
    overflow-y: auto;
}

.dchat-admin__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid rgba(106, 110, 118, 0.08);
    background: #fff;
    position: relative;
    transition: background 160ms ease;
}

.dchat-admin__item:hover,
.dchat-admin__item.is-active {
    background: #f2f2f4;
}

.dchat-admin__doc {
    display: block;
    font-family: "Jost", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #26282b;
}

.dchat-admin__pat {
    display: block;
    font-size: 12.5px;
    color: #6a6e76;
}

.dchat-admin__last {
    display: block;
    font-size: 12.5px;
    color: #90939a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dchat-admin__item .dchat-badge {
    position: absolute;
    right: 12px;
    top: 14px;
}

.dchat-admin__pane {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.dchat-admin__pane .dchat {
    height: 100%;
}

.dchat-admin__empty,
.dchat-admin__hint {
    padding: 30px 16px;
    text-align: center;
    color: #6a6e76;
    font-size: 14px;
}

@media (max-width: 767px) {
    .dchat-admin {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh 1fr;
    }

    .dchat-admin__side {
        border-right: 0;
        border-bottom: 1px solid rgba(106, 110, 118, 0.16);
    }
}
