.events-page {
    padding: 72px 40px 140px;
}

.events-container {
    max-width: 1280px;
    margin-inline: auto;
}

.events-heading {
    margin: 0;
    font-size: 64px;
    font-weight: 800;
    line-height: 64px;
    letter-spacing: -3.84px;
    font-variation-settings: "opsz" 14;
}

.events-intro {
    margin: 19px 0 0 2px;
    font-size: 18px;
    line-height: 28px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 40px 13px;
    margin-top: 65px;
}

.event-card {
    position: relative;
}

.event-card,
.event-card__button {
    min-width: 0;
}

.event-card__button {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.event-card__picture {
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
}

.event-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card__information {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 20px;
    padding-right: 16px;
    font-weight: 700;
}

.event-card__title {
    display: block;
    margin: 0;
    font-size: 24px;
    line-height: 28px;
    letter-spacing: -0.96px;
    font-variation-settings: "opsz" 14;
}

.event-card__date {
    margin: 0;
    color: rgb(74 49 40 / 70%);
    font-size: 16px;
    line-height: 24px;
}

.event-card__title,
.event-card__date,
.event-modal__title,
.event-modal__date,
.event-modal__description,
.event-modal__action {
    overflow-wrap: anywhere;
}

.event-card__status,
.event-modal__status {
    border-radius: 4px;
    background: #f1611e;
    color: #fff;
    font-weight: 700;
    line-height: 24px;
}

.event-card__status {
    position: absolute;
    top: -17px;
    left: 24px;
    padding: 8px 16px;
    box-shadow: 0 4px 9.5px rgb(0 0 0 / 25%);
    font-size: 18px;
}

.event-card__button:focus-visible,
.event-modal__close:focus-visible,
.event-modal__action:focus-visible {
    outline: 3px solid #c65a2e;
    outline-offset: 5px;
}

.event-modal {
    position: fixed;
    inset: 0;
    width: 926px;
    max-width: calc(100vw - 48px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 35px 70px rgb(0 0 0 / 35%);
}

.event-modal::backdrop {
    background: rgb(0 0 0 / 45%);
}

.event-modal__scroll {
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.event-modal__layout {
    display: grid;
    grid-template-columns: minmax(0, 500fr) minmax(0, 426fr);
    min-height: min(846px, calc(100dvh - 48px));
}

.event-modal__picture {
    display: block;
    min-width: 0;
    height: min(846px, calc(100dvh - 48px));
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
}

.event-modal__poster {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    object-fit: cover;
}

.event-modal__video {
    object-fit: cover;
    background: #000;
}

.event-modal__video.has-played {
    object-fit: contain;
}

.event-modal__details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 33px;
    padding: 50px 40px;
}

.event-modal__information {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.event-modal__status {
    padding: 4px 16px;
    font-size: 16px;
}

.event-modal__title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
    letter-spacing: -1.28px;
    font-variation-settings: "opsz" 14;
}

.event-modal__date {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.event-modal__divider {
    position: relative;
    width: 100%;
    height: 0;
}

.event-modal__divider img {
    position: absolute;
    top: -0.5px;
    max-width: 100%;
}

.event-modal__description {
    margin: 0;
    color: #1c1b1f;
    font-size: 16px;
    line-height: 24px;
    white-space: pre-line;
}

.event-modal__action {
    display: inline-flex;
    min-width: 140px;
    max-width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border: 0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    text-decoration: none;
    transition: background-color 150ms;
}

.event-modal__action:disabled {
    cursor: not-allowed;
}

.event-modal__pending {
    max-width: 280px;
    margin: 12px 0 0;
    color: rgb(74 49 40 / 70%);
    font-size: 14px;
    line-height: 20px;
}

.event-modal__close {
    position: absolute;
    z-index: 1;
    top: 6px;
    right: 6px;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.events-fallback {
    margin-top: 40px;
    line-height: 1.6;
}

.events-fallback details {
    margin-top: 16px;
}

.events-fallback a {
    text-decoration: underline;
}

.events-empty {
    grid-column: 1 / -1;
    max-width: 700px;
    font-size: 18px;
    line-height: 28px;
}

.events-pagination {
    margin-top: 48px;
}

html.event-modal-open {
    overflow: hidden;
}

@media (max-width: 1023px) {
    .events-page {
        padding: 56px 24px 140px;
    }

    .events-heading {
        font-size: 52px;
        line-height: 56px;
        letter-spacing: -3px;
    }

    .events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 20px;
        margin-top: 52px;
    }
}

@media (max-width: 699px) {
    .events-page {
        padding: 40px 20px 72px;
    }

    .events-heading {
        font-size: 42px;
        line-height: 48px;
        letter-spacing: -2.52px;
    }

    .events-intro {
        margin-left: 0;
        font-size: 16px;
        line-height: 24px;
    }

    .events-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        margin-top: 48px;
    }

    .event-modal {
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 16px;
    }

    .event-modal__scroll {
        max-height: calc(100dvh - 24px);
    }

    .event-modal__layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .event-modal__picture {
        height: auto;
        max-height: calc(100dvh - 24px);
        aspect-ratio: 500 / 846;
    }

    .event-modal__details {
        gap: 28px;
        padding: 32px 24px;
    }

    .event-modal__title {
        font-size: 28px;
        line-height: 36px;
        letter-spacing: -1.12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-modal__action {
        transition: none;
    }
}
