﻿  

/* 博客头部 */
.blog-header {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.9)), url('img/banner.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

.blog-title {
    font-size: 3.2em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.blog-description {
    font-size: 1.3em;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* 文章卡片 */
.post-card {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

    .post-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    }

.post-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.post-card:hover .post-image {
    transform: scale(1.03);
}

.post-content {
    padding: 25px;
}

.post-category {
    display: inline-block;
    background-color: #3498db;
    color: white;
    font-size: 0.85em;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    line-height: 1.4;
}

    .post-title a {
        color: #2c3e50;
        transition: color 0.3s ease;
    }

        .post-title a:hover {
            color: #3498db;
            text-decoration: none;
        }

.post-excerpt {
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.8;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f1f1f1;
    color: #95a5a6;
    font-size: 0.9em;
}

.post-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid #f1f1f1;
}

.post-date i,
.post-comments i {
    margin-right: 5px;
}

.post-comments {
    transition: color 0.3s ease;
}

    .post-comments:hover {
        color: #3498db;
        cursor: pointer;
    }

/* 分页 */
.pagination-container {
    text-align: center;
    margin: 40px 0 60px;
}

.pagination {
    margin: 0;
}

    .pagination > li > a,
    .pagination > li > span {
        color: #2c3e50;
        border: 1px solid #ddd;
        padding: 10px 16px;
        margin: 0 4px;
        border-radius: 4px;
        transition: all 0.3s ease;
    }

        .pagination > li > a:hover,
        .pagination > li > span:hover,
        .pagination > li.active > a,
        .pagination > li.active > span {
            background-color: #3498db;
            color: white;
            border-color: #3498db;
        }

/* 侧边栏 */
.sidebar {
    margin-bottom: 30px;
}

.sidebar-widget {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    position: relative;
}

/* 作者信息 */
.author-profile {
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 5px solid #f1f1f1;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.profile-name {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.profile-bio {
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

    .social-links a {
        display: inline-block;
        width: 38px;
        height: 38px;
        background-color: #f1f1f1;
        color: #7f8c8d;
        border-radius: 50%;
        text-align: center;
        line-height: 38px;
        margin: 0 5px;
        transition: all 0.3s ease;
    }

        .social-links a:hover {
            background-color: #3498db;
            color: white;
            transform: translateY(-3px);
        }

/* 搜索框 */
.search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    padding-right: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: all 0.3s ease;
}

    .search-input:focus {
        border-color: #3498db;
        outline: none;
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    }

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background-color: transparent;
    border: none;
    color: #7f8c8d;
    padding: 0 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .search-btn:hover {
        color: #3498db;
    }

/* 分类 */
.category-list {
    list-style: none;
    padding: 0;
}

    .category-list li {
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f1f1f1;
    }

        .category-list li:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

    .category-list a {
        display: flex;
        justify-content: space-between;
        color: #7f8c8d;
        transition: all 0.3s ease;
    }

        .category-list a:hover {
            color: #3498db;
            text-decoration: none;
            padding-left: 5px;
        }

.category-count {
    background-color: #f1f1f1;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}
 

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 1.5em;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        background-color: #2980b9;
        transform: translateY(-3px);
    }

/* 响应式调整 */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2.2em;
    }

    .blog-description {
        font-size: 1.1em;
        padding: 0 15px;
    }

    .blog-header {
        padding: 60px 0;
    }

    .post-title {
        font-size: 1.5em;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

        .post-meta > div {
            margin-bottom: 8px;
        }

    .sidebar {
        margin-top: 30px;
    }

    .footer-col {
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact p {
        justify-content: center;
    }
}
