/* Пост №1 — стили нового дизайна (макеты 2021, «Первый Красноярск»). Без сборщика. */

/* ===== Шрифты =====
   Свои файлы вместо Google Fonts (переменные, все веса в одном файле; лицензия SIL OFL — fonts/OFL-*.txt).
   Source Serif 4 — вариант «20pt» (оптический размер 20 = Source Serif Pro из макета).
   Скачаны с Google Fonts: css2?family=Manrope:wght@400;600;700&family=Source+Serif+4:opsz,wght@20,300;…;20,900 */
@font-face {
    font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
    src: url("../fonts/source-serif-4-cyrillic.8d06d3cc1235.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
    src: url("../fonts/source-serif-4-latin.d80fcd60509e.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("../fonts/manrope-cyrillic.8fc0aa17e129.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("../fonts/manrope-latin.101877a7a906.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Токены ===== */
:root {
    --c-red: #eb2030;
    --c-red-dark: #b71f2a;
    --c-dark: #1d1a1a;
    --c-black: #010102;
    --c-bg: #fcfcfc;
    --c-section: #ededed;
    --c-card: #fdfdfd;
    --c-text: #1d1a1a;
    --c-muted: #7d7d7d;
    --c-line: #dcdcdc;
    --c-gold: #936706;
    --c-link: #27348b;
    --c-on-dark: #e9e9e9;
    --c-on-dark-muted: #9b9b9b;

    --f-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
    --f-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* стрелка «→» для ссылок и кнопок (маской: в шрифтах сайта такого глифа нет) */
    --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12'%3E%3Cpath d='M0 6h20M15 1l5 5-5 5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E");

    /* Модульная шкала кеглей (плавная, как Utopia): каждая ступень больше предыдущей в одно и то же число раз.
       360px — база 16, отношение 1.15; 1440px — база 17, отношение 1.2 (малая терция); между ними — плавно.
       Ступени на 1440: 12 · 14 · 17 · 20 · 24 · 29 · 35 · 42; на 360: 12 · 14 · 16 · 18 · 21 · 24 · 28 · 32.
       Пересчёт: n-я ступень = 16·1.15ⁿ … 17·1.2ⁿ. Меню, вкладки, расписание — базовая ступень, как основной текст. */
    --step--2: 12px;
    --step--1: clamp(13.91px, 13.83px + .023vw, 14.17px);
    --step-0: clamp(16px, 15.67px + .093vw, 17px);
    --step-1: clamp(18.4px, 17.73px + .185vw, 20.4px);
    --step-2: clamp(21.16px, 20.05px + .307vw, 24.48px);
    --step-3: clamp(24.33px, 22.65px + .467vw, 29.38px);
    --step-4: clamp(27.98px, 25.56px + .673vw, 35.25px);
    --step-5: clamp(32.18px, 28.81px + .937vw, 42.3px);

    --fs-h1: var(--step-5);      /* заголовки страниц и разделов */
    --fs-h2: var(--step-3);      /* второстепенные заголовки разделов */
    --fs-h3: var(--step-2);      /* заголовки блоков и карточек */
    --fs-label: var(--step-1);   /* подзаголовки: лид, названия карточек, подписи у крупных карточек */
    --fs-body: var(--step-0);    /* основной текст, меню, вкладки, расписание, даты */
    --fs-small: var(--step--1);  /* ОУ, описания, второстепенное */
    --fs-xs: var(--step--2);     /* мелкие подписи */

    --w-narrow: 1130px;   /* главная, доска почёта */
    --w-wide: 1360px;     /* новости, видео, мероприятия */
    --gutter: 16px;
    --header-h: 72px;
    --radius: 8px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
}

@media (min-width: 768px) {
    :root { --gutter: 32px; }
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: 400 var(--fs-body)/1.5 var(--f-serif);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-red); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--c-red); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 900; line-height: 1.15; }
/* без одиноких слов на последней строке (предлоги привязывает фильтр |typograf) */
h1, h2, h3, h4, .hero__heading, .events-hero__title { text-wrap: pretty; }
p { margin: 0 0 1em; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 8px; top: -48px; z-index: 100;
    padding: 8px 14px; background: var(--c-dark); color: #fff; border-radius: 4px;
}
.skip-link:focus { top: 8px; color: #fff; }

/* ===== Сетка и секции ===== */
.container {
    width: 100%;
    max-width: calc(var(--w-narrow) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--wide { max-width: calc(var(--w-wide) + 2 * var(--gutter)); }

.section { padding-block: 48px; }
.section--gray { background: var(--c-section); }
.section--dark { background: var(--c-dark); color: var(--c-on-dark); }
@media (min-width: 1024px) { .section { padding-block: 64px; } }

/* ===== Типографика ===== */
.h1 { font-size: var(--fs-h1); margin-bottom: 24px; }
.h2 { font-size: var(--fs-h2); margin-bottom: 20px; }
.h3 { font-size: var(--fs-label); font-weight: 700; }
.lead { font-size: var(--fs-label); color: var(--c-muted); }
.muted { color: var(--c-muted); }
.eyebrow { color: var(--c-red); font-size: var(--fs-body); margin-bottom: 6px; }

.link-arrow {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--c-red); font-weight: 600;
}
.link-arrow::after {
    content: ""; width: 22px; height: 12px; flex: none;
    background: currentColor;
    -webkit-mask: var(--i-arrow) center / contain no-repeat;
            mask: var(--i-arrow) center / contain no-repeat;
    transition: transform .2s;
}
.link-arrow:hover { color: var(--c-red-dark); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow--light { color: var(--c-on-dark); font-weight: 400; }
.link-back { display: inline-flex; align-items: center; gap: 8px; }
.link-back::before, .btn--prev::before, .btn--next::after {
    content: ""; width: 18px; height: 10px; flex: none; background: currentColor;
    -webkit-mask: var(--i-arrow) center / contain no-repeat;
            mask: var(--i-arrow) center / contain no-repeat;
}
.link-back::before, .btn--prev::before { transform: scaleX(-1); }
.link-arrow--light:hover { color: #fff; }

/* ===== Соцсети ===== */
.social { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.social a { display: block; width: 32px; height: 32px; color: var(--c-dark); }
.social svg { width: 32px; height: 32px; fill: currentColor; }
.social svg path:not([fill]) { fill: currentColor; }
.social a:hover { color: var(--c-red); }

/* ===== Шапка ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: linear-gradient(180deg, #fdfdfd 0%, #e6e6e6 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}
.site-header__inner {
    display: flex; align-items: center; gap: 24px;
    max-width: 1440px; height: 100%; margin-inline: auto;   /* шире 1440 (холст макета) не растягиваем */
    padding-inline: var(--gutter);
}
@media (min-width: 1280px) { .site-header__inner { padding-inline: 40px; } }

.site-header__logo { flex: none; }
.site-header__logo img { width: 45px; height: auto; }

.site-nav { display: flex; align-items: center; flex: 1; gap: 24px; }
.site-nav__list {
    display: flex; flex-wrap: wrap; gap: 4px 16px;
    margin: 0; padding: 0; list-style: none;
}
.site-nav .social { margin-left: auto; }
/* пункты меню распределены по ширине шапки, как в макете (там меню занимает почти всю строку) */
@media (min-width: 1100px) {
    .site-nav { gap: clamp(24px, 6vw - 42px, 64px); }   /* отступ меню от иконок соцсетей */
    .site-nav__list { flex: 1; flex-wrap: nowrap; justify-content: space-between; }
}
.site-nav__link {
    position: relative; display: block;
    padding: 4px 6px;
    font-size: min(var(--fs-body), 2.3vw - 9.7px); white-space: nowrap;   /* как основной текст; в одну строку от 1100 */
}
.site-nav__link.is-active { font-weight: 700; }
.site-nav__link.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
    height: 3px; background: var(--c-dark);
}
.site-nav__link:hover { color: var(--c-red); }

.site-header__toggle {
    display: none;
    margin-left: auto; width: 44px; height: 44px; padding: 0;
    border: 0; background: none; cursor: pointer; color: var(--c-dark);
}
.burger, .burger::before, .burger::after {
    display: block; width: 26px; height: 2px; margin-inline: auto;
    background: currentColor; transition: transform .2s, opacity .2s;
}
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -8px; }
.burger::after { top: 8px; }
.site-header.is-open .burger { background: transparent; }
.site-header.is-open .burger::before { transform: translateY(8px) rotate(45deg); }
.site-header.is-open .burger::after { transform: translateY(-8px) rotate(-45deg); }


/* Мобильное меню */
@media (max-width: 1099px) {
    :root { --header-h: 64px; }
    .site-header__logo img { width: 38px; }
    .site-header__toggle { display: block; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 20px;
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
        padding: 12px var(--gutter) 24px;
        background: var(--c-bg);
        box-shadow: 0 8px 16px rgba(0, 0, 0, .15);
        visibility: hidden; opacity: 0; transform: translateY(-8px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .site-header.is-open .site-nav { visibility: visible; opacity: 1; transform: none; }
    .site-nav__list { flex-direction: column; flex-wrap: nowrap; gap: 0; }
    .site-nav__list li + li { border-top: 1px solid var(--c-line); }
    .site-nav__link { padding: 13px 0; font-size: 19px; }
    .site-nav__link.is-active { color: var(--c-red); }
    .site-nav__link.is-active::after { display: none; }
    .site-nav .social { margin-left: 0; }
}

/* ===== Подвал ===== */
.site-footer { color: var(--c-on-dark); }
.site-footer a:hover { color: #fff; }

.site-footer__main {
    position: relative; overflow: hidden;
    padding-block: 36px 40px;
    background: var(--c-dark);
}
/* водяной знак-эмблема слева, как в макете */
.site-footer__main::before {
    content: ""; position: absolute; left: -70px; top: -20px;
    width: 230px; height: 310px;
    background: url("../img/logo.2f8bf19ecb7d.svg") center / contain no-repeat;
    filter: grayscale(1) brightness(.6); opacity: .07;
    pointer-events: none;
}

.site-footer__grid { position: relative; display: grid; gap: 28px; }
.site-footer__logo img { width: 63px; }
.site-footer__nav ul {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px;
    margin: 0; padding: 0; list-style: none;
}
.site-footer__nav a { font-size: var(--fs-body); }
.site-footer__extra {
    position: relative; display: grid; gap: 32px;
    margin-top: 36px; padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.site-footer__title {
    margin-bottom: 14px;
    font: 700 13px/1.4 var(--f-sans); letter-spacing: .08em; text-transform: uppercase;
    color: var(--c-on-dark-muted);
}
.site-footer__extra ul { display: grid; gap: 14px; margin: 0 0 16px; padding: 0; list-style: none; }
.site-footer__contacts li { display: grid; gap: 2px; align-content: start; font-size: var(--fs-small); }

.site-footer__person { font-weight: 600; color: #fff; }
.site-footer__muted { color: var(--c-on-dark-muted); }
.site-footer__resources a { font-size: var(--fs-small); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }

.site-footer__bottom { background: var(--c-black); }
.site-footer__bottom-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 72px; padding-block: 16px;
    font: 400 14px/1.4 var(--f-sans); color: #cfcfcf;
}
.site-footer__bottom .social a { color: #fff; }
.site-footer__bottom .social svg path:not([fill]) { fill: var(--c-black); }
.site-footer__bottom .social svg circle { fill: #3a3636; }
.site-footer__bottom .social a:hover svg circle { fill: var(--c-red); }

@media (min-width: 768px) {
    .site-footer__nav ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .site-footer__extra { grid-template-columns: 1.4fr 1fr; }
    .site-footer__contacts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .site-footer__grid { grid-template-columns: 1fr minmax(0, 760px); align-items: start; }
    .site-footer__nav ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 24px; }
    .site-footer__extra { grid-template-columns: 5fr 2fr; gap: 40px; }
}
@media (min-width: 1200px) {
    .site-footer__contacts ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
    .site-footer__contacts a { overflow-wrap: normal; font-size: 14px; }
}

/* ===== Общие компоненты ===== */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.section-head .h1, .section-head .h2 { margin-bottom: 0; }

/* Карусель: прокрутка со снапом (работает свайпом без JS), JS добавляет точки и автопрокрутку */
.carousel { position: relative; }
.carousel__track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel__dots { display: flex; gap: 10px; }
.carousel__dot {
    width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
    background: #d9d9d9; cursor: pointer;
}
.carousel__dot[aria-current="true"] { background: var(--c-red); }
@media (prefers-reduced-motion: reduce) { .carousel__track { scroll-behavior: auto; } }

.tabs { display: flex; gap: 24px; }
.tabs__tab {
    padding: 2px 0; border: 0; border-bottom: 2px solid transparent; background: none;
    font: inherit; font-size: var(--fs-body); color: var(--c-text); cursor: pointer;
}
.tabs__tab.is-active { border-bottom-color: var(--c-dark); }
.tabs__tab:hover { color: var(--c-red); }

/* Горизонтальная лента (галерея, отзывы) */
.strip {
    display: grid; grid-auto-flow: column; grid-auto-columns: 240px; gap: 16px;
    margin: 0; padding: 0 0 8px; list-style: none;
    overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
}
.strip > * { scroll-snap-align: start; }
.strip__item a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); }
.strip__item img { width: 240px; height: 160px; object-fit: cover; transition: transform .3s; }
.strip__item a:hover img { transform: scale(1.04); }
.strip__caption {
    position: absolute; inset: auto 0 0; padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
    color: #fff; font-size: 13px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.strip--cards { grid-auto-columns: minmax(280px, 340px); }

/* Диалог (полный текст отзыва, фото галереи) */
.dialog {
    width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
    padding: 40px 32px 32px; border: 0; border-radius: 12px;
    background: var(--c-bg); color: var(--c-text);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.dialog::backdrop { background: rgba(20, 18, 18, .6); backdrop-filter: blur(4px); }
.dialog__close {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
    border: 0; background: none; cursor: pointer; color: var(--c-muted);
}
.dialog__close::before, .dialog__close::after {
    content: ""; position: absolute; left: 8px; top: 17px; width: 20px; height: 2px; background: currentColor;
}
.dialog__close::before { transform: rotate(45deg); }
.dialog__close::after { transform: rotate(-45deg); }
.dialog__close:hover { color: var(--c-text); }
.dialog__text { margin-top: 16px; }
.dialog--image { width: auto; max-width: calc(100vw - 32px); padding: 0; background: #000; }
.dialog--image img { max-height: calc(100vh - 120px); width: auto; margin: 0 auto; }
.dialog--image figcaption { padding: 12px 16px; color: #ddd; font-size: var(--fs-small); }
.dialog--image .dialog__close { color: #fff; z-index: 1; }

/* ===== Главная: слайдер ===== */
.hero { background: var(--c-dark); color: #fff; }
.hero__slide { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.hero__media { position: relative; height: 56vw; max-height: 340px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__slide--photo .hero__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(29, 26, 26, 0) 50%, var(--c-dark) 100%);
}
.hero__slide--cutout .hero__media img { object-fit: contain; object-position: bottom center; }
.hero__body { position: relative; padding-block: 20px 56px; }
.hero__heading { font-size: var(--fs-h1); font-weight: 900; color: #fff; margin-bottom: 14px; }
.hero__heading--text { font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; }
.hero__lead { color: #e2e2e2; font-size: var(--fs-body); line-height: 1.35; }
.carousel__dots--hero { position: absolute; left: 0; right: 0; bottom: 22px; justify-content: flex-end; }

@media (min-width: 900px) {
    .hero__slide { min-height: 480px; justify-content: center; }
    .hero__media { position: absolute; inset: 0 0 0 auto; width: 58%; height: auto; max-height: none; }
    .hero__slide--photo .hero__media::after {
        background: linear-gradient(90deg, var(--c-dark) 0%, rgba(29, 26, 26, .75) 18%, rgba(29, 26, 26, 0) 55%);
    }
    .hero__slide--cutout .hero__media { width: 50%; right: max(0px, (100vw - var(--w-narrow)) / 2 - 80px); }
    .hero__slide--cutout .hero__media img { object-position: bottom right; }
    .hero__body { padding-block: 64px; }
    .hero__text { max-width: 470px; }
}

/* ===== Главная: о проекте ===== */
.about__head { margin-bottom: 24px; }
.about__head .link-arrow { font-size: var(--fs-label); }
.about__title { max-width: 560px; font-size: var(--fs-h3); line-height: 1.15; margin-bottom: 16px; }
.about__text { font-size: var(--fs-body); line-height: 1.35; }
.about__text p { break-inside: avoid; }
.about__text p:last-child { margin-bottom: 0; }
@media (min-width: 900px) {
    /* заголовок слева, как в макете; весь текст — в две колонки под ним */
    .about__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
    .about__head .link-arrow { margin-bottom: 20px; flex: none; }
    .about__text { column-count: 2; column-gap: 48px; }
}

/* свёрнутый длинный текст на телефоне */
.about__text.is-collapsed {
    max-height: 340px; overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent);
}
.collapse-toggle {
    margin-top: 8px; padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: var(--fs-body); color: var(--c-red);
}
.collapse-toggle:hover { color: var(--c-red-dark); text-decoration: underline; }

/* ===== Главная: расписание ===== */
.schedule__grid { display: grid; gap: 40px 48px; }
@media (min-width: 900px) { .schedule__grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } }
.schedule__name { font-size: var(--fs-h3); margin-bottom: 12px; }
.schedule__list { margin: 0; padding: 0; list-style: none; }
.schedule__item {
    display: grid; grid-template-columns: 2.6em 1fr; gap: .5em;
    padding-block: 5px; font-size: var(--fs-body); line-height: 1.35;
}
.schedule__time { color: var(--c-muted); font-variant-numeric: tabular-nums; }
.schedule__item.is-active { color: var(--c-red); }
.schedule__item.is-active .schedule__time { color: var(--c-red); font-weight: 700; }
.schedule__now {
    display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px;
    background: var(--c-red); color: #fff; font: 600 12px/1.6 var(--f-sans); vertical-align: 2px;
}

/* ===== Карточки постовцев ===== */
.person-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px;
    margin: 0; padding: 0; list-style: none;
}
@media (min-width: 1024px) { .person-grid { grid-template-columns: repeat(5, 1fr); gap: 20px; } }
.person-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 32px 14px 36px; border-radius: var(--radius);
    background: var(--c-card); box-shadow: var(--shadow-card); text-align: center;
}
.person-card__photo {
    width: 118px; height: 118px; margin-bottom: 20px; border-radius: 50%;
    object-fit: cover; background: #e8e8e8;
    box-shadow: 0 0 0 4px #f2f2f2;
}
.person-card__name { font-weight: 700; line-height: 1.3; }
.person-card__school { font-size: var(--fs-small); color: var(--c-muted); line-height: 1.35; }
.person-card__school b { color: var(--c-text); }

/* ===== Цитаты ===== */
.quotes { background: var(--c-dark); color: var(--c-on-dark); }
.quote { margin: 0; }
.quote__inner { display: grid; align-items: end; gap: 24px; padding-top: 56px; }
.quote__body { position: relative; padding-left: 52px; padding-bottom: 56px; }
.quote__body::before {
    content: "\201C"; position: absolute; left: -6px; top: -36px;
    font: 900 120px/1 var(--f-serif); color: #604c24;
}
.quote__text { margin: 0 0 18px; font-size: var(--fs-label); font-weight: 300; line-height: 1.25; }
.quote__text p { margin: 0; }
.quote__author { display: block; font: 700 var(--fs-body)/1.4 var(--f-sans); color: var(--c-red); }
.quote__position { display: block; font: 400 var(--fs-small)/1.4 var(--f-sans); color: var(--c-on-dark-muted); }
.quote__photo { justify-self: center; width: min(320px, 80%); }
.carousel__dots--quotes { position: absolute; left: 0; right: 0; bottom: 28px; padding-left: calc(var(--gutter) + 52px); }
.carousel__dots--quotes .carousel__dot[aria-current="true"] { background: #e6a91b; }
@media (min-width: 900px) {
    .quote__inner { grid-template-columns: 1fr 360px; gap: 48px; }
    .quote__body { align-self: center; padding-bottom: 72px; }
    .quote__photo { width: 100%; }
    .carousel__dots--quotes { bottom: 40px; }
}

/* ===== Документы ===== */
.documents-block__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; margin-bottom: 24px; }
.documents-block__head .h1 { margin-bottom: 0; }
.doc-list { display: grid; gap: 22px 48px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .doc-list { grid-template-columns: 1fr 1fr; } }
.doc-list__item { display: grid; gap: 2px; max-width: 470px; }
.doc-list__name { font-size: var(--fs-body); line-height: 1.35; }
.doc-list__name:hover { color: var(--c-red); }
.doc-list__desc { font-size: var(--fs-small); color: var(--c-muted); }
.doc-list__meta { font: 400 var(--fs-xs)/1.4 var(--f-serif); color: var(--c-link); }
.documents-block__more { margin: 24px 0 0; text-align: right; }
.documents-block__more a { color: var(--c-link); }

/* ===== Отзывы ===== */
.review-card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 24px; border-radius: var(--radius); background: var(--c-section);
    scroll-snap-align: start;
}
.review-card__name { font-weight: 700; font-size: var(--fs-label); }
.review-card__text { margin: 0; font-size: var(--fs-small); color: #444; }
.review-card__more {
    align-self: flex-start; margin-top: auto; padding: 0; border: 0; background: none;
    font: inherit; font-size: var(--fs-small); color: var(--c-red); cursor: pointer;
}
.review-card__more:hover { color: var(--c-red-dark); text-decoration: underline; }

/* ===== Подменю раздела (категории новостей, видео, годы рейтинга) ===== */
.subnav { background: var(--c-section); border-bottom: 1px solid #e2e2e2; }
.subnav__list {
    display: flex; gap: 8px 36px; margin: 0; padding: 0; list-style: none;
    overflow-x: auto; scrollbar-width: none;
}
.subnav__list::-webkit-scrollbar { display: none; }
.subnav__link {
    position: relative; display: block; padding: 10px 2px; white-space: nowrap;
    font-size: var(--fs-body); color: var(--c-muted);
}
.subnav__link.is-active { color: var(--c-text); }
.subnav__link.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--c-dark);
}

.section--tight { padding-block: 24px 56px; }

/* Кнопка */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 28px; border: 1px solid var(--c-dark); border-radius: 999px;
    background: transparent; color: var(--c-dark); font: 600 15px/1.2 var(--f-sans); cursor: pointer;
}
.btn:hover { background: var(--c-dark); color: #fff; }
.btn[aria-busy="true"] { opacity: .5; pointer-events: none; }
.more { margin: 40px 0 0; text-align: center; }

/* Поиск */
.search-box { position: relative; margin-bottom: 20px; }
.search-box__input {
    width: 100%; height: 48px; padding: 0 16px 0 46px; border: 1px solid transparent; border-radius: var(--radius);
    background: #e9e9e9; font: inherit; font-size: var(--fs-body); color: var(--c-text);
    -webkit-appearance: none; appearance: none;
}
.search-box__input:focus { outline: none; border-color: var(--c-dark); background: #fff; }
.search-box__btn {
    position: absolute; left: 6px; top: 6px; width: 36px; height: 36px; border: 0; background: none; cursor: pointer;
}
.search-box__btn::before {
    content: ""; position: absolute; left: 10px; top: 9px; width: 13px; height: 13px;
    border: 2px solid var(--c-dark); border-radius: 50%;
}
.search-box__btn::after {
    content: ""; position: absolute; left: 23px; top: 23px; width: 6px; height: 2px;
    background: var(--c-dark); transform: rotate(45deg); transform-origin: left center;
}
.news-page__found { margin-bottom: 24px; color: var(--c-muted); }
.news-page__found a { color: var(--c-red); }

/* ===== Карточки новостей ===== */
.news-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.news-card { min-width: 0; }
.news-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.news-card__link:hover { color: inherit; }
.news-card__link:hover .news-card__title { color: var(--c-red); }
.news-card__media {
    position: relative; overflow: hidden; aspect-ratio: 440 / 240;
    border-radius: var(--radius) var(--radius) 0 0; background: #ddd;
}
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card__link:hover .news-card__media img { transform: scale(1.03); }
.news-card__placeholder {
    position: absolute; inset: 0;
    background: #e3e3e3 url("../img/logo.2f8bf19ecb7d.svg") center / 56px auto no-repeat;
    filter: grayscale(1); opacity: .5;
}
.news-card__body {
    flex: 1; padding: 12px 16px 18px;
    border-radius: 0 0 var(--radius) var(--radius); background: #f2f2f2;
}
.news-card__meta { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0 0 4px; font-size: var(--fs-body); font-weight: 300; color: var(--c-muted); }
.news-card__title { font-size: var(--fs-label); font-weight: 900; line-height: 1.2; transition: color .2s; }

/* крупная и высокая — без серой подложки, как в макете */
.news-card--featured .news-card__media, .news-card--tall .news-card__media { border-radius: var(--radius); }
.news-card--featured .news-card__body, .news-card--tall .news-card__body { padding: 10px 0 0; background: none; }
.news-card--featured .news-card__media { aspect-ratio: 900 / 365; }
.news-card--featured .news-card__meta, .news-card--tall .news-card__meta, .news-card--side .news-card__meta { font-size: var(--fs-label); }
.news-card--featured .news-card__title { font-size: var(--fs-h1); font-weight: 900; line-height: 1.15; }
.news-card--tall .news-card__title { font-size: var(--fs-h3); font-weight: 900; }

.news-top { display: grid; gap: 20px; margin-bottom: 20px; }
/* на узких экранах поиск — первым, над всеми карточками */
.news-top__aside { display: contents; }
.news-top__aside .search-box { order: -1; grid-column: 1 / -1; margin-bottom: 0; }
@media (min-width: 640px) {
    .news-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-top .news-card--featured, .news-top__aside { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
    .news-top { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; }
    .news-top .news-card--featured { grid-column: 1 / 3; grid-row: 1; }
    .news-top__aside { display: flex; flex-direction: column; grid-column: 3; grid-row: 1 / 3; }
    .news-top__aside .search-box { margin-bottom: 20px; }
    .news-top__aside .news-card--tall { flex: 1; }
    .news-top__aside .news-card--tall .news-card__link { height: 100%; }
    .news-top__aside .news-card--tall .news-card__media { flex: 1; aspect-ratio: auto; min-height: 320px; }
}

/* ===== Новость: страница и модалка ===== */
.dialog--news { width: min(760px, calc(100vw - 24px)); padding: 44px 40px 40px; }
.dialog--news .dialog__content:empty::before { content: "Загрузка…"; color: var(--c-muted); }
@media (max-width: 600px) { .dialog--news { padding: 44px 18px 24px; } }

.news-detail__card { max-width: 820px; }
.news-detail__back { margin-bottom: 20px; }
.news-detail__back a { color: var(--c-muted); }

.news-body__title { font-size: var(--fs-h3); line-height: 1.25; margin-bottom: 8px; }
.news-body__meta { color: var(--c-muted); font-size: var(--fs-body); font-weight: 300; }
.news-body__meta a { color: var(--c-red); }
.news-body__text { font-size: var(--fs-body); line-height: 1.35; }
.news-body__text p { margin-bottom: .9em; }

.photo-carousel { margin: 28px auto 8px; max-width: 640px; }
.photo-carousel__slide { margin: 0; }
.photo-carousel__slide img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 12px; background: #eee;
}
.carousel__arrow {
    position: absolute; top: calc(50% - 28px); width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: pointer;
}
.carousel__arrow::before {
    content: ""; position: absolute; top: 15px; width: 12px; height: 12px;
    border: solid var(--c-dark); border-width: 0 0 2px 2px;
}
.carousel__arrow--prev { left: -10px; }
.carousel__arrow--prev::before { left: 17px; transform: rotate(45deg); }
.carousel__arrow--next { right: -10px; }
.carousel__arrow--next::before { left: 13px; transform: rotate(-135deg); }
.carousel__arrow:hover { background: #fff; }
@media (min-width: 900px) { .carousel__arrow--prev { left: -64px; } .carousel__arrow--next { right: -64px; } }
.photo-carousel__counter { margin: 8px 0 0; text-align: center; font: 400 13px/1.4 var(--f-sans); color: var(--c-muted); }

/* YouTube без загрузки плеера до клика */
.video-embed { position: relative; margin: 20px 0; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }
.video-embed__poster { position: absolute; inset: 0; }
.video-embed__poster img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video-embed__poster::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px;
    border-radius: 12px; background: var(--c-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'%3E%3Cpath d='M27 15v18l16-9z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
}
.video-embed__poster:hover::after { background-color: var(--c-red-dark); }
.dialog { overflow-x: hidden; }
.dialog--news .carousel__arrow--prev { left: 8px; }
.dialog--news .carousel__arrow--next { right: 8px; }
.doc-list__archive {
    display: inline-block; padding: 0 6px; border-radius: 3px;
    background: #e4e4e4; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; font-size: 10px;
}
.documents-page { min-height: 50vh; }


/* ===== Трансляция ===== */
.stream { min-height: 55vh; }
.stream__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.stream__now { margin: 0; font-size: var(--fs-h3); font-weight: 900; }
.stream__weather { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--c-muted); font-size: var(--fs-label); font-weight: 600; }
.weather-icon { width: 26px; height: 26px; }
.camera-grid { display: grid; gap: 28px 20px; }
@media (min-width: 900px) { .camera-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* одна камера — на всю ширину, но плеер вместе с шапкой и датой помещается в экран по высоте */
@media (min-width: 900px) { .camera-grid:has(> .camera:only-child) { grid-template-columns: minmax(0, 1fr); } }
.camera:only-child { max-width: max(640px, calc((100svh - 260px) * 16 / 9)); }
.camera { margin: 0; }
.camera__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--c-dark); }
.camera__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.camera__placeholder {
    position: absolute; inset: 0; display: grid; place-items: end start; padding: 20px;
    background: var(--c-dark) url("../img/logo.2f8bf19ecb7d.svg") center / 80px auto no-repeat;
    color: var(--c-on-dark-muted); font: 400 14px/1.4 var(--f-sans);
}
.camera figcaption { padding-top: 10px; }
.camera__title { display: block; font-size: var(--fs-h3); font-weight: 900; line-height: 1.2; }
.camera__subtitle { display: inline-flex; align-items: center; gap: 8px; color: var(--c-muted); font-size: var(--fs-label); font-weight: 300; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-red); animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ===== Видео ===== */
.video-top { display: grid; gap: 20px; margin-bottom: 20px; }
@media (min-width: 1024px) {
    .video-top { grid-template-columns: 2fr 1fr; }
    .video-top .news-card--side .news-card__media { aspect-ratio: auto; height: 100%; min-height: 240px; }
    .video-top .news-card--side .news-card__link { display: grid; grid-template-rows: 1fr auto; }
}
.news-card--side .news-card__media { border-radius: var(--radius); }
.news-card--side .news-card__body { padding: 10px 0 0; background: none; }
.news-card--side .news-card__title { font-size: var(--fs-h3); font-weight: 900; }
.video-card__play {
    position: absolute; left: 50%; top: 50%; width: 60px; height: 42px; margin: -21px 0 0 -30px;
    border-radius: 10px; background: rgba(29, 26, 26, .75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 42'%3E%3Cpath d='M24 13v16l14-8z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: background-color .2s;
}
.news-card__link:hover .video-card__play { background-color: var(--c-red); }
.news-card--featured .video-card__play { width: 84px; height: 58px; margin: -29px 0 0 -42px; }
.dialog--video { width: min(1100px, calc(100vw - 24px)); padding: 0; background: #000; }
.dialog--video .video-embed { margin: 0; border-radius: 0; }
.dialog--video__title { margin: 0; padding: 12px 16px; color: #ddd; font-size: var(--fs-small); }
.dialog--video .dialog__close { color: #fff; top: 4px; right: 4px; z-index: 2; }

/* ===== Рейтинг караулов ===== */
.rating { min-height: 40vh; }
.rating__scroll { overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.rating__scroll:focus-visible { outline: 2px solid var(--c-red); }
.rating-table { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rating-table th, .rating-table td { padding: 14px 10px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: middle; }
.rating-table thead th { vertical-align: bottom; border-bottom-width: 2px; }
.rating-table__col { display: block; font: 700 var(--fs-xs)/1.25 var(--f-serif); color: var(--c-gold); }
.rating-table__col-desc { display: block; margin-top: 2px; font: 400 11px/1.3 var(--f-serif); color: var(--c-text); }
.rating-table__school-head, .rating-table__place-head { font: 400 12px/1.3 var(--f-serif); color: var(--c-muted); }
.rating-table__place-head { text-align: right !important; }
.rating-table td { font-weight: 900; font-size: var(--fs-body); }
.rating-table__school span { display: block; color: var(--c-red); font-weight: 700; font-size: var(--fs-small); line-height: 1.25; }
.rating-table__school small { display: block; font: 400 11px/1.3 var(--f-serif); color: var(--c-muted); }
.rating-table__place { text-align: right !important; color: var(--c-red); font-size: var(--fs-h3) !important; font-weight: 900 !important; }
.rating-table tbody tr:hover { background: #f4f4f4; }
/* первый столбец остаётся на месте при прокрутке таблицы на телефоне */
.rating-table__school, .rating-table__school-head { position: sticky; left: 0; z-index: 1; background: var(--c-bg); min-width: 170px; }
.rating__note { margin-top: 20px; color: var(--c-muted); font-size: var(--fs-small); }

.quote__author--big { font: 900 clamp(22px, 2.6vw, 30px)/1.2 var(--f-serif); color: #fff; margin-bottom: 12px; }
.quote--plain .quote__body::before { display: none; }
.quote--plain .quote__body { padding-left: 0; }
.quote__photo--rounded { border-radius: var(--radius); margin-bottom: 40px; }

/* ===== Доска почёта ===== */
.honor-groups__carousel { position: relative; }
.honor-groups__slide { margin: 0; }
.honor-groups__slide img { width: 100%; max-height: 600px; object-fit: cover; border-radius: 20px; }
.honor-groups__slide figcaption { padding-top: 8px; color: var(--c-muted); font-size: var(--fs-small); }
.honor-groups__carousel .carousel__arrow--prev { left: 12px; }
.honor-groups__carousel .carousel__arrow--next { right: 12px; }
.honor__container { max-width: calc(var(--w-wide) + 2 * var(--gutter)); }
.honor__container .h1 { margin-left: max(0px, (100% - var(--w-narrow)) / 2); }
.honor-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px 40px; align-items: start;
    margin: 0 0 40px; padding: 0; list-style: none;
}
@media (min-width: 1024px) { .honor-grid { grid-template-columns: repeat(3, 1fr); } }
.honor-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 10px 20px; border-radius: 12px; background: var(--c-card); box-shadow: var(--shadow-card);
    text-align: center;
}
.honor-card__photo {
    width: 124px; height: 124px; margin-bottom: 14px; border-radius: 50%; object-fit: cover;
    border: 2px solid #3b3b3b; background: #ddd;
}
@media (min-width: 768px) { .honor-card__photo { width: 200px; height: 200px; } }
.honor-card__photo--empty { display: block; background: #e3e3e3 url("../img/logo.2f8bf19ecb7d.svg") center / 48px auto no-repeat; filter: grayscale(1); }
.honor-card__name { margin-bottom: 6px; font-size: var(--fs-h3); font-weight: 900; }
.honor-card__main { margin: 0 0 4px; font-size: var(--fs-small); line-height: 1.25; }
.honor-card__extra { margin: 0; font-size: var(--fs-xs); line-height: 1.3; color: var(--c-muted); }

/* ===== Мероприятия ===== */
.events__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1024px) { .events__layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; } }
.events-hero { position: relative; }
.events-hero__slide a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 900 / 365; background: #ddd; color: #fff; }
.events-hero__media { position: absolute; inset: 0; }
.events-hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.events-hero__caption {
    position: absolute; inset: auto 0 0; display: grid; gap: 4px; padding: 48px 24px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .78)); font-size: var(--fs-body);
}
.events-hero__title {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
    font-size: var(--fs-h2); font-weight: 900; line-height: 1.2;
}
.events-hero .carousel__arrow--prev { left: 12px; }
.events-hero .carousel__arrow--next { right: 12px; }
/* на телефоне в полосе 900:365 подпись не помещается — ставим её под фото */
@media (max-width: 639px) {
    .events-hero__slide a { height: 100%; aspect-ratio: auto; background: var(--c-dark); }
    .events-hero__media { position: relative; display: block; aspect-ratio: 16 / 9; }
    .events-hero__caption { position: static; padding: 12px 16px 18px; background: none; }
    .events-hero__title { display: block; overflow: visible; }
    .events-hero .carousel__arrow { top: calc((100vw - 2 * var(--gutter)) * 9 / 32 - 22px); }
}
.events__subtitle { margin: 32px 0 16px; font-size: var(--fs-h3); font-weight: 900; }
.events__grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .events__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.events__empty { padding: 40px 24px; border-radius: var(--radius); background: var(--c-section); color: var(--c-muted); }
.events__empty a { color: var(--c-red); }

.events__past { display: grid; gap: 22px; padding: 14px 10px 24px; border-radius: 6px; background: var(--c-dark); color: #fff; }
.events__past-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-inline: 4px; }
.events__past-head .h3 { font-size: var(--fs-h3); font-weight: 900; }
.events__past-head a { color: var(--c-red); font-size: var(--fs-body); }
.events__past-empty { margin: 0; padding: 4px; color: var(--c-on-dark-muted); }
.event-card--dark .news-card__media { border-radius: var(--radius); aspect-ratio: 440 / 365; }
.event-card--dark .news-card__body { padding: 8px 4px 0; background: none; }
.event-card--dark .news-card__meta { color: var(--c-on-dark-muted); font-size: var(--fs-label); }
.event-card--dark .news-card__title { color: #fff; font-size: var(--fs-h3); font-weight: 900; }
.badge-soon { padding: 1px 8px; border-radius: 10px; background: var(--c-red); color: #fff; font: 600 12px/1.6 var(--f-sans); }

/* ===== Поиск постовца ===== */
.search-page__form { max-width: 640px; margin-top: 8px; }
.search-page__count { margin: 8px 0 24px; color: var(--c-muted); }
.search-page__count b { color: var(--c-text); }
.person-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .person-list { grid-template-columns: 1fr 1fr; gap: 16px 32px; } }
.person-row { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; padding: 14px; border-radius: var(--radius); background: var(--c-card); box-shadow: var(--shadow-card); }
.person-row__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #e8e8e8; }
.person-row__name { display: block; font-weight: 700; font-size: var(--fs-body); margin-bottom: 2px; }
.person-row__line { display: block; font-size: var(--fs-small); color: var(--c-muted); }
.person-row__line b { color: var(--c-text); font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; color: var(--c-muted); }

/* ===== Галерея ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.gallery-grid a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); }
.gallery-grid img { width: 100%; aspect-ratio: 440 / 240; object-fit: cover; transition: transform .3s; }
.gallery-grid a:hover img { transform: scale(1.03); }
.gallery-grid__caption { position: absolute; inset: auto 0 0; padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-size: var(--fs-small); line-height: 1.3; }

/* ===== Контакты ===== */
.contacts-page__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .contacts-page__grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.contacts-page__info { font-size: var(--fs-body); line-height: 1.6; }
.contacts-page__info .link-arrow { margin-top: 8px; }
.contact-cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.contact-card { display: grid; grid-template-columns: 80px 1fr; gap: 16px; align-items: start; padding: 18px; border-radius: var(--radius); background: var(--c-section); }
.contact-card__photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.contact-card__job { display: block; font-size: var(--fs-small); color: var(--c-muted); }
.contact-card__name { display: block; font-weight: 700; font-size: var(--fs-label); margin-bottom: 4px; }
.contact-card a { display: block; color: var(--c-link); }
/* длинные e-mail и названия не должны раздвигать колонки на телефоне */
.contacts-page__grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .contacts-page__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.contact-card, .person-row { grid-template-columns: auto minmax(0, 1fr); }
.person-row__line { overflow-wrap: anywhere; }

/* ===== 404 ===== */
.error-page { min-height: 50vh; }
.error-page__code { margin: 0; font-size: clamp(64px, 10vw, 120px); font-weight: 900; line-height: 1; color: var(--c-red); }
.error-page__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }


/* ===== Доработки мобильной версии ===== */
/* расписание: на телефоне вкладки, на десктопе колонки */
.schedule__tabs { margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.schedule__tabs .tabs__tab { white-space: nowrap; font-weight: 700; }
@media (max-width: 899px) {
    .schedule__group.is-hidden-mobile { display: none; }
    .schedule__group .schedule__name { display: none; }
}
@media (min-width: 900px) { .schedule__tabs { display: none; } }

/* битая внешняя картинка — прячем, видна подложка контейнера */
img.is-broken { visibility: hidden; }

/* подменю прокручивается вбок — затухание у правого края как подсказка */
@media (max-width: 1023px) {
    .subnav__list {
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
                mask-image: linear-gradient(90deg, #000 85%, transparent);
        padding-right: 32px;
    }
}

/* фото в цитате на телефоне меньше */
@media (max-width: 899px) {
    .quote__photo { width: min(220px, 60%); }
    .quote__body { padding-bottom: 8px; }
    .carousel__dots--quotes { bottom: auto; top: 20px; }
}


/* контакты в подвале: на телефоне свёрнуты в одну строку */
.site-footer__contacts summary { list-style: none; }
.site-footer__contacts summary::-webkit-details-marker { display: none; }
.site-footer__summary-hint { display: none; }
@media (max-width: 899px) {
    .site-footer__contacts summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; padding: 4px 0; }
    .site-footer__contacts summary::after {
        content: ""; width: 9px; height: 9px; margin-right: 4px;
        border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s;
    }
    .site-footer__contacts[open] summary { margin-bottom: 14px; }
    .site-footer__contacts[open] summary::after { transform: rotate(-135deg); }
    .site-footer__summary-hint { display: inline; }
}
@media (min-width: 900px) { .site-footer__contacts summary { pointer-events: none; } }

.schedule__meta { margin: -8px 0 24px; color: var(--c-muted); font-size: var(--fs-small); }
.schedule__meta p { margin: 0 0 4px; }
.schedule__meta b { color: var(--c-text); font-weight: 700; }
.schedule__meta .schedule__bad { color: var(--c-red); }
