/*
 * @file        article.css
 * @description 文章列表与内容页样式 - 侧边栏目树、文章卡片、搜索框、详情页排版、相关推荐
 * @author      zhuowebuqun
 * @date        2026-05-01
 * @notes       依赖 common.css；用于 news-list / news-detail / cooperation 页面
 */

/* ================ 列表布局：侧栏 + 内容 ================ */
.layout-aside {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    padding: 56px 0 80px;
}

/* 侧边栏目树 */
.side-nav {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 88px;
}
.side-nav-head {
    background: var(--c-ink);
    color: #fff;
    padding: 24px;
}
.side-nav-head h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    letter-spacing: 2px;
}
.side-nav-head p {
    font-size: 12px;
    opacity: .6;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}
.side-nav ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    font-size: 14px;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-divider);
    transition: all var(--t-fast);
}
.side-nav ul li:last-child a {
    border-bottom: 0;
}
.side-nav ul li a::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--c-border);
    margin-right: 12px;
    transition: all var(--t-fast);
}
.side-nav ul li.is-active > a,
.side-nav ul li > a:hover {
    background: var(--c-ivory);
    color: var(--c-gold-deep);
    padding-left: 32px;
}
.side-nav ul li.is-active > a::before,
.side-nav ul li > a:hover::before {
    background: var(--c-gold);
    width: 8px;
    height: 8px;
}

/* 移动端折叠按钮 */
.side-toggle {
    display: none;
    width: 100%;
    padding: 14px 20px;
    background: var(--c-ink);
    color: #fff;
    font-size: 14px;
    text-align: left;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
}
.side-toggle::after {
    content: "▾";
    float: right;
}

/* ================ 列表头部：搜索 + 排序 ================ */
.list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--c-ink);
}
.list-head h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--c-ink);
}
.list-search {
    position: relative;
    width: 260px;
}
.list-search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: 13px;
    background: #fff;
    transition: border-color var(--t-fast);
}
.list-search input:focus {
    border-color: var(--c-gold);
}
.list-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-ink);
    color: #fff;
    font-size: 14px;
}

/* ================ 文章卡片列表 ================ */
.article-list .article-item {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--c-divider);
    transition: all var(--t-base);
}
.article-list .article-item:hover {
    transform: translateX(6px);
}
.article-list .article-item:hover .ai-title a {
    color: var(--c-gold-deep);
}
.ai-thumb {
    flex-shrink: 0;
    width: 220px;
    height: 140px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-ivory), var(--c-cream));
    position: relative;
}
.ai-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.ai-thumb.t-1::after { background: linear-gradient(135deg, #1A1B3A, #E63946); }
.ai-thumb.t-2::after { background: linear-gradient(135deg, #F4B942, #C12A37); }
.ai-thumb.t-3::after { background: linear-gradient(135deg, #2D9596, #7B5EA7); }
.ai-thumb.t-4::after { background: linear-gradient(135deg, #FF8C42, #E63946); }
.ai-thumb.t-5::after { background: linear-gradient(135deg, #7B5EA7, #1A1B3A); }
.ai-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ai-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--c-text-muted);
}
.ai-cat {
    background: var(--c-ivory);
    color: var(--c-gold-deep);
    padding: 2px 10px;
    border-radius: 2px;
}
.ai-title {
    font-size: 18px;
    margin-bottom: 8px;
}
.ai-title a {
    color: var(--c-ink);
    transition: color var(--t-fast);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ai-sum {
    font-size: 13px;
    color: var(--c-text-muted);
    line-height: 1.7;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 空数据 */
.empty-state {
    padding: 64px 0;
    text-align: center;
    color: var(--c-text-muted);
}
.empty-state::before {
    content: "○";
    display: block;
    font-size: 56px;
    color: var(--c-border);
    margin-bottom: 8px;
}

/* ================ 文章详情页 ================ */
.article-main {
    background: #fff;
    padding: 56px 0 80px;
}
.article-wrap {
    max-width: 880px;
    margin: 0 auto;
}
.article-header {
    text-align: center;
    padding: 24px 0 32px;
    border-bottom: 1px dashed var(--c-border);
    margin-bottom: 40px;
}
.article-header .ah-cat {
    display: inline-block;
    background: var(--c-ivory);
    color: var(--c-gold-deep);
    padding: 4px 14px;
    border-radius: 2px;
    font-size: 12px;
    margin-bottom: 16px;
}
.article-header h1 {
    font-family: var(--font-serif);
    font-size: 36px;
    color: var(--c-ink);
    line-height: 1.4;
    margin-bottom: 16px;
}
.article-header .ah-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: 13px;
    color: var(--c-text-muted);
    flex-wrap: wrap;
}
.article-header .ah-meta span::before {
    content: "·";
    margin-right: 6px;
    color: var(--c-gold);
}

/* 正文排版 */
.article-content {
    font-size: 16px;
    line-height: 1.95;
    color: #3a4150;
}
.article-content p {
    margin-bottom: 1.5em;
    text-indent: 2em;
}
.article-content h2,
.article-content h3 {
    font-family: var(--font-serif);
    color: var(--c-ink);
    margin: 2em 0 1em;
    padding-left: 14px;
    border-left: 4px solid var(--c-gold);
}
.article-content h2 { font-size: 24px; }
.article-content h3 { font-size: 19px; }
.article-content blockquote {
    background: var(--c-cream);
    border-left: 4px solid var(--c-gold);
    padding: 18px 24px;
    margin: 1.5em 0;
    color: var(--c-ink-soft);
    font-style: italic;
}
.article-content img {
    margin: 2em auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.article-content figure {
    margin: 2em 0;
    text-align: center;
}
.article-content figcaption {
    font-size: 13px;
    color: var(--c-text-muted);
    margin-top: 8px;
    text-indent: 0;
}
.article-content ul,
.article-content ol {
    padding-left: 2em;
    margin-bottom: 1.5em;
}
.article-content ul li {
    list-style: disc;
    margin-bottom: .5em;
}
.article-content ol li {
    list-style: decimal;
    margin-bottom: .5em;
}
.article-content a {
    color: var(--c-gold-deep);
    border-bottom: 1px dashed var(--c-gold);
}

/* 文章底部：标签、分享、上下篇 */
.article-footer {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px dashed var(--c-border);
}
.article-tags {
    margin-bottom: 24px;
}
.article-tags span {
    display: inline-block;
    margin-right: 8px;
    padding: 4px 12px;
    background: var(--c-ivory);
    color: var(--c-gold-deep);
    border-radius: 2px;
    font-size: 12px;
}
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}
.article-nav a {
    padding: 18px 20px;
    background: var(--c-ivory);
    border-radius: var(--radius-md);
    transition: all var(--t-base);
}
.article-nav a:hover {
    background: var(--c-ink);
    color: #fff;
}
.article-nav a small {
    display: block;
    font-size: 12px;
    color: var(--c-text-muted);
    margin-bottom: 4px;
    transition: color var(--t-base);
}
.article-nav a:hover small {
    color: rgba(255,255,255,.6);
}
.article-nav a strong {
    font-size: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.article-nav .next {
    text-align: right;
}

/* 相关推荐 */
.related {
    background: var(--c-ivory);
    padding: 56px 0;
}
.related h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--c-ink);
    margin-bottom: 24px;
    border-left: 4px solid var(--c-gold);
    padding-left: 12px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.related-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--t-base);
    border: 1px solid transparent;
}
.related-card:hover {
    border-color: var(--c-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.rc-thumb {
    height: 160px;
}
.rc-thumb.t-1 { background: linear-gradient(135deg, #1A1B3A, #2D9596); }
.rc-thumb.t-2 { background: linear-gradient(135deg, #E63946, #FF8C42); }
.rc-thumb.t-3 { background: linear-gradient(135deg, #7B5EA7, #F4B942); }
.rc-body {
    padding: 16px 20px 20px;
}
.rc-body time {
    font-size: 12px;
    color: var(--c-gold);
}
.rc-body h4 {
    font-size: 15px;
    color: var(--c-ink);
    margin-top: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ================ 响应式 ================ */
@media (max-width: 991px) {
    .layout-aside {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .side-nav {
        position: static;
        margin-bottom: 24px;
        display: none;
    }
    .side-nav.is-open {
        display: block;
    }
    .side-toggle {
        display: block;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    /* 移动端间距统一标准：主体 padding 统一为 32px 顶 / 48px 底 */
    .layout-aside { padding: 32px 0 48px; }
    .article-main { padding: 32px 0 48px; }
    .list-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .list-search { width: 100%; }
    .ai-thumb { width: 110px; height: 80px; }
    .article-list .article-item { gap: 12px; padding: 16px 0; }
    .ai-title { font-size: 15px; }
    .ai-sum { display: none; }
    .article-header h1 { font-size: 24px; }
    .article-header .ah-meta { gap: 12px; font-size: 12px; }
    .article-content { font-size: 15px; }
    .article-content h2 { font-size: 20px; }
    .article-nav { grid-template-columns: 1fr; }
    .article-nav .next { text-align: left; }
    .related-grid { grid-template-columns: 1fr; }
}
