/* blog-style.css */

/* 确保博客内容区域与主站风格一致 */
.blog-main {
/*     padding: 20px; */
    max-width: 1200px;
    margin: 0 auto;
}

.blog-main .hero {
    text-align: center;
    padding: 50px 20px;
    background-color: #f8f8f8; /* 浅灰色背景，保持科技感和简洁 */
    margin-bottom: 40px;
    border-radius: 8px;
}

.blog-main .hero h1 {
    font-size: 2.5em;
    color: #007bff; /* 使用品牌色 */
    margin-bottom: 10px;
}

.blog-main .hero p {
    font-size: 1.1em;
    color: #555;
}

.blog-list-container h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 2em;
    color: #333;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    background-color: #ccc; /* 占位符颜色 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #fff;
    object-fit: cover;
}

.blog-card-content {
    padding: 20px;
}

.blog-card-content h3 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
}

.blog-card-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-content h3 a:hover {
    color: #007bff;
}

.blog-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.blog-meta span {
    margin-right: 15px;
}

.blog-summary {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* 文章详情页样式 */
.post-detail {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.post-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1em;
    color: #444;
}

/* 确保 Markdown 渲染的元素样式良好 */
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
    color: #007bff; /* 标题使用品牌色 */
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
}

.post-content p {
    margin-bottom: 1em;
}

.post-content ul, .post-content ol {
    margin-bottom: 1em;
    padding-left: 20px;
}

.post-content pre, .post-content code {
    background-color: #f4f4f4;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

.post-content pre {
    padding: 15px;
    overflow-x: auto;
    border: 1px solid #ddd;
}

.post-content blockquote {
    border-left: 4px solid #007bff;
    padding: 10px 20px;
    margin: 20px 0;
    background-color: #f9f9f9;
    color: #666;
    font-style: italic;
}

.hero-small {
    text-align: center;
    padding: 50px 20px;
    background-color: #f8f8f8; /* 浅灰色背景，保持科技感和简洁 */
    margin-bottom: 40px;
    border-radius: 8px;
}

.hero-small h1 {
    font-size: 2.5em;
    color: #007bff; /* 使用品牌色 */
    margin-bottom: 10px;
}

.hero-small p {
    font-size: 1.1em;
    color: #555;
}

/* 修正导航栏在非首页的激活状态 */
.navbar .nav-link.active {
    color: #007bff !important; /* 确保激活链接颜色 */
    border-bottom: 2px solid #007bff;
}

/* 确保主内容区域的 padding 适应导航栏 */
.blog-main {
    padding-top: 80px; /* 留出导航栏空间 */
    min-height: 80vh; /* 确保内容区域有足够高度 */
}

/* 博客页面的深色科技感 BANNER 样式 */
.blog-header-dark {
    background: linear-gradient(135deg, #1a2a3a, #0f172a); /* 深蓝到近黑色的渐变 */
    padding: 100px 0 50px;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
    margin-top: -80px; /* 覆盖 .blog-main 的 padding-top */
    margin-bottom: 40px;
}

.blog-header-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle 1px, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.3) 60%, transparent 100%);
    background-size: 8px 10px, 10px 12px, 12px 14px;
    z-index: 1;
}

.blog-header-dark .container {
    position: relative;
    z-index: 3;
}

/* 覆盖 tech-effects.css 中的默认亮色背景 */
.tech-experiment-header.blog-header-dark {
    background: linear-gradient(135deg, #1a2a3a, #0f172a);
}

