/**
 * MKIK Events Archive
 */

.mkik-events-archive {
    padding: 52px 0 70px;

    background:
        linear-gradient(
            180deg,
            #fff7f3 0,
            #ffffff 120px
        ),
        #ffffff;
}

/**
 * Archive heading.
 */

.mkik-events-archive__hero {
    position: relative;

    display: grid;
    grid-template-columns: 1fr 310px;
    align-items: center;
    gap: 40px;

    margin-bottom: 46px;
}

.mkik-events-archive__title {
    margin: 0 0 18px;

    color: var(--mkik-dark);

    font-size: clamp(48px, 6vw, 76px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.mkik-events-archive__intro {
    max-width: 520px;
    margin: 0;

    color: var(--mkik-text);

    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
}

.mkik-events-archive__decor {
    width: 220px;
    height: 160px;
    margin-left: auto;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='160' viewBox='0 0 220 160' fill='none'%3E%3Cpath d='M48 34L90 80L48 126' stroke='%23F7B9A1' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M120 34L162 80L120 126' stroke='%23F7B9A1' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    opacity: 0.62;
}

/**
 * Simplified archive filters.
 */

.mkik-events-filter {
    margin-bottom: 38px;
    padding: 28px 38px;

    border: 1px solid rgba(232, 237, 244, 0.78);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.84);

    box-shadow: 0 18px 54px rgba(20, 33, 61, 0.07);
}

.mkik-events-filter__row {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 22px;
}

.mkik-events-filter__label {
    color: #151a2d;

    font-size: 18px;
    font-weight: 800;
}

.mkik-events-filter__bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.mkik-events-filter__button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 28px;

    background: #eee9e1;
    color: #151a2d;

    font-size: 16px;
    font-weight: 700;
    text-decoration: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.mkik-events-filter__button:hover,
.mkik-events-filter__button.is-active {
    background: var(--mkik-orange);
    color: #ffffff;

    box-shadow: 0 12px 28px rgba(255, 90, 31, 0.22);
}

.mkik-events-filter__checkbox {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    gap: 12px;

    color: #151a2d;

    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.mkik-events-filter__box {
    position: relative;

    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;

    border: 2px solid #b8c1d1;
    border-radius: 5px;

    background: #ffffff;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.mkik-events-filter__checkbox.is-active .mkik-events-filter__box {
    border-color: var(--mkik-orange);
    background: var(--mkik-orange);
}

.mkik-events-filter__checkbox.is-active .mkik-events-filter__box::after {
    width: 12px;
    height: 7px;

    border-bottom: 3px solid #ffffff;
    border-left: 3px solid #ffffff;

    content: "";

    transform: rotate(-45deg) translate(1px, -1px);
}

.mkik-events-filter__checkbox:hover {
    color: var(--mkik-orange);
}

.mkik-events-filter__reset {
    margin-left: auto;

    color: var(--mkik-orange);

    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}

.mkik-events-filter__reset:hover {
    color: var(--mkik-dark);
}

/**
 * Events list.
 */

.mkik-events-list__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 26px;
}

.mkik-events-list__title {
    margin: 0;

    color: var(--mkik-dark);

    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.mkik-events-list__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 26px;
}

/**
 * Event card.
 */

.mkik-archive-event-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;

    border: 1px solid var(--mkik-border);
    border-radius: 14px;

    background: #ffffff;

    box-shadow: 0 12px 30px rgba(20, 33, 61, 0.05);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.mkik-archive-event-card:hover {
    transform: translateY(-2px);

    box-shadow: 0 18px 38px rgba(20, 33, 61, 0.08);
}

.mkik-archive-event-card.is-past {
    opacity: 0.82;
}

.mkik-archive-event-card.is-past:hover {
    opacity: 1;
}

/**
 * Full vertical poster.
 *
 * The poster area has the same proportion as 724 × 1024.
 * contain ensures that images with slightly different
 * vertical proportions remain fully visible.
 */

.mkik-archive-event-card__image {
    position: relative;

    display: flex;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 724 / 1024;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background: #f3f1ed;

    text-decoration: none;
}

.mkik-archive-event-card__image img {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 0;

    object-fit: contain;
    object-position: center;

    background: #f3f1ed;
}

.mkik-archive-event-card.is-past .mkik-archive-event-card__image img {
    filter: grayscale(35%) brightness(0.88);
}

/**
 * Past-event badge.
 */

.mkik-archive-event-card__past-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;

    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    padding: 8px 14px;

    background: rgba(20, 33, 61, 0.84);
    color: #ffffff;

    font-size: 13px;
    font-weight: 800;
    line-height: 1;

    backdrop-filter: blur(8px);
}

/**
 * Date badge.
 */

.mkik-event-card__date,
.mkik-archive-event-card__date {
    position: absolute;
    top: 16px;
    left: 18px;
    z-index: 3;

    display: inline-flex;
    min-width: 58px;
    flex-direction: column;
    align-items: center;

    border-radius: 8px;
    padding: 10px 9px;

    background: #ffffff;
    color: var(--mkik-dark);

    box-shadow: 0 10px 24px rgba(20, 33, 61, 0.12);
}

.mkik-event-card__date strong,
.mkik-archive-event-card__date strong {
    color: var(--mkik-orange);

    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.mkik-event-card__date span,
.mkik-event-card__date em,
.mkik-archive-event-card__date span,
.mkik-archive-event-card__date em {
    display: block;

    color: #25304f;

    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
}

/**
 * Card body.
 */

.mkik-archive-event-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 22px 20px 20px;

    background: #ffffff;
}

.mkik-archive-event-card h3 {
    min-height: 52px;
    margin: 0 0 18px;

    color: var(--mkik-dark);

    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
}

.mkik-archive-event-card h3 a {
    color: inherit;
    text-decoration: none;
}

.mkik-archive-event-card h3 a:hover {
    color: var(--mkik-orange);
}

/**
 * Event metadata.
 */

.mkik-event-card__meta {
    display: grid;
    gap: 11px;

    margin-bottom: 20px;
}

.mkik-event-card__meta-item {
    position: relative;

    display: inline-flex;
    min-height: 22px;
    align-items: flex-start;

    padding-left: 30px;

    color: #4c5872;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.mkik-event-card__meta-item::before {
    position: absolute;
    top: 1px;
    left: 0;

    width: 20px;
    height: 20px;

    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    content: "";
}

.mkik-event-card__meta-item--time::before {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8.5' stroke='%23707A91' stroke-width='1.8'/%3E%3Cpath d='M12 7.5V12.2L15.2 14.2' stroke='%23707A91' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.mkik-event-card__meta-item--location::before {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21C12 21 18.5 15.8 18.5 9.8C18.5 6.2 15.6 3.5 12 3.5C8.4 3.5 5.5 6.2 5.5 9.8C5.5 15.8 12 21 12 21Z' stroke='%23707A91' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='9.8' r='2.4' stroke='%23707A91' stroke-width='1.8'/%3E%3C/svg%3E");
}

/**
 * Card bottom.
 */

.mkik-archive-event-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-top: auto;
}

.mkik-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mkik-card-tags span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;

    border-radius: 999px;
    padding: 7px 11px;

    background: #fff7f3;
    color: var(--mkik-orange);

    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.mkik-card-tags span.is-free {
    background: var(--mkik-orange);
    color: #ffffff;
}

.mkik-archive-event-card__ticket,
.mkik-archive-event-card__button {
    display: inline-flex;
    width: auto;
    min-width: 0;
    min-height: 34px;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    padding: 8px 14px;

    background: var(--mkik-orange);
    color: #ffffff;

    box-shadow: none;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.mkik-archive-event-card__ticket:hover,
.mkik-archive-event-card__button:hover {
    color: #ffffff;
    transform: none;
}

.mkik-archive-event-card__status {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    padding: 8px 14px;

    background: #eef1f6;
    color: #59637c;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

/**
 * Empty state and pagination.
 */

.mkik-events-empty {
    border: 1px solid var(--mkik-border);
    border-radius: 16px;
    padding: 40px;

    background: #ffffff;
    color: var(--mkik-dark);

    font-size: 18px;
    font-weight: 700;
}

.mkik-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 34px;
}

.mkik-pagination .page-numbers {
    display: inline-flex;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--mkik-border);
    border-radius: 10px;
    padding: 0 14px;

    color: var(--mkik-dark);

    font-weight: 700;
    text-decoration: none;
}

.mkik-pagination .page-numbers.current,
.mkik-pagination .page-numbers:hover {
    border-color: var(--mkik-orange);

    background: var(--mkik-orange);
    color: #ffffff;
}

/**
 * Responsive.
 */

@media (max-width: 1100px) {
    .mkik-events-list__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .mkik-events-archive__hero {
        grid-template-columns: 1fr;
    }

    .mkik-events-archive__decor {
        display: none;
    }

    .mkik-events-filter {
        padding: 26px;
    }

    .mkik-events-filter__row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mkik-events-filter__reset {
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .mkik-events-archive {
        padding: 34px 0 52px;
    }

    .mkik-events-archive__title {
        font-size: 42px;
    }

    .mkik-events-archive__intro {
        font-size: 18px;
    }

    .mkik-events-filter {
        padding: 22px;
    }

    .mkik-events-filter__button {
        width: auto;
        min-height: 42px;
        padding: 10px 18px;

        font-size: 14px;
    }

    .mkik-events-filter__checkbox {
        width: 100%;
    }

    .mkik-events-list__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .mkik-events-list__title {
        font-size: 26px;
    }

    .mkik-events-list__grid {
        grid-template-columns: 1fr;
    }

    .mkik-archive-event-card h3 {
        min-height: auto;
    }

    .mkik-archive-event-card__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .mkik-archive-event-card__ticket,
    .mkik-archive-event-card__button {
        width: 100%;
    }
}

/* Отступ между строками фильтров */
.mkik-events-filter__row + .mkik-events-filter__row {
    margin-top: 22px;
}

@media (max-width: 767px) {
    .mkik-events-filter__row + .mkik-events-filter__row {
        margin-top: 26px;
    }
}