/* ==========================================================================
   博客模块终极样式表 - 80% 视宽网格流架构
   设计语言：严谨、专业、极简、动态响应
   ========================================================================== */

:root {
    --blog-blue: #0b4f8a;
    --blog-blue-hover: #083c6b;
    --text-deep: #1d1d1f;        /* 墨黑 */
    --text-sub: #86868b;         /* 金属灰 */
    --card-white: #ffffff;
    --radius-lg: 12px;           /* 统一圆角标准 */
    --shadow-standard: 0 1px 3px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.03);
    --shadow-lift: 0 20px 40px rgba(11, 79, 138, 0.08), 0 0 0 1px rgba(11, 79, 138, 0.05) inset;
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. 宏观布局架构 */
.blog-list-container {
    padding: 0.2rem 0;
    background-color: var(--surface);
    min-height: 100vh;
}

.container {
    width: min(92%, 1980px);
    max-width: 1980px;
    margin: 0 auto;
    padding-top: 0.4rem;
}

/* 2. 页面头部 (Header) 专项美化 */
.blog-header {
    padding: 0.4rem 0 0.2rem;
    text-align: center;
}

.blog-header h1 {
    font-size: .28rem;
    color: var(--text-deep);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    font-family: "Source Han Serif CN", serif; /* 引入衬线体增加学术感 */
}

.blog-intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.184rem;
    color: var(--text-sub);
    line-height: 1.8;
}

/* 3. 核心网格系统 (Grid Layout) */
.blog-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr));
    gap: 0.32rem 0.24rem; /* 纵向间距大于横向，增加纵向流动感 */
    margin-top: 0.3rem;
}

/* 4. 文章卡片 (Card) 深度重构 */
.blog-card-item {
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden; /* 核心：贴合圆角 */
    display: flex;
    flex-direction: column;
    transition: transform var(--trans-base), box-shadow var(--trans-base), border-color var(--trans-base);
    position: relative;
    opacity: 0;
    transform: translateY(0.2rem);
    animation: cardEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntry {
    to { opacity: 1; transform: translateY(0); }
}

.blog-card-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* 5. 顶部图片容器与动效 */
.blog-card-image-link {
    display: block;
    width: 100%;
    height: 2.8rem; /* 更高的视觉焦点，提升缩略图冲击力 */
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #eef7ff, #f5f5f7);
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card-item:hover .blog-card-image {
    transform: scale(1.05); /* 悬停时微距推进入场 */
}

/* 图像顶部渐变叠层，提升可读性 */
.blog-card-image-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.18) 100%);
    pointer-events: none;
    transition: opacity var(--trans-fast);
}

.blog-card-item:hover .blog-card-image-link::after { opacity: 0.02; }

/* 6. 卡片文字内容区 (Typography) */
.blog-card-content {
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 横向排列的元数据 (作者、日期) */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 0.2rem;
    font-size: 0.144rem;
    color: var(--text-sub);
    font-weight: 500;
}

.meta-author-wrap {
    color: var(--blog-blue);
    font-weight: 600;
}

.meta-divider {
    width: 0.03rem;
    height: 0.03rem;
    border-radius: 50%;
    background-color: var(--text-sub);
    opacity: 0.3;
}

/* 标题与摘要 */
.blog-card-title {
    font-size: .232rem;
    line-height: 1.4;
    color: var(--text-strong);
    margin: 0 0 15px 0;
    font-weight: 600;
    transition: color var(--trans-fast);
    text-decoration: none;
    display: block;
}

.blog-card-item:hover .blog-card-title {
    color: var(--text-link);
}

.blog-card-excerpt {
    font-size: 0.16rem;
    color: var(--text-sub);
    line-height: 1.7;
    margin: 0;
    text-align: justify;
    flex-grow: 1;
    margin-bottom: 0.25rem;
}

/* 7. 底部动作区与分页 */
.blog-card-footer {
    padding-top: 0.2rem;
    border-top: 1px solid rgba(15, 36, 62, 0.08);
}

.read-more-link {
    color: var(--blog-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.152rem;
    display: inline-flex;
    align-items: center;
    gap: 0.08rem;
    transition: gap 0.28s ease, transform var(--trans-fast);
    padding: 0.08rem 0.18rem;
    border-radius: 0.12rem;
    background: linear-gradient(90deg, rgba(11,79,138,0.03), rgba(11,79,138,0.01));
}

.blog-card-item:hover .read-more-link {
    gap: 0.12rem; /* 悬停时箭头向右微移 */
}
/* 分页器美化 */
.pagination {
    margin-top: 0.6rem;
    display: flex;
    justify-content: center;
    gap: 0.1rem;
}

.page-link, .pagination span {
    padding: 0.1rem 0.18rem;
    border-radius: 0.08rem;
    background: var(--card-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-sub);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.page-link:hover {
    background: var(--blog-blue-soft);
    color: var(--blog-blue);
    border-color: rgba(11, 79, 138, 0.1);
}

.pagination .active {
    background: var(--blog-blue);
    color: #ffffff;
    border-color: var(--blog-blue);
}

/* ==========================================================================
   博客详情页专属样式补充 (Detail Page Aesthetics)
   ========================================================================== */

.detail-header {
    padding: 0.8rem 0 0.5rem;
    text-align: center;
    background-color: var(--card-white);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 0.5rem;
}

.detail-title {
    font-size: .416rem;
    color: var(--text-deep);
    font-family: "Source Han Serif CN", serif;
    margin-bottom: 0.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
    color: var(--text-sub);
    font-size: 0.152rem;
}

.detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.detail-meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--blog-blue);
    opacity: 0.8;
}

.detail-meta-item strong {
    color: var(--text-deep);
    font-weight: 600;
}

.detail-featured-image-wrapper {
    width: 80%;
    max-width: 12rem;
    margin: 0 auto 0.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-standard);
}

.detail-featured-image {
    width: 100%;
    height: auto;
    display: block;
}

.detail-article-body {
    width: 100%;
    max-width: 8.6rem; /* 收窄阅读区以缩短视线水平移动距离 */
    margin: 0 auto;
    font-size: 0.176rem;
    line-height: 1.9;
    color: var(--text-deep);
    text-align: justify;
}

.detail-gallery-section {
    margin: 60px 0;
}

.gallery-title {
    font-size: 0.24rem;
    color: var(--text-deep);
    margin-bottom: 25px;
    font-family: "Source Han Serif CN", serif;
}

.detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(2.8rem, 1fr));
    gap: 0.25rem;
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-standard);
    background: var(--card-white);
    border: 1px solid rgba(15, 36, 62, 0.08);
}

.gallery-caption {
    padding: 15px;
    font-size: 0.144rem;
    color: var(--text-sub);
    text-align: center;
    background: rgba(11, 79, 138, 0.02);
    border-top: 1px solid rgba(0,0,0,0.03);
}

.detail-tags-wrapper {
    margin: 50px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-tag {
    padding: 8px 18px;
    background: #f0f6fc;
    color: var(--blog-blue);
    border-radius: 20px;
    font-size: 0.136rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.detail-tag:hover {
    background: var(--blog-blue);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 79, 138, 0.15);
}

.detail-back-nav {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-sub);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.detail-back-link:hover {
    color: var(--blog-blue);
}

.related-articles-section {
    width: 100%;
    margin-top: 80px;
    padding-top: 50px;
    border-top: 2px solid rgba(0,0,0,0.04);
}

.related-articles-title {
    font-size: .288rem;
    color: var(--text-deep);
    margin-bottom: 30px;
    font-family: "Source Han Serif CN", serif;
    text-align: center;
}

/* 8. 响应式兼容 */
@media (max-width: 1100px) {
    .container { width: 92%; }
}

@media (max-width: 768px) {
    .blog-grid-layout { grid-template-columns: 1fr; }
    .blog-header h1 { font-size: 2.2rem; }
}