/* ==========================================================================
   КМ ЦОТ — редизайн 2026
   Подключается после styles.less и перекрывает старые глобальные правила.
   ========================================================================== */

:root {
    --km-red: #D7261E;
    --km-red-dark: #B51E17;
    --km-navy: #0F2A5F;
    --km-navy-2: #16377A;
    --km-blue: #1E4FC2;
    --km-ink: #1B2333;
    --km-muted: #5E6878;
    --km-line: #E3E7EF;
    --km-bg: #F3F5F9;
    --km-card: #FFFFFF;
    --km-radius: 16px;
    --km-radius-sm: 10px;
    --km-shadow: 0 1px 2px rgba(15, 42, 95, .06), 0 8px 24px rgba(15, 42, 95, .06);
    --km-shadow-hover: 0 2px 4px rgba(15, 42, 95, .08), 0 16px 40px rgba(15, 42, 95, .12);
    --km-header-h: 100px;
}

/* --- База ---------------------------------------------------------------- */
body {
    font-family: 'Gilroy', 'Montserrat', Arial, sans-serif;
    color: var(--km-ink);
    background: #fff;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
main { flex: 1 0 auto; }

@media (min-width: 1400px) {
    .container { max-width: 1260px; }
}

[data-lucide], .lucide { width: 1.15em; height: 1.15em; flex: none; }

main h1, main h2, main h3 { text-transform: none; }

/* --- Кнопки ---------------------------------------------------------------- */
.btn-km {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .8em 1.4em;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font-weight: 600; font-size: 15px; line-height: 1.2;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn-km:active { transform: translateY(1px); }
.btn-km--primary { background: var(--km-red); color: #fff !important; }
.btn-km--primary:hover { background: var(--km-red-dark); box-shadow: 0 8px 20px rgba(215, 38, 30, .25); }
.btn-km--outline { border-color: var(--km-line); color: var(--km-navy) !important; background: #fff; }
.btn-km--outline:hover { border-color: var(--km-navy); }
.btn-km--light { background: #fff; color: var(--km-navy) !important; }
.btn-km--light:hover { background: #F1F4FA; }
.btn-km--ghost { background: transparent; color: var(--km-muted) !important; }
.btn-km--ghost:hover { color: var(--km-navy) !important; }
.btn-km:focus-visible,
.quick-card:focus-visible,
.service-card:focus-visible,
.program-card:focus-visible { outline: 3px solid rgba(30, 79, 194, .35); outline-offset: 2px; }

/* --- Верхняя строка ---------------------------------------------------- */
.topbar {
    background: var(--km-navy);
    color: rgba(255, 255, 255, .82);
    font-size: 13.5px;
}
.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 40px;
}
.topbar__contacts, .topbar__actions { display: flex; align-items: center; gap: 22px; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; color: inherit !important; white-space: nowrap; }
a.topbar__item:hover { color: #fff !important; }
.topbar__item [data-lucide], .topbar__item .lucide { opacity: .7; }
.topbar__phones a { color: inherit !important; }
.topbar__phones a:hover { color: #fff !important; }
.topbar__note { opacity: .7; }
.main-nav__mobile-contacts small { font-weight: 400; font-size: 13px; color: var(--km-muted, #6b7a90); }
@media (max-width: 991px) {
    .topbar__contacts .topbar__item:first-child { display: none; }
}
@media (max-width: 575px) {
    .topbar__contacts { display: none; }
    .topbar__inner { justify-content: center; }
}

/* --- Шапка ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .2s, border-color .2s;
}
.site-header.is-scrolled { border-color: var(--km-line); box-shadow: 0 6px 20px rgba(15, 42, 95, .06); }
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: var(--km-header-h);
}
.site-header__logo { flex: none; display: block; }
.logo-svg { display: block; height: 76px; width: auto; }

.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav__item { position: relative; }
.main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--km-ink) !important;
    font-weight: 600; font-size: 15px; line-height: 1.2;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
}
.main-nav__link:hover, .has-sub.is-open > .main-nav__link { background: var(--km-bg); }
@media (min-width: 1200px) {
    /* Длинные пункты («Сведения об образовательной организации») переносятся в две строки */
    .main-nav__link { max-width: 265px; white-space: normal; text-align: left; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
    .site-header__inner { gap: 12px; }
    .logo-svg { height: 60px; }
    .main-nav__list { gap: 0; }
    .main-nav__link { max-width: 270px; padding: 10px 9px; font-size: 14.5px; }
}
.main-nav__item.is-active > .main-nav__link { color: var(--km-red) !important; }
.main-nav__link .lucide { transition: transform .2s; width: 16px; height: 16px; }
.has-sub.is-open > .main-nav__link .lucide { transform: rotate(180deg); }
.main-nav__sub {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius);
    box-shadow: var(--km-shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.main-nav__sub--wide { min-width: 380px; max-height: 70vh; overflow: auto; }
.main-nav__sub a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14.5px; color: var(--km-ink) !important; line-height: 1.3; }
.main-nav__sub a:hover, .main-nav__sub .is-active a { background: var(--km-bg); color: var(--km-red) !important; }
.has-sub.is-open > .main-nav__sub { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1200px) {
    .has-sub:hover > .main-nav__sub { opacity: 1; visibility: visible; transform: none; }
}
.main-nav__mobile-contacts { display: none; }

.site-header__aside { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-header__burger { display: none; }

@media (max-width: 1199px) {
    :root { --km-header-h: 80px; }
    .logo-svg { height: 60px; }
    .site-header__burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 0 11px;
        border: 1px solid var(--km-line);
        border-radius: 12px;
        background: #fff;
    }
    .site-header__burger span { display: block; height: 2px; background: var(--km-navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
    .site-header__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-header__burger.is-open span:nth-child(2) { opacity: 0; }
    .site-header__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .main-nav {
        display: block;
        position: fixed;
        inset: calc(var(--km-header-h)) 0 0 0;
        background: #fff;
        padding: 16px 16px 32px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform .25s ease;
        border-top: 1px solid var(--km-line);
    }
    .main-nav.is-open { transform: none; }
    .main-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
    .main-nav__link { width: 100%; justify-content: space-between; padding: 14px 12px; font-size: 17px; border-radius: 12px; }
    .main-nav__sub, .main-nav__sub--wide {
        position: static;
        min-width: 0;
        max-height: none;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 0;
        box-shadow: none;
        padding: 0 0 8px 12px;
    }
    .has-sub.is-open > .main-nav__sub { display: block; }
    .main-nav__mobile-contacts { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; padding: 16px 12px 0; border-top: 1px solid var(--km-line); }
    .main-nav__mobile-contacts a { font-weight: 700; font-size: 18px; color: var(--km-navy) !important; }
}
@media (max-width: 575px) {
    .logo-svg { height: 50px; }
    .site-header__cta { display: none; }
}

/* --- Бегущая строка -------------------------------------------------- */
.ticker { background: var(--km-bg); border-bottom: 1px solid var(--km-line); }
.ticker__inner { display: flex; align-items: center; gap: 16px; min-height: 46px; }
.ticker__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--km-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ticker__viewport {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.ticker__track { display: flex; width: max-content; animation: km-ticker 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; }
.ticker__item {
    position: relative;
    padding: 0 28px;
    font-weight: 600;
    font-size: 15px;
    color: var(--km-navy) !important;
    white-space: nowrap;
}
.ticker__item::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--km-red);
    transform: translateY(-50%);
}
a.ticker__item:hover { text-decoration: underline; text-underline-offset: 3px; }
@keyframes km-ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .ticker__track { animation: none; }
    .ticker__viewport { overflow-x: auto; }
}

/* --- Первый экран ---------------------------------------------------------- */
.hero { padding: 28px 0 8px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; }
.hero__slider { position: relative; border-radius: 22px; overflow: hidden; min-height: 400px; width: 100%; }
.hero__slider .swiper-slide { height: auto; }

.banner {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 400px;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.banner--navy { background: radial-gradient(120% 140% at 100% 0%, #24509F 0%, var(--km-navy) 55%, #0A1E46 100%); }
.banner--red { background: radial-gradient(120% 140% at 100% 0%, #EF4A3C 0%, var(--km-red) 50%, #9E1A14 100%); }
.banner--blue { background: radial-gradient(120% 140% at 100% 0%, #3F73E0 0%, var(--km-blue) 55%, #12327F 100%); }
.banner--photo { background: var(--km-navy) var(--banner-image) center / cover no-repeat; }
.banner--photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(10, 24, 56, .9) 0%, rgba(10, 24, 56, .65) 55%, rgba(10, 24, 56, .2) 100%);
}
/* Декоративная сетка, чтобы шаблонный баннер не выглядел пустым */
.banner:not(.banner--photo)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.banner__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    max-width: 600px;
    padding: 48px 48px 72px;
}
.banner__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.banner__badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.banner__date { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; opacity: .9; }
.banner .banner__title {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 800;
    line-height: 1.12;
    text-transform: none;
    text-align: left;
}
.banner__text { margin: 0; font-size: 17px; line-height: 1.5; opacity: .88; max-width: 520px; }
.banner .btn-km { margin-top: 8px; }
.banner__art {
    position: absolute;
    right: -40px;
    bottom: -40px;
    display: grid;
    place-items: center;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .04), 0 0 0 80px rgba(255, 255, 255, .025);
}
.banner__art .lucide { width: 150px; height: 150px; stroke-width: 1.2; color: rgba(255, 255, 255, .85); }

.hero__controls {
    position: absolute;
    left: 48px;
    bottom: 22px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero__arrow {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.hero__arrow:hover { background: rgba(255, 255, 255, .15); }
.hero__pagination { position: static !important; display: flex; gap: 6px; width: auto !important; }
.hero__pagination .swiper-pagination-bullet { width: 8px; height: 8px; margin: 0 !important; background: #fff; opacity: .4; transition: width .2s, opacity .2s; }
.hero__pagination .swiper-pagination-bullet-active { width: 24px; border-radius: 4px; opacity: 1; }

.hero__actions { display: grid; grid-template-rows: repeat(4, 1fr); gap: 12px; }
.quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius);
    background: #fff;
    color: var(--km-ink) !important;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.quick-card:hover { border-color: transparent; box-shadow: var(--km-shadow-hover); transform: translateY(-2px); }
.quick-card__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--km-bg);
    color: var(--km-navy);
}
.quick-card__icon .lucide { width: 24px; height: 24px; }
.quick-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-card__text strong { font-size: 16px; font-weight: 700; line-height: 1.25; }
.quick-card__text small { font-size: 13.5px; color: var(--km-muted); }
.quick-card__arrow { margin-left: auto; color: #A9B1C0; transition: color .2s, transform .2s; }
.quick-card:hover .quick-card__arrow { color: var(--km-red); transform: translate(2px, -2px); }
.quick-card--accent { background: var(--km-red); border-color: var(--km-red); color: #fff !important; }
.quick-card--accent .quick-card__icon { background: rgba(255, 255, 255, .16); color: #fff; }
.quick-card--accent .quick-card__text small, .quick-card--accent .quick-card__arrow { color: rgba(255, 255, 255, .8); }
.quick-card--accent:hover .quick-card__arrow { color: #fff; }

@media (max-width: 1199px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__actions { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; }
}
@media (max-width: 767px) {
    .hero { padding-top: 16px; }
    .hero__slider, .banner { min-height: 440px; border-radius: 18px; }
    .banner__body { padding: 28px 22px 76px; }
    .banner__art { width: 200px; height: 200px; right: -50px; bottom: auto; top: -50px; }
    .banner__art .lucide { width: 90px; height: 90px; }
    .hero__controls { left: 22px; }
    .hero__actions { grid-template-columns: 1fr; }
}

/* --- Секции ------------------------------------------------------------------- */
.section { padding: 64px 0; }
.section--tinted { background: var(--km-bg); }
.section--page { padding-top: 24px; }
.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.section__eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--km-red);
}
.section .section__title, .contacts-card .section__title {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--km-navy);
    text-transform: none;
    text-align: left;
}
@media (max-width: 767px) {
    .section { padding: 44px 0; }
}

/* --- Услуги ------------------------------------------------------------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 26px;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius);
    background: #fff;
    color: var(--km-ink) !important;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.service-card:hover { border-color: transparent; box-shadow: var(--km-shadow-hover); transform: translateY(-3px); }
.service-card__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
    border-radius: 16px;
    background: linear-gradient(135deg, #EEF2FB, #E1E8F7);
    color: var(--km-blue);
    transition: background .2s, color .2s;
}
.service-card__icon .lucide { width: 28px; height: 28px; }
.service-card:hover .service-card__icon { background: var(--km-navy); color: #fff; }
.service-card__title { font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--km-navy); }
.service-card__text { font-size: 15px; line-height: 1.5; color: var(--km-muted); }
.service-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font-size: 14.5px; font-weight: 700; color: var(--km-red); }
.service-card__more .lucide { transition: transform .2s; }
.service-card:hover .service-card__more .lucide { transform: translateX(3px); }
@media (max-width: 991px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .services-grid { grid-template-columns: 1fr; } .service-card { padding: 20px; } }

/* --- Программы ------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
    padding: 9px 16px;
    border: 1px solid var(--km-line);
    border-radius: 999px;
    background: #fff;
    color: var(--km-ink);
    font-weight: 600; font-size: 14.5px; line-height: 1.2;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--km-navy); }
.chip.is-active { background: var(--km-navy); border-color: var(--km-navy); color: #fff; }

.programs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.program-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius);
    background: #fff;
    color: var(--km-ink) !important;
    transition: box-shadow .2s, border-color .2s;
}
.program-card[hidden], .program-item[hidden] { display: none; }
.program-card:hover { border-color: transparent; box-shadow: var(--km-shadow-hover); }
.program-card__code {
    display: grid;
    place-items: center;
    flex: none;
    min-width: 52px;
    height: 52px;
    padding: 0 8px;
    border-radius: 14px;
    background: var(--km-navy);
    color: #fff;
    font-weight: 800;
    font-size: 17px;
}
.program-card[data-group="aid"] .program-card__code, .program-item[data-group="aid"] .program-card__code { background: #0E8A6A; }
.program-card[data-group="fire"] .program-card__code, .program-item[data-group="fire"] .program-card__code { background: var(--km-red); }
.program-card[data-group="prom"] .program-card__code, .program-item[data-group="prom"] .program-card__code { background: #C77700; }
.program-card[data-group="other"] .program-card__code, .program-item[data-group="other"] .program-card__code { background: var(--km-blue); }
.program-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.program-card__title {
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.program-card__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: var(--km-muted); }
.program-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.program-card__arrow { margin-left: auto; color: #A9B1C0; }
.program-card:hover .program-card__arrow { color: var(--km-red); }
@media (max-width: 991px) { .programs-grid { grid-template-columns: 1fr; } }
/* На главной в режиме «Все» показываем первые 8 программ, остальные — на странице программ */
.programs-grid[data-active="all"] .program-card.is-extra { display: none; }
.programs-more { display: flex; justify-content: center; margin-top: 18px; }
.programs-grid:not([data-active="all"]) + .programs-more { display: none; }

.cta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding: 22px 26px;
    border-radius: var(--km-radius);
    background: var(--km-navy);
    color: #fff;
}
.cta-strip__text { display: flex; align-items: center; gap: 16px; }
.cta-strip__text > .lucide { width: 36px; height: 36px; color: #7FA2F0; }
.cta-strip__text div { display: flex; flex-direction: column; gap: 2px; }
.cta-strip__text strong { font-size: 18px; }
.cta-strip__text span { opacity: .8; font-size: 15px; }

/* Страница программ */
.program-list { display: flex; flex-direction: column; gap: 14px; }
.program-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius);
    background: #fff;
    scroll-margin-top: calc(var(--km-header-h) + 20px);
}
.program-item:target { border-color: var(--km-red); box-shadow: 0 0 0 3px rgba(215, 38, 30, .12); }
.program-item__group { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--km-muted); }
.section .program-item__title { margin: 4px 0 14px; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--km-navy); text-transform: none; text-align: left; }
.program-item__facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; }
.program-item__facts dt { font-size: 13px; font-weight: 500; color: var(--km-muted); }
.program-item__facts dd { margin: 0; font-weight: 700; }
.program-item__text { margin-top: 14px; color: var(--km-muted); line-height: 1.55; }
@media (max-width: 575px) { .program-item { flex-direction: column; gap: 12px; padding: 18px; } }

/* --- Документы ------------------------------------------------------- */
.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius);
    color: var(--km-ink) !important;
    transition: box-shadow .2s, border-color .2s;
}
.doc-card:hover { border-color: transparent; box-shadow: var(--km-shadow-hover); }
.doc-card__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: #FDECEB; color: var(--km-red); }
.doc-card__body { display: flex; flex-direction: column; gap: 2px; }
.doc-card__body strong { font-size: 15.5px; line-height: 1.3; }
.doc-card__body small { color: var(--km-muted); font-size: 13px; }
.doc-card__dl { margin-left: auto; color: #A9B1C0; }
.doc-card:hover .doc-card__dl { color: var(--km-red); }
@media (max-width: 991px) { .docs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .docs-grid { grid-template-columns: 1fr; } }

/* --- Госорганы ------------------------------------------------------------- */
.gov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gov-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 96px;
    padding: 16px 20px;
    border-radius: var(--km-radius);
    background: #fff;
    color: var(--km-ink) !important;
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.35;
    text-transform: uppercase;
    transition: box-shadow .2s;
}
.gov-card:hover { box-shadow: var(--km-shadow-hover); }
.gov-card img { width: 52px; height: auto; flex: none; }
.gov-card--logo { justify-content: center; }
.gov-card--logo img { width: auto; max-width: 100%; max-height: 64px; }

/* --- Контакты --------------------------------------------------------------- */
.contacts-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    overflow: hidden;
    border: 1px solid var(--km-line);
    border-radius: 22px;
}
.contacts-card__info { padding: 40px; }
.contacts-list { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 18px; }
.contacts-list li { display: flex; gap: 14px; align-items: flex-start; font-weight: 600; font-size: 16.5px; line-height: 1.4; }
.contacts-list li > .lucide { flex: none; width: 22px; height: 22px; margin-top: 18px; color: var(--km-red); }
.contacts-list small { display: block; font-weight: 500; font-size: 13px; color: var(--km-muted); margin-bottom: 2px; }
.contacts-list a { color: var(--km-navy) !important; }
.contacts-card__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.contacts-card__map { min-height: 420px; background: var(--km-bg); }
.contacts-card__map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
@media (max-width: 991px) {
    .contacts-card { grid-template-columns: 1fr; }
    .contacts-card__info { padding: 28px 22px; }
    .contacts-card__map, .contacts-card__map iframe { min-height: 320px; }
}

/* --- Подвал ---------------------------------------------------------------- */
.site-footer { margin-top: auto; padding: 56px 0 28px; background: var(--km-navy); color: rgba(255, 255, 255, .75); font-size: 15px; }
.site-footer a { color: rgba(255, 255, 255, .85) !important; }
.site-footer a:hover { color: #fff !important; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 32px; }
.site-footer__logo .logo-svg { height: 52px; margin-bottom: 18px; }
.site-footer__about p { max-width: 360px; line-height: 1.55; font-size: 14px; }
.site-footer h4 { margin-bottom: 14px; color: #fff; font-size: 16px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer__contacts li { display: flex; gap: 10px; align-items: flex-start; }
.site-footer__contacts .lucide { margin-top: 2px; opacity: .6; }
.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 13.5px;
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.site-footer__studio { display: inline-flex; align-items: center; gap: 10px; }
@media (max-width: 991px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* --- Модальные окна и формы ------------------------------------------- */
.km-modal .modal-content { border: 0; border-radius: 22px; overflow: hidden; }
.km-modal .modal-header { align-items: flex-start; padding: 24px 28px 18px; border-bottom: 1px solid var(--km-line); }
.km-modal .modal-title { font-size: 22px; font-weight: 800; color: var(--km-navy); }
.km-modal .modal-body { padding: 24px 28px 28px; }
@media (max-width: 575px) {
    .km-modal .modal-header, .km-modal .modal-body { padding-left: 18px; padding-right: 18px; }
}

/* Квиз «Заявка на услуги» */
.km-quiz__head { flex: 1; min-width: 0; }
.km-quiz__progress { height: 4px; margin: 14px 0 10px; border-radius: 4px; background: var(--km-bg); overflow: hidden; }
.km-quiz__progress span { display: block; width: 25%; height: 100%; background: var(--km-red); border-radius: inherit; transition: width .35s ease; }
.km-quiz__steps { display: flex; gap: 4px 18px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--km-muted); }
.km-quiz__steps li { display: flex; align-items: center; gap: 7px; }
.km-quiz__steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--km-bg); font-size: 12px; transition: background .2s, color .2s; }
.km-quiz__steps li.is-active { color: var(--km-navy); }
.km-quiz__steps li.is-active span { background: var(--km-red); color: #fff; }
.km-quiz__steps li.is-done { cursor: pointer; }
.km-quiz__steps li.is-done:hover { color: var(--km-navy); }
.km-quiz__steps li.is-done span { background: var(--km-navy); color: #fff; }
.km-quiz__steps li.is-skipped { opacity: .45; }
@media (max-width: 575px) {
    .km-quiz__steps li:not(.is-active) { font-size: 0; gap: 0; }
}

.km-quiz__q { float: none; width: auto; margin: 0 0 4px; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--km-navy); }
.km-quiz__sub { margin-bottom: 16px; }
.km-step > .km-quiz__q:not(:has(+ .km-quiz__sub)) { margin-bottom: 16px; }
.km-quiz__error { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--km-red); }

.km-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 767px) { .km-tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .km-tiles { grid-template-columns: 1fr; } }
.km-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1.5px solid var(--km-line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}
.km-tile:hover { border-color: #C9D1DF; box-shadow: var(--km-shadow); transform: translateY(-1px); }
.km-tile input { position: absolute; opacity: 0; pointer-events: none; }
.km-tile__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; border-radius: 12px; background: var(--km-bg); color: var(--km-blue); transition: background .2s, color .2s; }
.km-tile__title { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--km-navy); }
.km-tile__text { font-size: 13px; line-height: 1.4; color: var(--km-muted); }
.km-tile__check { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--km-line); border-radius: 50%; color: transparent; transition: all .2s; }
.km-tile__check .lucide { width: 14px; height: 14px; stroke-width: 3; }
.km-tile:has(input:checked) { border-color: var(--km-red); background: #FFF6F5; }
.km-tile:has(input:checked) .km-tile__icon { background: var(--km-red); color: #fff; }
.km-tile:has(input:checked) .km-tile__check { background: var(--km-red); border-color: var(--km-red); color: #fff; }
.km-tile:has(input:focus-visible) { outline: 3px solid rgba(30, 79, 194, .35); outline-offset: 1px; }
@media (max-width: 420px) {
    .km-tile { display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; padding: 12px 44px 12px 12px; }
    .km-tile__icon { grid-row: span 2; margin: 0; }
    .km-tile__check { top: 50%; transform: translateY(-50%); }
}

.km-block + .km-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--km-line); }
.km-block .km-group-title { display: flex; align-items: center; gap: 8px; }
.km-block .km-group-title .lucide { width: 18px; height: 18px; color: var(--km-red); }
.km-block .km-options--stack { margin: 0 0 16px; }
.km-field--short { max-width: 320px; margin-top: 16px; }
.km-field label small { font-weight: 400; color: var(--km-muted); }
.km-program__name small { color: var(--km-muted); white-space: nowrap; }

/* Аккордеоны */
.km-acc { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.km-acc__item { border: 1.5px solid var(--km-line); border-radius: 14px; background: #fff; }
.km-acc__item[hidden] { display: none; }
.km-acc__item > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 15px;
    color: var(--km-navy);
    cursor: pointer;
    list-style: none;
}
.km-acc__item > summary::-webkit-details-marker { display: none; }
.km-acc__item > summary small { font-weight: 500; font-size: 13px; color: var(--km-muted); }
.km-acc__item > summary .lucide { margin-left: auto; flex: none; width: 18px; height: 18px; color: var(--km-muted); transition: transform .2s; }
.km-acc__item[open] > summary .lucide { transform: rotate(180deg); }
.km-acc__item > :not(summary) { padding: 0 16px 16px; }
.km-acc__item .km-programs { margin-top: 0; }
.km-acc__badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--km-red); color: #fff; font-size: 12px; }
.km-acc__item--form { margin-top: 12px; }
.km-acc__item--form > .km-grid, .km-acc__item--form > .km-field { padding-top: 2px; }
.km-acc__item--form .km-hint { margin-bottom: 12px; }
@media (max-width: 575px) { .km-acc__item > summary { flex-wrap: wrap; } .km-acc__item > summary small { order: 3; width: 100%; } }

/* Карточка организации */
.km-org { display: flex; align-items: center; gap: 14px; margin-top: -8px; padding: 14px 16px; border-radius: 14px; background: #F2F8F4; border: 1.5px solid #CFE6D7; }
.km-org[hidden] { display: none; }
.km-org__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: #fff; color: #2E8B57; }
.km-org strong { display: block; font-size: 15px; color: var(--km-navy); }
.km-org small { display: block; font-size: 13px; color: var(--km-muted); }

/* Сводка перед отправкой */
.km-summary { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--km-bg); }
.km-summary__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.km-summary__head strong { color: var(--km-navy); }
.km-summary__head button, .km-draft button { padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--km-blue); text-decoration: underline; }
.km-summary__list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.km-summary__org { margin: 8px 0 0; font-size: 13.5px; color: var(--km-muted); }
.km-summary__org:empty { display: none; }

/* Черновик */
.km-draft { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding: 10px 14px; border-radius: 12px; background: #EEF3FD; font-size: 14px; color: var(--km-navy); }
.km-draft[hidden] { display: none; }
.km-draft .lucide { width: 18px; height: 18px; color: var(--km-blue); }
.km-draft button { margin-left: auto; }

.km-form { font-size: 15px; }
.km-step { display: none; border: 0; margin: 0; padding: 0; min-width: 0; }
.km-step.is-active { display: block; animation: km-fade .25s ease; }
@keyframes km-fade { from { opacity: 0; transform: translateY(6px); } }

.km-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.km-col-2 { grid-column: span 2; }
@media (max-width: 575px) { .km-grid { grid-template-columns: 1fr; } .km-col-2 { grid-column: auto; } }
.km-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.km-form > .km-field, .km-step > .km-field { margin-bottom: 16px; }
.km-field label { font-weight: 600; font-size: 14px; color: var(--km-ink); }
.km-field label em { color: var(--km-red); font-style: normal; }
.km-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--km-line);
    border-radius: var(--km-radius-sm);
    background: #fff;
    font-weight: 500; font-size: 15px; line-height: 1.4;
    font-family: inherit;
    color: var(--km-ink);
    transition: border-color .2s, box-shadow .2s, background .3s;
}
.km-input:focus { outline: 0; border-color: var(--km-blue); box-shadow: 0 0 0 3px rgba(30, 79, 194, .12); }
.km-input.is-invalid { border-color: var(--km-red); box-shadow: 0 0 0 3px rgba(215, 38, 30, .1); }
.km-input.is-filled { background: #F2F8F4; }
.km-input[readonly] { background: var(--km-bg); color: var(--km-muted); }
textarea.km-input { resize: vertical; }
.km-hint { margin: 0; font-size: 13.5px; color: var(--km-muted); line-height: 1.45; }
.km-hint a { color: var(--km-blue) !important; text-decoration: underline; }

.km-field--inn { margin-bottom: 20px; padding: 18px; border-radius: var(--km-radius); background: var(--km-bg); }
.km-suggest { position: relative; }
.km-suggest > .lucide { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--km-muted); pointer-events: none; }
.km-suggest .km-input { padding-left: 42px; font-size: 17px; font-weight: 600; }
.km-suggest__list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--km-line);
    border-radius: 12px;
    box-shadow: var(--km-shadow-hover);
    max-height: 320px;
    overflow: auto;
}
.km-suggest__list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.km-suggest__list li:hover, .km-suggest__list li.is-active { background: var(--km-bg); }
.km-suggest__list strong { display: block; font-size: 15px; }
.km-suggest__list em { display: inline-block; margin-top: 2px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--km-red); }
.km-suggest__list small { display: block; font-size: 13px; color: var(--km-muted); }

.km-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500 !important; cursor: pointer; }
.km-check input { width: 18px; height: 18px; accent-color: var(--km-navy); }

.km-group-title { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: var(--km-navy); }
.km-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 4px; }
.km-group-head .km-group-title { margin: 0; }
.km-search { position: relative; flex: 0 1 260px; }
.km-search .lucide { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--km-muted); }
.km-search .km-input { padding: 8px 12px 8px 36px; font-size: 14px; }

.km-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.km-options--stack { grid-template-columns: 1fr; margin: 18px 0; }
@media (max-width: 575px) { .km-options { grid-template-columns: 1fr; } }
.km-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--km-line);
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.km-option input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--km-red); }
.km-option:hover { border-color: #C9D1DF; }
.km-option.is-checked, .km-option:has(input:checked) { border-color: var(--km-red); background: #FFF6F5; }

.km-programs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.km-program {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1.5px solid var(--km-line);
    border-radius: 12px;
    transition: border-color .2s, background .2s;
}
.km-program[hidden] { display: none; }
.km-program.is-checked, .km-program:has(input:checked) { border-color: var(--km-red); background: #FFF6F5; }
.km-program__name { flex: 1; font-size: 14px; line-height: 1.4; }
.km-program__name b { color: var(--km-navy); margin-right: 4px; }
.km-program__formats { display: flex; gap: 6px; flex: none; }
.km-toggle { position: relative; cursor: pointer; }
.km-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.km-toggle span {
    display: inline-block;
    padding: 7px 12px;
    border: 1.5px solid var(--km-line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--km-muted);
    transition: all .2s;
}
.km-toggle:hover span { border-color: var(--km-navy); color: var(--km-navy); }
.km-toggle input:checked + span { background: var(--km-red); border-color: var(--km-red); color: #fff; }
.km-toggle input:focus-visible + span { outline: 3px solid rgba(30, 79, 194, .35); outline-offset: 1px; }
@media (max-width: 575px) {
    .km-program { flex-direction: column; align-items: stretch; }
}

.km-form__nav {
    position: sticky;
    bottom: -28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 24px -28px -28px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--km-line);
}
.km-form__count { margin-right: auto; font-size: 14px; color: var(--km-muted); }
.km-form__count b { color: var(--km-red); }
@media (max-width: 575px) { .km-form__nav { margin: 20px -18px -28px; padding: 14px 18px; } }

.km-form .form-consent { margin: 18px 0 0; }
.km-form .form-consent__label { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--km-muted); }
.km-form .form-consent__input { width: 18px; height: 18px; flex: none; accent-color: var(--km-navy); }
.km-form .form-consent a { color: var(--km-blue) !important; text-decoration: underline; }

/* Загрузчик Martin.Forms */
.km-form .responsiv-uploader-fileupload {
    height: auto !important;
    padding: 18px;
    border: 1.5px dashed #C9D1DF;
    border-radius: 12px;
    background: var(--km-bg);
}
.km-form .responsiv-uploader-fileupload .upload-button {
    width: auto !important;
    padding: 8px 16px;
    border: 1.5px solid var(--km-line);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* Оценка качества */
.km-rating-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 18px 0 10px; font-size: 13.5px; color: var(--km-muted); }
.km-rating { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.km-rating__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--km-line); border-radius: 12px; }
.km-rating__name { font-weight: 600; font-size: 14.5px; }
.km-rating__scales { display: flex; gap: 18px; flex-wrap: wrap; }
.km-scale { display: flex; align-items: center; gap: 4px; }
.km-scale small { margin-right: 4px; color: var(--km-muted); font-size: 12.5px; }
.km-scale label { cursor: pointer; }
.km-scale input { position: absolute; opacity: 0; }
.km-scale span { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--km-line); border-radius: 8px; font-weight: 700; font-size: 13.5px; }
.km-scale input:checked + span { background: var(--km-navy); border-color: var(--km-navy); color: #fff; }
.km-scale input:focus-visible + span { outline: 3px solid rgba(30, 79, 194, .35); }
@media (max-width: 767px) { .km-rating__row { flex-direction: column; align-items: flex-start; } }

/* ==========================================================================
   Внутренние страницы
   ========================================================================== */

/* --- Шапка страницы ------------------------------------------------------- */
.page-hero { padding: 22px 0 34px; background: var(--km-bg); border-bottom: 1px solid var(--km-line); }
.page-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-top: 22px; }
.page-hero__text { flex: 1 1 520px; min-width: 0; }
main .page-hero__title {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--km-navy);
    text-transform: none;
    text-align: left;
}
.page-hero__lead { max-width: 760px; margin: 14px 0 0; font-size: 17px; line-height: 1.55; color: var(--km-muted); }
.page-hero__actions { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; }
.page-hero__phone { display: inline-flex; align-items: center; gap: 12px; color: var(--km-navy) !important; }
.page-hero__phone .lucide { width: 42px; height: 42px; padding: 11px; border-radius: 50%; background: #fff; color: var(--km-red); }
.page-hero__phone span { display: flex; flex-direction: column; line-height: 1.25; }
.page-hero__phone b { font-size: 18px; }
.page-hero__phone small { font-size: 13px; color: var(--km-muted); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--km-muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: ''; width: 6px; height: 6px; margin: 0 10px; border-top: 1.5px solid #A9B2C2; border-right: 1.5px solid #A9B2C2; transform: rotate(45deg); }
.crumbs a { color: var(--km-muted) !important; }
.crumbs a:hover { color: var(--km-red) !important; }
.crumbs [aria-current] { color: var(--km-ink); }
@media (max-width: 575px) {
    .page-hero { padding: 16px 0 26px; }
    .crumbs ol { font-size: 13px; }
}

/* --- Сетка с боковым меню ------------------------------------------------- */
.page-body { padding: 40px 0 72px; }
.page-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.page-grid--wide { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 991px) {
    .page-grid, .page-grid--wide { grid-template-columns: 1fr; gap: 20px; }
    .page-body { padding: 24px 0 56px; }
}

.page-nav { position: sticky; top: calc(var(--km-header-h) + 16px); }
.page-nav__box { border: 1px solid var(--km-line); border-radius: var(--km-radius); background: #fff; }
.page-nav__box > summary {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px;
    font-weight: 700; color: var(--km-navy);
    list-style: none; cursor: pointer;
}
.page-nav__box > summary::-webkit-details-marker { display: none; }
.page-nav__box > summary .lucide:last-child { margin-left: auto; color: var(--km-muted); transition: transform .2s; }
.page-nav__box[open] > summary .lucide:last-child { transform: rotate(180deg); }
.page-nav__box ul { margin: 0; padding: 0; list-style: none; }
.page-nav__box > ul { padding: 0 8px 10px; }
.page-nav__box li a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px; line-height: 1.35;
    color: var(--km-ink) !important;
}
.page-nav__box li a:hover { background: var(--km-bg); }
.page-nav__box li.is-active > a { background: #FFF1F0; color: var(--km-red) !important; font-weight: 600; }
/* Вложенные пункты раскрыты только у текущего раздела */
.page-nav__box li:not(.is-open):not(.is-active) > ul { display: none; }
.page-nav__box li ul { margin: 2px 0 4px 12px; padding-left: 8px; border-left: 2px solid var(--km-line); }
.page-nav__box li ul a { font-size: 13.5px; padding: 6px 10px; color: var(--km-muted) !important; }
@media (min-width: 992px) {
    .page-nav__box > summary { pointer-events: none; }
    .page-nav__box > summary .lucide:last-child { display: none; }
    .page-nav__box { max-height: calc(100vh - var(--km-header-h) - 40px); overflow: auto; }
}
@media (max-width: 991px) { .page-nav { position: static; } }

/* --- Контент из редактора ------------------------------------------------- */
.page-content {
    padding: 32px 36px;
    border: 1px solid var(--km-line);
    border-radius: var(--km-radius);
    background: #fff;
    font-size: 16px;
    line-height: 1.6;
    color: var(--km-ink);
    overflow-wrap: anywhere;
}
.page-content:empty { display: none; }
@media (max-width: 575px) { .page-content { padding: 20px 18px; font-size: 15px; } }
.page-content > :first-child, .page-content .content-wrap > :first-child { margin-top: 0; }
main .page-content h2, main .page-content h3 {
    margin: 28px 0 12px;
    font-size: 21px; font-weight: 800; line-height: 1.3;
    color: var(--km-navy);
    text-transform: none;
    text-align: left;
}
main .page-content h3 { font-size: 18px; }
.page-content p { margin: 0 0 12px; }
.page-content ul, .page-content ol { margin: 0 0 14px; padding-left: 22px; }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--km-blue) !important; }
.page-content a:hover { color: var(--km-red) !important; }
.page-content img { max-width: 100%; height: auto; border-radius: 12px; }
.page-content hr { margin: 24px 0; border: 0; border-top: 1px solid var(--km-line); opacity: 1; }
.page-content article + article { margin-top: 8px; }

/* Ссылки на документы — отдельной строкой с иконкой */
.page-content p > a[href*="/storage/app/media/"]:only-child,
.page-content p > a.fr-file:only-child,
.page-content .links-list__item a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 12px 18px 12px 64px;
    border: 1px solid var(--km-line);
    border-radius: 12px;
    background: #fff !important;
    font-weight: 600; font-size: 15px; line-height: 1.4;
    color: var(--km-navy) !important;
    text-decoration: none !important;
    transition: border-color .2s, box-shadow .2s;
}
.page-content p > a[href*="/storage/app/media/"]:only-child::before,
.page-content p > a.fr-file:only-child::before,
.page-content .links-list__item a::before {
    content: '';
    position: absolute;
    left: 16px; top: 50%;
    width: 34px; height: 34px;
    margin-top: -17px;
    border-radius: 9px;
    background: #FFF1F0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D7261E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 13h4M10 17h4M8 9h2'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.page-content p > a[href*="/storage/app/media/"]:only-child:hover,
.page-content p > a.fr-file:only-child:hover,
.page-content .links-list__item a:hover { border-color: transparent; box-shadow: var(--km-shadow-hover); color: var(--km-red) !important; }
.page-content p > a[href$=".zip"]:only-child::before { background-color: var(--km-bg); filter: hue-rotate(200deg) saturate(.6); }
.page-content p:has(> a[href*="/storage/app/media/"]:only-child),
.page-content p:has(> a.fr-file:only-child) { margin-bottom: 8px; }
.page-content a strong { font-weight: inherit; }
.page-content .links-list { margin: 0; padding: 0; list-style: none; }

/* Таблицы */
.page-content table {
    width: 100% !important;
    margin: 0 0 20px;
    border: 1px solid var(--km-line) !important;
    border-radius: 14px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.5;
}
.page-content table th, .page-content table td {
    padding: 13px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--km-line) !important;
    background: #fff;
    text-align: left !important;
    vertical-align: top;
}
.page-content table tr:last-child > td { border-bottom: 0 !important; }
.page-content table th { background: var(--km-bg) !important; font-size: 13.5px; font-weight: 700; color: var(--km-navy); }
.page-content table tr:nth-child(odd) { background: none; }
.page-content table p:last-child, .page-content table ul:last-child { margin-bottom: 0; }
.page-content table.colored-double td:first-child {
    width: 36% !important;
    background: var(--km-bg) !important;
    font-weight: 600;
    color: var(--km-navy);
}
.page-content table.colored-double td + td { width: auto !important; }
@media (max-width: 767px) {
    .page-content table.colored-double, .page-content table.colored-double tbody,
    .page-content table.colored-double tr, .page-content table.colored-double td,
    .page-content table.colored-double td:first-child { display: block; width: 100% !important; }
    .page-content table.colored-double tr { margin: 0; border-bottom: 1px solid var(--km-line); }
    .page-content table.colored-double td { border-bottom: 0 !important; font-size: 15px; }
    .page-content table.colored-double td:first-child { padding-bottom: 6px !important; font-size: 13.5px; }
    .page-content table:not(.colored-double):not(.cards_table) { display: block; overflow-x: auto; }
}

.page-content table th { text-transform: none; letter-spacing: 0; }
.page-content table span { font-size: inherit !important; }
.table-scroll { margin: 0 0 20px; overflow-x: auto; border-radius: 14px; }
.table-scroll > table { margin-bottom: 0; }
.page-content div[style*="overflow-x"] { overflow: visible !important; }
.page-content table.is-wide { min-width: 1400px; table-layout: auto !important; }
.page-content table.is-wide th, .page-content table.is-wide td {
    width: auto !important;
    min-width: 120px !important;
    font-size: 14px !important;
    line-height: 1.45;
}
.page-content table.is-wide td *, .page-content table.is-wide th * { font-size: inherit !important; }
.page-content table.is-wide td:first-child { min-width: 150px; font-weight: 600; color: var(--km-navy); }

/* Страница с широкой таблицей: контент на всю ширину, меню раздела — плашкой сверху */
.page-grid.has-wide-table { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.page-grid.has-wide-table .page-nav { position: static; }
.page-grid.has-wide-table .page-nav__box { max-height: none; }
.page-grid.has-wide-table .page-nav__box > summary { pointer-events: auto; }
.page-grid.has-wide-table .page-nav__box > summary .lucide:last-child { display: block; }

/* Таблица сотрудников (сниппет) — на мобильном превращается в карточки */
@media (max-width: 991px) {
    .page-content table.cards_table, .page-content table.cards_table tbody,
    .page-content table.cards_table tr, .page-content table.cards_table td { display: block; width: 100% !important; }
    .page-content table.cards_table thead { display: none; }
    .page-content table.cards_table { border: 0 !important; overflow: visible; }
    .page-content table.cards_table tr { margin-bottom: 12px; border: 1px solid var(--km-line); border-radius: 12px; overflow: hidden; }
    .page-content table.cards_table td { padding: 8px 16px !important; }
    .page-content table.cards_table td::before {
        content: attr(data-label);
        display: block; float: none !important;
        width: auto !important; max-width: none !important;
        margin: 0 0 2px; padding: 0 !important;
        background: none !important; border: 0 !important;
        font-size: 12.5px !important; font-weight: 700; text-transform: none !important;
        color: var(--km-muted);
    }
    .page-content table.cards_table.is-wide { min-width: 0; }
    .page-content table.cards_table.is-wide td { min-width: 0 !important; }
}

/* Списки из старой вёрстки */
.page-content .marked_list { padding: 0; list-style: none; }
.page-content .marked_list > li { position: relative; margin: 0 0 10px; padding-left: 22px; }
.page-content .marked_list > li::before {
    content: ''; position: absolute; left: 2px; top: .62em;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--km-red); border: 0;
}
.page-content .marked_list p { margin: 0; }
.page-content .marked_list strong { color: var(--km-navy); }
.page-content .lettered-list { padding-left: 22px; list-style: lower-alpha; }

/* Абзац-подпись «Формы обучения:» — как подзаголовок */
.page-content p.para-label { margin: 26px 0 8px; font-size: 17px; font-weight: 700; color: var(--km-navy); }
.page-content p.para-label:first-child { margin-top: 0; }

/* ---- Таблицы «Сведений» в удобном виде (собираются в main.js из таблиц админки) ---- */
.page-content table[hidden] { display: none !important; }

/* Факты «название — значение» */
.facts { margin: 0 0 24px; }
.facts__title { margin: 28px 0 12px; font-size: 18px; line-height: 1.35; color: var(--km-navy); }
.facts__title:first-child { margin-top: 0; }
.facts__list { margin: 0 0 16px; border: 1px solid var(--km-line); border-radius: 14px; overflow: hidden; background: #fff; }
.facts__row, .facts__head { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr); gap: 24px; padding: 14px 20px; border-top: 1px solid var(--km-line); }
.facts__list > :first-child { border-top: 0; }
.facts__row dt { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--km-muted); }
.facts__row dd { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--km-ink); }
.facts__row dd p { margin: 0 0 8px; }
.facts__row dd > :last-child { margin-bottom: 0; }
.facts__row dd ol, .facts__row dd ul { margin: 6px 0 0; padding-left: 20px; }
.facts__row.is-empty dd { color: var(--km-muted); }
.facts__head { padding-top: 10px; padding-bottom: 10px; background: var(--km-bg); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--km-muted); }
.facts__list--numbers .facts__row { align-items: center; }
.facts__list--numbers .facts__row dt { font-size: 15px; font-weight: 500; color: var(--km-navy); }
.facts__row.is-number dd { font-size: 20px; font-weight: 700; color: var(--km-navy); }
.facts__row.is-number.is-empty dd { font-size: 16px; font-weight: 500; color: #b4bccb; }
.facts__bullets { list-style: none; padding: 0 !important; margin: 0 !important; }
.facts__bullets li { position: relative; margin: 0 0 6px; padding-left: 18px; }
.facts__bullets li::before { content: ''; position: absolute; left: 2px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--km-red); }
.facts__extra { margin: 0 0 16px; }
@media (max-width: 767px) {
    .facts__row { grid-template-columns: 1fr; gap: 4px; padding: 13px 16px; }
    .facts__row dt { font-size: 13px; }
    .facts__head { grid-template-columns: 1fr auto; padding: 10px 16px; }
    .facts__list--numbers .facts__row { grid-template-columns: 1fr auto; gap: 16px; }
}

/* Программы: общие характеристики + нумерованный список */
.program-info { margin: 0 0 24px; }
.program-info__common { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin: 0 0 14px; padding: 16px 20px; border-radius: 14px; background: var(--km-bg); }
.program-info__caption { margin: 0 !important; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--km-red); }
.program-props { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.program-props > div { display: flex; flex-direction: column; }
.program-props dt { margin: 0; font-size: 12.5px; font-weight: 500; color: var(--km-muted); }
.program-props dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--km-navy); }
.page-content .program-list { margin: 0; padding: 0; list-style: none; counter-reset: prog; border: 1px solid var(--km-line); border-radius: 14px; overflow: hidden; }
.page-content .program-list > li { margin: 0; position: relative; counter-increment: prog; padding: 16px 20px 16px 68px; border-top: 1px solid var(--km-line); background: #fff; }
.program-list > li:first-child { border-top: 0; }
.program-list > li::before {
    content: counter(prog, decimal-leading-zero);
    position: absolute; left: 20px; top: 15px;
    width: 32px; height: 32px; border-radius: 9px;
    display: grid; place-items: center;
    background: #FFF1F0; color: var(--km-red); font-size: 13px; font-weight: 700;
}
.program-list__title { display: block; padding-top: 5px; font-size: 15.5px; font-weight: 600; line-height: 1.45; color: var(--km-navy); }
.program-list .program-props { margin-top: 8px; }
@media (max-width: 767px) {
    .program-info__common { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
    .program-list > li { padding: 14px 16px 14px 58px; }
    .program-list > li::before { left: 14px; top: 14px; }
}

/* Педагогический состав: карточки сотрудников */
.staff-list { display: grid; gap: 18px; margin: 0 0 24px; }
.staff-card { border: 1px solid var(--km-line); border-radius: 18px; background: #fff; overflow: hidden; }
.staff-card__head { display: flex; align-items: center; gap: 18px; padding: 22px 24px; background: linear-gradient(180deg, var(--km-bg), #fff); border-bottom: 1px solid var(--km-line); }
.staff-card__avatar { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--km-navy); color: #fff; font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.staff-card__who { flex: 1 1 auto; min-width: 0; }
.page-content .staff-card__name { margin: 0 0 2px; font-size: 20px; line-height: 1.3; color: var(--km-navy); }
.page-content .staff-card__post { margin: 0; font-size: 15px; color: var(--km-muted); }
.staff-card__stats { display: flex; gap: 10px; margin: 0; }
.staff-card__stats > div { padding: 9px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--km-line); text-align: center; }
.staff-card__stats dt { margin: 0; font-size: 12px; font-weight: 500; color: var(--km-muted); white-space: nowrap; }
.staff-card__stats dd { margin: 0; font-size: 16px; font-weight: 700; color: var(--km-navy); white-space: nowrap; }
.staff-card__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px 32px; padding: 22px 24px 24px; }
.staff-card__section { min-width: 0; }
.staff-card__section:has(.staff-card__facts) { grid-column: 1 / -1; }
.page-content .staff-card__label { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--km-muted); }
.page-content .tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.page-content .tag-list li { margin: 0; padding: 7px 13px; border-radius: 999px; background: #FFF1F0; color: var(--km-navy); font-size: 14px; font-weight: 500; line-height: 1.3; }
.page-content .timeline { margin: 0; padding: 0; list-style: none; }
.page-content .timeline__item { margin-bottom: 0; position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--km-line); margin-left: 5px; }
.timeline__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline__item::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--km-red); }
.timeline__date { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--km-navy); }
.timeline__list { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.5; }
.timeline__list li { margin: 0 0 5px; }
.page-content .timeline__text { margin: 0 0 5px; font-size: 14.5px; }
.page-content .timeline__org { margin: 6px 0 0; font-size: 13.5px; color: var(--km-muted); }
.staff-card__facts { display: grid; gap: 10px; margin: 0; }
.staff-card__facts dt { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--km-muted); }
.staff-card__facts dd { margin: 0; font-size: 15px; }
.staff-card__facts dd p { margin: 0 0 4px; }
.page-content .staff-card__none { grid-column: 1 / -1; margin: 0; padding-top: 14px; border-top: 1px dashed var(--km-line); font-size: 13.5px; color: var(--km-muted); }
.page-content .staff-card__none::first-letter { text-transform: uppercase; }
@media (max-width: 991px) {
    .staff-card__head { flex-wrap: wrap; }
    .staff-card__stats { width: 100%; }
    .staff-card__stats > div { flex: 1 1 0; }
    .staff-card__body { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
    .staff-card__head, .staff-card__body { padding: 18px 16px; }
    .staff-card__avatar { width: 48px; height: 48px; font-size: 16px; }
    .page-content .staff-card__name { font-size: 18px; }
}

/* Карточки разделов «Сведений» на главной странице раздела */
.info-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
@media (max-width: 575px) { .info-cards { grid-template-columns: 1fr; } }
.info-card {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    min-height: 72px;
    padding: 16px 20px;
    border: 1px solid var(--km-line);
    border-radius: 14px;
    background: #fff;
    font-weight: 700; line-height: 1.35;
    color: var(--km-navy) !important;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.info-card .lucide { color: var(--km-red); transition: transform .2s; }
.info-card:hover { border-color: transparent; box-shadow: var(--km-shadow-hover); transform: translateY(-2px); }
.info-card:hover .lucide { transform: translateX(3px); }

/* Список дочерних страниц (сниппет) */
.page-content .child-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 0 0 8px; padding: 0; list-style: none; }
.page-content .child-pages li { margin: 0; }
.page-content .child-pages a {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%;
    padding: 14px 18px;
    border: 1px solid var(--km-line); border-radius: 12px;
    font-weight: 600; color: var(--km-navy) !important;
}
.page-content .child-pages a::after { content: '→'; color: var(--km-red); }
.page-content .child-pages a:hover { border-color: transparent; box-shadow: var(--km-shadow-hover); }

/* --- Помощь внизу страницы ------------------------------------------------ */
.help-card { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: 20px; padding: 22px 26px; border-radius: var(--km-radius); background: var(--km-navy); color: #fff; }
.help-card strong { display: block; font-size: 18px; }
.help-card span { font-size: 14.5px; color: rgba(255, 255, 255, .75); }
.help-card__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Страницы услуг ------------------------------------------------------- */
.service-page { display: flex; flex-direction: column; gap: 22px; }
.service-block { padding: 28px 32px; border: 1px solid var(--km-line); border-radius: var(--km-radius); background: #fff; }
@media (max-width: 575px) { .service-block { padding: 20px 18px; } }
main .service-block h2 { margin: 0 0 16px; font-size: 22px; font-weight: 800; color: var(--km-navy); text-transform: none; }
.service-block p { margin: 0 0 12px; line-height: 1.6; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 767px) { .check-list { grid-template-columns: 1fr; } }
.check-list li { position: relative; padding-left: 32px; line-height: 1.45; }
.check-list li::before {
    content: ''; position: absolute; left: 0; top: 0;
    width: 22px; height: 22px; border-radius: 50%;
    background: #FFF1F0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D7261E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (max-width: 991px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .steps { grid-template-columns: 1fr; } }
.steps li { position: relative; padding: 18px; border-radius: 14px; background: var(--km-bg); counter-increment: step; font-size: 14.5px; line-height: 1.45; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 50%; background: var(--km-navy); color: #fff; font-weight: 700; font-size: 14px; }
.steps b { display: block; margin-bottom: 4px; color: var(--km-navy); }

/* Форма обращения в боковой колонке */
.form-card { position: sticky; top: calc(var(--km-header-h) + 16px); padding: 26px; border-radius: var(--km-radius); background: #fff; border: 1px solid var(--km-line); box-shadow: var(--km-shadow); scroll-margin-top: calc(var(--km-header-h) + 16px); }
@media (max-width: 991px) { .form-card { position: static; } }
main .form-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--km-navy); text-transform: none; }
.form-card > p { margin: 0 0 18px; font-size: 14.5px; color: var(--km-muted); }
.form-card .km-field { margin-bottom: 14px; }
.form-card .btn-km { width: 100%; margin-top: 16px; }
.form-card .alert { border-radius: 12px; font-size: 14.5px; }

/* --- Контакты ------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1199px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--km-line); border-radius: var(--km-radius); background: #fff; }
.contact-tile .lucide { width: 42px; height: 42px; margin-bottom: 8px; padding: 10px; border-radius: 12px; background: var(--km-bg); color: var(--km-blue); }
.contact-tile small { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--km-muted); }
.contact-tile b, .contact-tile a { font-size: 16px; font-weight: 700; color: var(--km-navy) !important; line-height: 1.4; }
.contact-tile a:hover { color: var(--km-red) !important; }
.contact-tile span { font-size: 14.5px; color: var(--km-muted); line-height: 1.45; }
.contact-map { margin-top: 22px; overflow: hidden; border: 1px solid var(--km-line); border-radius: var(--km-radius); }
.contact-map { position: relative; background: var(--km-bg); }
.contact-map iframe { position: relative; z-index: 1; display: block; width: 100%; height: 440px; border: 0; }
.contact-map__fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--km-navy); }
.contact-map__fallback .lucide { width: 36px; height: 36px; color: var(--km-red); }
.contact-map__fallback a { font-size: 14.5px; font-weight: 600; color: var(--km-blue); }
@media (max-width: 575px) { .contact-map iframe { height: 320px; } }
.contact-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
@media (max-width: 575px) { .contact-photos { grid-template-columns: 1fr; } }
.contact-photos figure { margin: 0; overflow: hidden; border-radius: var(--km-radius); background: var(--km-bg); }
.contact-photos img { display: block; width: 100%; height: 320px; object-fit: cover; }
.contact-photos figcaption { padding: 12px 16px; font-size: 14px; color: var(--km-muted); }

/* --- Документы-политики: оглавление -------------------------------------- */
.toc { padding: 18px; border: 1px solid var(--km-line); border-radius: var(--km-radius); background: #fff; }
.toc strong { display: block; margin-bottom: 10px; color: var(--km-navy); }
.toc ol { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.4; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--km-ink) !important; }
.toc a:hover { color: var(--km-red) !important; }
.page-content [id] { scroll-margin-top: calc(var(--km-header-h) + 16px); }
.page-content .policy_list { padding-left: 22px; list-style: disc; }
.staff-card__more > summary { display: none; }
@media (max-width: 991px) {
    .staff-card__more > summary {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 9px 14px; border: 1px solid var(--km-line); border-radius: 10px;
        font-size: 14px; font-weight: 600; color: var(--km-navy); cursor: pointer; list-style: none;
    }
    .staff-card__more > summary::-webkit-details-marker { display: none; }
    .staff-card__more > summary::after { content: ''; width: 7px; height: 7px; border: solid var(--km-navy); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
    .staff-card__more[open] > summary { margin-bottom: 14px; }
    .staff-card__more[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
}

/* ---- Страницы услуг: текст с подзаголовками, одна форма справа ---- */
.service-text { min-width: 0; padding: 36px 40px; border: 1px solid var(--km-line); border-radius: var(--km-radius); background: #fff; }
.service-text > section + section { margin-top: 34px; padding-top: 34px; border-top: 1px solid var(--km-line); }
main .service-text h2 { margin: 0 0 16px; font-size: 24px; font-weight: 800; line-height: 1.25; color: var(--km-navy); text-transform: none; }
.service-text p { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: var(--km-ink); }
.service-text section > p:last-child { margin-bottom: 0; }
.service-text .check-list li { font-size: 15.5px; }
.service-text__more { margin: 34px 0 0 !important; padding: 18px 22px; border-radius: 14px; background: var(--km-bg); font-size: 15px !important; }
.service-text__more a { font-weight: 600; color: var(--km-blue); }
.faq { border-top: 1px solid var(--km-line); }
.faq details { border-bottom: 1px solid var(--km-line); }
.faq summary { position: relative; padding: 16px 40px 16px 0; font-size: 16.5px; font-weight: 600; color: var(--km-navy); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border: solid var(--km-navy); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 16px; padding-right: 40px; font-size: 15.5px; color: var(--km-muted); }
.form-card__phone { margin: 14px 0 0; text-align: center; font-size: 14.5px; color: var(--km-muted); }
.form-card__phone a { font-weight: 700; color: var(--km-navy); white-space: nowrap; }
@media (max-width: 575px) {
    .service-text { padding: 24px 18px; }
    main .service-text h2 { font-size: 20px; }
    .service-text p { font-size: 15.5px; }
}
@media (max-width: 575px) {
    .steps { gap: 8px; }
    .steps li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; padding: 14px; }
    .steps li::before { grid-row: span 2; margin: 0; }
    .steps b { margin: 4px 0 2px; }
}

/* Font Awesome больше не подключается — убираем его значок из старых ссылок на файлы
   (у ссылок-карточек свой значок, его правило конкретнее) */
a.fr-file::before { content: none; }

/* --- Формы: ошибки и «Спасибо» ---------------------------------------- */
.form-consent__error { margin: 8px 0 0 28px; font-size: 13.5px; font-weight: 600; color: var(--km-red); }
.km-form .form-consent.is-invalid .form-consent__input { outline: 2px solid var(--km-red); outline-offset: 2px; }
.km-form .form-consent.is-invalid .form-consent__text { color: var(--km-ink); }
.form-success { padding: 28px 8px; text-align: center; outline: none; }
.form-success__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; background: #E7F6EC; color: #1E8E4A; }
.form-success__title { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: var(--km-navy); }
.form-success__text { max-width: 420px; margin: 0 auto 20px; color: var(--km-muted); line-height: 1.5; }
.form-success__text a { color: var(--km-blue); white-space: nowrap; }
.km-quiz .is-sent .km-quiz__progress, .km-quiz .is-sent .km-quiz__steps { display: none; }

/* --- Выбор программ на главной ----------------------------------------- */
.programs-hint { margin: -8px 0 16px; font-size: 14px; color: var(--km-muted); }
.program-card--pick { position: relative; cursor: pointer; margin: 0; }
.program-card__input { position: absolute; opacity: 0; pointer-events: none; }
.program-card--pick:has(.program-card__input:focus-visible) { outline: 3px solid rgba(30, 79, 194, .35); outline-offset: 2px; }
.program-card__more { color: var(--km-blue) !important; text-decoration: underline; text-underline-offset: 2px; }
.program-card__check {
    display: grid; place-items: center; flex: none;
    width: 28px; height: 28px; margin-left: auto;
    border: 2px solid #C9D1DF; border-radius: 50%;
    color: transparent; background: #fff;
    transition: background .2s, border-color .2s, color .2s;
}
.program-card__check .lucide { width: 16px; height: 16px; stroke-width: 3; }
.program-card--pick:hover .program-card__check { border-color: var(--km-navy); }
.program-card.is-picked { border-color: var(--km-navy); box-shadow: 0 0 0 1px var(--km-navy); }
.program-card.is-picked .program-card__check { background: var(--km-navy); border-color: var(--km-navy); color: #fff; }
.programs-pick {
    position: sticky; bottom: 16px; z-index: 5;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 16px; padding: 12px 12px 12px 20px;
    border-radius: 999px; background: var(--km-navy); color: #fff;
    box-shadow: 0 10px 30px rgba(15, 42, 95, .25);
}
.programs-pick[hidden] { display: none; }
.programs-pick__text { font-weight: 600; }
.programs-pick__clear { margin-right: auto; padding: 0; border: 0; background: none; color: rgba(255,255,255,.75); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }
.programs-pick__clear:hover { color: #fff; }
@media (max-width: 575px) {
    .programs-pick { border-radius: 16px; padding: 12px 14px; gap: 10px; }
    .programs-pick .btn-km { width: 100%; justify-content: center; }
}
.km-program.is-picked { background: #EEF3FC; }

/* --- Новости ------------------------------------------------------------ */
.banner-news { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; max-width: 520px; }
.banner-news li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid rgba(255, 255, 255, .35); }
.banner-news time { font-size: 13px; font-weight: 600; opacity: .75; }
.banner-news a { color: #fff !important; font-size: 16.5px; font-weight: 600; line-height: 1.35; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-news a:hover { text-decoration: underline; }
.banner--news .banner__body { gap: 14px; }

.news-list { display: grid; gap: 16px; max-width: 860px; }
.news-card { padding: 24px 28px; border: 1px solid var(--km-line); border-radius: var(--km-radius); background: #fff; }
.news-card__date { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--km-muted); }
.news-card__title { margin: 0 0 8px; font-size: 21px; font-weight: 700; line-height: 1.3; text-transform: none; text-align: left; }
.news-card__title a { color: var(--km-navy) !important; text-decoration: none; }
.news-card__title a:hover { color: var(--km-red) !important; }
.news-card__text { margin: 0 0 12px; color: var(--km-ink); line-height: 1.55; }
.news-card__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--km-red) !important; }
.news-card__more .lucide { width: 18px; height: 18px; }
.news-pages { display: flex; gap: 8px; margin-top: 24px; }
.news-pages a, .news-pages span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--km-line); border-radius: 10px; background: #fff; color: var(--km-ink) !important; font-weight: 600; }
.news-pages span { background: var(--km-navy); border-color: var(--km-navy); color: #fff !important; }
.news-empty { color: var(--km-muted); }
.news-post { max-width: 860px; }
.news-post__image { display: block; width: 100%; max-height: 460px; object-fit: cover; margin-bottom: 24px; border-radius: var(--km-radius); }
.news-post__back { margin-top: 28px; }
@media (max-width: 575px) { .news-card { padding: 20px; } .news-card__title { font-size: 18.5px; } }
.km-program__note { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--km-navy); }
