/* ===== Локальный шрифт Gehaks =====
   Gehaks нет в Google Fonts — self-hosted из папки /fonts.
   Автор: Emily Michajlenko. Бесплатно для личного и коммерческого
   использования; при коммерции требуется указание автора. */
@font-face {
    font-family: 'Gehaks';
    src: url('../fonts/Gehaks-Regular.woff2') format('woff2'),
         url('../fonts/Gehaks-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ===== Переменные (токены из макета «Культурный слой») ===== */
:root {
    /* --- Шрифты (из макета «2. Fonts / Typography») --- */
    --font-display: 'Gehaks', Georgia, 'Times New Roman', serif; /* заголовки, кнопки, меню, ссылки */
    --font-body: 'Manrope', system-ui, -apple-system, sans-serif; /* текст, подписи, теги */
    --font-numeric: 'Inter', system-ui, sans-serif;               /* даты, числа */

    /* --- Размеры: заголовки (Gehaks, line-height 110%) --- */
    --fs-super: 121px;
    --fs-display: 90px;
    --fs-h1: 64px;
    --fs-h2: 50px;
    --fs-h3: 36px;
    --fs-h4: 26px;
    --fs-h5: 24px;
    --fs-h6: 20px;
    --fs-quote: 18px;
    --lh-heading: 1.1;

    /* --- Размеры: текст (Manrope) --- */
    --fs-body-lg: 18px;
    --fs-body: 16px;
    --fs-body-sm: 14px;
    --fs-caption: 12px;
    --fs-caption-sm: 11px;
    --lh-body: 1.2;

    /* --- Примитивы --- */
    --white: #ffffff;
    --black: #000000;
    --brand-blue: #0834c5;
    --brand-blue-alt: #0c35bf;
    --gray-100: #fafafa;
    --gray-200: #f6f6f6;
    --gray-300: #f5f5f5;
    --gray-400: #f1f1f1;
    --gray-500: #efeeed;
    --gray-600: #e7e6e5;
    --gray-700: #bfbfbf;
    --gray-800: #737373;
    --gray-900: #212121;
    --light-blue: #61bdec;

    /* --- Семантические: текст --- */
    --text-primary: #000000;
    --text-secondary: #737373;
    --text-tertiary: #bfbfbf;
    --text-inverse: #ffffff;
    --text-accent: #0834c5;
    --text-muted: #212121;

    /* --- Семантические: фоны --- */
    --bg-page: #fafafa;
    --bg-section: #ffffff;
    --bg-card: #efeeed;
    --bg-card-alt: #f6f6f6;
    --bg-surface: #f1f1f1;
    --bg-overlay: #000000;

    /* --- Границы и разделители --- */
    --border-default: #0834c5;
    --border-subtle: #e7e6e5;
    --divider-default: #0c35bf;

    /* --- Иконки --- */
    --icon-primary: #000000;
    --icon-inverse: #ffffff;
    --icon-accent: #0834c5;

    /* --- Кнопки --- */
    --button-bg-primary: #0834c5;
    --button-bg-secondary: #ffffff;
    --button-text-primary: #ffffff;
    --button-text-secondary: #0834c5;

    /* --- Ссылки --- */
    --link-default: #0c35bf;

    /* --- Бренд --- */
    --brand-primary: #0834c5;
    --brand-secondary: #0c35bf;
    --brand-light: #61bdec;

    /* --- Сетка (из макета «1. Grid») --- */
    --grid-columns: 12;         /* desktop: 12 колонок */
    --grid-gutter: 20px;        /* desktop: gutter между колонками */
    --grid-margin: 40px;        /* desktop: боковые поля */
    --content-max: 1360px;      /* desktop: ширина контентной области (1440 − 2×40) */

    /* --- Служебные --- */
    --max-width: var(--content-max);
    --radius: 8px;
    --transition: 0.25s ease;
    --section-gap: 120px;                 /* отступ между секциями (только сверху) */
}

/* Мобильные параметры сетки и типографики — 375px */
@media (max-width: 720px) {
    :root {
        /* Сетка: 4 колонки, gutter 16, поля 20 */
        --grid-columns: 4;
        --grid-gutter: 16px;
        --grid-margin: 20px;

        /* Заголовки (Mobile Typography из макета) */
        --fs-display: 70px;
        --fs-h1: 38px;
        --fs-h2: 34px;
        --fs-quote: 22px;
    }
}

/* ===== Сброс ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Lenis (плавный скролл) */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: var(--lh-body);
    font-size: var(--fs-body);
}

/* Заголовки — акцидентный шрифт Gehaks */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: var(--lh-heading);
    font-weight: 400;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Контейнер (ширина контента + боковые поля из макета) ===== */
.container {
    width: 100%;
    /* контентная область 1360 + боковые поля → внешняя рамка 1440 */
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

/* ===== Сетка 12/4 колонок (из макета «1. Grid») ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    gap: var(--grid-gutter);
}

/* Помощники ширины колонок (desktop) */
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* На мобильном сетка сворачивается до 4 колонок — блоки занимают всю ширину */
@media (max-width: 720px) {
    .col-3,
    .col-4,
    .col-6,
    .col-8,
    .col-12 { grid-column: 1 / -1; }
}

/* ===== Шумовой оверлей на весь сайт ===== */
.noise {
    background-image: url('../images/noise.gif');
    background-size: 100px;
    opacity: calc(10 / 100);
    height: 100dvh;
    width: 100dvw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
}

/* ===== Разделитель (повтор мотива divider.svg по всей ширине) =====
   Плитка divider-tile.svg = мотив 38px + зазор 12px = 50px.
   Фон повторяется по X → подстраивается под любую ширину экрана. */
.divider {
    width: 100%;
    height: 18px;                 /* высота мотива divider.svg */
    margin: 12px 0;
    background-image: url('../images/divider-tile.svg');
    background-repeat: repeat-x;
    background-position: left center;
    background-size: 50px 18px;   /* натуральный размер плитки — без растяжения */
}

/* Мобильный: мотив 24px (плитка 50 × 24/38 ≈ 31.58px), высота 18 × 24/38 ≈ 11.4px */
@media (max-width: 720px) {
    .divider {
        height: 11.4px;
        background-size: 31.58px auto;
    }
}

/* ===== Section / Formats & Team ===== */
.formats {
    padding: var(--section-gap) 0 0;
}

/* секция используется отдельно на странице — нужен отступ и снизу.
   Двойной класс: ниже по файлу .formats переопределяется шорткатом padding в медиа-запросах. */
.formats.formats--standalone {
    padding-bottom: 120px;
}

.formats__inner {
    /* контентная область 1360 + боковые поля → внешняя рамка 1440 */
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

/* Интро */
.formats__intro {
    max-width: 660px;
    margin: 0 auto 40px;
    text-align: center;
}

.formats__title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);           /* 50 / 34 моб. */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
    margin: 0;
}

.formats__desc {
    max-width: 430px;
    margin: 16px auto 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.35;
    color: #4b4b4b;
}

/* Сетка карточек */
.formats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Карточка формата */
.format-card {
    display: flex;
    flex-direction: column;
    background: #f0f0f0;
    overflow: hidden;
}

.format-card__panel {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 440px;
    padding: 24px;
    background: #f0f0f0;
}

/* Обёртка заголовка — единая высота под 2 строки, текст выравнивается по центру */
.format-card__head {
    display: flex;
    align-items: center;
    min-height: 54px;                  /* 2 строки × 24px × 1.1 — разделители совпадают */
}

.format-card__title {
    font-family: var(--font-display);
    font-size: var(--fs-h5);           /* 24 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
    margin: 0;
}

/* Линия-разделитель во всю ширину карточки — пунктир */
.format-card__line {
    display: block;
    height: 0;
    margin: 16px -24px 0;
    border-top: 1px dashed var(--brand-primary);
}

/* Иллюстрация по центру свободного пространства */
.format-card__media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

.format-card__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 43%;                    /* было 62% — уменьшено на 30% */
    max-height: 91px;                  /* было 130px — уменьшено на 30% */
    object-fit: contain;
}

.format-card__text {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);      /* 14 */
    line-height: 1.3;
    color: var(--brand-primary);
}

/* Кнопка «купить билет» */
.format-card__btn {
    display: block;
    padding: 14px;
    text-align: center;
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);      /* 14 */
    color: var(--button-text-primary);
    background: var(--button-bg-primary);
    transition: opacity var(--transition);
}

.format-card__btn:hover {
    opacity: 0.9;
}

/* Планшет — 2 колонки */
@media (max-width: 960px) {
    .formats__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Мобильный — 1 колонка */
@media (max-width: 560px) {
    .formats {
        padding: 48px 0;
    }
    .formats__grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Section / Афиша ===== */
.afisha {
    padding: var(--section-gap) 0 0;
}

.afisha__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

/* Интро */
.afisha__intro {
    max-width: 660px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.afisha__title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);           /* 50 / 34 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
    margin: 0;
}

.afisha__desc {
    max-width: 430px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.35;
    color: #4b4b4b;
}

.afisha__more {
    position: relative;
    font-family: var(--font-display);
    font-size: var(--fs-body-lg);      /* 18 */
    letter-spacing: -0.4px;
    color: var(--brand-secondary);
    padding-bottom: 8px;
}

/* Подчёркивание картинкой line_blue.svg */
.afisha__more::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: url('../images/line_blue.svg') center / 100% 100% no-repeat;
    transform-origin: left;
}

.afisha__more:hover::after {
    animation: about-underline 0.6s ease forwards;
}

/* Сетка карточек */
.afisha__grid {
    display: flex;
    gap: 20px;
}

.afisha__grid > .afisha-card {
    flex: 1 1 0;                          /* до 991px могут сужаться */
    min-width: 0;
}

/* с 991px и меньше — минимум 325px, горизонтальный скролл */
@media (max-width: 991px) {
    .afisha__grid {
        overflow-x: auto;
    }
    .afisha__grid > .afisha-card {
        flex: 0 0 325px;
        min-width: 325px;
    }
}

/* Карточка афиши */
.afisha-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Медиа с фото, оверлеем и бейджем */
.afisha-card__media {
    position: relative;
    aspect-ratio: 325 / 237;
    overflow: hidden;
}

.afisha-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.afisha-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);   /* #00000026 */
    pointer-events: none;
}

.afisha-card__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);      /* 14 */
    font-weight: 500;
    color: var(--gray-400);            /* #f1f1f1 */
}

/* Контент карточки */
.afisha-card__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.afisha-card__date {
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);      /* 14 */
    line-height: var(--lh-body);
    color: var(--brand-primary);
}

.afisha-card__text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.afisha-card__heading {
    font-family: var(--font-display);
    font-size: var(--fs-h5);           /* 24 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
    margin: 0;
    min-height: 79px;                  /* 3 строки — описания выравниваются */
}

.afisha-card__desc {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);      /* 14 */
    line-height: var(--lh-body);
    color: #3859c7;
}

/* Мобильный */
@media (max-width: 560px) {
    .afisha {
        padding: 64px 0 0;
    }
}

/* ===== Section / Events ===== */
.events {
    padding: 24px 0 0;
}

.events__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.events__grid {
    display: flex;
    gap: 20px;
}

.events__grid > .event-card {
    flex: 1 1 0;                          /* до 991px могут сужаться */
    min-width: 0;
}

/* с 991px и меньше — минимум 325px, появляется горизонтальный скролл */
@media (max-width: 991px) {
    .events__grid {
        overflow-x: auto;
    }
    .events__grid > .event-card {
        flex: 0 0 325px;
        min-width: 325px;
    }
}

/* Лента дат */
.datestrip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 8px 0;
}

.datestrip__arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: opacity var(--transition);
}

.datestrip__arrow:hover {
    opacity: 0.55;
}

.datestrip__track {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;                /* Firefox */
}

.datestrip__track::-webkit-scrollbar {
    display: none;                        /* Chrome/Safari */
}

.datestrip__month {
    flex: 0 0 auto;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);         /* #737373 */
    white-space: nowrap;
    text-transform: uppercase;
}

.datestrip__day {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 38px;
    height: 51px;
    border: none;
    background: none;
    cursor: pointer;
}

.datestrip__day-num {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    color: var(--text-muted);             /* #212121 */
}

.datestrip__day-label {
    font-family: var(--font-numeric);     /* Inter */
    font-size: 11px;
    line-height: 1;
    color: var(--text-secondary);         /* #737373 */
}

/* Выбранная дата */
.datestrip__day.is-active {
    background: url('../images/date.svg') center / cover no-repeat;
}

.datestrip__day.is-active .datestrip__day-num {
    color: var(--white);
}

.datestrip__day.is-active .datestrip__day-label {
    color: var(--gray-700);               /* #bfbfbf */
}

/* CTA снизу по центру */
.events__cta {
    position: relative;
    display: block;
    width: fit-content;
    margin: 40px auto 0;
    font-family: var(--font-display);
    font-size: var(--fs-h6);           /* 20 */
    color: var(--brand-primary);
    padding-bottom: 8px;
}

/* Подчёркивание картинкой line_blue.svg */
.events__cta::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: url('../images/line_blue.svg') center / 100% 100% no-repeat;
    transform-origin: left;
}

.events__cta:hover::after {
    animation: about-underline 0.6s ease forwards;
}

/* Карточка-билет */
.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #e1e0df;
}

/* Верхняя инфо-панель */
.event-card__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 314px;
    padding: 14px 16px 24px;
    background: #f0f0f0;
}

.event-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.event-card__date,
.event-card__time {
    font-family: var(--font-display);
    font-size: var(--fs-h6);           /* 20 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
}

/* Линия отрыва с боковыми вырезами */
.event-card__line {
    position: relative;
    display: block;
    height: 0;
    margin: 14px -16px 0;
    border-top: 1px dashed var(--brand-primary);
}

.event-card__notch {
    position: absolute;
    top: 0;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--bg-page);         /* #fafafa — цвет фона за карточкой */
    transform: translateY(-50%);
}

.event-card__notch--left {
    left: -8.5px;
}

.event-card__notch--right {
    right: -8.5px;
}

.event-card__tag {
    margin-top: 32px;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);       /* 14 */
    font-weight: 500;
    text-transform: uppercase;
    color: #8c9cd2;
}

.event-card__title {
    margin: 30px 0 0;
    min-height: 53px;                   /* 2 строки — цена/описание совпадают */
    font-family: var(--font-display);
    font-size: var(--fs-h5);            /* 24 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
}

.event-card__price {
    margin-top: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--brand-primary);
}

.event-card__desc {
    margin: 24px 0 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);       /* 14 */
    line-height: var(--lh-body);
    color: #3859c7;
}

/* Фото + кнопка */
.event-card__media {
    position: relative;
    aspect-ratio: 325 / 237;
    overflow: hidden;
}

.event-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card__btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px;
    text-align: center;
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);       /* 14 */
    color: var(--button-text-primary);
    background: var(--button-bg-primary);
    transition: opacity var(--transition);
}

.event-card__btn:hover {
    opacity: 0.9;
}

/* Мобильный */
@media (max-width: 560px) {
    .events {
        padding: 24px 0 0;
    }
}

/* ===== Section / Quote ===== */
.quote {
    --med-h: 420px;                       /* высота портрета-медальона */
    display: flex;
    justify-content: center;
    align-items: flex-start;              /* контент прижат к верху */
    /* margin (не padding!) — фон секции не заходит под выступ медальона */
    margin-top: 330px;
    padding: 0 20px clamp(60px, 9vw, 120px);
    background: url('../images/cultura_bg.jpg') center / cover no-repeat;
}

.quote__panel {
    width: min(575px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;                  /* центрирование по горизонтали */
    gap: 40px;
    padding: 0 0 114px;
    text-align: center;
    background: url('../images/cultura_block.jpg') center / cover no-repeat;
}

/* Портрет в фигурной рамке — обычный поток, поднят вверх отрицательным отступом */
.quote__medallion {
    margin-top: -210px;
    height: var(--med-h);
    width: auto;
}

.quote__body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.quote__text {
    margin: 0;
    max-width: 492px;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 моб. */
    line-height: var(--lh-heading);
    color: var(--gray-400);               /* #f1f1f1 */
}

.quote__author {
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);         /* 18 */
    font-style: normal;
    color: var(--gray-400);
}

/* Мобильный — уменьшаем медальон (отступы пересчитаются автоматически) */
@media (max-width: 560px) {
    .quote {
        --med-h: 300px;
        /* full-bleed: панель и фото во всю ширину */
        padding: 0 0 115%;                /* низ = высота фото (786:904 ≈ 115% ширины) */
        /* мобильный фон — цельное фото, прижато к низу во всю ширину */
        background-image: url('../images/cultura_bg-mob.jpg');
        background-position: bottom center;
        background-size: 100% auto;
    }
}

/* Плавающая эмблема (управляется GSAP по скроллу) */
.floating-emblem {
    position: absolute;
    top: 0;
    left: 50%;
    width: 68px;
    height: auto;
    margin-left: -34px;                   /* центрирование по горизонтали без transform */
    z-index: 50;
    pointer-events: none;
}

/* вторая эмблема появляется только в slider */
#floating-emblem-2 {
    opacity: 0;
}

/* на экранах <991px эмблемы стоят на конечных точках без анимации */
@media (max-width: 991px) {
    /* показываем статичную эмблему в футере (вместо приезжающей) */
    body.home .footer-card__emblem img {
        visibility: visible;
    }
    /* вторая эмблема стоит статично в слайдере (в футере — своя, статичная) */
    #floating-emblem-2 {
        opacity: 1;
    }
}

/* ===== Section / Hero ===== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 681px;
    padding: 15px var(--grid-margin) 48px;
    overflow: hidden;
    color: var(--white);
}

/* Два фоновых фото */
.hero__bg {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 0;
}

.hero__bg-left,
.hero__bg-right {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.hero__bg-left {
    background-image: url('../images/hero_left.jpg');
}

.hero__bg-right {
    background-image: url('../images/hero_right.jpg');
}

/* Тёмный градиент снизу — для читаемости белого текста */
.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.5) 100%);
}

/* Хедер */
.hero__header {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 72px;
}

.hero__event {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    font-family: var(--font-display);
    font-size: var(--fs-h6);              /* 20 */
    color: var(--white);
    transition: opacity var(--transition);
}

.hero__event:hover {
    opacity: 0.75;
}

.hero__logo {
    justify-self: center;
    display: block;
}

.hero__logo img {
    display: block;
    width: 178px;
    height: auto;
}

.hero__choose {
    position: relative;
    justify-self: end;
    font-family: var(--font-display);
    font-size: var(--fs-h6);              /* 20 */
    color: var(--white);
    padding-bottom: 8px;
}

/* Подчёркивание картинкой line.svg */
.hero__choose::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: url('../images/line.svg') center / 100% 100% no-repeat;
    transform-origin: left;
}

/* При наведении: линия уходит влево и заново появляется справа */
.hero__choose:hover::after {
    animation: about-underline 0.6s ease forwards;
}

/* На главной кнопка вынесена из шапки — позиционируем справа сверху */
.hero > .hero__choose {
    position: absolute;
    top: 37px;
    right: var(--grid-margin);
    z-index: 2;
}

/* Заголовок снизу-слева, подзаголовок снизу-справа */
.hero__foot {
    position: relative;
    z-index: 1;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.hero__title {
    max-width: 590px;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h1);              /* 64 / 38 моб. */
    line-height: var(--lh-heading);
    color: var(--white);
}

.hero__subtitle {
    max-width: 429px;
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);         /* 18 */
    line-height: 1.4;
    color: var(--white);
}

/* Мобильный первый экран */
@media (max-width: 760px) {
    .hero {
        min-height: 600px;
        min-height: 100svh;
        padding: 0;
        text-align: center;
    }
    .hero__bg-right {
        display: none;
    }
    .hero__bg-left {
        flex: 1 0 100%;
    }

    /* шапка: событие-плашка сверху + логотип по центру */
    .hero__header {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: auto;
    }
    .hero__event {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 14px 20px;
        background: var(--brand-primary);
        font-size: var(--fs-body-sm);         /* 14 */
        letter-spacing: 0.04em;
    }
    .hero__event svg {
        transform: rotate(90deg);             /* стрелка вниз */
    }
    .hero__logo {
        justify-self: unset;
        margin-top: 40px;
    }

    /* заголовок + подзаголовок по центру */
    .hero__foot {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 20px;
        margin-top: 0;
        padding: 40px 20px 0;
    }
    .hero__title,
    .hero__subtitle {
        max-width: none;
    }

    /* «выбрать событие» по центру снизу */
    .hero > .hero__choose {
        position: relative;
        top: auto;
        right: auto;
        align-self: center;
        margin: 0 auto 48px;
    }
}

/* ===== Section / Что такое «Культурный слой» ===== */
.about {
    position: relative;
    overflow: hidden;
    height: 830px;
    margin-top: var(--section-gap);       /* отступ сверху (bg-секция → через margin) */
    display: flex;
    align-items: center;                  /* текст по центру по вертикали */
    justify-content: center;
    padding: 0 20px;
    text-align: center;
    background:
        url('../images/chto_takoe.jpg') top center / cover no-repeat,
        var(--bg-page);
}

/* Две волны одного цвета (#FAFAFA) поверх фото:
   .about__forma (forma_big) уезжает вверх по скроллу и скрывается,
   .about__forma-top (forma_big-top) остаётся на месте — форма как будто трансформируется. */
.about__forma,
.about__forma-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
}

/* остаётся на месте — конечная форма */
.about__forma-top {
    height: 213px;
    background: url('../images/forma_big-top.svg') top center repeat-x;
}

/* уезжает вверх по скроллу */
.about__forma {
    height: 247px;
    background: url('../images/forma_big.svg') top center repeat-x;
    will-change: transform;
}

/* Боковые декоративные фото — привязаны к низу блока */
.about__side {
    position: absolute;
    bottom: 90px;
    width: clamp(140px, 15.5vw, 222px);
    height: auto;
    z-index: 0;
}

.about__side--left {
    left: 0;
}

.about__side--right {
    right: 0;
}

.about__inner {
    position: relative;
    z-index: 2;
    max-width: 660px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.about__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.about__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 */
    line-height: var(--lh-heading);
    color: var(--white);
}

.about__logo {
    display: block;
    width: min(415px, 80%);
    height: auto;
}

.about__subtitle {
    max-width: 420px;
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body);            /* 16 */
    line-height: 1.4;
    color: var(--white);
}

.about__link {
    position: relative;
    font-family: var(--font-display);
    font-size: var(--fs-body-lg);         /* 18 */
    color: var(--white);
    padding-bottom: 8px;
}

/* Подчёркивание картинкой line.svg */
.about__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: url('../images/line.svg') center / 100% 100% no-repeat;
    transform-origin: left;
}

/* При наведении: линия уходит вправо и заново появляется слева */
.about__link:hover::after {
    animation: about-underline 0.6s ease forwards;
}

@keyframes about-underline {
    0%     { transform: scaleX(1); transform-origin: left; }
    50%    { transform: scaleX(0); transform-origin: left; }
    50.01% { transform: scaleX(0); transform-origin: right; }
    100%   { transform: scaleX(1); transform-origin: right; }
}

/* Узкие экраны — прячем боковые фото */
@media (max-width: 1100px) {
    .about__side {
        display: none;
    }
}

@media (max-width: 560px) {
    .about {
        height: auto;
        min-height: 600px;
        padding: 64px 20px 80px;
    }
}

/* ===== Section / About Community ===== */
.about-community {
    padding: 140px var(--grid-margin) 40px;
}

.about-community__inner {
    max-width: 660px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.about-community__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
}

.about-community__desc {
    max-width: 430px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.35;
    color: #4b4b4b;
}

/* ===== Section / About Community In ===== */
.aci {
    position: relative;
    width: 100%;
    aspect-ratio: 1443 / 831;
    background: url('../images/krug.jpg') top center / cover no-repeat;
}

.aci__grid {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
    display: flex;
    align-items: flex-start;               /* растёт только карточка под курсором */
    gap: 20px;
}

.aci__grid > .aci-card {
    flex: 1 1 0;                          /* до 991px могут сужаться */
    min-width: 0;
}

.aci-card {
    position: relative;
    height: 293px;
    padding: 32px;
    background: var(--gray-200);          /* #f6f6f6 */
    overflow: hidden;
    transition: height 0.45s cubic-bezier(0.4, 0.15, 0.2, 1);
}

/* Текстура, проявляющаяся при наведении */
.aci-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('../images/community_bg.jpg') center / cover no-repeat;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.aci-card__title {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 240px;
    font-family: var(--font-display);
    font-size: var(--fs-h4);              /* 26 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
}

.aci-card__num {
    position: absolute;
    z-index: 1;
    top: 160px;                           /* остаётся на месте при вытягивании */
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: clamp(72px, 9vw, 121px);
    line-height: 1;
    color: var(--brand-primary);
}

/* Описание — появляется при наведении */
.aci-card__desc {
    position: absolute;
    z-index: 1;
    left: 32px;
    right: 32px;
    bottom: 32px;
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    line-height: 1.4;
    color: var(--brand-primary);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

/* Раскрытие при наведении */
.aci-card:hover {
    height: 440px;
}

.aci-card:hover::before {
    opacity: 1;
}

.aci-card:hover .aci-card__desc {
    opacity: 1;
    transform: none;
}

/* ≤991px — обычная высота, карточки min 325px, горизонтальный скролл */
@media (max-width: 991px) {
    .aci {
        aspect-ratio: auto;
        min-height: 760px;
        padding: 40px 20px;
    }
    .aci__grid {
        position: static;
        max-width: none;
        padding: 0;
        overflow-x: auto;
        align-items: stretch;             /* карточки одной высоты в скролле */
    }
    .aci__grid > .aci-card {
        flex: 0 0 325px;
        min-width: 325px;
    }

    /* Карточки раскрыты статично: на тач-устройствах нет hover,
       поэтому описание видно сразу, номер уходит вправо вверх. */
    .aci-card {
        height: auto;
    }
    .aci-card__title {
        max-width: 60%;                   /* справа освобождаем место под номер */
    }
    .aci-card__num {
        top: 28px;
        left: auto;
        right: 28px;
        transform: none;
        color: rgba(8, 52, 197, 0.35);    /* бледно-голубой номер (как на макете) */
    }
    .aci-card__desc {
        position: static;
        margin-top: 40px;
        opacity: 1;
        transform: none;
    }

    /* без hover-механики: ни роста высоты, ни проявления текстуры */
    .aci-card:hover {
        height: auto;
    }
    .aci-card:hover::before {
        opacity: 0;
    }
}

/* Мобильный */
@media (max-width: 560px) {
    .aci {
        padding: 32px 20px;
    }
}

/* ===== Section / Slider (отзывы) ===== */
.slider {
    position: relative;
    min-height: 827px;
    margin-top: var(--section-gap);       /* отступ сверху (bg-секция) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px var(--grid-margin);
    overflow: hidden;
    text-align: center;
    color: var(--white);
    /* картинка растянута cover, сверху волна forma_big.svg (как в about, без анимации) */
    background:
        url('../images/forma_big.svg') top -22px center / auto repeat-x,
        url('../images/slider.jpg') center / cover no-repeat,
        var(--brand-primary);
}

.slider > * {
    position: relative;
    z-index: 1;
}

.slider__tag {
    position: absolute;
    top: 125px;                           /* от верхнего края секции .slider */
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--white);
}

.slider__center {
    /* без позиционирования: контейнером для абсолютного .slider__tag
       становится сама .slider, чтобы top отсчитывался от края секции */
    position: static;
    max-width: 940px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.slider__text {
    margin: 0;
    font-family: var(--font-display);
    font-size: 26px;
    line-height: var(--lh-heading);
    color: var(--white);
    transition: opacity 0.4s ease;
}

.slider__monogram {
    display: block;
    width: min(415px, 80%);
    height: auto;
}

.slider__review {
    margin: 0;
    max-width: 740px;
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);         /* 18 */
    line-height: 1.5;
    color: #b0bce6;
    transition: opacity 0.4s ease;
}

.slider__link {
    position: relative;
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: var(--fs-body-lg);         /* 18 */
    color: var(--white);
    padding-bottom: 8px;
}

/* Подчёркивание картинкой line.svg */
.slider__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: url('../images/line.svg') center / 100% 100% no-repeat;
    transform-origin: left;
}

/* При наведении: линия уходит влево и заново появляется справа */
.slider__link:hover::after {
    animation: about-underline 0.6s ease forwards;
}

/* Стрелки */
.slider__arrows {
    display: contents;                    /* на десктопе не влияет — стрелки абсолютные */
}

.slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    transition: opacity var(--transition);
}

.slider__arrow:hover {
    opacity: 0.6;
}

.slider__arrow img {
    width: 37px;
    height: auto;
}

.slider__arrow--prev {
    left: 72px;
}

.slider__arrow--prev img {
    transform: scaleX(-1);
}

.slider__arrow--next {
    right: 72px;
}

/* Счётчик */
.slider__counter {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    color: var(--white);
}

/* мягкая смена текста */
.slider__center.is-fading .slider__text,
.slider__center.is-fading .slider__review {
    opacity: 0;
}

@media (max-width: 760px) {
    .slider {
        min-height: 100svh;
        padding: 56px 24px;
        justify-content: center;
    }

    /* центр: монограмма → тег → отзыв → мероприятие */
    .slider__center {
        order: 1;
        gap: 24px;
    }
    .slider__monogram {
        order: 1;
        width: min(280px, 62%);
    }
    /* тег остаётся вверху секции, как на десктопе */
    .slider__tag {
        top: 125px;
    }
    .slider__text {
        order: 3;
    }
    .slider__review {
        order: 4;
    }

    /* стрелки — по центру под текстом */
    .slider__arrows {
        display: flex;
        order: 2;
        justify-content: center;
        gap: 56px;
        margin-top: 40px;
    }
    .slider__arrow {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
    }

    /* счётчик снизу */
    .slider__counter {
        order: 3;
        position: static;
        left: auto;
        bottom: auto;
        transform: none;
        margin-top: 40px;
    }
}

/* ===== Section / Team ===== */
.team {
    padding: var(--section-gap) 0 0;
}

.team__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.team__intro {
    max-width: 660px;
    margin: 0 auto 56px;
    text-align: center;
}

.team__title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
    margin: 0;
}

.team__desc {
    max-width: 430px;
    margin: 16px auto 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);         /* 18 */
    line-height: 1.35;
    color: var(--text-secondary);
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    justify-items: center;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 440px;
}

/* 3D-переворот при наведении */
.team-flip {
    width: 100%;
    perspective: 1400px;
}

.team-flip__inner {
    position: relative;
    width: 100%;
    aspect-ratio: 439 / 441;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.15, 0.2, 1);
}

.team-flip:hover .team-flip__inner,
.team-flip:focus-within .team-flip__inner {
    transform: rotateY(180deg);
}

.team-flip__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.team-flip__back {
    transform: rotateY(180deg);
}

.team-flip__shape {
    display: block;
    width: 100%;
    height: 100%;
}

/* Текст на обороте — по центру формы */
.team-flip__bio {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22%;
    margin: 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: clamp(13px, 1.15vw, 16px);
    line-height: 1.4;
    color: var(--white);
}

.team-member__name {
    margin: 24px 0 0;
    font-family: var(--font-display);
    font-size: var(--fs-h5);              /* 24 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
}

.team-member__role {
    margin: 8px 0 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    color: var(--text-secondary);
}

/* Планшет — 2 в ряд */
@media (max-width: 900px) {
    .team__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Мобильный — 1 в ряд */
@media (max-width: 560px) {
    .team {
        padding: 56px 0;
    }
    .team__grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Section / Footer ===== */
.footer {
    color: var(--white);
}

/* CTA-область с фоновыми фото */
.footer-cta {
    position: relative;
    overflow: hidden;
    padding: 32px var(--grid-margin);
}

.footer-cta__bg {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 0;
}

.footer-cta__bg-left,
.footer-cta__bg-right {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.footer-cta__bg-left {
    background-image: url('../images/footer_1.jpg');
}

.footer-cta__bg-right {
    background-image: url('../images/footer_2.jpg');
}

/* лёгкое затемнение для читаемости белого текста */
.footer-cta__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
}

.footer-cta__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 40px;
    width: 100%;
    min-height: 600px;
}

/* Навигация слева / контакты справа */
.footer-nav,
.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contacts {
    align-items: flex-end;
}

.footer-nav__link,
.footer-contacts__link {
    font-family: var(--font-display);
    font-size: var(--fs-h6);              /* 16→20 токен; в макете 16 */
    color: var(--white);
    transition: opacity var(--transition);
}

.footer-nav__link:hover,
.footer-contacts__link:hover {
    opacity: 0.7;
}

/* Центр: логотип + карточка */
.footer-cta__center {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.footer-logo {
    width: 178px;
    height: auto;
}

/* Карточка подписки на фигурном фоне */
.footer-card {
    width: 471px;
    max-width: 100%;
    aspect-ratio: 471 / 477;
    background: url('../images/footer_svg.png') center / contain no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    gap: 40px;
    padding: 32px 86px;
    text-align: center;
}

.footer-card__emblem img {
    display: block;
    width: 68px;
    height: auto;
}

/* на главной эмблема скрыта — на её место приезжает плавающий логотип */
.home .footer-card__emblem img {
    visibility: hidden;
}

.footer-card__heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h5);              /* 24 */
    line-height: var(--lh-heading);
    color: var(--brand-secondary);
}

.footer-card__subtitle {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    line-height: 1.3;
    color: var(--brand-primary);
}

/* Поле e-mail */
.footer-card__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 220px;
}

/* строка с полем ввода и кнопкой */
.footer-card__row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border-bottom: 1px solid rgba(12, 53, 191, 0.5);   /* #0c35bf80 */
    padding-bottom: 6px;
}

.footer-card__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    color: var(--brand-primary);
    outline: none;
}

.footer-card__input::placeholder {
    color: var(--brand-primary);
    opacity: 0.9;
}

.footer-card__submit {
    display: flex;
    padding: 0;
    border: none;
    background: none;
    color: var(--brand-primary);
    cursor: pointer;
    transition: transform var(--transition);
}

.footer-card__submit:hover {
    transform: translate(2px, -2px);
}

.footer-card__submit img {
    display: block;
    width: 20px;
    height: 20px;
}

/* ===== Кастомный чекбокс формы ===== */
.form-check {
    display: flex;
    align-items: flex-start;              /* рамка по первой строке текста */
    cursor: pointer;
}

/* нативный чекбокс скрыт, но остаётся доступным с клавиатуры */
.form-check__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.form-check__box {
    position: relative;
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    background: url('../images/checkbox_form.svg') center / contain no-repeat;
}

/* отметка выбранного состояния */
.form-check__box::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--brand-primary);
    opacity: 0;
    transition: opacity var(--transition);
}

.form-check__input:checked + .form-check__box::after {
    opacity: 1;
}

.form-check__input:focus-visible + .form-check__box {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.form-check__text {
    margin-left: 8px;
    font-family: var(--font-body);
    font-size: 10px;
    line-height: 1.3;
    text-align: left;                     /* .footer-card центрует — сбрасываем */
    color: rgba(8, 52, 197, 0.5);         /* #0834C5, 50% */
}

/* ссылка внутри подписи чекбокса */
.form-check__link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity var(--transition);
}

.form-check__link:hover {
    opacity: 0.7;
}

/* Нижняя синяя полоса */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 13px var(--grid-margin);
    background: var(--brand-primary);
}

/* декоративная линия — только в мобильной раскладке */
.footer-bottom__line {
    display: none;
}

.footer-bottom__nav {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-bottom__link,
.footer-bottom__copy {
    font-family: var(--font-body);
    font-size: var(--fs-caption);         /* 12 */
    color: var(--white);
    opacity: 0.55;
}

.footer-bottom__link {
    transition: opacity var(--transition);
}

.footer-bottom__link:hover {
    opacity: 0.7;
}

/* Планшет / мобильный — стек */
@media (max-width: 860px) {
    .footer-cta {
        padding: 0;
    }
    /* левое фото на всю ширину экрана */
    .footer-cta__bg {
        display: flex;
    }
    .footer-cta__bg-right {
        display: none;
    }
    .footer-cta__bg-left {
        flex: 1 0 100%;
    }

    .footer-cta__grid {
        grid-template-columns: 1fr 1fr;
        min-height: 0;
        gap: 0;
    }
    .footer-cta__center {
        grid-column: 1 / -1;
        grid-row: 1;
        gap: 110px;
        padding: 48px 20px;
    }
    /* nav и контакты — рядом по 50% на общем синем фоне */
    .footer-nav {
        grid-column: 1;
        grid-row: 2;
    }
    .footer-contacts {
        grid-column: 2;
        grid-row: 2;
        align-items: flex-start;
    }
    .footer-nav,
    .footer-contacts {
        background: var(--brand-primary);   /* #0834C5 */
        padding: 32px 20px;
        gap: 16px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-bottom {
        padding-top: 0;
    }
    .footer-bottom__line {
        display: block;
        height: 2px;
        align-self: stretch;
        margin: 0 calc(-1 * var(--grid-margin)) 24px;
        background: url('../images/line.svg') center / 100% 100% no-repeat;
    }
    .footer-bottom__nav {
        flex-direction: column;
        gap: 12px;
    }

    .footer-card {
        gap: 20px;
        padding: 32px 66px;
    }
    .footer-card__form {
        max-width: 180px;
    }
    .footer-card__emblem img {
        width: 47px;
    }
    .footer-card__title {
        font-size: 20px;
    }
}

/* ===== Меню (боковая панель) ===== */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(30, 30, 30, 0.15);   /* #1E1E1E 15% */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 201;
    display: flex;
    flex-direction: column;
    width: 440px;
    max-width: 88vw;
    height: 100dvh;
    padding: 24px 40px 32px;
    color: var(--white);
    background: var(--brand-primary) url('../images/menu.jpg') center / cover no-repeat;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0.15, 0.2, 1);
    will-change: transform;
    overflow-y: auto;
}

/* Открытое состояние */
body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
}

body.menu-open .menu {
    transform: translateX(0);
}

.menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu__emblem img {
    display: block;
    width: 34px;
    height: auto;
}

.menu__close {
    display: flex;
    padding: 4px;
    border: none;
    background: none;
    color: var(--white);
    cursor: pointer;
    transition: opacity var(--transition);
}

.menu__close:hover {
    opacity: 0.7;
}

/* Декоративная линия line.svg во всю ширину панели */
.menu__line {
    display: block;
    height: 2px;
    margin: 24px -40px 0;
    background: url('../images/line.svg') center / 100% 100% no-repeat;
}

/* Пункты меню */
.menu__nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-top: 40px;
}

.menu__link {
    font-family: var(--font-display);
    font-size: var(--fs-h6);              /* 20 */
    color: var(--white);
    transition: opacity var(--transition);
}

.menu__link:hover {
    opacity: 0.75;
}

.menu__link--active {
    padding-bottom: 6px;
    background: url('../images/line.svg') no-repeat bottom right / 600px;
}

/* Низ панели: контакты + кнопка */
.menu__foot {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.menu__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.menu__contact {
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);         /* 14 */
    color: var(--white);
    transition: opacity var(--transition);
}

.menu__contact:hover {
    opacity: 0.75;
}

.menu__account {
    display: block;
    padding: 12px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--white);
    border: 1px solid var(--white);
    transition: background var(--transition), color var(--transition);
}

.menu__account:hover {
    background: var(--white);
    color: var(--brand-primary);
}

/* ===== Страница экспертов ===== */
.ex-hero {
    position: relative;
    min-height: 783px;
    display: flex;
    flex-direction: column;
    padding: 15px var(--grid-margin) 48px;
    overflow: hidden;
    color: var(--white);
}

.ex-hero__bg {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 0;
}

.ex-hero__bg-left,
.ex-hero__bg-right {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.ex-hero__bg-left {
    background-image: url('../images/hero-image-left.jpg');
}

.ex-hero__bg-right {
    background-image: url('../images/hero-image-right.jpg');
}

.ex-hero__body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.ex-hero__content {
    max-width: 590px;
}

.ex-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h1);              /* 64 / 38 моб. */
    line-height: var(--lh-heading);
    color: var(--white);
}

.ex-hero__subtitle {
    max-width: 429px;
    margin: 32px 0 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);         /* 18 */
    line-height: 1.4;
    color: var(--white);
}

/* Секция карточек */
.experts {
    padding: 80px 0 120px;
}

.experts__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.experts__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Карточка эксперта */
.expert-card {
    display: flex;
    flex-direction: column;
    aspect-ratio: 325 / 437;
    background: #efeeed;
    overflow: hidden;
}

.expert-card--cta {
    background: var(--brand-primary);
}

.expert-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.expert-card__head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.expert-card__name {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h5);              /* 24 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
}

.expert-card__role {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    color: var(--brand-primary);
}

.expert-card__cta-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h5);              /* 24 */
    line-height: var(--lh-heading);
    color: var(--white);
}

.expert-card__link {
    align-self: flex-start;
    margin-top: auto;                     /* прижать к низу тела — ссылки на одной линии */
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--brand-primary);
    border-bottom: 1.5px solid var(--brand-primary);
    padding-bottom: 2px;
    transition: opacity var(--transition);
}

.expert-card__link:hover {
    opacity: 0.7;
}

.expert-card__link--white {
    color: var(--white);
    border-bottom-color: var(--white);
}

.expert-card__photo {
    aspect-ratio: 325 / 265;
    overflow: hidden;
}

.expert-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CTA-карточка — фото приглушено */
.expert-card--cta .expert-card__photo img {
    opacity: 0.1;
}

/* Попап эксперта */
.expert-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.expert-modal[hidden] {
    display: none;                        /* перебиваем display:flex, когда скрыт */
}

.expert-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.expert-modal__card {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(670px, 100%);
    background: var(--gray-500);          /* #efeeed */
    padding: 6px;
}

.expert-modal__photo {
    flex: 0 0 46%;
    aspect-ratio: 309 / 336;
    overflow: hidden;
}

.expert-modal__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-modal__body {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 26px 26px 26px 26px;
    color: var(--brand-primary);
}

.expert-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    padding: 4px;
    border: none;
    background: none;
    color: var(--brand-primary);
    cursor: pointer;
    transition: opacity var(--transition);
}

.expert-modal__close:hover {
    opacity: 0.6;
}

.expert-modal__name {
    margin: 0;
    padding-right: 28px;
    font-family: var(--font-display);
    font-size: var(--fs-h5);              /* 24 */
    line-height: var(--lh-heading);
    color: var(--brand-primary);
}

.expert-modal__role {
    margin: -8px 0 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    color: var(--brand-primary);
}

.expert-modal__bio {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);         /* 14 */
    line-height: 1.4;
    color: var(--brand-primary);
}

@media (max-width: 560px) {
    .expert-modal__card {
        flex-direction: column;
    }
    .expert-modal__photo {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 10;
    }
}

/* Адаптив карточек */
@media (max-width: 960px) {
    .experts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    /* синий блок с текстом сверху, фото — отдельной полосой под ним */
    .ex-hero {
        min-height: 0;
        padding: 0;
        background: url('../images/hero-image-left.jpg') center / cover no-repeat;
    }

    /* фон перестаёт быть слоем — его половинки становятся элементами колонки */
    .ex-hero__bg {
        display: contents;
    }
    .ex-hero__bg-left {
        display: none;                    /* ушёл в фон самой секции */
    }
    .ex-hero__bg-right {
        order: 3;
        flex: none;
        width: 100%;
        aspect-ratio: 26 / 19;
    }

    .ex-hero .hero__header {
        order: 1;
    }

    /* на внутренних страницах в мобильной шапке только плашка события */
    .ex-hero .hero__logo,
    .ex-hero .hero__choose {
        display: none;
    }

    /* линия под плашкой */
    .ex-hero .hero__event {
        position: relative;
    }
    .ex-hero .hero__event::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        background: url('../images/line.svg') center / 100% 100% no-repeat;
    }

    .ex-hero__body {
        order: 2;
        flex: none;
        align-items: flex-start;
        padding: 56px 20px 48px;
    }
    .ex-hero__subtitle {
        font-size: 16px;
    }
}

@media (max-width: 560px) {
    .experts {
        padding: 48px 0 80px;
    }
    .experts__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ===== История: закреплённая секция с раскрытием (страница «О проекте») =====
   .history даёт запас прокрутки, .history__stage залипает на 100vh.
   По скроллу левая панель уезжает влево, правая расширяется на всю ширину,
   затем на ней проявляются плашки. */
.history {
    position: relative;
    height: 250vh;
}

.history__stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-page);
}

/* левая половина — уезжает влево */
.history__left {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 100px;
    text-align: center;
    background: #efeeed url('../images/about_history-left.jpg') center / cover no-repeat;
    will-change: transform;
}

.history__content {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.history__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 моб. */
    line-height: 1.1;
    color: var(--brand-primary);
}

.history__desc {
    max-width: 396px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.7);
    white-space: pre-line;
}

/* правая половина — расширяется влево до 100% */
.history__right {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('../images/about_history.jpg') center / cover no-repeat;
    will-change: width;
}

/* плашки разложены сразу на всю ширину экрана и прижаты вправо,
   поэтому при расширении панели они не перестраиваются */
.history__cards {
    position: absolute;
    top: 73px;
    right: 0;
    width: 100vw;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    /* та же контентная рамка, что у .about-how__row: 1360 по центру экрана */
    padding: 0 max(var(--grid-margin), calc((100vw - var(--content-max)) / 2));
}

.history__label {
    position: absolute;
    right: 0;
    bottom: 46px;
    width: 100vw;
    text-align: center;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0;
}

/* --- плашка (по образцу aci-card, но со своими стилями) --- */
.history-card {
    position: relative;
    flex: 1 1 0;                          /* до 991px сужаются, как в aci */
    min-width: 0;
    max-width: 325px;
    height: 293px;
    padding: 32px;
    overflow: hidden;
    background: var(--gray-200);          /* #f6f6f6 */
    opacity: 0;                           /* проявляется по скроллу */
    transition: height 0.45s cubic-bezier(0.4, 0.15, 0.2, 1);
}

/* текстура, проявляющаяся при наведении */
.history-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('../images/community_bg.jpg') center / cover no-repeat;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.history-card__title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h4);              /* 26 */
    line-height: 1.1;
    color: var(--brand-primary);
}

.history-card__num {
    position: absolute;
    z-index: 1;
    top: 143px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 121px;
    line-height: 1.1;
    color: var(--brand-primary);
    opacity: 0.33;
}

.history-card__desc {
    position: absolute;
    z-index: 1;
    left: 32px;
    bottom: 32px;
    max-width: 222px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.2;
    color: var(--brand-primary);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.history-card:hover {
    height: 440px;
}

.history-card:hover::before {
    opacity: 1;
}

.history-card:hover .history-card__desc {
    opacity: 0.85;
    transform: none;
}

/* ≤991px — без закрепления и анимации: сначала текстовый блок,
   под ним фон с плашками в горизонтальном скролле */
@media (max-width: 991px) {
    .history {
        height: auto;
    }
    .history__stage {
        position: static;
        height: auto;
        display: flex;
        flex-direction: column;
    }
    .history__left,
    .history__right {
        position: static;
        width: 100% !important;
        height: auto;
        transform: none !important;
    }
    /* в разметке .history__right идёт первым — меняем порядок */
    .history__left {
        order: 1;
        padding: 64px 20px;
    }
    /* плашки центрируются по вертикали внутри блока с фото */
    .history__right {
        order: 2;
        min-height: 670px;
        padding: 0;
        display: flex;
        align-items: center;
    }
    .history__cards {
        position: static;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 20px;
    }
    .history__label {
        display: none;
    }
    .history-card {
        flex: 0 0 325px;
        min-width: 325px;
        height: 210px;
        opacity: 1 !important;
    }
    /* без раскрытия по наведению — высота фиксированная */
    .history-card:hover {
        height: 210px;
    }
    .history-card:hover::before {
        opacity: 0;
    }
    .history-card__title {
        max-width: 60%;
        font-size: 18px;
    }
    .history-card__num {
        top: 28px;
        left: auto;
        right: 28px;
        transform: none;
        font-size: 70px;
    }
    /* описание видно всегда, прижато к низу плашки */
    .history-card__desc {
        opacity: 0.85;
        transform: none;
    }
}

/* ===== «Так родился Культурный слой» (страница «О проекте») ===== */
.about-how {
    padding: 107px 0;
    background: var(--bg-page);
}

/* та же контентная рамка, что у .formats__inner */
.about-how__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.about-how__intro {
    max-width: 616px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.about-how__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 моб. */
    line-height: 1.1;
    color: var(--brand-primary);
}

.about-how__subtitle {
    max-width: 504px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.1;
    color: rgba(0, 0, 0, 0.7);
}

/* grid с фиксированной серединой — картинка строго по центру секции */
.about-how__row {
    display: grid;
    grid-template-columns: 1fr 440px 1fr;
    align-items: start;
    gap: 58px;
    margin-top: 40px;
}

/* боковые колонки опущены относительно центральной, как в макете */
.about-how__col {
    margin-top: 83px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-how__label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    color: rgba(8, 52, 197, 0.4);
}

.about-how__text {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.6);
}

.about-how__media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.about-how__media img {
    display: block;
    width: 100%;
    height: auto;
}

.about-how__tagline {
    max-width: 296px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    color: rgba(8, 52, 197, 0.4);
}

/* планшет и мобильный — в одну колонку, картинка первой */
@media (max-width: 991px) {
    .about-how {
        padding: 72px 0;
    }
    .about-how__row {
        grid-template-columns: minmax(0, 440px);
        justify-content: center;
        gap: 40px;
        margin-top: 32px;
    }
    .about-how__col {
        margin-top: 0;
    }
    .about-how__media {
        order: -1;
    }

    .about-how__subtitle {
        font-size: 16px;
    }
    .about-how__tagline {
        font-size: 12px;
    }
    /* подписи и текст колонок по центру */
    .about-how__col {
        align-items: center;
        text-align: center;
    }
}

/* ===== Цитата на странице «О проекте» (свои стили, не связаны с .quote) ===== */
.about-quote {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 816px;
    background: url('../images/about_text.jpg') center / cover no-repeat;
}

.about-quote__panel {
    width: 581px;
    max-width: 100%;
    min-height: 661px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 44px 0;                 /* 581 - 2*44 = 493 ≈ ширина текста в макете */
    text-align: center;
    background: url('../images/about_text-bg.jpg') center / cover no-repeat;
}

.about-quote__emblem {
    display: block;
    width: 68px;
    height: auto;
}

/* текст центрируется в остатке панели — даёт отступ 237px сверху, как в макете */
.about-quote__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.about-quote__text {
    margin: 0;
    font-family: var(--font-display);
    font-size: 36px;
    line-height: 1.3;
    color: var(--gray-400);               /* #f1f1f1 */
}

.about-quote__author {
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.1;
    color: var(--gray-400);
}

@media (max-width: 760px) {
    .about-quote {
        min-height: 0;
        padding-bottom: 450px;
        background: url('../images/about_text.jpg') left bottom / 100vh no-repeat;
    }
    .about-quote__emblem {
        width: 40px;
    }
    .about-quote__panel {
        min-height: 0;
        padding: 32px 24px 56px;
    }
    .about-quote__body {
        flex: none;
        margin-top: 56px;
    }
    .about-quote__text {
        font-size: 26px;
    }
    .about-quote__author {
        font-size: 16px;
    }
}


/* ===== Hero страницы «События» =====
   .events-hero — обёртка, даёт запас прокрутки (высоту ставит JS).
   .events-hero__stage залипает на 100vh: фон и левая колонка стоят на месте,
   уезжает вверх только правая панель .events-hero__detail. */
.events-hero {
    position: relative;
}

.events-hero__stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 15px var(--grid-margin) 0;
    color: var(--white);
    background: url('../images/sobitie.jpg') center / cover no-repeat;
}

/* затемнение поверх фото (#00000059 из макета) */
.events-hero__stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.events-hero__stage > * {
    position: relative;
    z-index: 1;
}

/* карточка прижата к низу сцены — нижний отступ живёт здесь */
.events-hero__card {
    position: absolute;
    z-index: 1;
    left: var(--grid-margin);
    right: var(--grid-margin);
    bottom: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

/* кнопка видна в исходном состоянии, потом её перекрывает выезжающая панель */
.events-hero__btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 163px;
    height: 48px;
    padding: 12px 16px;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.1;
    color: var(--brand-primary);
    background: var(--white);
    transition: opacity var(--transition);
}

.events-hero__btn:hover {
    opacity: 0.85;
}

.events-hero__info {
    flex: 0 1 461px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.events-hero__date {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--white);
}

.events-hero__details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.events-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 моб. */
    line-height: 1.1;
    color: var(--white);
}

.events-hero__price {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--white);
}

/* --- правая панель: прижата к правому краю, стартует за нижним краем --- */
.events-hero__detail {
    position: absolute;
    z-index: 2;
    top: 100%;
    right: 0;
    width: 579px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 45px 24px;
    background: var(--bg-page);           /* #fafafa */
    will-change: transform;
}

.events-hero__detail-title {
    max-width: 406px;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h4);              /* 26 */
    line-height: 1.1;
    color: var(--brand-primary);
}

.events-hero__detail-subtitle {
    max-width: 396px;
    margin: 14px 0 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.7);
}

.events-hero__detail-img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 32px;
}

.events-hero__detail-text {
    max-width: 433px;
    margin: 32px 0 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.7);
    white-space: pre-line;
}

.events-hero__quote {
    max-width: 433px;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.events-hero__quote-title {
    max-width: 390px;
    margin: 0;
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.1;
    color: var(--brand-primary);
}

.events-hero__quote-text {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.7);
}

/* три бокса: дата / место / стоимость */
.events-hero__meta {
    width: 100%;
    margin-top: 32px;
    display: flex;
    gap: 10px;
}

.events-hero__meta-item {
    flex: 1 1 0;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid var(--brand-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
    color: var(--brand-primary);
    white-space: pre-line;
}

.events-hero__buy {
    width: 100%;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 1.1;
    color: var(--white);
    background: var(--brand-primary);
    transition: opacity var(--transition);
}

.events-hero__buy:hover {
    opacity: 0.85;
}

/* ≤991px — та же механика, что на десктопе: hero стоит, панель наезжает сверху.
   Отличия: всё во всю ширину, карточка колонкой, кнопка под ценой. */
@media (max-width: 991px) {
    /* шапка-плашка во всю ширину, поэтому боковые поля уходят на содержимое */
    .events-hero__stage {
        padding: 0;
    }

    /* на мобилке в шапке плашка + логотип, «выбрать событие» не нужен */
    .events-hero .hero__choose {
        display: none;
    }

    /* дата → название → цена → кнопка, всё по левому краю */
    .events-hero__card {
        left: var(--grid-margin);
        right: var(--grid-margin);
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    .events-hero__info {
        flex: none;
        gap: 32px;
    }

    /* панель во всю ширину экрана */
    .events-hero__detail {
        width: 100%;
        max-width: none;
        padding: 40px var(--grid-margin);
    }

    /* три бокса друг под другом, каждый во всю ширину */
    .events-hero__meta {
        flex-direction: column;
    }
    .events-hero__meta-item {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* ===== Hero страницы «О проекте» ===== */
.about-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 783px;
    padding: 15px var(--grid-margin) 24px;
    color: var(--white);
    background: url('../images/about_hero.jpg') center / cover no-repeat;
}

/* лёгкое затемнение сверху — чтобы белая шапка читалась на светлом небе */
.about-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.about-hero > * {
    position: relative;
    z-index: 1;
}

.about-hero .hero__header {
    width: 100%;
}

/* белая фигурная плашка */
.about-hero__card {
    width: 520px;
    max-width: 100%;
    min-height: 527px;
    margin-top: 76px;                     /* низ шапки 87px + 76 = 163 как в макете */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 62px;
    padding: 32px 20px 0;
    text-align: center;
    background: url('../images/footer_svg.png') center / contain no-repeat;
}

.about-hero__emblem {
    display: block;
    width: 68px;
    height: auto;
}

.about-hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 330px;
}

.about-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 моб. */
    line-height: 1.1;
    color: var(--brand-primary);
}

.about-hero__subtitle {
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.1;
    color: #737373;
}

.about-hero__label {
    margin-top: auto;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--white);
}

@media (max-width: 760px) {
    /* плашка меню во всю ширину — снимаем верхний и боковые отступы */
    .about-hero {
        min-height: 90svh;
        padding: 0 0 32px;
    }
    /* «выбрать событие» и нижняя подпись на мобилке не нужны */
    .about-hero .hero__choose,
    .about-hero__label {
        display: none;
    }
    .about-hero__emblem {
        width: 40px;
    }
    .about-hero__card {
        /* у секции паддингов нет (плашка во всю ширину), поля задаём самой фигуре */
        width: calc(100% - 24px);
        max-width: 440px;
        min-height: calc(min(100vw - 24px, 440px) * 527 / 520);   /* пропорции фигуры как минимум */
        margin: auto 0;                   /* центрируем в остатке высоты */
        gap: 32px;
        padding: 14% 17%;
        /* фигура тянется за плашкой, если текста больше, чем в макете */
        background-size: 100% 100%;
    }
    .about-hero__content {
        max-width: 100%;
    }
    .about-hero__subtitle {
        font-size: 15px;
    }
}

/* ===== Страница мероприятия / афиши (page-article) ===== */
.post-hero {
    position: relative;
    height: 783px;
    display: flex;
    flex-direction: column;
    padding: 15px var(--grid-margin) 120px;
    overflow: hidden;
    color: var(--white);
    background: var(--brand-primary);
}

/* левая половина — синяя фактура, правая — фото */
.post-hero__bg,
.post-hero__photo {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
}

.post-hero__bg {
    left: 0;
    background: url('../images/hero-post-bg.jpg') center / cover no-repeat;
}

.post-hero__photo {
    right: 0;
    background: url('../images/hero-post-right.jpg') center / cover no-repeat;
}

/* вертикальный орнамент по стыку половин */
.post-hero__ornament {
    position: absolute;
    top: 121px;
    bottom: 0;
    left: 50%;
    width: 20px;
    transform: translateX(-50%);
    background: url('../images/ornament-white-tile.svg') top center / 20px 30px repeat-y;
}

.post-hero > .hero__header,
.post-hero__content {
    position: relative;
    z-index: 1;
}

.post-hero__content {
    width: 590px;
    max-width: 100%;
    margin-top: auto;                     /* прижимаем к низу: текста может быть больше */
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.post-hero__tag {
    padding: 8px 0;
    text-transform: uppercase;
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);
    font-weight: 500;
    line-height: 1.1;
    color: var(--gray-400);
}

.post-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-hero__text {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.post-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 */
    line-height: 1.1;
    color: var(--white);
}

.post-hero__subtitle {
    margin: 0;
    max-width: 429px;
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);         /* 18 */
    font-weight: 500;
    line-height: 1.1;
    color: var(--white);
}

.post-hero__date {
    font-family: var(--font-body);
    font-size: var(--fs-body-sm);
    font-weight: 500;
    line-height: 1.1;
    color: var(--gray-400);
    opacity: 0.7;
}

/* ---- тело статьи ---- */
.post-body {
    /* текст начинается с 5-й колонки сетки: 459 из 1360 */
    --post-col: 33.75%;
    padding: 82px 0 154px;
    background: var(--bg-page);
}

.post-body__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.post-block {
    margin-left: var(--post-col);
    max-width: 621px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-block__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h4);              /* 26 */
    line-height: 1.1;
    color: var(--brand-primary);
}

.post-block__text {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.7);
}

.post-block--exhibition .post-block__text { max-width: 526px; }
.post-block--collection .post-block__title { max-width: 564px; }

.post-block--focus { margin-top: 62px; }
.post-block--origins { margin-top: 16px; }
.post-block--collection { margin-top: 80px; }

/* большая картинка во всю ширину контента */
.post-wide {
    margin-top: 40px;
}

.post-wide img,
.post-figures img {
    display: block;
    width: 100%;
    height: auto;
}

/* маленькая картинка слева + большая в колонке текста */
.post-figures {
    margin-top: 40px;
    display: grid;
    grid-template-columns: var(--post-col) 1fr;
    align-items: start;
}

/* маленькая картинка залипает и едет вместе со скроллом до конца ряда */
.post-figures__small {
    position: sticky;
    top: 120px;
    align-self: start;
    width: 211px;
}
.post-figures__big { max-width: 670px; }

/* практическая информация */
.post-info {
    margin-top: 80px;
    margin-left: var(--post-col);
    max-width: 564px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.post-info__tips {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.post-info__block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-info__bonus {
    margin: 0;
    max-width: 551px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--brand-primary);
}

.post-info__line {
    height: 0;
    border-top: 1.5px solid var(--brand-primary);
}

.post-info__venue {
    max-width: 497px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-info__item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-info__label {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--brand-primary);
}

.post-info__value {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.1;
    color: rgba(0, 0, 0, 0.7);
}

.post-info__item--date .post-info__value { max-width: 439px; }

/* временная адаптация — макета мобилки для этой страницы ещё нет */
@media (max-width: 991px) {
    .post-body {
        --post-col: 0px;
    }
    /* маленькая картинка нужна только рядом с большой — в одну колонку её нет */
    .post-figures {
        grid-template-columns: 1fr;
    }
    .post-figures__small {
        display: none;
    }
}

@media (max-width: 760px) {
    /* половины разворачиваются в колонку: текст на синем, под ним фото */
    .post-hero {
        height: auto;
        padding: 0;
        background: url('../images/hero-post-bg.jpg') center / cover no-repeat, var(--brand-primary);
    }
    .post-hero__bg {
        display: none;
    }
    .post-hero .hero__header {
        order: 1;
    }
    /* логотипа в мобильной шапке этой страницы нет */
    .post-hero .hero__logo {
        display: none;
    }
    .post-hero .hero__event {
        border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    }
    .post-hero__content {
        order: 2;
        width: 100%;
        margin-top: 100px;
        padding: 0 var(--grid-margin) 32px;
        gap: 32px;
    }
    .post-hero__text,
    .post-hero__meta {
        gap: 24px;
    }
    .post-hero__subtitle {
        max-width: none;
        font-size: var(--fs-body-sm);     /* 14 */
    }
    /* орнамент из вертикального становится горизонтальным разделителем */
    .post-hero__ornament {
        position: static;
        order: 3;
        width: 100%;
        height: 15px;
        transform: none;
        background: url('../images/divider-tile-white.svg') left center / 42px 15px repeat-x;
    }
    .post-hero__photo {
        position: static;
        order: 4;
        width: 100%;
        height: 440px;
    }

    .post-body {
        padding: 40px 0 80px;
    }
    /* картинки статьи — фиксированная высота, кадр обрезаем по центру */
    .post-wide img,
    .post-figures__big img {
        height: 530px;
        object-fit: cover;
    }
}

/* ===== Шапка в синем варианте (на светлом фоне) ===== */
.hero__header--blue .hero__event,
.hero__header--blue .hero__choose {
    color: var(--brand-primary);
}

/* line.svg белый — на светлом фоне не виден, берём синий вариант */
.hero__header--blue .hero__choose::after {
    background: url('../images/line_blue.svg') center / 100% 100% no-repeat;
}

/* ===== Hero страницы «Календарь мероприятий» ===== */
.calendar-hero {
    padding: 16px 0 30px;
    background: #efeeed;
}

.calendar-hero__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.calendar-hero__intro {
    margin-top: 104px;
    max-width: 660px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calendar-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 моб. */
    line-height: 1.1;
    color: var(--brand-primary);
}

.calendar-hero__desc {
    max-width: 458px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.1;
    color: rgba(0, 0, 0, 0.8);
}

.calendar-hero__controls {
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* --- лента дат --- */
.calendar-strip {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    overflow-x: auto;
}

.calendar-strip__arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    color: var(--brand-primary);
    cursor: pointer;
}

.calendar-strip__month {
    flex: 0 0 auto;
    padding: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    color: #737373;
}

.calendar-strip__day {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.calendar-strip__num {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.1;
    color: #212121;
}

.calendar-strip__dow {
    font-family: var(--font-body);
    font-size: 11px;
    line-height: 1.1;
    color: #737373;
}

.calendar-strip__day.is-active {
    background: var(--brand-primary);
}

.calendar-strip__day.is-active .calendar-strip__num {
    color: var(--white);
}

.calendar-strip__day.is-active .calendar-strip__dow {
    color: #bfbfbf;
}

/* --- переключатель вида --- */
.calendar-hero__switch {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-hero__switch-link {
    position: relative;
    padding-bottom: 4px;
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: -0.4px;
    color: var(--brand-primary);
}

.calendar-hero__switch-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: var(--brand-primary);
}

.calendar-hero__today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    padding: 8px 16px;
    border: 1px solid var(--brand-primary);
    font-family: var(--font-display);
    font-size: 12px;
    line-height: 1.1;
    color: var(--brand-primary);
}

/* ===== Список событий ===== */
.events-list {
    padding: 56px 0;
    background: var(--bg-page);
}

.events-list__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
    display: flex;
    align-items: flex-start;
    gap: 181px;
    overflow: hidden;                     /* фильтры не выходят за рамки контейнера */
}

.events-list__filters {
    flex: 0 0 160px;
    min-width: 0;                         /* колонка держит 160px, длинный текст уходит в зазор */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.events-list__filter {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;                  /* «Формат участия» не должен переноситься */
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.1;
    color: var(--brand-primary);
    transition: opacity var(--transition);
}

/* текст шире колонки — не даём flex сжать ни подпись, ни стрелку */
.events-list__filter > * {
    flex: 0 0 auto;
}

.events-list__filter:hover {
    opacity: 0.7;
}

.events-list__items {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

/* --- карточка события в списке --- */
.event-item {
    display: flex;
    align-items: flex-start;
    gap: 150px;
}

.event-item__content {
    flex: 1 1 425px;
    min-width: 0;
    display: flex;
    gap: 49px;
}

.event-item__date {
    flex: 0 0 auto;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 66px;
    padding: 6px 8px;
    border-radius: 4px;
    background: var(--brand-primary);
}

.event-item__date-num {
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1.1;
    color: var(--white);
}

.event-item__date-dow {
    font-family: var(--font-body);
    font-size: 11px;
    line-height: 1.1;
    color: #bfbfbf;
}

.event-item__details {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 310px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.event-item__location {
    max-width: 250px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--brand-primary);
}

.event-item__format {
    margin-top: 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    color: rgba(8, 52, 197, 0.4);
}

.event-item__title {
    margin: 20px 0 0;
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.1;
    color: var(--brand-primary);
}

.event-item__price {
    margin-top: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--brand-primary);
}

.event-item__desc {
    max-width: 272px;
    margin: 32px 0 0;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.2;
    color: rgba(8, 52, 197, 0.8);
}

.event-item__btn {
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid var(--brand-primary);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.1;
    letter-spacing: -0.4px;
    color: var(--brand-primary);
    transition: background var(--transition), color var(--transition);
}

.event-item__btn:hover {
    background: var(--brand-primary);
    color: var(--white);
}

.event-item__img {
    flex: 0 1 441px;
    display: block;
    width: 441px;
    max-width: 100%;
    height: auto;
}

/* --- навигация по страницам --- */
.events-list__nav {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 88px var(--grid-margin) 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.events-list__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.1;
    color: var(--brand-primary);
    transition: opacity var(--transition);
}

.events-list__nav-link:hover {
    opacity: 0.7;
}

/* ===== Карта маршрутов ===== */
.events-map {
    padding: 140px 0 120px;
    background: var(--bg-page);
}

.events-map__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.events-map__intro {
    max-width: 616px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.events-map__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    line-height: 1.1;
    color: var(--brand-primary);
}

.events-map__desc {
    max-width: 416px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.1;
    color: rgba(0, 0, 0, 0.7);
}

/* пока статичная картинка — позже заменим на карту Яндекса */
.events-map__img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 40px;
    border: 4px solid var(--brand-primary);
}

/* --- адаптив календаря, списка и карты --- */
@media (max-width: 991px) {
    .calendar-hero__intro {
        margin-top: 56px;
    }
    .calendar-hero__controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .calendar-hero__switch {
        justify-content: flex-end;
    }

    .events-list__inner {
        flex-direction: column;
        align-items: stretch;             /* иначе колонки жмутся по контенту и вылезают */
        gap: 40px;
    }
    .events-list__filters {
        flex: none;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px 24px;
    }
    .event-item {
        flex-direction: column;
        gap: 24px;
    }
    .event-item__img {
        flex: none;
        width: 100%;
        order: -1;
    }
    .events-list__nav {
        padding-top: 56px;
    }
    .events-map {
        padding-top: 72px;
    }
}

@media (max-width: 560px) {
    .event-item__content {
        gap: 20px;
    }
    .events-list__nav {
        flex-direction: column;
        gap: 16px;
    }
}

/* ===== Страница «Медиа о культуре» ===== */
.media-hero {
    padding: 16px 0 48px;                 /* светлая полоса до y=410 из макета */
    background: #efeeed;
}

.media-hero__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.media-hero__intro {
    max-width: 660px;
    margin-top: 102px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.media-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);              /* 50 / 34 моб. */
    line-height: 1.1;
    color: var(--brand-primary);
}

.media-hero__desc {
    max-width: 522px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.1;
    color: rgba(0, 0, 0, 0.8);
}

/* --- фильтры-теги --- */
.media-filters {
    margin-top: 32px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.media-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid var(--brand-primary);
    font-family: var(--font-display);
    font-size: 12px;
    line-height: 1.1;
    color: var(--brand-primary);
    transition: background var(--transition), color var(--transition);
}

.media-filter:hover {
    background: rgba(8, 52, 197, 0.08);
}

.media-filter.is-active {
    background: var(--brand-primary);
    color: var(--white);
}

/* --- сетка статей --- */
.media-list {
    padding: 64px 0 120px;
    background: var(--bg-page);
}

.media-list__inner {
    max-width: calc(var(--content-max) + 2 * var(--grid-margin));
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.media-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.media-card__thumb {
    position: relative;
    display: block;
    height: 237px;
    overflow: hidden;
}

.media-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.media-card:hover .media-card__thumb img {
    transform: scale(1.04);
}

.media-card__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 8px 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--gray-400);               /* #f1f1f1 */
}

.media-card__body {
    max-width: 294px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.media-card__date {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.2;
    color: var(--brand-primary);
}

.media-card__text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.media-card__title {
    max-width: 267px;
    margin: 0;
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1.1;
    color: var(--brand-primary);
}

.media-card__excerpt {
    max-width: 221px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.2;
    color: rgba(8, 52, 197, 0.7);
}

/* ===== Страница «Авторская афиша» (карточки те же, что в медиа) ===== */
.afisha-section__title {
    margin: 0 0 32px;
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1.1;
    color: var(--brand-primary);
}

/* заголовок второго блока отбиваем от карточек первого */
.afisha-section__title--next {
    margin-top: 80px;
}

/* кнопка во всю ширину карточки, прижата к низу — чтобы ряд был ровным */
.media-card__btn {
    margin-top: auto;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
    color: var(--white);
    background: var(--brand-primary);
    transition: opacity var(--transition);
}

.media-card__btn:hover {
    opacity: 0.85;
}

/* карточка с кнопкой тянется на всю высоту ячейки */
.media-card--linked {
    height: 100%;
}

/* --- адаптив (мобильного макета пока нет) --- */
@media (max-width: 991px) {
    .media-hero__intro {
        margin-top: 56px;
    }
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .media-list {
        padding: 48px 0 80px;
    }
}

@media (max-width: 760px) {
    /* заголовок, описание и фильтры по центру */
    .media-hero__intro {
        max-width: none;
        align-items: center;
        text-align: center;
    }
    .media-hero__desc {
        max-width: none;
    }
    .media-filters {
        justify-content: center;
        margin-top: 24px;
    }
}

@media (max-width: 560px) {
    .media-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .media-card__body,
    .media-card__title,
    .media-card__excerpt {
        max-width: none;
    }
}

/* ===== Календарь: мобильная раскладка ===== */
@media (max-width: 760px) {
    /* плашка меню во всю ширину — выносим её из паддингов контейнера */
    .calendar-hero,
    .media-hero {
        padding-top: 0;
    }
    .calendar-hero .hero__header,
    .media-hero .hero__header {
        margin: 0 calc(-1 * var(--grid-margin));
    }
    /* на мобилке плашка синяя, значит текст на ней белый */
    .hero__header--blue .hero__event {
        color: var(--white);
    }
    .calendar-hero .hero__choose,
    .media-hero .hero__choose {
        display: none;
    }

    /* заголовок и описание по центру */
    .calendar-hero__intro {
        margin: 40px auto 0;
        align-items: center;
        text-align: center;
    }
    .calendar-hero__desc {
        margin: 0 auto;
    }

    /* лента дат — строкой, под ней «список/месяц» и «сегодня» в один ряд */
    .calendar-hero__controls {
        display: contents;
    }
    .calendar-hero__inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "header header"
            "intro  intro"
            "strip  strip"
            "switch today";
        align-items: center;
    }
    .calendar-hero .hero__header {
        grid-area: header;
    }
    .calendar-hero__intro {
        grid-area: intro;
    }
    .calendar-strip {
        grid-area: strip;
        min-width: 0;                 /* иначе grid-элемент не сжимается и распирает экран */
        margin-top: 40px;
    }
    .calendar-hero__switch {
        grid-area: switch;
        justify-self: start;
        margin-top: 24px;
    }
    .calendar-hero__today {
        grid-area: today;
        justify-self: end;
        margin-top: 24px;
    }

    /* фильтры одной строкой с горизонтальным скроллом */
    .events-list__filters {
        flex-wrap: nowrap;
        min-width: 0;
        overflow-x: auto;
        gap: 24px;
    }
    .events-list__filter {
        flex: 0 0 auto;
    }

    /* карточка: дата слева, картинка и текст колонкой справа */
    .event-item {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "date img"
            ".    details";
        column-gap: 32px;
        row-gap: 20px;
    }
    .event-item__content {
        display: contents;
    }
    .event-item__date {
        grid-area: date;
        min-width: 44px;
        padding: 6px 8px;
    }
    .event-item__date-num {
        font-size: 24px;
    }
    .event-item__date-dow {
        font-size: 10px;
    }
    .event-item__img {
        grid-area: img;
        width: 100%;
        order: 0;
    }
    .event-item__details {
        grid-area: details;
        max-width: none;
    }
    .event-item__location {
        max-width: none;
        font-size: 14px;
    }
    .event-item__title {
        font-size: 22px;
    }
    .event-item__desc {
        max-width: none;
    }
}

/* ===== Мобильная донастройка (идёт последней — перекрывает блоки выше) ===== */
@media (max-width: 760px) {
    /* первый экран чуть ниже вьюпорта, чтобы выглядывал календарь */
    .hero {
        min-height: 90svh;
    }
    .hero__subtitle {
        font-size: 14px;
    }

    .datestrip {
        margin-bottom: 30px;
    }

    .events__grid {
        gap: 16px;
    }
    .events__cta {
        margin: 24px auto 0;
    }

    /* отступы секций сверху фиксируем явно */
    .formats,
    .afisha,
    .team {
        padding-top: 120px;
    }
    .formats__desc {
        font-size: 16px;
    }

    .about {
        height: 100vh;
    }

    .format-card__panel {
        min-height: 350px;
    }

    .slider__text {
        font-size: 20px;
    }
}

/* ===== Ниже пиши стили под вашу вёрстку ===== */

/* =========================================================================
   Дополнения для WordPress: контент из редактора и элементы, которых
   не было в статической вёрстке (выпадающие фильтры, отметки в календаре).
   ========================================================================= */

/* Редактор отдаёт текст в <p>, а вёрстка рассчитана на один блок текста */
.events-hero__detail-text {
    white-space: normal;
}

.events-hero__detail-text p,
.post-block__text p {
    margin: 0 0 1em;
}

.events-hero__detail-text > :first-child,
.post-block__text > :first-child {
    margin-top: 0;
}

.events-hero__detail-text > :last-child,
.post-block__text > :last-child {
    margin-bottom: 0;
}

/* Фон hero подставляется инлайном из изображения записи */
.events-hero__stage,
.post-hero__photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Выпадающий список внутри фильтра календаря */
.events-list__filter-wrap {
    position: relative;
}

.events-list__filter-list {
    position: absolute;
    z-index: 2;
    top: 100%;
    left: 0;
    min-width: 160px;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-200);
    border: 1px solid var(--brand-primary);
}

.events-list__filter-wrap:hover .events-list__filter-list,
.events-list__filter-wrap:focus-within .events-list__filter-list {
    display: flex;
}

.events-list__filter-item {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.2;
    color: var(--brand-primary);
    white-space: nowrap;
}

.events-list__filter-item:hover {
    opacity: 0.7;
}

/* День месяца, на который есть мероприятия */
.calendar-strip__day.has-events .calendar-strip__num {
    font-weight: 600;
}

.calendar-strip__day.has-events::after {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    margin: 2px auto 0;
    border-radius: 50%;
    background: var(--brand-primary);
}

/* Постраничная навигация WordPress */
.navigation.pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.navigation.pagination .nav-links {
    display: flex;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--brand-primary);
}
