/* ===========================================
   СТРАНИЦА СОБЫТИЯ АФИШИ — оформление (GLA-131)
   Собрано из демо-версий /demo/afisha-v5*, которые владелец принял 31.07.2026.
   Демо остаются на месте как история решения; правится ОТСЮДА, а туда
   изменения не переносятся — это разные файлы с разной судьбой.

   Устройство страницы:
     — герой: слева текст, справа афиша квадратом и целиком, фон — её же
       сильно размытая копия;
     — ниже «Расписание», «Место проведения», служебные ссылки и
       «Ближайшие мероприятия».

   Почему афиша не кадрируется и не лежит под текстом (замер 31.07.2026 по
   12 постерам подряд): 10 из 12 — свёрстанные афиши, где имя артиста и дата
   уже нарисованы на картинке, а яркость обложек гуляет от 11 до 172 из 255.
   Кадрировать такую и класть поверх свой заголовок значит показать два имени
   и две даты сразу, а на светлой обложке ещё и потерять текст.

   Затемнение фона подобрано замером, а не на глаз: блюр 70px + чёрный 0.62
   дают белому тексту 8.6:1 на самой светлой афише сайта при пороге 4.5:1.
   Меняешь эти числа — пересчитай на светлой обложке.

   Разметку собирает templates/event-template.html, поведение — js/event-page.js.
   =========================================== */

.ep-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.01em;
    margin-bottom: 22px;
}

.ep-chip-sep {
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.35);
}

.ep-title {
    font-size: clamp(34px, 5vw, 64px);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.05;
    text-transform: uppercase;
    margin: 0 0 20px;
}

.ep-lead {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 12px;
    max-width: 620px;
}

.ep-lead.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-more {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.ep-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 19px 42px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    font-family: inherit;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ep-btn-primary {
    background: var(--color-text-primary);
    color: #000;
}

.ep-btn-primary:hover {
    background: #dcdcdc;
}

.ep-btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

.ep-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===========================================
   СЕКЦИИ НИЖЕ ГЕРОЯ
   =========================================== */

.ep-section {
    padding: 64px 0 0;
}

.ep-section:last-of-type {
    padding-bottom: 72px;
}

.ep-h2 {
    font-size: 32px;
    font-weight: var(--font-weight-extrabold);
    margin: 0 0 28px;
}

.ep-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
}

/* --- Место проведения: слева адрес, справа карта --- */
.ep-venue {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.ep-venue-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.ep-venue-name {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    margin: 0;
}

.ep-venue-address {
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin: 0;
}

.ep-venue-hours {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin: 0;
}

.ep-venue-map {
    min-height: 280px;
}

.ep-venue-map iframe {
    width: 100%;
    height: 100%;
    min-height: 280px;
    border: 0;
    display: block;
}

.ep-taxi {
    margin-top: auto;
    padding: 13px 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background 0.2s ease;
}

.ep-taxi:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* --- Расписание --- */
.ep-schedule-row {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 26px 32px;
}

.ep-schedule-date {
    font-size: 22px;
    font-weight: var(--font-weight-bold);
    line-height: 1.25;
}

.ep-schedule-weekday {
    display: block;
    font-size: 16px;
    font-weight: var(--font-weight-normal);
    color: var(--color-text-secondary);
    text-transform: lowercase;
}

.ep-schedule-time {
    font-size: 22px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 4px;
}

.ep-schedule-place {
    font-size: 17px;
    color: var(--color-text-secondary);
    margin: 0;
}

.ep-schedule-row .ep-btn {
    padding: 15px 34px;
    font-size: 17px;
}

/* --- Две ссылки внизу.
   Были во всю ширину блоками по 30px — рядом со «Расписанием» читались как
   ещё две главные кнопки. Это служебные ссылки, поэтому они компактные
   пилюли по содержимому и прижаты влево, как остальной текст страницы. --- */
.ep-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.ep-link-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.ep-link-plate:hover {
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.35);
}

.ep-link-plate svg {
    width: 18px;
    height: 18px;
    flex: none;
}

/* «Поделиться событием» — такая же пилюля рядом со служебными ссылками.
   Это <button>, а не ссылка, поэтому гасим кнопочные умолчания браузера. */
.ep-share {
    font-family: inherit;
    cursor: pointer;
}

.ep-share:hover {
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Полоса «когда» вместо мелкой меты */
.ep-when {
    margin: 22px 0 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    max-width: 620px;
}

.ep-when-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

/* Время отделено точкой-разделителем, а не иконкой: на этом размере
   иконка спорит с цифрами за внимание */
.ep-when-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    align-self: center;
    flex: none;
}

/* Класс ставит js/event-page.js, когда время не поместилось на строку с датой:
   тогда точка-разделитель повисла бы в конце первой строки сиротой */
.ep-when-main.is-stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.ep-when-main.is-stacked .ep-when-dot {
    display: none;
}

.ep-when-sub {
    margin: 10px 0 0;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 9px;
}

.ep-when-sub svg {
    width: 18px;
    height: 18px;
    flex: none;
    opacity: 0.8;
}

@media (max-width: 560px) {
    .ep-when {
        margin: 18px 0 16px;
        padding-top: 14px;
    }

    .ep-when-sub {
        font-size: 16px;
        align-items: flex-start;
    }

    .ep-when-sub svg {
        margin-top: 3px;
    }
}

.ep-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 88px 0 72px;
}

.ep-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    filter: blur(70px) saturate(1.1);
    /* увеличение прячет светлеющие края, которые даёт размытие у границы кадра */
    transform: scale(1.15);
}

.ep-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.06) 45%, rgba(0, 0, 0, 0) 70%),
        rgba(0, 0, 0, 0.62);
}

.ep-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: 56px;
    align-items: center;
}

.ep-text {
    min-width: 0;
}

/* Постер квадратом и целиком. `contain`, а не `cover`: сегодня парсер отдаёт
   строго 600×600, но обрезать афишу с текстом нельзя ни при какой пропорции —
   при другой форме кадра по краям просто проступит размытый фон. */
.ep-art {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    /* Наклон вслед за курсором: углы считает js/event-page.js и кладёт сюда.
       perspective прямо в transform, чтобы не заводить лишнюю обёртку. */
    transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
    will-change: transform;
}

/* Само по себе, без мыши, карточка медленно качается от края к краю.
   Кадры начинаются и заканчиваются В ПОКОЕ (0/0) — это не украшательство:
   после ухода мыши анимация подхватывается с нулевого кадра, и если бы он был
   наклонённым, карточка дёргалась бы в этот наклон рывком. */
@keyframes ep-float {
    0%   { transform: perspective(1100px) rotateX(0deg) rotateY(0deg); }
    25%  { transform: perspective(1100px) rotateX(2.2deg) rotateY(-6deg); }
    50%  { transform: perspective(1100px) rotateX(0deg) rotateY(0deg); }
    75%  { transform: perspective(1100px) rotateX(-2.2deg) rotateY(6deg); }
    100% { transform: perspective(1100px) rotateX(0deg) rotateY(0deg); }
}

/* Качание И наклон за курсором живут ТОЛЬКО там, где есть настоящая мышь.
   На телефоне карточка неподвижна: наклон там вызвать нечем, а вечное
   самопроизвольное качание на маленьком экране только отвлекает и жжёт батарею. */
@media (hover: hover) and (pointer: fine) {
    .ep-art {
        animation: ep-float 16s ease-in-out infinite;
    }
}

/* Мышь на карточке — качание выключается, ведёт курсор.
   Переход не мгновенный (0.16s): за мышью успевает, но вход из качания в
   курсорный наклон получается мягким, а не рывком. */
.ep-art.is-tilting {
    animation: none;
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.62),
        inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

/* Мышь ушла: сперва плавно возвращаемся в покой и только потом отдаём карточку
   обратно качанию — иначе анимация перехватила бы её прямо из наклона */
.ep-art.is-returning {
    animation: none;
    transform: perspective(1100px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

/* Системная настройка «меньше движения» — выключается и качание, и наклон,
   причём в CSS, а не только в скрипте: стили грузятся раньше */
@media (prefers-reduced-motion: reduce) {
    .ep-art {
        animation: none;
        transform: none;
        transition: none;
    }
}

.ep-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Заголовок может быть длинным («Света. Большой сольный концерт») */
.ep-hero .ep-title {
    font-size: clamp(30px, 3.8vw, 56px);
    overflow-wrap: anywhere;
}

.ep-hero .ep-lead,
.ep-hero .ep-when {
    max-width: none;
}

@media (max-width: 900px) {
    .ep-hero {
        padding: 32px 0 44px;
    }

    .ep-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* Афиша выше текста: на телефоне её и хотят увидеть первой */
    .ep-art {
        order: -1;
    }

    .ep-hero .ep-cta .ep-btn {
        flex: 1 1 100%;
    }
}

@media (max-width: 560px) {
    .ep-art {
        border-radius: 18px;
    }
}

/* ===========================================
   БЛИЖАЙШИЕ МЕРОПРИЯТИЯ
   Карточки повторяют язык блока «Ближайшие вечеринки» на главной:
   картинка сверху, текст в подложке, тонкая рамка. Постеры квадратные,
   поэтому рамка 1:1 — кадрировать нечего.
   =========================================== */

.ep-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.ep-event-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.ep-event-card:hover {
    border-color: var(--color-text-primary);
    transform: translateY(-2px);
}

.ep-event-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-bg-lighter);
}

.ep-event-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ep-event-card:hover .ep-event-img img {
    transform: scale(1.05);
}

/* Дата и название по центру карточки: постер сверху симметричный, и текст
   у левого края смотрелся сдвинутым относительно него */
.ep-event-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.ep-event-date {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.ep-event-name {
    margin: 0;
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    line-height: 1.25;
}

@media (max-width: 640px) {
    /* Четыре карточки в столбик — это экран прокрутки ради одного блока,
       поэтому лента вбок, ровно как в «Ближайших вечеринках» на главной */
    .ep-events {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ep-events::-webkit-scrollbar {
        display: none;
    }

    .ep-event-card {
        flex: 0 0 74%;
        scroll-snap-align: start;
    }
}

/* ===========================================
   ПЛАНШЕТ И ТЕЛЕФОН
   =========================================== */

@media (max-width: 900px) {

    .ep-venue {
        grid-template-columns: 1fr;
    }

    .ep-venue-map {
        order: -1;
    }

    .ep-schedule-row {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px;
    }

    .ep-schedule-row .ep-btn {
        width: 100%;
    }

    .ep-links {
        margin-top: 28px;
    }
}

@media (max-width: 560px) {
    .ep-section {
        padding-top: 44px;
    }

    .ep-h2 {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .ep-venue-info {
        padding: 24px;
    }

    .ep-link-plate {
        padding: 12px 18px;
        font-size: 15px;
    }
}

/* ===========================================
   ПЕРЕНЕСЕНО ИЗ ПРЕЖНЕГО _afisha-event.css
   Страница на нём больше не стоит: старый файл переопределял `.container`
   (поля 20px вместо 50px сайта) и описывал блоки, которых в новой раскладке
   нет — обрезанный постер, сетку «дата/время/площадка/возраст», блок «как
   добраться» отдельной секцией. Сюда переехало только то, что осталось
   в разметке: крошки, плашка прошедшего события, форма отзыва и модалки.
   =========================================== */

.past-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 16px;
}

.past-event-badge svg {
    width: 18px;
    height: 18px;
    flex: none;
    stroke: #000;
}


.feedback-section-event {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.feedback-section-event h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.feedback-section-event .subtitle {
    color: #999;
    margin-bottom: 25px;
    font-size: 14px;
}

.feedback-form-event .form-group {
    margin-bottom: 20px;
}

.feedback-form-event label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
}

.feedback-form-event input,
.feedback-form-event textarea {
    width: 100%;
    padding: 14px 16px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
}

.feedback-form-event input:focus,
.feedback-form-event textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.feedback-form-event textarea {
    resize: vertical;
    min-height: 100px;
}

.feedback-submit-btn-event {
    background: #000;
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    transition: background 0.3s, color 0.3s;
}

.feedback-submit-btn-event:hover {
    background: #fff;
    color: #000;
}

.privacy-checkbox-wrapper-event {
    display: none;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.privacy-checkbox-wrapper-event.visible {
    display: flex;
}

.privacy-checkbox-wrapper-event input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.privacy-checkbox-wrapper-event label {
    font-size: 13px;
    color: #999;
    margin-bottom: 0;
}

.privacy-checkbox-wrapper-event a {
    color: #fff;
}

.phone-group-event {
    display: none;
    margin-bottom: 20px;
}

.phone-group-event.visible {
    display: block;
}

.feedback-success-event {
    display: none;
    text-align: center;
    padding: 40px;
}

.feedback-success-event.active {
    display: block;
}

.feedback-success-event .success-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feedback-form-event.hidden {
    display: none;
}


.btn-event {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: background 0.2s;
    display: block;
    width: 100%;
}

.btn-event:hover {
    background: #2a2a2a;
}

.btn-event:active {
    background: #0a0a0a;
}

/* White button for "Buy Ticket" */
.btn-buy-ticket {
    background: #fff;
    color: #000;
}

.btn-buy-ticket:hover {
    background: #f0f0f0;
}

.btn-buy-ticket:active {
    background: #e0e0e0;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
    width: 90%;
    background: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

.modal-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-actions .btn-event {
    border: 1px solid #444;
}


