/*
  文章详情页专用样式
  配色对齐首页 --electric-blue: #3E6AE1
*/

/* ====== Single Hero ====== */
.single-hero {
    position: relative;
    min-height: 340px;
    overflow: hidden;
    background-color: #171A20;
    background-size: cover;
    background-position: center;
    isolation: isolate;
}
.single-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg,
        rgba(23,26,32,.94) 0%,
        rgba(23,26,32,.80) 45%,
        rgba(62,106,225,.25) 100%
    );
}
.single-hero-content {
    position: relative; z-index: 2;
    max-width: 1280px; margin: 0 auto;
    padding: 72px 24px 52px;
    text-align: left;
}
.single-hero-eyebrow {
    color: #8eaaf0; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px;
}
.single-hero-eyebrow::before {
    content: ""; display: inline-block; width: 32px; height: 2.5px;
    background: linear-gradient(90deg, #3E6AE1, #8eb5f5);
    vertical-align: middle; margin-right: 10px;
    border-radius: 2px;
}
.single-hero h1 {
    color: #fff; font-size: clamp(32px, 4vw, 44px);
    font-weight: 800; line-height: 1.18; margin: 8px 0 0;
}
.single-hero p {
    color: rgba(255,255,255,.78); font-size: 15px;
    line-height: 1.7; max-width: 600px; margin-top: 14px;
}

/* 面包屑导航 */
.single-breadcrumb {
    display: flex; gap: 8px; margin-top: 18px;
    font-size: 13px; color: rgba(255,255,255,.45); align-items: center;
}
.single-breadcrumb a { color: #a8c4fa; text-decoration: none; transition: color .2s; }
.single-breadcrumb a:hover { color: #fff; }

/* ====== 两栏布局 ====== */
.single-layout {
    max-width: 1280px; margin: 0 auto; padding: 48px 24px;
}
.single-layout-inner {
    display: flex; gap: 36px;
    align-items: flex-start;
}

/* ====== 主内容区 ====== */
.single-main {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 356px);
}

/* ====== 侧边栏 ====== */
.single-sidebar {
    width: 320px; flex-shrink: 0;
    position: sticky; top: 88px;
}

/* ====== 文章头部 ====== */
.article-header {
    display: flex; gap: 32px;
    margin-bottom: 36px;
    padding: 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.article-header-text {
    flex: 1; min-width: 0;
}
.article-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800; line-height: 1.25;
    color: #171A20; margin: 0 0 14px;
}
.article-meta {
    display: flex; gap: 18px;
    font-size: 13px; color: #7C8089;
    margin-bottom: 14px;
}
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-meta i { color: #3E6AE1; }
.article-excerpt {
    font-size: 15px; line-height: 1.65;
    color: #5C5E62;
}

/* 文章标签 */
.article-tags {
    display: flex; flex-wrap: wrap;
    align-items: center; gap: 8px;
    margin-top: 14px;
    font-size: 13px; color: #7C8089;
}
.article-tags > i { color: #3E6AE1; }
.article-tag {
    display: inline-block; padding: 3px 12px;
    background: #f0f4ff; color: #3E6AE1;
    border-radius: 20px; font-size: 12px;
    text-decoration: none; transition: all .2s;
}
.article-tag:hover {
    background: #3E6AE1; color: #fff;
}

/* 特色图片 */
.article-header-image {
    width: 280px; flex-shrink: 0;
}
.article-header-image img {
    width: 100%; height: 200px;
    object-fit: cover; border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

/* ====== 文章正文 ====== */
.article-body {
    font-size: 16px; line-height: 1.8;
    color: #393C41;
    margin-bottom: 40px;
    padding: 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.article-body h2 {
    font-size: 24px; font-weight: 700;
    color: #171A20; margin: 36px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8ecf4;
    
}
.article-body h3 {
    font-size: 20px; font-weight: 600;
    color: #2a2e38; margin: 28px 0 12px;
    padding-left: 14px;
    border-left: 4px solid #3E6AE1;
}
.article-body h4 {
    font-size: 17px; font-weight: 600;
    color: #393C41; margin: 24px 0 10px;
    padding-left: 12px;
    border-left: 3px solid #8eaaf0;
}
.article-body h5 {
    font-size: 15.5px; font-weight: 600;
    color: #5C5E62; margin: 20px 0 8px;
}
.article-body h6 {
    font-size: 14.5px; font-weight: 600;
    color: #7C8089; margin: 16px 0 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.article-body p { margin: 0 0 18px; }
.article-body img {
    max-width: 100%; height: auto;
    border-radius: 8px; margin: 20px 0;
}
.article-body ul, .article-body ol {
    margin: 0 0 18px 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
    border-left: 4px solid #3E6AE1;
    padding: 16px 20px; margin: 24px 0;
    background: #f8faff;
    border-radius: 0 8px 8px 0;
    color: #5C5E62;
    font-style: italic;
}

/* 表格样式 */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14.5px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.article-body thead {
    background: linear-gradient(135deg, #3E6AE1, #5a85f0);
}
.article-body thead th {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 16px;
    text-align: left;
    letter-spacing: 0.3px;
}
.article-body tbody tr {
    transition: background .2s;
    border-bottom: 1px solid #eee;
}
.article-body tbody tr:nth-child(even) {
    background: #fafbfe;
}
.article-body tbody tr:hover {
    background: #eef2ff;
}
.article-body tbody td {
    padding: 12px 16px;
    color: #444;
    line-height: 1.6;
}
.article-body tbody td:first-child {
    font-weight: 600;
    color: #2a2e38;
}

/* 代码块 */
.article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.7;
}
.article-body code {
    background: #f0f4ff;
    color: #3E6AE1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 90%;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}
.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* 分隔线 */
.article-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d0d7e8, transparent);
    margin: 36px 0;
}

/* 强调文字 */
.article-body strong {
    color: #171A20;
    font-weight: 700;
}

/* 链接 */
.article-body a {
    color: #3E6AE1;
    text-decoration: underline;
    text-decoration-color: rgba(62,106,225,.3);
    text-underline-offset: 3px;
    transition: all .2s;
}
.article-body a:hover {
    color: #2550c9;
    text-decoration-color: #2550c9;
}

/* 列表增强 */
.article-body ul, .article-body ol {
    margin: 0 0 20px 24px;
}
.article-body li {
    margin-bottom: 10px;
    line-height: 1.75;
    color: #444;
}
.article-body li::marker {
    color: #3E6AE1;
}

/* 图片增强 */
.article-body img {
    max-width: 100%; height: auto;
    border-radius: 10px; margin: 28px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
}
.article-body img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* ====== 文章导航 ====== */
.post-nav {
    display: flex; justify-content: space-between; gap: 20px;
    padding: 24px 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.post-nav-prev, .post-nav-next {
    flex: 1;
}
.post-nav-prev a, .post-nav-next a {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600;
    color: #3E6AE1; text-decoration: none;
    transition: all .22s ease;
    padding: 10px 16px;
    border-radius: 8px;
    background: #f0f4ff;
}
.post-nav-prev a:hover, .post-nav-next a:hover {
    background: #3E6AE1; color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(62,106,225,.28);
}
.post-nav-next {
    text-align: right;
}

/* ====== 侧边栏 ====== */
.sidebar-inner { position: sticky; top: 88px; }
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #f0f0f0;
}
.widget-title {
    font-size: 17px;
    font-weight: 700;
    color: #171A20;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e6a23c;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-menu li {
    border-bottom: 1px solid #f5f5f5;
}
.sidebar-menu li:last-child {
    border-bottom: none;
}
.sidebar-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}
.sidebar-menu li a:hover {
    color: #1267f1;
}
.recent-posts, .popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}
.recent-posts li, .popular-posts li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}
.recent-posts li:last-child, .popular-posts li:last-child {
    border-bottom: none;
}
.recent-posts li a, .popular-posts li a {
    color: #555;
    text-decoration: none;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.recent-posts li a:hover, .popular-posts li a:hover {
    color: #1267f1;
}
.contact-widget .contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}
.contact-widget .contact-info i {
    color: #1267f1;
    width: 18px;
    text-align: center;
}
.contact-qrcode {
    text-align: center;
    margin-top: 16px;
}
.contact-qrcode img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
}
.contact-qrcode p {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .single-layout-inner {
        flex-direction: column;
    }
    .single-main {
        max-width: 100%;
    }
    .single-sidebar {
        width: 100%;
        position: static;
    }
    .article-header {
        flex-direction: column;
    }
    .article-header-image {
        width: 100%;
    }
    .article-header-image img {
        height: 240px;
    }
}

@media (max-width: 640px) {
    .single-hero {
        min-height: 280px;
    }
    .single-hero-content {
        padding: 48px 16px 36px;
    }
    .single-hero h1 {
        font-size: 26px;
    }
    .article-title {
        font-size: 22px;
    }
    .article-header {
        padding: 20px;
        gap: 20px;
    }
    .article-body {
        padding: 20px;
        font-size: 15px;
    }
    .article-body h2 { font-size: 20px; margin: 24px 0 12px; padding-bottom: 8px; }
    .article-body h3 { font-size: 17px; margin: 20px 0 10px; padding-left: 10px; }
    .article-body h4 { font-size: 15.5px; margin: 18px 0 8px; padding-left: 10px; }
    .article-body h5 { font-size: 14.5px; margin: 16px 0 6px; }
    .article-body h6 { font-size: 13.5px; margin: 14px 0 6px; }
    .article-body table {
        font-size: 12.5px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .article-body thead th,
    .article-body tbody td {
        padding: 10px 12px;
    }
    .post-nav {
       
        padding: 20px;
    }
    .post-nav-next {
        text-align: left;
    }
}
