/* 1. 模块整体：强制和网站主容器（1400px）对齐 */
.home-combo-module {
    max-width: 1400px !important;  /* 关键：强制最大宽度1400px */
    width: 100% !important;
    margin: 0 auto !important;    /* 居中对齐 */
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;       /* 内边距不撑宽 */
}

/* 2. 模块头部 */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.module-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    position: relative;
}
.module-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #ff4757, #ffa502);
}
.view-more {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s;
}
.view-more:hover {
    background: #f5f5f5;
}

/* 3. 主体布局：严格控制左右比例 */
.module-body {
    display: flex;
    gap: 20px;
    width: 100%;
}
.left-section { 
    flex: 0 0 70%; /* 固定左侧宽度占70% */
    max-width: 70%;
}
.right-section { 
    flex: 0 0 30%; /* 固定右侧宽度占30% */
    max-width: 30%;
}

/* 4. 左侧标签导航 */
.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 8px;
    flex-wrap: wrap;
}
.tab-link {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.2s;
}
.tab-link.active {
    background: #fff;
    color: #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 5. 左侧文章网格：适配70%宽度的4列布局 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
}
.post-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.post-card:hover { transform: translateY(-3px); }

.card-thumb {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vip-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ffc107;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.card-tags { padding: 8px 12px 0; }
.cat-tag {
    display: inline-block;
    font-size: 12px;
    color: #666;
    margin-right: 6px;
}

.card-title {
    padding: 8px 12px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}
.card-title a { color: #333; text-decoration: none; }

.card-meta {
    padding: 0 12px 12px;
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #999;
}

/* 6. 右侧排行 */
.rank-tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.rank-tab {
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
}
.rank-tab.active {
    background: #ffebee;
    color: #f44336;
    font-weight: bold;
}

.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.rank-num {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 4px;
    background: #eee;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
}
.rank-num.top3 { color: #fff; }
.rank-num.top3:nth-child(1) { background: #f44336; }
.rank-num.top3:nth-child(2) { background: #ffc107; color: #000; }
.rank-num.top3:nth-child(3) { background: #4caf50; }

.rank-info { flex: 1; }
.rank-name {
    display: block;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    margin-bottom: 4px;
}
.rank-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    gap: 8px;
}

/* 7. 响应式适配：1400px断点 */
@media (max-width: 1400px) {
    .home-combo-module {
        max-width: 1400px;
    }
}

@media (max-width: 1024px) {
    .home-combo-module {
        padding: 15px;
    }
    .module-body {
        flex-direction: column;
    }
    .left-section, .right-section {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .tab-nav {
        flex-wrap: wrap;
    }
}