/* ===========================================================
   ФКУ «Казанская ПБСТИН» — новая версия
   Единая дизайн-система. Подключается на всех страницах.
   =========================================================== */

:root {
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --line: rgba(0, 0, 0, .08);
    --blue: #0b66c3;
    --blue-dark: #06243f;
    --bg: #fff;
    --bg-soft: #f5f5f7;
    --radius: 22px;
    --maxw: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ===== Ссылка «Перейти к основному содержанию» ===== */
.skip-link {
    position: absolute; left: 16px; top: -100px; z-index: 1000;
    padding: 10px 18px; border-radius: 10px;
    background: var(--blue); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--blue-dark); outline-offset: 2px; }
#main { scroll-margin-top: 64px; }
#main:focus { outline: none; }

/* ===== Frosted-glass шапка ===== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: 1320px; margin: 0 auto;
    height: 46px; padding: 0 26px;
    display: flex; align-items: center; justify-content: center; gap: 14px;
    font-size: 13px;
}
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-brand {
    display: flex; align-items: center; flex: none;
    color: var(--ink); white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 34px; height: 34px; min-width: 34px; max-width: none; border-radius: 7px; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 14px; }
.nav-item { position: relative; }
.nav-item > a { color: var(--ink); opacity: .82; transition: opacity .2s; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.nav-item > a:hover { opacity: 1; text-decoration: none; }
/* Анимированное подчёркивание пунктов меню (только десктоп) */
@media (min-width: 1181px) {
    .nav-item > a::after {
        content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
        background: var(--blue); border-radius: 2px;
        transform: scaleX(0); transform-origin: left center;
        transition: transform .28s ease;
    }
    .nav-item > a:hover::after,
    .nav-item:focus-within > a::after,
    .nav-item > a.active::after { transform: scaleX(1); }
}
/* ===== Полноширинная выпадающая панель ===== */
.drop {
    position: fixed; left: 0; right: 0; top: 46px; z-index: 90;
    opacity: 0; visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}
/* затемнение остальной страницы */
.drop::before {
    content: ""; position: fixed; left: 0; right: 0; top: 46px; bottom: 0;
    background: rgba(0, 0, 0, .32); z-index: -1;
    opacity: 0; transition: opacity .35s ease;
}
.nav-item:hover .drop, .nav-item:focus-within .drop { opacity: 1; visibility: visible; }
.nav-item:hover .drop::before, .nav-item:focus-within .drop::before { opacity: 1; }
.drop-inner {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .12);
    transform: translateY(-12px);
    transition: transform .35s ease;
}
.nav-item:hover .drop .drop-inner, .nav-item:focus-within .drop .drop-inner { transform: none; }
.drop-wrap {
    max-width: var(--maxw); margin: 0 auto; padding: 36px 22px 44px;
    display: flex; gap: 56px;
}
.drop-feature { width: 280px; flex: none; }
.drop-feature strong {
    display: block; font-size: 26px; font-weight: 700;
    letter-spacing: -.02em; line-height: 1.14; color: var(--ink);
}
.drop-feature p { margin-top: 12px; font-size: 15px; color: var(--muted); max-width: 26ch; }
.drop-col { display: flex; flex-direction: column; min-width: 240px; }
.drop-col a {
    display: block; padding: 12px 0; font-size: 17px; font-weight: 500;
    color: var(--ink); opacity: .82; white-space: nowrap; border-bottom: 1px solid var(--line);
    transition: opacity .15s, padding-left .15s, color .15s;
}
.drop-col a:last-child { border-bottom: 0; }
.drop-col a:hover { opacity: 1; text-decoration: none; padding-left: 6px; color: var(--blue); }
.nav-search svg { display: block; }
.nav-burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }
@media (max-width: 1180px) {
    /* на мобильных/узких шапка — обычный flex: лого слева, иконки и бургер справа */
    .nav-inner { display: flex; justify-content: flex-start; gap: 0; }
    .nav-brand { order: 1; }
    .nav-actions { order: 2; margin-left: auto; }
    .nav-burger { order: 3; display: block; margin-left: 10px; }
    .nav-links {
        order: 4;
        position: absolute; top: 46px; left: 0; right: 0;
        flex-direction: column; gap: 0; margin: 0;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--line);
        max-height: calc(100vh - 46px); overflow-y: auto;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-item { width: 100%; }
    .nav-item > a { padding: 14px 22px; border-top: 1px solid var(--line); opacity: 1; }
    /* подменю на мобильных — раскрытый вложенный список */
    .drop {
        position: static; opacity: 1; visibility: visible;
        transition: none;
    }
    .drop::before { display: none; }
    .drop-inner {
        background: var(--bg-soft); backdrop-filter: none;
        border: 0; box-shadow: none; transform: none;
    }
    .drop-wrap { display: block; padding: 0; max-width: none; gap: 0; }
    .drop-feature { display: none; }
    .drop-col { display: block; min-width: 0; }
    .drop-col a {
        padding: 12px 22px 12px 38px; font-size: 14px; opacity: 1;
        white-space: normal; border-bottom: 0; border-top: 1px solid var(--line);
    }
    .drop-col a:last-child { border-bottom: 0; }
    .drop-col a:hover { padding-left: 38px; }
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; color: #fff;
    overflow: hidden; padding: 80px 22px;
}
.hero-bg {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
    transform: scale(1.05);
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.28) 40%, rgba(0,0,0,.6) 100%);
}
.hero h1 {
    font-size: clamp(28px, 6vw, 64px);
    font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
    max-width: none; white-space: nowrap; text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.hero .lead {
    margin-top: 18px; font-size: clamp(17px, 2.4vw, 23px);
    font-weight: 400; max-width: 38ch; opacity: .95;
    text-shadow: 0 1px 14px rgba(0,0,0,.4);
}
.hero .cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ===== Интро: надпись растёт, фон бледнеет в белый, проявляется «Об учреждении» ===== */
.intro { position: relative; height: 240vh; background: #fff; }
.intro-sticky {
    position: sticky; top: 0; height: 100vh; overflow: hidden;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: #fff;
}
.intro-bg {
    position: absolute; inset: 0; z-index: 1;
    background-size: cover; background-position: center;
    will-change: opacity, transform;
}
.intro-bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.3) 40%, rgba(0,0,0,.62) 100%);
}
.intro-badge {
    display: none;                       /* показывается только в праздничный период (см. main.js) */
    position: absolute; z-index: 4; left: 140px; top: 56px;
    width: clamp(220px, 30vw, 460px); height: auto;
    pointer-events: none; user-select: none;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.45));
    will-change: opacity, transform;
}
.intro-badge.show { display: block; }
/* 1 мая — чуть левее базового положения */
.intro-badge[data-holiday="maylabor"] { left: 40px; }
/* 4 ноября — меньше базового, в правом верхнем углу */
.intro-badge[data-holiday="unity"] { left: auto; right: -24px; top: 20px; width: clamp(150px, 20vw, 300px); }
/* 30 августа — меньше и выше базового */
.intro-badge[data-holiday="tatarstan"] { left: 100px; top: 0; width: clamp(230px, 30vw, 460px); }
/* 12 июня — чуть левее, выше и меньше базового */
.intro-badge[data-holiday="russia"] { left: 80px; top: 16px; width: clamp(180px, 24vw, 380px); }
/* 12 июня — слово «России» триколором: три равные полосы по высоте строчных «оссии»,
   а верхушка заглавной «Р» (выше строчных) остаётся белой. */
.ru-tricolor {
    background: linear-gradient(180deg,
        #ffffff 0 51.5%,        /* верх «Р» + верхняя треть строчных — белый */
        #0039a6 51.5% 66.6%,    /* средняя треть строчных — синий */
        #d52b1e 66.6% 100%);    /* нижняя треть строчных — красный */
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}
/* 9 мая — крупнее базового и выше */
.intro-badge[data-holiday="victory"] { top: -40px; width: clamp(340px, 46vw, 720px); }
/* 8 марта — прижат в левый верхний угол, скруглён правый нижний угол */
.intro-badge[data-holiday="march8"] {
    left: 120px; top: 0;
    width: clamp(240px, 32vw, 500px);
    border-bottom-right-radius: 32px;
}
@media (max-width: 700px) {
    .intro-badge { left: 14px; top: 76px; width: 200px; }
}
.intro-title {
    position: relative; z-index: 2; margin: 0; padding: 0 22px;
    color: #fff; font-size: clamp(28px, 6vw, 64px);
    font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
    white-space: nowrap; text-shadow: 0 2px 24px rgba(0,0,0,.35);
    will-change: transform, opacity;
}
.intro-about {
    position: absolute; z-index: 3; left: 50%; top: 53.5%; bottom: auto;
    transform: translate(-50%, -50%);
    width: min(1100px, 94vw); padding: 0 22px; opacity: 0;
    will-change: opacity, transform;
}
.intro-about .kicker { margin-bottom: 14px; text-align: center; }
.intro-about h2 {
    font-size: clamp(28px, 4.4vw, 46px); font-weight: 700;
    letter-spacing: -.02em; line-height: 1.12; margin: 0 auto; max-width: none; color: var(--ink);
    text-align: center;
}
.intro-about .sub {
    margin: 18px auto 0; font-size: clamp(17px, 2vw, 21px);
    color: var(--muted); max-width: 820px; line-height: 1.6;
    text-align: justify;
}
.intro-about .coverflow { margin-top: 30px; }
.intro-about .cf-stage { height: 330px; }

/* Фото-блок «Об учреждении» под интро */
.about-photos { background: #fff; padding: 0 22px 90px; }

@media (max-width: 700px) {
    .intro { height: 200vh; }
}

/* ===== Кнопки ===== */
.btn {
    display: inline-block; padding: 12px 26px; border-radius: 980px;
    font-size: 16px; font-weight: 500; transition: transform .15s, background .2s;
    border: none; box-shadow: none; appearance: none; -webkit-appearance: none;
    font-family: inherit; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #0a5bb0; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.55); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.28); }

/* ===== Секции-«главы» ===== */
.chapter { text-align: center; padding: 110px 22px; }
.chapter.soft { background: var(--bg-soft); }
.chapter.dark { background: var(--blue-dark); color: #fff; }
.kicker {
    font-size: 14px; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
.chapter.dark .kicker { color: #6fb6ff; }
.chapter h2 {
    font-size: clamp(28px, 4.4vw, 46px);
    font-weight: 700; letter-spacing: -.02em; line-height: 1.12;
    max-width: 20ch; margin: 0 auto;
}
.chapter .sub {
    margin: 18px auto 0; font-size: clamp(17px, 2vw, 21px);
    color: var(--muted); max-width: 48ch;
}
.chapter.dark .sub { color: rgba(255,255,255,.72); }
.region-list {
    list-style: none; padding: 0;
    margin: 26px auto 0; max-width: 48ch;
    text-align: left;
    display: grid; gap: 10px 26px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    font-size: clamp(16px, 1.7vw, 19px); color: var(--ink);
}
.region-list li { position: relative; padding-left: 20px; }
.region-list li::before {
    content: ""; position: absolute; left: 0; top: .55em;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--blue);
}
.chapter .shot {
    margin: 46px auto 0; max-width: 980px; width: 100%;
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.18);
}

/* ===== Плитки разделов — бесшовная бегущая лента ===== */
.tiles { padding: 96px 0; background: #fff; }
.tiles > h2 {
    text-align: center; font-size: clamp(26px, 4vw, 40px);
    font-weight: 700; letter-spacing: -.02em; margin: 0 22px 44px;
}
.tile-marquee {
    overflow-x: auto; overflow-y: hidden; width: 100%; padding: 26px 0 26px;
    scrollbar-width: thin; scrollbar-color: transparent transparent;   /* скрыт, пока не крутят */
}
.tile-marquee.show-scroll { scrollbar-color: rgba(0, 0, 0, .28) transparent; }
.tile-marquee::-webkit-scrollbar { height: 6px; }
.tile-marquee::-webkit-scrollbar-track { background: transparent; }
.tile-marquee::-webkit-scrollbar-thumb { background: transparent; border-radius: 980px; }
.tile-marquee.show-scroll::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .28); }
.tile-marquee.show-scroll::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .42); }
.tile-track { display: flex; width: max-content; }
.tile {
    flex: none; width: 280px; min-height: 170px; margin-right: 20px;
    border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line);
    color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease, background .25s;
}
.tile:hover { text-decoration: none; transform: translateY(-6px); box-shadow: 0 20px 44px rgba(0, 0, 0, .12); background: #fff; }
.tile-inner { display: flex; flex-direction: column; height: 100%; padding: 26px 26px 22px; }
.tile h3 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.tile .tile-desc { margin-top: 8px; font-size: 15px; color: var(--muted); line-height: 1.45; }
.tile .tile-arrow { margin-top: auto; padding-top: 18px; color: var(--blue); font-size: 22px; line-height: 1; transition: transform .3s ease; }
.tile:hover .tile-arrow { transform: translateX(6px); }

/* ===== Контент-страницы (внутренние) ===== */
.page { max-width: 820px; margin: 0 auto; padding: 60px 22px 80px; }
.page h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.page .crumbs { font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.page h2 { font-size: 26px; font-weight: 700; margin: 38px 0 14px; letter-spacing: -.01em; }
.page p { margin: 14px 0; font-size: 18px; color: #2b2b30; }
.page ul, .page ol { margin: 14px 0 14px 22px; font-size: 18px; }
.page li { margin: 7px 0; }

/* ===== Контакты ===== */
.contact { text-align: center; padding: 110px 22px; background: var(--bg-soft); }
.contact h2 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 700; letter-spacing: -.02em; }
.contact-wrap { max-width: var(--maxw); margin: 0 auto; }
.contact-top { margin-top: 18px; font-size: 18px; color: var(--muted); line-height: 1.85; }
.contact-top a { font-weight: 500; }
.contact-h3 {
    font-size: clamp(20px, 3vw, 28px); font-weight: 700;
    letter-spacing: -.02em; margin: 72px 0 28px;
}
.people {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px; text-align: left;
}
.person {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    padding: 24px; display: flex; flex-direction: column;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: box-shadow .25s, transform .25s;
}
.person:hover { box-shadow: 0 18px 44px rgba(0, 0, 0, .10); transform: translateY(-3px); }
.person .post { font-size: 13px; color: var(--muted); line-height: 1.4; min-height: 4.2em; }
.person .fio { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin: 10px 0 16px; }
.person .fio .ln { display: block; }
.person .tel { margin-top: auto; }
.person .tel a { font-size: 17px; font-weight: 500; color: var(--blue); }
.depts { max-width: 680px; margin: 0 auto; text-align: left; }
.contact .depts { margin-top: 40px; }
.dept-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 16px; padding: 16px 6px; border-bottom: 1px solid var(--line);
}
.dept-row:first-child { border-top: 1px solid var(--line); }
.dept-row .name { font-size: 17px; color: var(--ink); }
.dept-row .tel { font-size: 17px; font-weight: 500; text-align: right; white-space: nowrap; }
.contact-note { margin: 32px auto 0; max-width: 60ch; font-size: 15px; color: var(--muted); text-align: justify; }
.prose p.contact-note { margin: 32px auto 0; max-width: 60ch; font-size: 15px; color: var(--muted); text-align: justify; }

/* ===== Шапка внутренней страницы ===== */
.page-hero { padding: 100px 22px 10px; text-align: center; }
.page-hero .crumbs { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.page-hero .crumbs a { color: var(--muted); }
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -.02em; }
.page-hero .page-sub { margin: 16px auto 0; max-width: 760px; font-size: 18px; color: var(--muted); line-height: 1.8; }
.page-hero .page-sub a { font-weight: 500; }
.contact-page { max-width: var(--maxw); margin: 0 auto; padding: 20px 22px 110px; text-align: center; }
.nav-item > a.active { opacity: 1; color: var(--blue); }

/* ===== Тело внутренней страницы: фото + читаемый текст ===== */
.page-body { max-width: var(--maxw); margin: 0 auto; padding: 20px 22px 100px; }
.page-figure {
    max-width: 980px; margin: 30px auto 50px;
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .18);
}
.page-figure img { width: 100%; display: block; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p {
    font-size: 19px; line-height: 1.7; color: #2b2b30; margin: 20px 0;
    text-align: justify;
}
.prose a { font-weight: 500; }
.prose h2 {
    font-size: clamp(24px, 3.4vw, 32px); font-weight: 700;
    letter-spacing: -.02em; margin: 8px 0 18px; text-align: left;
}
/* Подразделы-полосы с чередующимся фоном (как .chapter на главной) */
.band { padding: 70px 22px; scroll-margin-top: 0; }
.band.alt { background: var(--bg-soft); }
/* На светло-серой полосе серые карточки делаем белыми, чтобы не сливались */
.band.alt .product-grid,
.band.alt .callout,
.band.alt .hours-card,
.band.alt .transport-info { background: #fff; }
.band-inner { max-width: var(--maxw); margin: 0 auto; }
.band-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 30px; text-align: center; }

/* Подзаголовки внутри текста */
.prose h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 36px 0 10px; text-align: left; color: var(--ink); }
.prose h3:first-child { margin-top: 0; }
.prose .info-ref { margin-top: 22px; font-size: 16px; }
.prose .info-ref a { font-weight: 500; }

/* ===== Список «метка: значение» (реквизиты регистрации, учредитель) ===== */
.prose ul.spec-list { list-style: none; padding: 0; margin: 18px 0; }
.prose .spec-list li { font-size: 16px; line-height: 1.55; color: #2b2b30; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); text-align: left; }
.prose .spec-list li:last-child { border-bottom: 0; }
.spec-list b { color: var(--ink); font-weight: 600; margin-right: 4px; }

/* ===== Блок «Как добраться»: транспорт + карта ===== */
.prose .transport-info { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 18px 24px; margin: 22px 0; }
.transport-info p { font-size: 16px; line-height: 1.6; margin: 5px 0; text-align: left; }
.transport-info p:first-child { font-weight: 600; color: var(--ink); }
.map-embed { width: 100%; height: 380px; border: 0; border-radius: 18px; margin-top: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .12); display: block; }

/* ===== Карточка графика работы ===== */
.hours-card { max-width: 540px; margin: 6px auto 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.hours-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border-bottom: 0; }
.hours-day { font-size: 16px; color: var(--ink); font-weight: 500; }
.hours-badge { font-size: 15px; font-weight: 600; color: var(--blue); background: rgba(11, 102, 195, .1); padding: 5px 14px; border-radius: 980px; white-space: nowrap; }
.hours-badge--off { color: var(--muted); background: #e8e8ec; }

/* ===== Фото: карусель coverflow ===== */
.coverflow { position: relative; max-width: var(--maxw); margin: 6px auto 0; }
.band:has(.coverflow) { overflow-x: clip; }
.cf-stage { position: relative; height: 560px; perspective: 1600px; }
.cf-slide {
    position: absolute; top: 50%; left: 50%;
    aspect-ratio: 16 / 10;
    border-radius: 20px; overflow: hidden; background: #0a0a0c;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .28);
    transition: transform .6s cubic-bezier(.22, .61, .36, 1), opacity .6s ease;
    cursor: pointer; will-change: transform, opacity;
}
.cf-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-slide.is-center { cursor: pointer; }

/* Лайтбокс: приближение выбранного фото на матовом сером фоне */
.cf-lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 5vh 5vw;
    background: rgba(200, 200, 206, .55); -webkit-backdrop-filter: blur(22px) saturate(120%); backdrop-filter: blur(22px) saturate(120%);
    opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease;
}
.cf-lightbox.open { opacity: 1; visibility: visible; }
.cf-lb-img {
    max-width: 100%; max-height: 90vh; border-radius: 16px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .35);
    transform: scale(.9); transition: transform .35s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}
.cf-lightbox.open .cf-lb-img { transform: scale(1); }
.cf-lb-close, .cf-lb-arrow {
    position: absolute; border-radius: 50%; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .82); color: #1d1d1f; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15); transition: background .2s; z-index: 210;
}
.cf-lb-close:hover, .cf-lb-arrow:hover { background: #fff; }
.cf-lb-close { top: 18px; right: 24px; width: 46px; height: 46px; font-size: 30px; line-height: 1; }
.cf-lb-arrow { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 30px; line-height: 1; }
.cf-lb-prev { left: 3vw; } .cf-lb-next { right: 3vw; }
@media (max-width: 600px) { .cf-lb-arrow { width: 44px; height: 44px; font-size: 24px; } .cf-lb-prev { left: 8px; } .cf-lb-next { right: 8px; } }

.cf-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 50;
    width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12); transition: background .2s, opacity .2s;
}
.cf-prev { left: 4px; } .cf-next { right: 4px; }
.cf-arrow:hover { background: #fff; }
.cf-arrow:disabled { opacity: .3; cursor: default; }

.cf-caption { text-align: center; color: var(--muted); font-size: 15px; margin-top: 16px; min-height: 1.2em; }
.cf-dots { display: flex; gap: 9px; justify-content: center; margin-top: 12px; }
.cf-dot { width: 9px; height: 9px; border-radius: 50%; background: #cfcfd6; border: 0; padding: 0; cursor: pointer; transition: background .25s, transform .25s; }
.cf-dot.active { background: var(--blue); transform: scale(1.25); }

@media (max-width: 600px) {
    .cf-stage { height: 320px; }
    .cf-arrow { width: 40px; height: 40px; font-size: 22px; }
}
.doc-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; justify-content: center; }
.doc-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 980px; font-size: 16px; font-weight: 500; color: var(--ink);
    transition: background .2s, transform .15s;
}
.doc-link:hover { background: #ececf0; text-decoration: none; transform: translateY(-1px); }

/* ===== Официальные документы (аккордеон) ===== */
.docs { max-width: 880px; margin: 0 auto; padding: 16px 22px 100px; }
.doc-group { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; overflow: hidden; }
.doc-head {
    width: 100%; display: flex; align-items: center; gap: 14px;
    padding: 20px 24px; background: none; border: 0; cursor: pointer; text-align: left;
    font-family: inherit; color: var(--ink); transition: background .2s;
}
.doc-head:hover { background: var(--bg-soft); }
.doc-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.doc-count { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: auto; }
.doc-chevron {
    flex: none; width: 11px; height: 11px; margin-left: 12px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .3s ease;
}
.doc-group.open .doc-chevron { transform: rotate(-135deg); }
.doc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.doc-group.open .doc-body { grid-template-rows: 1fr; }
.doc-body-inner { overflow: hidden; }
.doc-list { list-style: none; margin: 0; padding: 0 14px 12px; }
.doc-list li + li { border-top: 1px solid var(--line); }
.doc-list a { display: flex; align-items: center; gap: 14px; padding: 13px 10px; color: var(--ink); border-radius: 10px; transition: background .2s; }
.doc-list a:hover { background: var(--bg-soft); text-decoration: none; }
.doc-ico {
    flex: none; width: 40px; height: 40px; border-radius: 9px;
    background: #d63a2f; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em;
    display: flex; align-items: center; justify-content: center;
}
.doc-nm { flex: 1; font-size: 16px; line-height: 1.4; }
.doc-sz { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.doc-ico.xls { background: #1a7f4b; }

/* ===== Руководство: email в карточке ===== */
.person .mail { margin-top: 6px; }
.person .mail a { font-size: 14px; font-weight: 500; color: var(--blue); word-break: break-word; }

/* ===== Сетка руководства: главврач шириной в две карточки ===== */
.lead-grid {
    display: grid; gap: 16px; max-width: var(--maxw); margin: 0 auto;
    grid-template-columns: repeat(4, 1fr); text-align: left;
}
.lead-grid .person:first-child { grid-column: 2 / 4; }
.lead-grid .person:nth-child(n+2) { grid-row: 2; }
@media (max-width: 900px) {
    .lead-grid { grid-template-columns: repeat(2, 1fr); }
    .lead-grid .person:first-child { grid-column: 1 / 3; }
    .lead-grid .person:nth-child(n+2) { grid-row: auto; }
}
@media (max-width: 520px) {
    .lead-grid { grid-template-columns: 1fr; }
    .lead-grid .person:first-child { grid-column: auto; }
}

/* ===== График приема граждан ===== */
.reception-block { max-width: 880px; margin: 44px auto 0; text-align: left; }
.reception-h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 18px; text-align: center; }
.reception-list { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.reception-row { display: grid; grid-template-columns: 1.25fr 1.4fr 1.25fr; gap: 18px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line); }
.reception-row:first-child { border-top: 0; }
.reception-who { display: flex; flex-direction: column; }
.reception-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.reception-role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.reception-when { font-size: 15px; color: #2b2b30; }
.reception-cont { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.reception-cont a { color: var(--blue); font-weight: 500; word-break: break-word; }
@media (max-width: 660px) {
    .reception-row { grid-template-columns: 1fr; gap: 7px; }
    .reception-when { color: var(--muted); }
}

/* ===== Наши специалисты ===== */
.spec-files { max-width: 880px; margin: 0 auto 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; }
.docs-h2 { max-width: 880px; margin: 34px auto 16px; padding: 0 8px; font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -.02em; }
.spec-list { list-style: none; margin: 0; padding: 4px 24px 16px; }
.spec-list li { padding: 12px 2px; border-top: 1px solid var(--line); }
.spec-list li:first-child { border-top: 0; }
.spec-name { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.spec-post { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ===== Контролирующие организации ===== */
.org-grid {
    max-width: var(--maxw); margin: 0 auto; padding: 16px 22px 100px;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
@media (max-width: 720px) { .org-grid { grid-template-columns: 1fr; } }
.org-card {
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    padding: 34px 34px 28px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s;
}
.org-card:hover { box-shadow: 0 22px 50px rgba(0, 0, 0, .11); transform: translateY(-4px); }
.org-name { font-size: 21px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--ink); }
.org-person { margin-top: 10px; font-size: 16px; font-weight: 500; color: var(--ink); }
.org-contacts { list-style: none; margin: 20px 0 0; padding: 0; }
.org-row { display: grid; grid-template-columns: 88px 1fr; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.45; }
.org-row:first-child { border-top: 0; }
.org-label { color: var(--muted); }
.org-value { color: #2b2b30; }
.org-value a { color: var(--blue); font-weight: 500; }

/* ===== Противодействие коррупции ===== */
.docs-h2 { scroll-margin-top: 64px; }
.ac-intro {
    max-width: 880px; margin: 0 auto 8px; background: var(--bg-soft);
    border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px;
}
.ac-intro p { font-size: 16px; line-height: 1.7; color: #2b2b30; margin: 0 0 12px; }
.ac-intro p:last-child { margin-bottom: 0; }
.ac-intro ul { margin: 0; padding-left: 22px; }
.ac-intro li { font-size: 15.5px; line-height: 1.65; color: #2b2b30; margin: 8px 0; }
.doc-list a.doc-ext { align-items: flex-start; gap: 12px; }
.doc-ext .doc-nm { font-size: 15.5px; line-height: 1.45; }
.doc-ext-ico { flex: none; margin-top: 2px; color: var(--muted); font-size: 15px; }
/* Одиночная ссылка по центру блока (по горизонтали и по высоте) */
.doc-list--center { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 0 14px; text-align: left; }
.doc-list--center li { border: 0; }
.doc-list--center a.doc-ext { display: inline-flex; align-items: center; }
.doc-list--center .doc-nm { flex: 0 1 auto; }
.spo-banner {
    display: block; max-width: 300px; margin: 18px auto; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    transition: transform .25s, box-shadow .25s;
}
.spo-banner img { width: 100%; display: block; }
.spo-banner:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 0, 0, .14); }
/* Единый формат баннеров — чуть выше и уже */
.spo-banner--crop { aspect-ratio: 320 / 84; }
.spo-banner--crop img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Логотип во всю ширину (СПО) — вписываем без обрезки, фон белый под буквы */
.spo-banner--fit { background: #fff; }
.spo-banner--fit img { object-fit: contain; }
.ac-phone { text-align: center; margin: 12px 0 0; font-size: 16px; color: var(--ink); }
.ac-phone a { color: var(--blue); font-weight: 600; }
/* Тёмно-синяя карточка-призыв «Обратная связь» */
.ac-cta {
    max-width: 880px; margin: 0 auto 8px; text-align: center;
    background: var(--blue-dark); color: #fff;
    border-radius: 20px; padding: clamp(30px, 4vw, 46px);
}
.ac-cta .kicker { color: #6fb6ff; margin-bottom: 12px; }
.ac-cta p { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .8); margin: 0 auto; max-width: 56ch; }
.ac-cta-phone { margin-top: 20px !important; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: rgba(255, 255, 255, .6) !important; }
.ac-cta-phone a { display: inline-block; margin-top: 4px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.ac-cta-phone a:hover { text-decoration: none; }
.ac-cta .btn { margin-top: 26px; }
.ac-stub {
    max-width: 880px; margin: 0 auto; text-align: center; color: var(--muted);
    font-size: 16px; padding: 34px; background: var(--bg-soft);
    border: 1px solid var(--line); border-radius: 18px;
}

/* ===== Реквизиты ===== */
.rekvizity { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; margin-top: 24px; align-items: start; }
.prose ul.req-list { list-style: none; padding: 0; margin: 0; }
.rekvizity .qr-card { margin-top: 18px; }
.req-list li { font-size: 16px; line-height: 1.55; color: #2b2b30; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.req-list li:first-child { padding-top: 0; }
.req-list li:last-child { border-bottom: 0; }
.req-list strong { color: var(--ink); font-weight: 600; }
.qr-card { background: var(--blue-dark); border: 1px solid var(--blue-dark); border-radius: 18px; padding: 24px; text-align: center; position: sticky; top: 74px; align-self: start; box-shadow: 0 14px 34px rgba(6,36,63,.28); }
.qr-card img { width: 200px; max-width: 100%; margin: 18px auto; border-radius: 12px; }
.qr-card p { font-size: 15px; color: #fff; line-height: 1.5; text-align: left; }
.qr-card p strong { color: #fff; font-weight: 700; }
@media (max-width: 680px) { .rekvizity { grid-template-columns: 1fr; } }

/* ===== Блок расписания (внутри пункта правил) ===== */
.schedule-box {
    display: block; width: fit-content; background: var(--blue-dark);
    border: 1px solid var(--blue-dark); border-radius: 14px;
    padding: 14px 26px; margin: 14px auto 4px; text-align: center;
    box-shadow: 0 12px 30px rgba(6,36,63,.28);
}
.schedule-box p { margin: 5px 0; font-size: 16px; line-height: 1.5; color: #fff; text-align: center; }
.schedule-box a { color: #fff; text-decoration: underline; }
.prose .note { margin-top: 26px; font-size: 16px; color: var(--muted); text-align: left; }

/* ===== Перечень продуктов / предметов — список в серой рамке ===== */
.prose ul.product-grid {
    list-style: none; margin: 24px 0; padding: 6px 24px;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px;
}
.product-grid li {
    padding: 8px 2px; border-bottom: 1px solid var(--line);
    font-size: 14.5px; line-height: 1.3; color: #2b2b30; text-align: left; margin: 0;
}
.product-grid li:last-child { border-bottom: 0; }

/* ===== Наглядные перечни передач (карточки с иконками) ===== */
.prose ul.pf-grid {
    list-style: none; margin: 24px 0; padding: 0;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
}
.pf-grid .pf-item {
    display: flex; align-items: flex-start; gap: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 15px 18px; margin: 0; text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pf-grid .pf-item:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .09); }
.pf-ico {
    flex: none; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px;
}
.pf-allow .pf-ico { background: #1a7f4b; }
.pf-allow:hover { border-color: #1a7f4b; }
.pf-deny .pf-ico { background: #d63a2f; }
.pf-deny:hover { border-color: #d63a2f; }
.pf-body { flex: 1; min-width: 0; }
.pf-name { font-size: 15.5px; line-height: 1.35; color: var(--ink); }
.pf-amt {
    display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600;
    color: #1a7f4b; background: rgba(26, 127, 75, .12); border-radius: 999px; padding: 4px 11px;
}
/* белые карточки видны и на серой полосе */
.band.alt .pf-item { background: #fff; }

/* вариант «строками»: один продукт = одна строка во всю ширину */
.pf-grid--rows { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pf-grid--rows .pf-item { align-items: center; padding: 11px 18px; }
.pf-grid--rows .pf-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pf-grid--rows .pf-body { min-width: 0; }
.pf-grid--rows .pf-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-grid--rows .pf-amt { margin-top: 0; flex: none; white-space: nowrap; }
@media (max-width: 700px) { .pf-grid--rows .pf-name { white-space: normal; } }
html.vi .pf-grid--rows .pf-name { white-space: normal; }

/* ===== Выделенная плашка-предупреждение ===== */
.prose .callout {
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px;
    padding: 22px 26px; margin: 30px 0; text-align: center;
    font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.5;
}
.prose ol, .prose ul { margin: 20px 0; padding-left: 26px; }
.prose li { font-size: 19px; line-height: 1.7; color: #2b2b30; margin: 16px 0; padding-left: 6px; text-align: justify; }
.prose li::marker { color: #2b2b30; font-weight: 400; }
.prose strong { font-weight: 600; color: var(--ink); }

/* ===== Карточка-призыв (например, вакансии hh.ru) ===== */
.hire {
    max-width: 760px; margin: 0 auto; text-align: left;
    background: #fff; border: 1px solid var(--line); border-radius: 24px;
    padding: clamp(36px, 5vw, 60px);
}
.hire-logo { height: 34px; width: auto; display: block; margin: 0 0 26px; opacity: .92; }
.hire-title {
    font-size: clamp(28px, 4.2vw, 44px); font-weight: 700;
    letter-spacing: -.02em; line-height: 1.08; color: var(--ink);
}
.hire-lead {
    margin: 16px 0 0; max-width: 52ch;
    font-size: clamp(17px, 2vw, 20px); line-height: 1.5; color: var(--muted);
}
.hire-actions {
    margin-top: 32px; display: flex; flex-wrap: wrap;
    align-items: center; justify-content: flex-start; gap: 14px 26px;
}
.hire .btn-primary { padding: 13px 32px; font-size: 17px; color: #fff; }
.hire-more { display: inline-flex; align-items: center; gap: 5px; font-size: 17px; font-weight: 500; color: var(--blue); }
.hire-more:hover { text-decoration: none; }
.hire-more .chev { transition: transform .2s ease; }
.hire-more:hover .chev { transform: translateX(4px); }

/* ===== Подвал ===== */
.footer { background: var(--bg-soft); color: var(--muted); border-top: 1px solid var(--line); padding: 32px 22px 20px; font-size: 14px; }
.footer-grid { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-grid strong { color: var(--ink); }
.footer-banners {
    max-width: var(--maxw); margin: 22px auto 0;
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 24px; align-items: center; justify-items: center;
}
@media (max-width: 760px) {
    .footer-banners { grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
}
@media (max-width: 460px) {
    .footer-banners { grid-template-columns: repeat(3, 1fr); }
}
.footer-banners a { display: flex; align-items: center; justify-content: center; height: 46px; max-width: 100%; }
.footer-banners img { max-height: 100%; max-width: 100%; width: auto; height: auto; opacity: .85; transition: opacity .2s; }
.footer-banners a:hover img { opacity: 1; }
.footer-bottom { max-width: var(--maxw); margin: 18px auto 0; text-align: center; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

/* ===== Reveal-анимация ===== */
/* ── Новости (лента карточек) ───────────────────────── */
.news-feed { max-width: 880px; margin: 0 auto; padding: 12px 22px 96px; display: flex; flex-direction: column; gap: 34px; }
.news-item {
    background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .06); transition: transform .3s, box-shadow .3s;
}
.news-item:hover { transform: translateY(-4px); box-shadow: 0 18px 46px rgba(0, 0, 0, .1); }
.news-cover { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; background: #eef1f5; }
.news-body { padding: 30px 34px 32px; }
.news-date { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.news-title { font-size: clamp(21px, 2.6vw, 27px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 14px; color: var(--ink); }
.news-text { color: #3a3a3c; line-height: 1.7; font-size: 17px; }
.news-text p { margin: 0 0 12px; }
.news-text p:last-child { margin-bottom: 0; }
.news-link {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 20px;
    padding: 10px 20px; border-radius: 980px; background: var(--blue); color: #fff;
    font-size: 15px; font-weight: 500; transition: background .2s, transform .2s;
}
.news-link:hover { background: #0a5bb0; transform: translateY(-1px); text-decoration: none; }
.news-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.news-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; cursor: pointer; transition: opacity .2s, transform .2s; }
.news-gallery img:hover { opacity: .92; transform: scale(1.015); }
@media (max-width: 620px) {
    .news-gallery { grid-template-columns: repeat(2, 1fr); }
    .news-body { padding: 24px 22px 26px; }
}

.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .nav-item > a::after { transition: none; }
    .hero-bg, .tile-bg { transform: none; }
    .tile-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; gap: 20px; }
    .tile { margin-right: 0; }
    .tile-marquee { overflow: visible; padding: 0 22px; -webkit-mask-image: none; mask-image: none; }
    .tile-track .tile[aria-hidden="true"] { display: none; }
}

/* ── Соцсети в подвале ──────────────────────────────── */
.footer-social {
    max-width: var(--maxw); margin: 16px auto 0; padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.footer-social > span { margin-right: 4px; }
.footer-social > span { font-size: 14px; opacity: .8; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .1); transition: background .2s, transform .2s;
}
.footer-social a:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.footer-social img { width: 20px; height: 20px; display: block; }

/* ── Кнопка «Наверх» (воздушная) ────────────────────── */
#toTop {
    position: fixed; right: 22px; bottom: 28px; z-index: 120;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink); cursor: pointer;
    background: rgba(255, 255, 255, .55);
    -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .2s;
}
#toTop.show { opacity: 1; visibility: visible; transform: none; }
#toTop:hover { background: rgba(255, 255, 255, .85); }
@media (max-width: 600px) { #toTop { right: 14px; width: 44px; height: 44px; } }

/* ── Баннер согласия на использование cookie (плавающая карточка) ── */
.cookie-bar {
    position: fixed; left: 50%; bottom: 24px; z-index: 250;
    width: min(600px, calc(100vw - 32px));
    transform: translate(-50%, 0); opacity: 1;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
    padding: 20px 24px;
    transition: transform .45s cubic-bezier(.22,.9,.32,1), opacity .35s ease;
}
.cookie-bar.out { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.cookie-text { font-size: 14.5px; line-height: 1.6; color: var(--ink); overflow: hidden; }
.cookie-actions { float: right; display: flex; align-items: center; gap: 10px; margin: 4px 0 6px 16px; }
.cookie-btn { padding: 8px 20px; font-size: 13px; white-space: nowrap; }
.btn-secondary { background: #e7e7ec; color: var(--ink); border: none; }
.btn-secondary:hover { background: #dadae0; }
.btn:focus { outline: none; }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 600px) {
    .cookie-bar { left: 16px; right: 16px; bottom: 16px; width: auto; transform: none; }
    .cookie-bar.out { transform: translateY(140%); }
    .cookie-actions { float: none; flex-direction: column; align-items: stretch; margin: 12px 0 0; gap: 8px; }
    .cookie-btn { text-align: center; }
}

/* ── Модальное окно документа-заглушки ── */
.doc-list button.doc-modal-trigger {
    all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
    display: flex; align-items: center; gap: 14px; padding: 13px 10px; color: var(--ink); border-radius: 10px; transition: background .2s;
}
.doc-list button.doc-modal-trigger:hover { background: var(--bg-soft); }
.doc-modal-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(20, 20, 30, .45);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.doc-modal-overlay.show { opacity: 1; visibility: visible; }
.doc-modal-card {
    position: relative; width: min(560px, 100%);
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    padding: 28px 26px 24px;
    transform: translateY(16px); transition: transform .3s cubic-bezier(.22,.9,.32,1);
}
.doc-modal-overlay.show .doc-modal-card { transform: translateY(0); }
.doc-modal-title { font-size: 19px; font-weight: 700; margin: 0 0 12px; padding-right: 30px; }
.doc-modal-text { font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0; }
.doc-modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: #e7e7ec; color: var(--ink); font-size: 16px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.doc-modal-close:hover { background: #dadae0; }

/* ── Кнопка «Версия для слабовидящих» в шапке ───────── */
.nav-vi {
    display: flex; align-items: center; justify-content: center; flex: none;
    background: none; border: 0; cursor: pointer;
    color: var(--ink); opacity: .82; padding: 0; transition: opacity .2s, color .2s;
}
.nav-vi:hover, .nav-vi.active { opacity: 1; color: var(--blue); }
.nav-search { display: flex; align-items: center; color: var(--ink); cursor: pointer; }
.nav-search.active { color: var(--blue); }

/* ── Полноширинный выпадающий поиск (в стиле apple.com) ── */
.search-panel {
    position: fixed; top: 46px; left: 0; right: 0; z-index: 300;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .12);
    padding: 20px 22px 26px;
    opacity: 0; visibility: hidden; transform: translateY(-10px); overflow: hidden;
    transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
}
.search-panel.open { opacity: 1; visibility: visible; transform: none; }
.search-inner { max-width: var(--maxw); margin: 0 auto; height: 100%; display: flex; flex-direction: column; }
.search-field {
    display: flex; align-items: center; gap: 14px;
    padding: 4px 2px;
}
.search-field svg { flex: none; color: var(--muted); width: 26px; height: 26px; }
.search-field input {
    flex: 1; border: 0; background: none; outline: none;
    font: inherit; font-size: clamp(24px, 4vw, 34px); font-weight: 600;
    letter-spacing: -.02em; color: var(--ink); padding: 0;
}
.search-field input::placeholder { color: #b0b0b5; font-weight: 500; }
.search-close {
    flex: none; background: none; border: 0; cursor: pointer; color: var(--muted);
    font-size: 30px; line-height: 1; padding: 0 4px; transition: color .2s;
}
.search-close:hover { color: var(--ink); }
.search-head { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 4px; }
.search-results { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.search-results a {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 10px; border-radius: 12px; color: var(--ink); transition: background .15s;
}
.search-results a::before {
    content: ""; flex: none; width: 18px; height: 18px; opacity: .5;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E");
}
.search-results a:hover, .search-results a.sel { background: var(--bg-soft); text-decoration: none; }
.search-results a .sr-t { font-weight: 500; font-size: 17px; }
.search-results a .sr-s { font-size: 13px; color: var(--muted); margin-left: 8px; }
.search-empty { padding: 16px 10px; color: var(--muted); font-size: 16px; }

/* ── Панель настроек доступности ────────────────────── */
.vi-panel {
    position: fixed; top: 56px; right: 16px; z-index: 300;
    width: 280px; max-width: calc(100vw - 24px);
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .18); padding: 16px;
    display: flex; flex-direction: column; gap: 14px;
}
.vi-panel[hidden] { display: none; }
.vi-row { display: flex; flex-direction: column; gap: 8px; }
.vi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.vi-opts { display: flex; gap: 8px; }
.vi-opts button {
    flex: 1; min-height: 40px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--bg-soft); color: var(--ink); cursor: pointer; font-size: 15px;
    display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.vi-opts button:hover { border-color: var(--blue); }
.vi-opts button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.vi-opts [data-f="f2"] { font-size: 18px; } .vi-opts [data-f="f3"] { font-size: 21px; }
.vi-sw { flex: 1; min-height: 40px; }
.vi-sw.on { outline: 3px solid var(--blue); outline-offset: 1px; }
.vi-sw-w { background: #fff; } .vi-sw-b { background: #000; }
.vi-sw-blue { background: #9dd1ff; } .vi-sw-sepia { background: #efe4c8; }
.vi-reset {
    margin-top: 2px; padding: 11px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; transition: opacity .2s;
}
.vi-reset:hover { opacity: .85; }
@media (max-width: 900px) { .vi-panel { top: auto; bottom: 16px; right: 16px; } }

/* ====================================================
   РЕЖИМ ДЛЯ СЛАБОВИДЯЩИХ — визуальные схемы (ГОСТ Р 52872)
   ==================================================== */
html.vi { --vi-bg: #fff; --vi-fg: #111; --vi-acc: #0033cc; --vi-line: #777; }
html.vi.vi-cb     { --vi-bg: #000; --vi-fg: #fff; --vi-acc: #ffd34d; --vi-line: #fff; }
html.vi.vi-cblue  { --vi-bg: #9dd1ff; --vi-fg: #06243f; --vi-acc: #06243f; --vi-line: #06243f; }
html.vi.vi-csepia { --vi-bg: #f7f1df; --vi-fg: #3a2c0c; --vi-acc: #5a3e10; --vi-line: #8a7a4a; }

html.vi body, html.vi .nav, html.vi .footer, html.vi .page-hero, html.vi section,
html.vi .band, html.vi .band.alt, html.vi .chapter, html.vi .chapter.dark, html.vi .chapter.soft,
html.vi .hero, html.vi .intro, html.vi .intro-sticky, html.vi .tiles, html.vi .tile, html.vi .tile-inner,
html.vi .news-item, html.vi .person, html.vi .org-card, html.vi .doc-group, html.vi .doc-head,
html.vi .ac-intro, html.vi .schedule-box, html.vi .callout, html.vi .product-grid, html.vi .hours-card,
html.vi .transport-info, html.vi .qr-card, html.vi .spec-files, html.vi .spo-banner, html.vi .reception-block,
html.vi .map-embed, html.vi .vi-panel {
    background: var(--vi-bg) !important; background-image: none !important;
    color: var(--vi-fg) !important; box-shadow: none !important;
    border-color: var(--vi-line) !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html.vi h1, html.vi h2, html.vi h3, html.vi h4, html.vi h5, html.vi p, html.vi span,
html.vi li, html.vi strong, html.vi b, html.vi div, html.vi td, html.vi th, html.vi label,
html.vi .kicker, html.vi .news-date, html.vi .post, html.vi .fio, html.vi .band-title,
html.vi .doc-nm, html.vi .org-name, html.vi .vi-label, html.vi .crumbs, html.vi .page-sub {
    color: var(--vi-fg) !important;
}
html.vi a { color: var(--vi-acc) !important; text-decoration: underline !important; }
html.vi .btn, html.vi .news-link, html.vi .doc-link, html.vi .vi-reset {
    background: var(--vi-acc) !important; color: var(--vi-bg) !important;
    border: 2px solid var(--vi-fg) !important; text-decoration: none !important;
}
html.vi .vi-opts button.on, html.vi .nav-vi.active { color: var(--vi-bg) !important; background: var(--vi-acc) !important; }
html.vi .intro-bg, html.vi .hero-bg, html.vi .tile-bg { opacity: 0 !important; }
/* увеличение текста — через масштаб основного контента (шапка/подвал остаются) */
html.vi.vi-f2 main > section, html.vi.vi-f2 main > header.page-hero { zoom: 1.18; }
html.vi.vi-f3 main > section, html.vi.vi-f3 main > header.page-hero { zoom: 1.4; }
/* отключение изображений */
html.vi.vi-noimg img { display: none !important; }
html.vi.vi-noimg .nav-brand img { display: inline-block !important; }

/* ===== Праздничное оформление (снег, лепестки, конфетти и т.п.) ===== */
.fx { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.fx .fx-p { position: absolute; top: 0; animation: fxfall linear infinite; will-change: transform, opacity; }
@keyframes fxfall {
    0%   { transform: translate(0, -12vh) rotate(0deg); opacity: 0; }
    8%   { opacity: 1; }
    50%  { transform: translate(var(--drift, 30px), 50vh) rotate(calc(var(--rot, 360deg) / 2)); }
    92%  { opacity: 1; }
    100% { transform: translate(0, 112vh) rotate(var(--rot, 360deg)); opacity: 1; }
}
.fx-snow .fx-p { background: #bcd3ef; border-radius: 50%; box-shadow: 0 0 5px rgba(150, 185, 230, .6); }
.fx-stars .fx-p { background: #ffcf3f; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.fx-petals .fx-p { background: linear-gradient(180deg, #ffd6e6, #ff9ec5); border-radius: 70% 70% 65% 65% / 80% 80% 40% 40%; }
.fx-leaves .fx-p { background: linear-gradient(180deg, #c4e7ac, #79c14f); border-radius: 0 100% 0 100%; }
.fx-confetti .fx-p, .fx-ru .fx-p { border-radius: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); }
.fx-salute { display: block; width: 100%; height: 100%; }   /* День основания — салют на canvas */

/* ===== Новый год: шапка Санта-Клауса на заголовке ===== */
.santa-anchor { position: relative; }
.santa-hat {
    position: absolute; left: -0.16em; top: 0.04em;
    width: 0.92em; height: 0.26em;
    background: #fdfdfd; border-radius: 0.2em;
    transform: rotate(-16deg); transform-origin: bottom right;
    box-shadow: 0 0 2px rgba(0, 0, 0, .15); pointer-events: none; z-index: 5;
}
.santa-hat::before {                                    /* красный колпак */
    content: ''; position: absolute; left: 0.07em; bottom: 0.1em;
    width: 0.7em; height: 0.8em;
    background: linear-gradient(135deg, #ef3b3b, #c01818);
    border-radius: 0.5em 0.85em 0.15em 0.5em; transform: rotate(-4deg);
}
.santa-hat::after {                                     /* белый помпон */
    content: ''; position: absolute; right: -0.06em; top: -0.28em;
    width: 0.34em; height: 0.34em; border-radius: 50%; background: #fff;
    box-shadow: 0 0 2px rgba(0, 0, 0, .12);
}
