.wenzhang .header {
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
    font-weight: bold;
}

.wenzhang .header-list {
    display: flex;
    flex-wrap: wrap;
}

.wenzhang .header-list .section {
    display: flex;
    flex: 0 0 25%;
    box-sizing: border-box;
    padding: 5px;
    flex-direction: column;
}

/* === 首页 hero 区域（轮播 + 最新内容） === */
.hero-row {
    margin-top: 20px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.hero-banner {
    width: 40%;
    padding: 10px;
}

.hero-latest {
    width: 60%;
    padding: 10px;
}

.hero-latest-title {
    font-size: 1.1em;
    font-weight: bold;
}

.hero-latest-list {
    font-size: 1em;
}

.hero-latest-item {
    display: flex;
    justify-content: space-between;
}

.hero-latest-item a {
    white-space: nowrap;
}

.hero-latest-item .hero-latest-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
}

/* === 轮播图 === */
.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 2px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
    position: relative;
}

.slide img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    vertical-align: top;
}

.caption {
    position: absolute;
    bottom: 0px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.1em;
    width: 100%;
    padding-left: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-weight: bold;
}

@keyframes slideAnimation {
    0% { transform: translateX(0); }
    20% { transform: translateX(0); }
    25% { transform: translateX(-100%); }
    45% { transform: translateX(-100%); }
    50% { transform: translateX(-200%); }
    70% { transform: translateX(-200%); }
    75% { transform: translateX(-300%); }
    95% { transform: translateX(-300%); }
    100% { transform: translateX(-400%); }
}

.slides {
    animation: slideAnimation 20s infinite;
}

.container a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: #4d7fd0;
    font-size: 1.1em;
    text-decoration: underline;
}

/* === 分类区域文章卡片 === */
.category-section {
    margin-top: 20px;
    background-color: #fff;
    padding: 10px;
}

.category-card {
    font-size: 1em;
}

.category-card-image {
    padding-bottom: 5px;
}

.category-card-image img {
    height: 120px;
    width: 100%;
    object-fit: cover;
}

.category-card-title {
    font-weight: bold;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.2em;
    max-height: 2.4em;
}

.category-card-desc {
    padding-top: 5px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    line-height: 1.2em;
    max-height: 5em;
}

/* ===== 平板端适配 ===== */
@media (max-width: 768px) {
    .hero-row {
        flex-direction: column;
    }

    .hero-banner,
    .hero-latest {
        width: 100%;
        padding: 10px;
    }

    .hero-banner {
        padding-bottom: 0;
    }

    .slide img {
        height: 200px;
    }

    .wenzhang .header-list .section {
        flex: 0 0 50%;
    }

    .category-card-image img {
        height: 100px;
    }
}

/* ===== 手机端适配 ===== */
@media (max-width: 480px) {
    .hero-latest-item {
        flex-direction: column;
    }

    .hero-latest-item .hero-latest-link {
        width: 100%;
    }

    .slide img {
        height: 160px;
    }

    .caption {
        font-size: 0.9em;
    }

    .wenzhang .header-list .section {
        flex: 0 0 100%;
    }

    .category-card-image img {
        height: 180px;
    }
}
