/* ============================================================
   list-ai-article.css —— 文章列表页专属样式
   包含：Hero 区高度覆盖、文章列表页布局、右侧悬浮栏、分页
   ============================================================ */

/* --- Hero 区（页面差异：min-height 280px，顶部内边距） --- */
.page-header { min-height: 280px; }
.hero-section { padding-top: 10px; }

/* ================= 新布局：文章列表页与右侧悬浮栏 ================= */
.home-layout {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 60px 40px;
    align-items: flex-start; /* 让子元素各自对齐顶部 */
}

/* ----- 左侧主内容区 ----- */
.main-feed {
    flex: 1;
    min-width: 0; /* 防止flex子项溢出 */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 顶部两个大卡片 */
.top-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.top-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.top-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.top-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.top-card-content {
    padding: 16px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
}
.top-card-wrapper {
    position: relative;
    height: 220px;
}
.top-card-wrapper img {
    height: 100%;
}
.top-card-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.top-card-content p {
    font-size: 13px;
    color: #e5e7eb;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.article-item {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    /* 添加平滑过渡动画 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
/* 列表内容为静态 HTML，通过 data-page 控制分页显示 */
.article-list .article-item { display: none; }
.article-list .article-item.is-show { display: flex; }
.article-item:hover {
    /* 向上移动并加深阴影 */
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}
.article-img {
    width: 200px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}
.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}
.article-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-header h3 .badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}
.article-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #9ca3af;
}
.article-tags {
    display: flex;
    gap: 8px;
}
.article-tags span {
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    color: #4b5563;
    font-size: 12px;
}

/* ================= 分页盒子（与 list-ai.html 同款） ================= */
.pages {
    display: flex; justify-content: center; align-items: center;
    gap: 8px; flex-wrap: wrap;
    padding: 30px 0 50px 0;
}
.pages span,
.pages a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 14px;
    border-radius: 8px; background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #4b5563; font-size: 14px; text-decoration: none;
    cursor: pointer; user-select: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.pages a:hover,
.pages span:hover { background: #eff6ff; color: #2563eb; border-color: #dbeafe; }

.pages a.active {
    background: #2563eb; color: #ffffff; border-color: #2563eb;
    font-weight: 600; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pages span.disabled {
    color: #cbd5e1; background: #f9fafb; cursor: not-allowed;
    box-shadow: none;
}
.pages span.disabled:hover {
    color: #cbd5e1; background: #f9fafb; border-color: #e5e7eb;
}

.pages .ellipsis {
    border: none; background: transparent; cursor: default;
    box-shadow: none; color: #9ca3af; padding: 0 4px;
}
.pages .ellipsis:hover { background: transparent; color: #9ca3af; }

/* ----- 右侧侧边栏（悬浮） ----- */
.right-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 80px; /* 距离顶部偏移量，避开 top-navbar */
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-title i {
    color: #2563eb;
    font-size: 18px;
}

/* 栏目名称（二级栏目）样式 */
.category-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.category-list a {
    display: block;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
}
.category-list a:hover {
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
}

/* 热门文章列表（复用原有的 latest-list 样式） */
.latest-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.latest-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.latest-item:hover .latest-title {
    color: #2563eb;
}
.latest-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}
.latest-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.latest-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.latest-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.latest-time {
    font-size: 11px;
    color: #9ca3af;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .home-layout { flex-direction: column; padding: 20px; }
    .right-sidebar {
        width: 100%;
        position: static; /* 移动端取消悬浮 */
    }
    .top-cards { grid-template-columns: 1fr; }
    .top-card-wrapper { height: 200px; }
}
@media (max-width: 768px) {
    .article-item { flex-direction: column; }
    .article-img { width: 100%; height: 180px; }
    .category-list { grid-template-columns: 1fr 1fr; }
}
