/* ===========================================================================
   /afisha/ — редизайн 2026 (GLA-377). Макет: ~/Downloads/GLAVCLUB_redesign
   (README, раздел «Афиша»; html/afisha.html — размеры и цвета).

   Отдельный файл, а не правка _afisha.css: тот же _afisha.css грузят /party/ и
   страницы артистов, их редизайн не трогает. Шапка, кнопки .rd-btn и шапка
   страницы (.rd-page-head) — в css/base/_redesign.css, он подключается ПОСЛЕ.
   Брейкпоинт один — 900 px.

   Разметку печатает генератор (templates/afisha-template.html,
   generate_afisha_index + afisha_groups), фильтры и пересчёт добивки —
   js/afisha-filters.js.
   =========================================================================== */

.af-page {
    padding-bottom: 96px;
    color: #FFFFFF;
}

/* ---------- Плашка «Большие вечеринки» ---------- */
.af-banner {
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr) auto;
    gap: 40px;
    align-items: center;
    padding: 16px 32px 16px 16px;
    border-radius: 24px;
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.af-banner:hover {
    border-color: rgba(255, 255, 255, 0.28);
}
/* Вся плашка ведёт на /party/ (GLA-401): область нажатия ссылки-заголовка растянута на
   карточку, кнопка брони поднята над ней и остаётся своей ссылкой */
.af-banner-link {
    color: inherit;
    text-decoration: none;
}
.af-banner-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
}
.af-banner-link:focus-visible {
    outline: none;
}
.af-banner:has(.af-banner-link:focus-visible) {
    outline: 2px solid #FFFFFF;
    outline-offset: 3px;
}
/* Окно плашки: первый кадр ролика, сверху ролик (js/hero-video.js ставит is-playing) */
.af-banner-media {
    position: relative;
    display: block;
    min-width: 0;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    background: #0B0B0B;
}
.af-banner-media picture {
    display: block;
    height: 100%;
}
.af-banner-img,
.af-banner-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.af-banner-video {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.af-banner-video.is-playing {
    opacity: 1;
}
.af-banner-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}
.af-banner-tags {
    display: flex;
    gap: 8px;
}
.af-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
}
.af-tag--white {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: #0B0B0B;
    font-weight: 800;
}
.af-banner-title {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    color: #FFFFFF;
}
.af-banner-desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
    color: #C4C4C4;
}
.af-banner-cta {
    position: relative;
    z-index: 1;
    font-weight: 800;
}

/* ---------- Фильтры и полоска дней ---------- */
.af-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
}
.af-types,
.af-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.af-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #161616;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.af-type-count {
    font-weight: 600;
    opacity: 0.6;
}
.af-type:hover {
    border-color: rgba(255, 255, 255, 0.45);
}
/* Подборки /afisha/concert|party|splt/ (GLA-448): фильтры там — ссылки, своя выделена */
.af-type[aria-current="page"],
.af-type[aria-pressed="true"] {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: #0B0B0B;
}
.af-type:disabled {
    opacity: 0.45;
    cursor: default;
}
.af-type:disabled:hover {
    border-color: rgba(255, 255, 255, 0.14);
}
.af-type:focus-visible,
.af-daychip:focus-visible,
.event-card:focus-visible,
.af-day:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 3px;
}
.af-daychip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 52px;
    padding: 0 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #161616;
    color: #FFFFFF;
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}
.af-daychip:hover {
    border-color: rgba(255, 255, 255, 0.45);
    color: #FFFFFF;
}
.af-daychip-wd {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #A3A3A3;
}
.af-daychip-num {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

/* ---------- Сетка ---------- */
.af-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}
/* Скрытое фильтром: у карточек и плиток свой display, атрибута hidden мало */
.af-grid [hidden],
.af-filters[hidden],
.af-days[hidden] {
    display: none !important;
}

/* Оттенок дня — только лёгкий (4–7 %), макет: чт #8B5CF6, пт #3B82F6, сб #F97316,
   вс #14B8A6, «скоро» #EC4899. Пн–ср в макете нет — нейтральный серый #A3A3A3. */
.tone-thu { --af-tone: 139, 92, 246; }
.tone-fri { --af-tone: 59, 130, 246; }
.tone-sat { --af-tone: 249, 115, 22; }
.tone-sun { --af-tone: 20, 184, 166; }
.tone-soon { --af-tone: 236, 72, 153; }
.tone-plain { --af-tone: 163, 163, 163; }

/* Плитка даты */
.af-day {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #161616;
    color: #FFFFFF;
    /* шапка сайта липкая — день не уезжает под неё при переходе из полоски */
    scroll-margin-top: 88px;
}
.af-day-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 1 / 1;
    text-align: center;
    background: linear-gradient(165deg, rgba(var(--af-tone), 0.07) 0%, rgba(var(--af-tone), 0.01) 50%, rgba(22, 22, 22, 0) 100%);
}
.af-day-badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.af-day.is-today .af-day-badge {
    background: #FFFFFF;
    color: #0B0B0B;
}
.af-day-num {
    font-size: 104px;
    font-weight: 900;
    line-height: 0.9;
}
.af-day-soon .af-day-num {
    font-size: 52px;
}
.af-day-month {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}
.af-day-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 16px 18px;
    list-style: none;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.af-day-list li {
    display: flex;
    gap: 8px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    text-align: left;
}
.af-day-time {
    flex: 0 0 auto;
    font-weight: 800;
}
.af-day-name {
    min-width: 0;
    color: #E5E5E5;
    overflow-wrap: anywhere;
}
.af-day-list li.is-cancelled .af-day-name {
    text-decoration: line-through;
    color: #A3A3A3;
}

/* Карточка события */
.event-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    text-decoration: none;
    transition: border-color 0.2s ease;
}
.event-card:hover {
    border-color: rgba(255, 255, 255, 0.28);
    color: #FFFFFF;
}
.event-image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #1F1F1F;
}
.event-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.4s ease;
}
.event-card:hover .event-image img {
    transform: scale(1.04);
}
.event-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #6B6B6B;
}
.event-tags {
    position: absolute;
    left: 12px;
    top: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.event-kind,
.event-age-badge {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(11, 11, 11, 0.8);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}
.event-age-badge {
    padding: 6px 10px;
    background: #FFFFFF;
    color: #0B0B0B;
}
.event-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 16px 18px;
    text-align: center;
    background: linear-gradient(180deg, rgba(22, 22, 22, 1) 50%, rgba(var(--af-tone, 22, 22, 22), 0.04) 100%);
}
.event-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    color: #FFFFFF;
    overflow-wrap: anywhere;
}
.event-date-time {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #D4D4D4;
}
/* Артист на вечеринке (GLA-403): «Выступает LIZER» под датой карточки вечеринки */
.event-artist {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    color: #FFFFFF;
    /* длинное имя без пробелов («Константинопольский») на 320 выходило за карточку — как у .event-title (TIC-148) */
    overflow-wrap: anywhere;
}
/* Зал, если не основной (GLA-399): «Сплетники» — пилюлей под датой */
.event-venue {
    align-self: center;
    margin-top: 2px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: #FFFFFF;
}
.af-nw {
    white-space: nowrap;
}
/* Отменённое остаётся в списке, но обычной карточкой не выглядит (GLA-264, №23) */
.event-card-cancelled .event-image img {
    filter: grayscale(1);
    opacity: 0.45;
}
.event-card-cancelled .event-title {
    color: #A3A3A3;
    text-decoration: line-through;
}
.event-cancelled-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #FFFFFF;
    color: #0B0B0B;
    font-weight: 800;
}

/* Плитки-призывы: добивают неполную последнюю строку. Какие видны — классы
   is-fill4 (4 колонки) и is-fill2 (2 колонки), их ставит генератор и пересчитывает
   скрипт. */
.af-cta {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 22px;
    border-radius: 20px;
    background: #161616;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
}
@media (min-width: 901px) {
    .af-cta.is-fill4 {
        display: flex;
    }
}
.af-cta-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.af-cta-title {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
    color: #FFFFFF;
}
.af-cta-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 500;
    color: #A3A3A3;
}
.af-cta-btn {
    min-height: 48px;
    width: 100%;
    padding: 0 16px;
    font-weight: 800;
}

.no-results {
    grid-column: 1 / -1;
    padding: 64px 20px;
    border-radius: 20px;
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}
.no-results-text {
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
}
.no-results-subtitle {
    margin-top: 8px;
    font-size: 15px;
    color: #A3A3A3;
}

/* ---------- Прошедшие события (GLA-294) ----------
   Свёрнутый список ссылок под сеткой: страницы прошедших концертов получают ссылку из
   разметки. Разметку печатает генератор (afisha_archive), раскрытие — штатный <details>. */
.af-archive {
    margin-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.af-archive-sum {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    cursor: pointer;
    list-style: none;
}
.af-archive-sum::-webkit-details-marker {
    display: none;
}
/* Стрелка: вниз — свёрнуто, вверх — раскрыто */
.af-archive-sum::after {
    content: "";
    width: 9px;
    height: 9px;
    margin: -4px 4px 0 auto;
    border-right: 2px solid #A3A3A3;
    border-bottom: 2px solid #A3A3A3;
    transform: rotate(45deg);
    flex-shrink: 0;
}
.af-archive[open] .af-archive-sum::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}
.af-archive-sum:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 3px;
}
.af-archive-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}
.af-archive-count {
    font-size: 14px;
    font-weight: 600;
    color: #A3A3A3;
}
.af-archive-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 0 24px;
}
/* Цель нажатия не меньше 44 px (docs/accessibility.md) */
.af-archive-list a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 44px;
    padding: 8px 0;
    color: #FFFFFF;
    text-decoration: none;
}
.af-archive-name {
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.af-archive-date {
    font-size: 13px;
    color: #A3A3A3;
}
.af-archive-list a:hover .af-archive-name,
.af-archive-list a:focus-visible .af-archive-name {
    text-decoration: underline;
}
.af-archive-list a:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .event-image img,
    .event-card:hover .event-image img {
        transition: none;
        transform: none;
    }
}

/* ---------- Телефон ---------- */
@media (max-width: 900px) {
    .af-page {
        padding-bottom: 64px;
    }
    .af-banner {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding: 12px 12px 16px;
        text-align: center;
    }
    .af-banner-media {
        height: 110px;
    }
    .af-banner-text {
        align-items: center;
        gap: 8px;
    }
    .af-banner-title {
        font-size: 22px;
    }
    .af-banner-cta {
        width: 100%;
        min-height: 48px;
    }
    .af-filters {
        justify-content: center;
        margin-top: 32px;
    }
    .af-types,
    .af-days {
        justify-content: center;
    }
    .af-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 24px;
    }
    .af-cta.is-fill2 {
        display: flex;
    }
    .af-day-head {
        gap: 8px;
    }
    .af-day-num {
        font-size: 72px;
    }
    .af-day-soon .af-day-num {
        font-size: 32px;
    }
    .af-day-month {
        font-size: 15px;
    }
    .af-day-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    .af-day-list {
        padding: 12px 10px;
    }
    .af-day-list li {
        font-size: 12px;
        gap: 6px;
    }
    .event-content {
        padding: 12px 10px 14px;
        gap: 4px;
    }
    .event-title {
        font-size: 15px;
    }
    .event-date-time {
        font-size: 12px;
    }
    .event-tags {
        left: 8px;
        top: 8px;
        right: 8px;
        gap: 4px;
    }
    .event-kind,
    .event-age-badge {
        font-size: 11px;
        padding: 5px 8px;
    }
    .af-cta {
        padding: 16px 14px;
    }
    .af-cta-title {
        font-size: 18px;
    }
    .af-cta-desc {
        font-size: 13px;
    }
    .af-cta-btn {
        padding: 0 10px;
        font-size: 14px;
        white-space: normal;
    }
}

/* Самые узкие телефоны (320–360): метки и полоска дней в одну строку */
@media (max-width: 360px) {
    .af-days {
        gap: 6px;
    }
    .af-daychip {
        min-width: 48px;
        padding: 0 6px;
    }
    .event-kind,
    .event-age-badge {
        font-size: 10px;
        padding: 4px 7px;
    }
    .af-day-list {
        padding: 12px 8px;
    }
    .af-day-list li {
        font-size: 11px;
        gap: 4px;
    }
    .af-day-name {
        overflow-wrap: break-word;
    }
    /* Карточка в две колонки ~130 px: при 15 px «Студенческая» не влезала и рвалась
       по букве «Студенческа / я» (приёмка GLA-378). 13 px вмещает слова до 13 букв */
    .event-title {
        font-size: 13px;
    }
}
