/* ==========================================================================
   BLOG LIST PAGE
   断点体系：桌面 > 996 > 768 > 480
   ========================================================================== */

.blogs-page {
    padding: 80px 0 30px 0;
}

/* ==========================================================================
   Blog Hero Banner
   ========================================================================== */
.blog-hero {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* 从左到右：纯白 -> 白色半透明 -> 完全透明 */
    background:
            linear-gradient(
                    to right,
                    var(--secondary-color) 0%,
                    rgba(176, 13, 21, 0.9) 40%,
                    rgba(176, 13, 21, 0) 65%
            ),
            url(/dist/img/banner/blog-banner.webp) no-repeat center center;
    background-size: cover;
    height: min(30vh, 720px);
    min-height: 280px;
}

.blog-hero .hero-copy {
    max-width: 50%;
}

.hero-desc {
    margin: 20px 0;
    line-height: 1.6;
}

.hero .btn i {
    font-size: 16px;
}

/* 博客列表页 banner：深色端子图 + 左侧暗化渐变（原来只有红色渐变、右侧空白） */
.blogs-page .blog-hero {
    background:
            linear-gradient(
                    to right,
                    rgba(8, 6, 9, 0.94) 0%,
                    rgba(8, 6, 9, 0.82) 34%,
                    rgba(8, 6, 9, 0.42) 60%,
                    rgba(8, 6, 9, 0.04) 88%
            ),
            url("/dist/img/banner/blog-banner.webp") no-repeat right center;
    background-size: cover;
}

/* ==========================================================================
   Tabs / News Container
   ========================================================================== */
.tabs-content-new {
    background: #f2f1f6;
}

.news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

.news-container h1 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--title-color);
    font-size: 26px;
    line-height: 1.4;
}

.news-list {
    margin-bottom: 0;
}

/* ==========================================================================
   Blog Card
   ========================================================================== */
.blog-card {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-card__link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.blog-card__image {
    flex: 0 0 240px;
    height: 180px;
    overflow: hidden;
    background: #eef2f7;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

.blog-card__content {
    flex: 1;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
}

.blog-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--title-color);
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover .blog-card__title {
    color: var(--secondary-color);
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.blog-card__date {
    font-size: 13px;
    color: #64748B;
}

.blog-card__desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: auto;
}

.blog-card:hover .blog-card__read-more {
    text-decoration: underline;
}

/* 无封面文章：卡片不留图片位，内容区占满 */
.blog-card__link:not(:has(.blog-card__image)) .blog-card__content {
    padding: 28px 32px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.blog-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 5px;
    padding: 20px;
}

.sidebar-widget__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--title-color);
    margin: 0 0 20px 0;
}

/* Search Widget */
.sidebar-search {
    padding: 20px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(50, 150, 148, 0.1);
}

.search-input::placeholder {
    color: #94A3B8;
}

.search-btn {
    width: 44px;
    height: 44px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--secondary-hover-color);
}

/* Popular Articles Widget */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list__item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.popular-list__item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-list__link {
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    line-height: 1.5;
    display: block;
    transition: color 0.3s ease;
}

.popular-list__link:hover {
    color: var(--secondary-color);
}

/* CTA Widget */
.sidebar-cta {
    background: rgba(0, 0, 0, 0.7) url("/dist/img/banner/bg.webp") center no-repeat;
    background-blend-mode: multiply;
    text-align: center;
}

.sidebar-cta__title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
    text-align: left;
}

.sidebar-cta__desc {
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
    margin: 0 0 20px 0;
    text-align: left;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   Old News Item Styles (keep for backward compatibility)
   ========================================================================== */
.news-item {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left-color: var(--secondary-color);
}

.news-item:hover .news-item-title {
    text-decoration: underline;
}

.news-item-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.news-item-desc {
    font-size: 15px;
    color: #666;
    margin-bottom: 18px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888;
    flex-wrap: wrap;
    gap: 10px;
}

.news-date {
    display: flex;
    align-items: center;
}

.news-views {
    display: flex;
    align-items: center;
}

.news-date::before {
    content: "📅";
    margin-right: 5px;
}

.news-views::before {
    content: "👁️";
    margin-right: 5px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination-contain {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: all 0.2s;
}

.page-btn.active {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-dots {
    padding: 0 5px;
    color: #666;
}

/* ==========================================================================
   RESPONSIVE
   断点统一：996 / 768 / 480（从大到小）
   原 1024 断点规则按语义就近归并到 996，值不变
   ========================================================================== */

/* --------------------------------------------------------------------------
   ≤ 996px — Tablet / Small Laptop（原 1024 断点）
   -------------------------------------------------------------------------- */
@media (max-width: 996px) {
    .news-container {
        grid-template-columns: 1fr 300px;
        gap: 32px;
    }

    .blog-hero .hero-copy {
        max-width: 100%;
    }

    .blog-card__image {
        flex: 0 0 200px;
        height: 160px;
    }

    .blog-card__content {
        padding: 20px 24px;
    }

    .blog-card__title {
        font-size: 18px;
    }
}

/* --------------------------------------------------------------------------
   ≤ 768px — Large Phone / Portrait Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .blogs-page {
        padding: 80px 0 20px 0;
    }

    /* Banner：改为居中背景 + 更强的暗化渐变 */
    .blogs-page .blog-hero {
        background:
                linear-gradient(
                        to right,
                        rgba(8, 6, 9, 0.94) 0%,
                        rgba(8, 6, 9, 0.86) 55%,
                        rgba(8, 6, 9, 0.6) 100%
                ),
                url("/dist/img/banner/blog-banner.webp") no-repeat center center;
        background-size: cover;
    }

    .news-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 32px 20px;
    }

    .news-container h1 {
        font-size: 22px;
    }

    .blog-sidebar {
        position: static;
        /*order: -1;*/
    }

    .blog-card {
        margin-bottom: 20px;
    }

    .blog-card__link {
        flex-direction: column;
    }

    .blog-card__image {
        flex: 1;
        width: 100%;
        height: 200px;
    }

    .blog-card__content {
        padding: 20px;
    }

    .blog-card__title {
        font-size: 18px;
    }

    .blog-card__desc {
        font-size: 14px;
    }

    .sidebar-widget {
        padding: 20px;
    }

    .news-item {
        padding: 20px;
    }

    .news-item-title {
        font-size: 18px;
    }

    .news-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* --------------------------------------------------------------------------
   ≤ 480px — Small Phone
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .news-container {
        padding: 24px 15px;
        gap: 32px;
    }

    .news-container h1 {
        font-size: 20px;
    }

    .blog-card {
        border-radius: 10px;
        margin-bottom: 16px;
    }

    .blog-card__image {
        height: 180px;
    }

    .blog-card__content {
        padding: 18px 16px;
    }

    .blog-card__title {
        font-size: 17px;
    }

    .blog-card__desc {
        font-size: 14px;
        -webkit-line-clamp: 3;
    }

    .sidebar-widget {
        padding: 18px 16px;
        border-radius: 10px;
    }

    .sidebar-widget__title {
        font-size: 16px;
    }

    .sidebar-cta__title {
        font-size: 18px;
    }

    .search-input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .search-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .news-item {
        padding: 18px 15px;
    }

    .news-item-title {
        font-size: 17px;
    }

    .news-item-desc {
        font-size: 14px;
    }

    .page-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}