/* =========================================
   博客页面专属样式 (Blog Page Styles)
   字体标准: PingFang SC / Microsoft YaHei
   主色调: var(--brand-blue) #2793ff
   ========================================= */

/* ----------------------------------------
   1. 全局容器与基础布局
   ---------------------------------------- */
.page-blog {
    padding: 60px 0;
    background-color: #f9f9f9;
    min-height: 80vh;
}

.blog-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ----------------------------------------
   2. 左侧侧边栏 (Sidebar)
   ---------------------------------------- */
.blog-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-widget {
    margin-bottom: 40px;
}

/* 蓝色标题块 */
.widget-title {
    background-color: var(--brand-blue, #2793ff);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 20px;
    margin: 0 0 20px 0;
    text-transform: uppercase;
}

/* 🔍 搜索框样式 (图标在右) */
.search-widget .search-form {
    position: relative;
    display: flex;
    border: 1px solid #eeeeee;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
}

.search-widget .search-field {
    width: 100%;
    height: 46px;
    padding: 12px 50px 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333333;
    background: transparent;
}

.search-widget .search-submit {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 46px;
    background: var(--brand-blue, #2793ff);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 2;
}

.search-widget .search-submit:hover {
    background: #1a7acc; /* 蓝色Hover加深 */
}

/* 📂 分类列表样式 */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #ffffff;
    border: 1px solid #eeeeee;
}

.category-list li {
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: block;
    padding: 12px 20px;
    color: #333333;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 当前分类高亮 + Hover效果 */
.category-list li.current-cat > a,
.category-list li.active > a,
.category-list a:hover {
    background-color: #f5f5f5;
    color: var(--brand-blue, #2793ff);
    font-weight: 600;
    padding-left: 25px;
}

/* 左侧蓝色指示条 */
.category-list li.current-cat > a::before,
.category-list li.active > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--brand-blue, #2793ff);
}

/* 🛠️ 特色产品小部件 */
.product-recommend .prod-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.product-recommend img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 1px solid #eeeeee;
}

.product-recommend h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
}

/* ----------------------------------------
   3. 右侧主内容区 (Main Content)
   ---------------------------------------- */
.blog-main {
    flex: 1;
    min-width: 0;
}

.page-main-title {
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 800;
    color: var(--brand-blue, #2793ff);
}

/* ✅ 核心：等高卡片布局 */
.news-card {
    display: flex;
    gap: 30px;
    padding: 30px;
    margin-bottom: 30px;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    align-items: stretch;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(39, 147, 255, 0.08); /* 蓝色阴影 */
}

/* 左侧图片固定尺寸 */
.news-thumb {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumb img {
    transform: scale(1.08);
}

/* 右侧内容区垂直分布 */
.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 标题限制2行 */
.news-title {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--brand-blue, #2793ff);
}

/* 元数据 */
.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #888888;
}

.news-meta i {
    margin-right: 5px;
    color: var(--brand-blue, #2793ff);
}

/* ✅ 核心：摘要固定3行 + 自动撑开剩余空间 */
.news-excerpt {
    margin-bottom: 20px;
    font-size: 15px;
    color: #666666;
    line-height: 1.8;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部按钮始终沉底对齐 */
.news-footer {
    margin-top: auto;
    text-align: right;
}

.read-more-btn {
    display: inline-block;
    padding: 6px 20px;
    font-size: 14px;
    font-weight: bold;
    color: var(--brand-blue, #2793ff);
    text-decoration: none;
    border: 1px solid var(--brand-blue, #2793ff);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: var(--brand-blue, #2793ff);
    color: #ffffff;
    transform: translateX(5px);
}

/* ----------------------------------------
   4. 高颜值翻页器 (Pagination)
   ---------------------------------------- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 悬停效果 */
.pagination-wrapper a:hover {
    transform: translateY(-2px);
    border-color: var(--brand-blue, #2793ff);
    color: var(--brand-blue, #2793ff);
    background: #f0f7ff;
    box-shadow: 0 4px 6px rgba(39, 147, 255, 0.1);
}

/* 当前页高亮 */
.pagination-wrapper .current,
.pagination-wrapper .page-numbers.current {
    background: var(--brand-blue, #2793ff);
    border-color: var(--brand-blue, #2793ff);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(39, 147, 255, 0.3);
}


.blog-sidebar .category-list li a{
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* ----------------------------------------
   5. 响应式适配 (Responsive)
   ---------------------------------------- */

/* 平板端 (< 1024px) */
@media (max-width: 1024px) {
    .blog-sidebar {
        width: 240px;
    }
    
    .news-thumb {
        width: 220px;
        height: 150px;
    }
    
    .news-title {
        font-size: 18px;
    }
}

/* 手机端 (< 768px) */
@media (max-width: 768px) {
    .page-blog {
        padding: 30px 0;
    }

    .blog-container {
        flex-direction: column;
        gap: 30px;
    }

    /* 侧边栏整体提到文章前面 */
    .blog-sidebar {
        width: 100%;
        order: -1;
    }

    /* 手机端内部顺序：搜索 -> 分类 -> 产品 */
    .search-widget {
        order: 1;
        margin-bottom: 25px;
    }
    
    .sidebar-widget:nth-child(2) {
        order: 2;
        margin-bottom: 25px;
    }
    
    .sidebar-widget:nth-child(3) {
        order: 3;
    }

    /* 手机端分类横向滑动胶囊条 */
    .category-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        background: transparent;
        border: none;
        -webkit-overflow-scrolling: touch;
    }

    .category-list li {
        flex: 0 0 auto;
        margin-right: 10px;
        background: #ffffff;
        border: 1px solid #eeeeee;
        border-radius: 4px;
    }

    .category-list a {
        padding: 8px 15px;
        white-space: nowrap;
    }

    /* 手机端卡片单列化 */
    .news-card {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .news-thumb {
        width: 100%;
        height: 200px;
    }

    .news-title {
        font-size: 18px;
        -webkit-line-clamp: 2;
    }

    .news-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 3;
    }

    .news-footer {
        margin-top: 15px;
        text-align: left;
    }

    .page-main-title {
        margin-bottom: 20px;
        font-size: 26px;
    }

    /* 手机端翻页器缩小 */
    .pagination-wrapper a,
    .pagination-wrapper span {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}