.event-list-wrapper {
    width: min(1120px, calc(100% - 48px));
    margin: 48px auto 84px;
}

.event-list-header {
    max-width: 680px;
    margin-bottom: 20px;
}

.event-list-eyebrow {
    margin: 0 0 9px;
    color: var(--tripbora-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.event-list-header h1 {
    margin: 0;
    color: #183b52;
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.045em;
}

.event-list-header > p:last-child {
    margin: 12px 0 0;
    color: #667686;
    font-size: 1rem;
    line-height: 1.65;
}

/* 상태 탭: pill 버튼 대신 밑줄로만 선택을 표시하는 텍스트 탭 */
.event-tab {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e5eaee;
}

.event-tab a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 1px 10px;
    color: #7a8795;
    background: none;
    border: 0;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 0.16s ease;
}

.event-tab a::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: transparent;
    content: "";
    transition: background-color 0.16s ease;
}

.event-tab a:hover,
.event-tab a:focus-visible {
    color: #1e3443;
}

.event-tab a.active {
    color: var(--tripbora-primary-hover);
    font-weight: 750;
}

.event-tab a.active::after {
    background: var(--tripbora-primary);
}

.event-tab a:focus-visible {
    outline: 3px solid rgba(118, 87, 200, 0.18);
    outline-offset: 2px;
}

.event-list {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 항목은 카드 박스가 아니라 얇은 divider 로만 구분되는 콘텐츠 행이다 */
.event-card {
    min-width: 0;
}

.event-card:not(:last-child) {
    border-bottom: 1px solid #eceff2;
}

.event-card-link {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 24px 2px;
    color: inherit;
    text-decoration: none;
}

.event-card-link:focus-visible {
    outline: 3px solid rgba(118, 87, 200, 0.24);
    outline-offset: 2px;
}

.event-card-image-wrap {
    width: 260px;
    flex: 0 0 260px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #edf2f3;
    border-radius: 12px;
}

.event-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.event-card-link:hover .event-card-image {
    transform: scale(1.025);
}

.event-card-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

/* 이미지가 없는 이벤트는 텍스트가 행 전체 폭을 그대로 쓴다 */
.event-card-link.is-text-only {
    padding: 22px 2px;
}

.event-status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 10px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
}

.event-status-badge.is-ongoing {
    color: #14766f;
    background: #e6f7f4;
}

.event-status-badge.is-upcoming {
    color: #356ba1;
    background: #eaf3fb;
}

.event-status-badge.is-ended {
    color: #6e7781;
    background: #eff1f3;
}

.event-title {
    margin: 0;
    overflow: hidden;
    color: #16303f;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.16s ease;
}

.event-card-link:hover .event-title {
    color: #0d2432;
}

.event-date {
    margin: 8px 0 0;
    overflow: hidden;
    color: #7a8899;
    font-size: 0.86rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-desc {
    display: -webkit-box;
    margin: 10px 0 0;
    overflow: hidden;
    color: #7b8794;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.event-empty-state {
    padding: 72px 24px;
    color: #788792;
    text-align: center;
}

.event-empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* 페이지네이션: 여행지 목록(.pagination)과 같은 디자인을 이벤트 목록 안에서만 쓴다 */
.event-list-wrapper .pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 36px 0 0;
}

.event-list-wrapper .pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.event-list-wrapper .pagination a,
.event-list-wrapper .pagination span {
    display: inline-flex;
    min-width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 9px;
    color: #5b6676;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.event-list-wrapper .pagination a:hover {
    color: #1e2939;
    background: #f4f6fa;
    border-color: #dbe0e8;
}

.event-list-wrapper .pagination a:focus-visible {
    outline: 3px solid rgba(53, 88, 240, 0.22);
    outline-offset: 2px;
}

.event-list-wrapper .pagination .page-nav {
    font-size: 1.05rem;
    line-height: 1;
}

.event-list-wrapper .pagination .page-number.is-current {
    color: #fff;
    background: #7657c8;
    border-color: #7657c8;
    font-weight: 750;
    pointer-events: none;
}

.event-list-wrapper .pagination .is-disabled {
    color: #c2c8d2;
    background: #f7f8fb;
    border-color: #eceff4;
    pointer-events: none;
}

@media (max-width: 600px) {
    .event-list-wrapper .pagination a,
    .event-list-wrapper .pagination span {
        min-width: 30px;
        height: 30px;
        padding: 0 7px;
        font-size: 0.85rem;
    }
}

/* 태블릿: 대표 이미지만 조금 줄이고 가로 배치는 유지한다 */
@media (max-width: 900px) {
    .event-card-link {
        gap: 20px;
        padding: 20px 2px;
    }

    .event-card-image-wrap {
        width: 200px;
        flex-basis: 200px;
    }
}

@media (max-width: 700px) {
    .event-list-wrapper {
        width: min(100% - 32px, 1120px);
        margin: 36px auto 60px;
    }

    .event-tab {
        gap: 16px;
    }

    .event-list {
        grid-template-columns: 1fr;
    }

    /* 좁은 화면에서는 이미지가 위, 텍스트가 아래로 내려간다 (카드 박스는 만들지 않는다) */
    .event-card-link,
    .event-card-link.is-text-only {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 18px 0;
    }

    .event-card-image-wrap {
        width: 100%;
        flex: 0 0 auto;
        aspect-ratio: 16 / 9;
    }

    .event-status-badge {
        margin-bottom: 8px;
    }

    .event-title {
        display: -webkit-box;
        font-size: 1.05rem;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .event-date {
        margin-top: 6px;
        font-size: 0.82rem;
    }

    .event-desc {
        margin-top: 7px;
        font-size: 0.86rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-card-image,
    .event-title,
    .event-tab a,
    .event-tab a::after {
        transition: none;
    }

    .event-card-link:hover .event-card-image {
        transform: none;
    }
}
