/**
 * 新闻列表页样式 - 仿雷锋网风格
 * Inspired by https://www.leiphone.com
 */

/* ========== 文章卡片 ========== */
.lp-article-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    border: 1px solid #f0f0f0;
}

.lp-article-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
    transform: translateY(-2px);
}

/* 左侧图片 */
.lp-article-img {
    flex-shrink: 0;
    width: 220px;
    height: 147px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.lp-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lp-article-card:hover .lp-article-img img {
    transform: scale(1.05);
}

/* 右侧内容 */
.lp-article-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lp-article-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lp-article-card:hover .lp-article-title {
    color: #2563eb;
}

.lp-article-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章元信息 */
.lp-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.lp-article-source {
    color: #2563eb;
    font-weight: 500;
}

.lp-article-source::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.lp-article-date,
.lp-article-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lp-article-date::before,
.lp-article-views::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.lp-article-date::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.lp-article-views::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* 标签 */
.lp-article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.lp-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #e6f7fc;
    color: #2563eb;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lp-tag:hover {
    background: #2563eb;
    color: #fff;
}

/* ========== 置顶文章区域 ========== */
.lp-top-section {
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    border: 1px solid #fbbf24;
}

.lp-top-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
}

.lp-top-label i {
    color: #f59e0b;
}

.lp-top-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.lp-top-card {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.lp-top-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.lp-top-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.lp-top-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lp-top-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #2563eb);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.lp-top-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lp-top-badge {
    display: inline-block;
    width: fit-content;
    padding: 2px 6px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.lp-top-title {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lp-top-meta {
    font-size: 11px;
    color: #999;
    margin-top: auto;
}

/* ========== 分页控件 ========== */
.lp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    padding: 16px 0;
}

.lp-page-num,
.lp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lp-page-num:hover,
.lp-page-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.lp-page-num.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}

.lp-page-ellipsis {
    color: #999;
    padding: 0 8px;
}

/* ========== 侧边栏 ========== */
.lp-sidebar {
    position: sticky;
    top: 120px;
}

.lp-side-block {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.lp-side-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.lp-side-head i {
    color: #2563eb;
}

.lp-side-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lp-side-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 6px 0;
    border-bottom: 1px dashed #f0f0f0;
    transition: all 0.2s ease;
}

.lp-side-item:last-child {
    border-bottom: none;
}

.lp-side-item:hover .lp-side-text {
    color: #2563eb;
}

.lp-side-rank {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.lp-side-rank.top3 {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
}

.lp-side-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.lp-side-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    background: #d1d5db;
    border-radius: 50%;
    margin-top: 6px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .lp-article-img {
        width: 180px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .lp-article-card {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .lp-article-img {
        width: 100%;
        height: 180px;
    }

    .lp-article-title {
        font-size: 16px;
    }

    .lp-article-summary {
        -webkit-line-clamp: 3;
    }

    .lp-top-grid {
        grid-template-columns: 1fr;
    }

    .lp-sidebar {
        position: static;
        margin-top: 24px;
    }
}

@media (max-width: 480px) {
    .lp-article-img {
        height: 160px;
    }

    .lp-article-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lp-page-num,
    .lp-page-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }
}
