/* ============================================
   博客列表页与文章详情页通用样式
   ============================================ */

/* --- 页面标题区（缩小版 hero） --- */
.page-hero {
    background: linear-gradient(135deg, #001A40 0%, #000D1F 100%);
    padding: 110px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 70% 50%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.25), transparent);
    pointer-events: none;
}
.page-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}
.page-hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 3px;
    margin-bottom: 10px;
}
.page-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
}

/* --- 主内容区 --- */
.blog-list-wrapper {
    background: #FFFFFF;
    padding: 60px 0 80px;
}
.blog-list-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 30px;
}

/* --- 分类标签 --- */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cat-tab {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    background: #F5F6F8;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
    text-decoration: none;
}
.cat-tab:hover {
    color: #0050C8;
    border-color: #0050C8;
    background: #F0F4FF;
}
.cat-tab.active {
    background: #0050C8;
    color: #FFFFFF;
    border-color: #0050C8;
}

/* --- 分类简介 --- */
.category-intro {
    text-align: center;
    margin-bottom: 40px;
}
.category-intro p {
    font-size: 1.65rem;
    text-align: left;
    color: #6B7280;
}

/* --- 文章卡片 --- */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 50px;
}
.article-card {
    display: flex;
    gap: 25px;
    padding: 20px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #FFFFFF;
}
.article-card:hover {
    border-color: #0050C8;
    box-shadow: 0 8px 25px rgba(0,80,200,0.08);
    transform: translateY(-2px);
}
.card-thumb {
    flex: 0 0 200px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    background: #F0F2F5;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    overflow: hidden;              /* 确保宽度被截断 */
    flex-direction: column;
    justify-content: center;
}
.card-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}
.card-body h2 a {
    color: #1A1A1A;
    text-decoration: none;
    transition: color 0.3s;
}
.card-body h2 a:hover {
    color: #0050C8;
}
.card-excerpt {
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;                   /* 标准属性，消除 VS Code 警告 */
    text-overflow: ellipsis;
    word-break: break-all;           /* 防止长英文单词顶破容器 */
}
.card-meta {
    font-size: 0.8rem;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.meta-divider {
    color: #D1D5DB;
}
.tag {
    display: inline-block;
    background: #EEF2FF;
    color: #0050C8;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* --- 分页导航 --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}
.page-link,
.page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #E5E7EB;
    color: #555;
    background: #FFFFFF;
    transition: all 0.3s;
}
.page-link:hover {
    border-color: #0050C8;
    color: #0050C8;
    background: #F0F4FF;
}
.page-current {
    background: #0050C8;
    color: #FFFFFF;
    border-color: #0050C8;
}
.page-next {
    width: auto;
    padding: 0 20px;
}

/* --- 文章正文页通用 --- */
.article-wrapper {
    max-width: 780px;
    margin: 100px auto 80px;
    padding: 0 30px;
}
.article-header {
    margin-bottom: 40px;
}
.article-category {
    display: inline-block;
    background: #EEF2FF;
    color: #0050C8;
    font-size: 0.8rem;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 500;
    margin-bottom: 15px;
}
.article-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.4;
    margin-bottom: 10px;
}
.article-meta {
    font-size: 0.85rem;
    color: #9CA3AF;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.article-body {
    font-size: 1rem;
    line-height: 1.9;
    color: #333;
}
.article-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 40px 0 15px;
    color: #1A1A1A;
}
.article-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 30px 0 10px;
    color: #333;
}
.article-body p {
    margin-bottom: 18px;
}
.article-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #E5E7EB;
}
.article-body ul, .article-body ol {
    margin: 15px 0 20px 25px;
}
.article-body li {
    margin-bottom: 8px;
}
.article-body blockquote {
    border-left: 4px solid #0050C8;
    padding: 10px 20px;
    margin: 20px 0;
    background: #F8FAFC;
    border-radius: 0 8px 8px 0;
    color: #555;
}
.article-body code {
    background: #F1F3F5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.article-body pre {
    background: #1E1E1E;
    color: #D4D4D4;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #E5E7EB;
    font-size: 0.95rem;
}
.article-nav a {
    color: #0050C8;
    text-decoration: none;
    transition: color 0.3s;
}
.article-nav a:hover {
    color: #003DA5;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
    }
    .card-thumb {
        flex: 0 0 auto;
        height: 180px;
        width: 100%;
    }
    .category-tabs {
        gap: 10px;
    }
    .cat-tab {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
    .page-hero h1 {
        font-size: 1.8rem;
    }
    .article-header h1 {
        font-size: 1.6rem;
    }
    .article-body {
        font-size: 0.95rem;
    }
}

/* ============================================
   右侧名片区（文章详情页 & 主页共用）
   ============================================ */

/* 双栏布局容器 */
.content-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    gap: 40px;
}
.main-content {
    flex: 3;                /* 占 75% */
    min-height: 400px;
}
.sidebar-profile {
    flex: 1;                /* 占 25% */
    min-width: 220px;
    border-left: 1px solid #E5E7EB;
    padding-left: 30px;
}

/* 名片卡片 */
.profile-card {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    color: #1A1A1A;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: sticky;
    top: 100px;              /* 随滚动固定在距顶100px处 */
}
.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: #0050C8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}
.profile-card p {
    font-size: 0.9rem;
    color: #6B7280;
    margin-top: 8px;
}

/* 响应式：平板及手机端名片到底部 */
@media (max-width: 1024px) {
    .content-inner {
        flex-direction: column;
        padding: 0 30px;
    }
    .sidebar-profile {
        border-left: none;
        border-top: 1px solid #E5E7EB;
        padding-left: 0;
        padding-top: 30px;
        margin-top: 30px;
        min-width: auto;
    }
}

.hero-tabs .tab-card.active {
    background: rgba(0, 80, 200, 0.45);      /* 克莱因蓝半透明底 */
    border-color: rgba(255, 255, 255, 0.55);  /* 亮白边框 */
    color: #FFFFFF;
    box-shadow: 0 0 15px rgba(0, 80, 200, 0.4);
}
.hero-tabs .tab-card.active .tab-icon {
    filter: brightness(1.2);
}
/* 返回列表按钮 */
.back-to-list {
    display: inline-block;
    padding: 6px 16px;
    color: #0050C8;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
}
.back-to-list:hover {
    background: #EEF2FF;
    border-color: #0050C8;
    color: #003DA5;
}