.events {
    padding: 80px 0;
    background-color: #fff;
}

.events-header {
    text-align: center;
    margin-bottom: 48px;
}

.events-title {
    font-size: 48px;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.events-grid {
    display: grid;
    gap: 80px 20px;
    margin-bottom: 80px;
    justify-content: center;
    max-width: 1280px;
}

/* 1个卡片：居中显示 */
.events-grid:has(.event-card:nth-child(1):last-child) {
    grid-template-columns: 1fr;
    justify-items: center;
}

.events-grid:has(.event-card:nth-child(1):last-child) .event-card {
    width: 400px;
}

/* 2个卡片：左右显示 */
.events-grid:has(.event-card:nth-child(2):last-child) {
    grid-template-columns: 1fr 1fr;
    max-width: 840px;
}

/* 3个或以上：一排三个 */
.events-grid:has(.event-card:nth-child(3)) {
    grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
}

@media (min-width: 1281px) {
    .events-grid:has(.event-card:nth-child(3)) {
        grid-template-columns: repeat(3, minmax(300px, 400px));
    }
}

.event-card {
    background: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    min-width: 300px;
    max-width: 400px;
    text-decoration: none !important;
}

.event-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.event-content {
    padding: 32px 20px 28px;
    height: 260px;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    height: 54px;
}

.event-location,
.event-date {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #505050;
}

.event-location {
    align-items: flex-start;
}

.location-icon {
    background: url(/s/images/events/location.png) no-repeat center center;
    min-width: 20px;
    min-height: 20px;
    margin-right: 10px;
}

.date-icon {
    background: url(/s/images/events/date.png) no-repeat center center;
    min-width: 20px;
    min-height: 20px;
    margin-right: 10px;
}

.event-location span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-more {
    position: absolute;
    bottom: 28px;
    right: 20px;
}

.view-more span {
    color: #000;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
}

.load-more-container {
    text-align: center;
}

.view-more-btn {
    background: transparent;
    border: 2px solid #000;
    border-radius: 100px;
    padding: 14px 32px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 280px;
}

.view-more-btn:hover {
    background: #000;
    color: #fff;
}

@media (max-width: 1024px) {
    .events-grid {
        gap: 30px;
        grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
    }
}

@media (max-width: 768px) {
    .events {
        padding: 40px 0;
    }
    
    .events-header {
        margin-bottom: 40px;
    }
    
    .events-title {
        font-size: 32px;
    }
    
    .events-container {
        padding: 0 15px;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
        gap: 40px 20px;
        margin-bottom: 40px;
    }
    
    .event-image {
        height: 160px;
    }
    
    .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .event-title {
        font-size: 16px;
    }
    
    .event-location,
    .event-link,
    .event-date {
        font-size: 12px;
    }
}