/* ===== 博客页面通用样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    background: #f5f6f8;
}
a { text-decoration: none; color: #333; transition: all 0.3s; }
a:hover { color: #0066cc; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ===== 顶部导航 ===== */
.header {
    background: #fff;
    border-bottom: 3px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo img {
    height: 42px;
    width: auto;
    display: block;
}
.nav { display: flex; gap: 30px; }
.nav a {
    font-size: 15px;
    color: #444;
    padding: 5px 0;
    position: relative;
}
.nav a:hover, .nav a.active {
    color: #0066cc;
}
.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #0066cc;
}

/* ===== 主体布局 ===== */
.main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}
.content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ===== 面包屑 ===== */
.breadcrumb {
    background: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #999;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #0066cc; }

/* ===== 文章列表 ===== */
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-item {
    background: #fff;
    border-radius: 6px;
    padding: 25px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s;
    border-left: 4px solid transparent;
}
.article-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-left-color: #0066cc;
    transform: translateY(-2px);
}
.article-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.5;
}
.article-title a { color: #222; }
.article-title a:hover { color: #0066cc; }
.article-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
}
.article-meta span { display: flex; align-items: center; gap: 4px; }
.article-excerpt {
    color: #666;
    line-height: 1.8;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more {
    margin-top: 15px;
    display: inline-block;
    color: #0066cc;
    font-size: 14px;
    font-weight: 500;
}
.read-more:hover { padding-left: 5px; }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}
.pagination .current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}
.pagination a:hover {
    border-color: #0066cc;
    color: #0066cc;
}

/* ===== 文章详情 ===== */
.article-detail {
    background: #fff;
    border-radius: 6px;
    padding: 40px 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.article-detail h1 {
    font-size: 26px;
    font-weight: bold;
    color: #222;
    line-height: 1.5;
    margin-bottom: 15px;
}
.article-detail .article-meta {
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}
.article-body h2 {
    font-size: 20px;
    color: #222;
    margin: 35px 0 15px;
    padding-left: 12px;
    border-left: 4px solid #0066cc;
    font-weight: bold;
}
.article-body h3 {
    font-size: 17px;
    color: #333;
    margin: 25px 0 12px;
    font-weight: bold;
}
.article-body p {
    margin-bottom: 15px;
    line-height: 2;
    color: #444;
}
.article-body ul, .article-body ol {
    margin-bottom: 15px;
    padding-left: 25px;
}
.article-body ul li {
    list-style: disc;
    margin-bottom: 8px;
    line-height: 1.8;
}
.article-body ol li {
    list-style: decimal;
    margin-bottom: 8px;
    line-height: 1.8;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.article-body th, .article-body td {
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
    text-align: left;
}
.article-body th {
    background: #f5f8fc;
    font-weight: bold;
    color: #333;
}
.article-body strong { color: #222; }
.article-body blockquote {
    border-left: 4px solid #0066cc;
    background: #f5f8fc;
    padding: 15px 20px;
    margin: 20px 0;
    color: #555;
    border-radius: 0 4px 4px 0;
}
.article-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.article-tags a {
    padding: 5px 12px;
    background: #f0f4f8;
    border-radius: 20px;
    font-size: 13px;
    color: #0066cc;
}
.article-tags a:hover { background: #0066cc; color: #fff; }

/* ===== 侧边栏 ===== */
.sidebar-box {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.sidebar-title {
    font-size: 17px;
    font-weight: bold;
    color: #222;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0066cc;
    display: inline-block;
}
.hot-article li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    gap: 10px;
}
.hot-article li:last-child { border-bottom: none; padding-bottom: 0; }
.hot-article .rank {
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: #ddd;
    color: #fff;
    font-size: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.hot-article li:nth-child(1) .rank { background: #e74c3c; }
.hot-article li:nth-child(2) .rank { background: #e67e22; }
.hot-article li:nth-child(3) .rank { background: #f1c40f; }
.hot-article a {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}
.hot-article a:hover { color: #0066cc; }

.category-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.category-list li:last-child { border-bottom: none; }
.category-list a { color: #444; font-size: 14px; }
.category-list a:hover { color: #0066cc; }
.category-list .count {
    font-size: 12px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.contact-box {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: #fff;
    border-radius: 6px;
    padding: 25px;
}
.contact-box h4 {
    font-size: 17px;
    margin-bottom: 15px;
    font-weight: bold;
}
.contact-box p {
    font-size: 13px;
    margin-bottom: 8px;
    opacity: 0.9;
}
.contact-box .phone {
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0;
}

/* ===== 底部 ===== */
.footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 40px 0 20px;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer h5 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 18px;
    font-weight: bold;
}
.footer p, .footer li {
    font-size: 13px;
    line-height: 2;
    color: #95a5a6;
}
.footer a { color: #95a5a6; font-size: 13px; }
.footer a:hover { color: #fff; }
.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 20px 20px 0;
    border-top: 1px solid #3d4f61;
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .main { flex-direction: column; }
    .sidebar { width: 100%; }
    .nav { display: none; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .article-detail { padding: 25px 20px; }
    .article-detail h1 { font-size: 22px; }
}
@media (max-width: 600px) {
    .footer-inner { grid-template-columns: 1fr; gap: 25px; }
    .article-item { padding: 18px 20px; }
    .article-title { font-size: 17px; }
}
