/* ========== blog.html 专属样式 ========== */

/* 英雄区 */
.blog-hero-bg {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center 30%;
    display: flex;
    align-items: center;
}
.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,95,140,0.7) 100%);
}
.blog-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.blog-hero-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 800;
}
.blog-hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
.hero-search {
    max-width: 500px;
    margin: 0 auto;
}
.search-form {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.search-form input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    outline: none;
}
.search-form button {
    background: #2c7da0;
    border: none;
    padding: 0 24px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}
.search-form button:hover {
    background: #1f5e7a;
}
@media (max-width: 768px) {
    .blog-hero-bg { height: 280px; }
    .blog-hero-content h2 { font-size: 1.6rem; }
}

/* 博客布局 */
.blog-layout {
    display: flex;
    gap: 50px;
}
.blog-content {
    flex: 2.5;
}
.blog-sidebar {
    flex: 1.2;
}
@media (max-width: 992px) {
    .blog-layout {
        flex-direction: column;
    }
}

/* 文章网格 */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.post-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    cursor: pointer;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(44,125,160,0.15);
}
.post-img {
    height: 200px;
    overflow: hidden;
}
.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.post-card:hover .post-img img {
    transform: scale(1.03);
}
.post-content {
    padding: 1.2rem;
}
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: #8ba9c2;
}
.post-category {
    background: #eef4fc;
    color: #2c7da0;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}
.post-date i {
    margin-right: 4px;
}
.post-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #1f5e7a;
    line-height: 1.4;
}
.post-excerpt {
    font-size: 0.85rem;
    color: #5f7f9e;
    line-height: 1.5;
    margin-bottom: 15px;
}
.read-more {
    color: #2c7da0;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}
.read-more:hover {
    gap: 10px;
    color: #1f5e7a;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-btn {
    background: #eef4fc;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #2c7da0;
}
.page-btn:hover:not(:disabled) {
    background: #2c7da0;
    color: white;
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page-numbers {
    display: flex;
    gap: 8px;
}
.page-num {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    background: #f0f3f8;
    color: #2c7da0;
    font-weight: 600;
}
.page-num:hover {
    background: #2c7da0;
    color: white;
}
.page-num.active {
    background: #2c7da0;
    color: white;
}

/* 侧边栏组件 */
.sidebar-widget {
    background: #f9fbfe;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 30px;
}
.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 18px;
    color: #003753;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid #2c7da0;
    padding-left: 12px;
}
.category-list,
.popular-list {
    list-style: none;
    padding: 0;
}
.category-list li,
.popular-list li {
    margin-bottom: 12px;
}
.category-list a,
.popular-list a {
    color: #4a627a;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: color 0.2s;
}
.category-list a:hover,
.popular-list a:hover {
    color: #2c7da0;
}
.category-count {
    background: #eef2f8;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #2c7da0;
}
.popular-list li {
    display: flex;
    gap: 12px;
    align-items: center;
}
.popular-list img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}
.popular-list .popular-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f5e7a;
    margin-bottom: 4px;
}
.popular-list .popular-date {
    font-size: 0.7rem;
    color: #8ba9c2;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag-cloud a {
    background: #eef2f8;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #2c7da0;
    text-decoration: none;
    transition: all 0.2s;
}
.tag-cloud a:hover {
    background: #2c7da0;
    color: white;
}

/* 订阅表单 */
.newsletter-widget p {
    font-size: 0.85rem;
    color: #5f7f9e;
    margin-bottom: 15px;
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.newsletter-form input {
    padding: 12px 16px;
    border: 1px solid #dce5ec;
    border-radius: 40px;
    font-size: 0.9rem;
}
.newsletter-form button {
    background: #2c7da0;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.newsletter-form button:hover {
    background: #1f5e7a;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .sidebar-widget {
        padding: 20px;
    }
}