/* ============================================
   ORCHESTRA46 — Блок «Другие события»
   Подключается только на страницах концертов.
   Карточки рисует shared/js/other-events.js.
   ============================================ */

/* Секция скрыта, пока скрипт не нашёл, что показать.
   У .other-events НЕ должно быть своего display — иначе атрибут hidden
   перестанет её скрывать, и при пустом списке останется голый заголовок. */
.other-events[hidden] {
    display: none;
}

.other-events {
    padding: var(--section-padding) 0;
    /* Соседние .final-cta и .footer идут на --bg-primary,
       поэтому блок читается как отдельная полоса */
    background: var(--bg-secondary);
    width: 100%;
    overflow: hidden;
}

.other-events .section-title {
    margin-bottom: 56px;
}

/* Сетка одним правилом на все случаи:
   3 карточки в ряд на десктопе, 2 на планшете, 1 на мобильном.
   justify-content: center — ключевое: при одной карточке остаток ширины
   уходит в поля, а не растягивает превью на весь экран. */
.other-events__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
    justify-content: center;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================
   КАРТОЧКА
   ============================================ */

.oe-card {
    height: 100%;
}

.oe-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.oe-card__poster {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0e12 0%, var(--bg-primary) 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.oe-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.oe-card__link:hover .oe-card__poster img {
    transform: scale(1.05);
}

.oe-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px 4px 0;
}

.oe-card__date {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}

.oe-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.oe-card__link:hover .oe-card__title {
    color: var(--gold-light);
}

.oe-card__teaser {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.oe-card__meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    /* прижимает мета, цену и кнопку к низу карточки,
       чтобы у соседних карточек кнопки были на одной линии */
    margin-top: auto;
}

.oe-card__sep {
    color: var(--gold);
    margin: 0 8px;
}

.oe-card__price {
    font-size: 0.8125rem;
    color: var(--gold);
    margin-top: 6px;
}

.oe-card__cta {
    align-self: flex-start;
}

/* ============================================
   ССЫЛКА НА ПОЛНУЮ АФИШУ
   Статическая: видна поисковому роботу независимо от JS
   и нужна, когда предстоящих концертов больше трёх.
   ============================================ */

.other-events__more {
    display: block;
    width: fit-content;
    margin: 48px auto 0;
    padding-bottom: 4px;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.other-events__more:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 767px) {
    .other-events__grid {
        grid-template-columns: minmax(0, 420px);
        gap: 24px;
    }

    .other-events .section-title {
        margin-bottom: 40px;
    }

    .other-events__more {
        margin-top: 32px;
    }
}
