/* ======================
   全局基础样式
====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.7;
}

a {
    color: #1e6bd6;
    text-decoration: none;
}

a:hover {
    color: #0b4fb3;
}

/* ======================
   Header
====================== */
header {
    background: #1e6bd6;
    color: #fff;
    padding: 20px 0;
}

header .logo h1 {
    font-size: 30px;
    text-align: center;
}

header nav {
    margin-top: 10px;
    text-align: center;
}

header nav ul {
    list-style: none;
}

header nav li {
    display: inline-block;
    margin: 0 15px;
}

header nav a {
    color: #fff;
    font-size: 16px;
}

/* ======================
   Banner
====================== */
.banner {
    background: linear-gradient(
        rgba(30,107,214,.75),
        rgba(30,107,214,.75)
    ), url(/assets/img/banner.jpg) center / cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 90px 20px;
}

.banner h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

.banner p {
    font-size: 18px;
    opacity: .95;
}

/* ======================
   主体区域
====================== */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ======================
   首页 / 分类文章列表
====================== */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.article-item {
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    transition: all .25s ease;
    margin: 5px;
}

.article-item:hover {
    transform: translateY(-6px);
}

.article-item h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.article-item .excerpt {
    font-size: 15px;
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    font-size: 15px;
    font-weight: 500;
}

/* ======================
   分类页头部
====================== */
.category-header {
    margin-bottom: 30px;
    text-align: center;
}

.category-header h1 {
    font-size: 32px;
    color: #ffffff;
}

.category-header p {
    color: #666;
    margin-top: 10px;
}

/* ======================
   单篇文章
====================== */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.single-main {
    min-width: 0;
}

.single-article {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,.06);
}

.single-article h1 {
    font-size: 32px;
    color: #1e6bd6;
    margin-bottom: 20px;
}

.article-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

.article-content {
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2,
.article-content h3 {
    margin: 35px 0 15px;
    color: #1e6bd6;
}

.single-sidebar {
    position: sticky;
    top: 30px;
}

.sidebar-box {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,.05);
}

.sidebar-box h3 {
    font-size: 18px;
    color: #1e6bd6;
    margin-bottom: 15px;
}

.sidebar-box ul {
    list-style: none;
}

.sidebar-box li {
    margin-bottom: 10px;
}

.sidebar-box a {
    font-size: 14px;
    color: #333;
}

.sidebar-box a:hover {
    color: #1e6bd6;
}

.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    font-size: 24px;
    color: #1e6bd6;
    margin-bottom: 20px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.related-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
}

/* 上一篇 / 下一篇 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.post-navigation a {
    font-size: 15px;
}

/* ======================
   FAQ 问答模块
====================== */
.faq {
    margin-top: 70px;
    text-align: center;
}

.faq h2 {
    font-size: 30px;
    color: #1e6bd6;
    margin-bottom: 25px;
}

.faq-item {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
}

.faq-question {
    width: 100%;
    background: #1e6bd6;
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
    border-radius: 10px;
}

.faq-answer {
    display: none;
    padding: 20px;
    color: #555;
    background: #f9fbff;
}

/* ======================
   分页
====================== */
.pagination {
    text-align: center;
    margin: 50px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 6px;
    border: 1px solid #1e6bd6;
}

.pagination .current,
.pagination a:hover {
    background: #1e6bd6;
    color: #fff;
}

/* ======================
   Footer
====================== */
footer {
    background: #1e6bd6;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

footer p {
    font-size: 14px;
}

/* ======================
   移动端适配
====================== */
@media (max-width: 768px) {
    .banner h2 {
        font-size: 26px;
    }

    .single-article {
        padding: 25px;
    }

    .post-navigation {
        flex-direction: column;
        gap: 10px;
    }
}
