/**
 * 首页专用样式
 */

/* ===== 1. 主体布局 ===== */
.main-content {
    padding: 32px 0 50px;
}

.content-wrap {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

.content-left {
    flex: 1;
    min-width: 0;
}

/* ===== 2. 栏目网格 ===== */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.category-block {
    background: var(--stn-card-bg);
    border: 1px solid var(--stn-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--stn-shadow);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.category-block:hover {
    border-color: rgba(212, 168, 92, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--stn-text-light);
    padding: 14px 18px 10px;
    border-bottom: 1px solid rgba(212, 168, 92, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.section-title i {
    color: var(--stn-primary);
    font-size: 1.1rem;
}
.section-title small {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--stn-text-muted);
    margin-left: auto;
}
.section-title small a {
    color: var(--stn-primary);
    transition: var(--transition);
}
.section-title small a:hover {
    color: var(--stn-secondary);
    text-decoration: underline;
}

/* ===== 3. 文章列表 ===== */
.article-list {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-left: 3px solid transparent;
    transition: var(--transition);
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.article-item:last-child {
    border-bottom: none;
}
.article-item:hover {
    background: var(--stn-card-bg);
    border-left-color: var(--stn-primary);
}

.article-tag {
    flex-shrink: 0;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 30px;
    background: rgba(212, 168, 92, 0.12);
    color: var(--stn-primary);
    border: 1px solid rgba(212, 168, 92, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.article-tag.new {
    background: rgba(52, 152, 219, 0.15);
    color: #5dade2;
    border-color: rgba(52, 152, 219, 0.2);
}
.article-tag.hot {
    background: rgba(165, 69, 58, 0.2);
    color: #e0746a;
    border-color: rgba(165, 69, 58, 0.2);
}
.article-tag.info {
    background: rgba(46, 204, 113, 0.15);
    color: #58d68d;
    border-color: rgba(46, 204, 113, 0.2);
}

.article-info {
    flex: 1;
    min-width: 0;
}
.article-info h4 {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--stn-text-light);
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.article-item:hover .article-info h4 {
    color: #fff;
}
.article-meta {
    font-size: 0.6rem;
    color: var(--stn-text-muted);
    display: flex;
    gap: 10px;
    margin-top: 1px;
}
.article-meta i {
    margin-right: 3px;
    font-size: 0.5rem;
}

.article-item .fa-chevron-right {
    color: var(--stn-text-muted);
    font-size: 0.6rem;
    transition: var(--transition);
    flex-shrink: 0;
}
.article-item:hover .fa-chevron-right {
    color: var(--stn-primary);
    transform: translateX(4px);
}

/* ===== 4. 右侧边栏 ===== */
.content-right {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.widget {
    background: var(--stn-card-bg);
    border: 1px solid var(--stn-border);
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: var(--stn-shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.widget-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--stn-text-light);
    border-bottom: 1px solid rgba(212, 168, 92, 0.1);
    padding-bottom: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.widget-title i {
    color: var(--stn-primary);
}

.hot-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}
.hot-list .hot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    cursor: pointer;
}
.hot-list .hot-item:last-child {
    border-bottom: none;
}
.hot-list .hot-item:hover {
    padding-left: 6px;
    color: var(--stn-text-light);
}
.hot-list .hot-rank {
    font-weight: 700;
    color: var(--stn-primary);
    font-size: 0.8rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.hot-list .hot-rank.top1 {
    color: #f1c40f;
}
.hot-list .hot-rank.top2 {
    color: #bdc3c7;
}
.hot-list .hot-rank.top3 {
    color: #e67e22;
}
.hot-list .hot-info {
    flex: 1;
}
.hot-list .hot-info .title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--stn-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hot-list .hot-info .views {
    font-size: 0.7rem;
    color: var(--stn-text-muted);
}

.update-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}
.update-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    cursor: pointer;
}
.update-item:last-child {
    border-bottom: none;
}
.update-item:hover {
    padding-left: 4px;
    color: var(--stn-text-light);
}
.update-item .date {
    font-size: 0.65rem;
    color: var(--stn-text-muted);
    flex-shrink: 0;
    width: 56px;
}
.update-item .title {
    font-size: 0.85rem;
    color: var(--stn-text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.update-item:hover .title {
    color: var(--stn-text-light);
}

/* ===== 5. 响应式 ===== */
@media (max-width: 1024px) {
    .content-right {
        width: 260px;
    }
    .category-grid {
        gap: 18px;
    }
    .article-item {
        padding: 8px 14px;
    }
    .article-info h4 {
        font-size: 0.82rem;
    }
}

@media (max-width: 820px) {
    .content-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .content-right {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .content-right .widget {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .content-right .widget {
        min-width: 100%;
    }
    .article-item {
        padding: 8px 14px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .article-info h4 {
        white-space: normal;
        font-size: 0.85rem;
    }
    .article-meta {
        font-size: 0.6rem;
        gap: 8px;
        flex-wrap: wrap;
    }
    .section-title {
        font-size: 1rem;
        padding: 12px 16px 8px;
    }
}