/* 博客页面样式 */

.blog-main {
    padding: 100px 0 60px;
    min-height: calc(100vh - 300px);
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.page-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 分类筛选 */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid #3498db;
    background-color: transparent;
    color: #3498db;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #3498db;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.filter-btn.active {
    background-color: #3498db;
    color: #fff;
}

/* 博客网格 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* 博客卡片 */
.blog-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* 博客图片 */
.blog-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.blog-icon {
    color: #fff;
    opacity: 0.9;
}

.blog-icon svg {
    width: 64px;
    height: 64px;
}

/* 博客内容 */
.blog-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 博客元数据 */
.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-category {
    background-color: #3498db;
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.blog-date {
    color: #999;
    font-size: 14px;
}

/* 博客标题 */
.blog-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover h2 {
    color: #3498db;
}

/* 博客描述 */
.blog-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* 博客链接 */
.blog-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.blog-link:hover {
    color: #2980b9;
    transform: translateX(5px);
}

/* 加载更多 */
.blog-load-more {
    text-align: center;
    margin-top: 30px;
}

.blog-load-more .btn {
    padding: 15px 40px;
    font-size: 16px;
}

/* 分类颜色 */
.blog-card[data-category="tech"] .blog-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card[data-category="tutorial"] .blog-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.blog-card[data-category="case"] .blog-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.blog-card[data-category="news"] .blog-image {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding: 100px 0 40px;
    }
    
    .page-header h1 {
        font-size: 36px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .blog-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-content {
        padding: 25px;
    }
    
    .blog-card h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .blog-main {
        padding: 100px 0 30px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-header p {
        font-size: 14px;
    }
    
    .blog-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
    
    .blog-image {
        height: 160px;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-card h2 {
        font-size: 16px;
    }

    .blog-card p {
        font-size: 14px;
    }

    .blog-link {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
        display: block;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease forwards;
}

.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.blog-card:nth-child(4) {
    animation-delay: 0.4s;
}

.blog-card:nth-child(5) {
    animation-delay: 0.5s;
}

.blog-card:nth-child(6) {
    animation-delay: 0.6s;
}

.blog-card:nth-child(7) {
    animation-delay: 0.7s;
}

.blog-card:nth-child(8) {
    animation-delay: 0.8s;
}

.blog-card:nth-child(9) {
    animation-delay: 0.9s;
}

/* 搜索框 */
.blog-search {
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.blog-search input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.blog-search button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.blog-search button svg {
    width: 20px;
    height: 20px;
    color: #999;
    transition: color 0.3s ease;
}

.blog-search button:hover svg {
    color: #3498db;
}

/* 标签 */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.blog-tag {
    background-color: #f8f9fa;
    color: #666;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.blog-tag:hover {
    background-color: #3498db;
    color: #fff;
}

/* 阅读时间 */
.blog-read-time {
    color: #999;
    font-size: 13px;
    margin-top: 10px;
}

/* 作者信息 */
.blog-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.blog-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.blog-author-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.blog-author-title {
    font-size: 12px;
    color: #999;
}


/* 相关文章 */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.related-posts h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-card:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-card h4 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.related-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.related-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.related-link:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* 滚动条样式 */
.blog-grid::-webkit-scrollbar {
    width: 8px;
}

.blog-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.blog-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.blog-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}