/* ====================================================
   NEWS LIST PAGE - COMPLETE CSS
   (Mobile & Tablet Optimized)
   ==================================================== */

.page-hero {
    position: relative;
    padding: 80px 0 70px;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 280px;
    display: flex;
    align-items: center;
}
.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10,22,40,0.8) 0%, rgba(26,82,118,0.6) 50%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}
.page-hero .container {
    position: relative;
    z-index: 2;
}
.page-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.page-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 640px;
    margin: 0 auto;
}

.page-breadcrumb {
    padding: 12px 0;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}
.page-breadcrumb .container {
    font-size: 0.85rem;
    color: var(--gray-500);
}
.page-breadcrumb .container a {
    color: var(--primary);
}
.page-breadcrumb .container a:hover {
    text-decoration: underline;
}
.page-breadcrumb .container .sep {
    color: var(--gray-300);
    margin: 0 8px;
}

.news-list-page {
    background: var(--white);
    padding: 40px 0 60px;
}

/* ===== LAYOUT: Desktop ===== */
.news-list-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* ===== LIST HEADER ===== */
.news-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
}
.news-list-count {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ===== NEWS GRID ===== */
.news-list-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== NEWS ITEM (Desktop: horizontal) ===== */
.news-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 140px;
}
.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(26, 82, 118, 0.08);
    border-color: var(--primary-light);
}

/* ----- Image Area (Desktop) ----- */
.news-item .news-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 140px;
    overflow: hidden;
    background: var(--gray-100);
    flex-shrink: 0;
    padding: 12px;              /* 内边距让图片不贴边 */
}
.news-item .news-image img {
    width: 100%;
    height: 100%;
    max-height: 160px;
    object-fit: contain;        /* 完整显示，不裁剪 */
    transition: transform 0.4s ease;
}
.news-item:hover .news-image img {
    transform: scale(1.03);
}

/* ----- Content Area ----- */
.news-item .news-content {
    padding: 16px 20px 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.news-item .news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--gray-500);
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.news-item .news-meta .news-category {
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 10px;
    border-radius: 50px;
    font-weight: 500;
}
.news-item .news-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}
.news-item .news-title a {
    color: var(--gray-900);
    transition: color 0.3s ease;
}
.news-item .news-title a:hover {
    color: var(--primary);
}
.news-item .news-excerpt {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item .news-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.news-item .btn {
    padding: 4px 16px;
    font-size: 0.72rem;
    flex-shrink: 0;
}
.news-item .btn .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}
.news-item .btn:hover .arrow {
    transform: translateX(4px);
}
.news-item .related-product {
    font-size: 0.72rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.news-item .related-product:hover {
    color: var(--primary);
}
.news-item .related-product .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}
.news-item .related-product:hover .arrow {
    transform: translateX(4px);
}

/* ====================================================
   SIDEBAR
   ==================================================== */
.news-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.sidebar-box {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 20px 22px 24px;
    border: 1px solid var(--gray-200);
}
.sidebar-box h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}
.sidebar-search-box h4 {
    margin-bottom: 10px;
}
.sidebar-search {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 4px;
    padding: 2px 4px 2px 14px;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.sidebar-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.08);
}
.sidebar-search input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 4px;
    font-size: 0.85rem;
    outline: none;
    color: var(--gray-700);
}
.sidebar-search input::placeholder {
    color: var(--gray-400);
}
.sidebar-search button {
    background: var(--primary);
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}
.sidebar-search button:hover {
    background: var(--primary-dark);
}

/* ----- Categories ----- */
.sidebar-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-categories ul li {
    margin-bottom: 2px;
}
.sidebar-categories ul li a {
    display: block;
    padding: 7px 12px;
    color: var(--gray-600);
    font-size: 0.88rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.sidebar-categories ul li a:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.sidebar-categories ul li ul {
    padding-left: 16px;
}
.sidebar-categories ul li ul li a {
    font-size: 0.82rem;
    padding: 5px 12px;
}

/* ----- Recent News ----- */
.sidebar-recent ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-recent ul li {
    margin-bottom: 10px;
}
.sidebar-recent ul li:last-child {
    margin-bottom: 0;
}
.sidebar-news-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}
.sidebar-news-item:hover {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.sidebar-news-item .sidebar-news-title {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.3;
    font-weight: 500;
}
.sidebar-news-item:hover .sidebar-news-title {
    color: var(--primary);
}
.sidebar-news-item .sidebar-news-date {
    font-size: 0.7rem;
    color: var(--gray-400);
}

/* ----- Featured Products (sidebar) ----- */
.sidebar-products ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-products ul li {
    margin-bottom: 10px;
}
.sidebar-products ul li:last-child {
    margin-bottom: 0;
}
.sidebar-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}
.sidebar-product-item:hover {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.sidebar-product-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.sidebar-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;        /* 侧边栏小图也完整显示 */
}
.sidebar-product-name {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.3;
    flex: 1;
    font-weight: 500;
}
.sidebar-product-item:hover .sidebar-product-name {
    color: var(--primary);
}

/* ----- Quote Box ----- */
.sidebar-quote p {
    font-size: 0.88rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 16px;
}
.sidebar-quote .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
}

/* ====================================================
   PAGINATION
   ==================================================== */
.pagebar {
    display: flex;
    justify-content: center;
    padding: 24px 0 10px;
    margin-top: 10px;
    border-top: 1px solid var(--gray-200);
}
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination .page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    text-decoration: none;
}
.pagination .page-item:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.15);
}
.pagination .page-item.active,
.pagination .page-item.current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    cursor: default;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.15);
}
.pagination .page-item.page-current {
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-weight: 400;
    cursor: default;
    box-shadow: none;
}
.pagination .page-item.page-current:hover {
    background: transparent;
    color: var(--gray-500);
    transform: none;
    box-shadow: none;
}

.list-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--gray-500);
    font-size: 1.1rem;
}

/* ====================================================
   CTA SECTION
   ==================================================== */
.page-cta {
    background: var(--gradient-accent);
    padding: 50px 0;
    text-align: center;
    color: var(--white);
}
.page-cta h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 12px;
}
.page-cta p {
    font-size: 1.05rem;
    opacity: 0.85;
    max-width: 520px;
    margin: 0 auto 24px;
}

/* ====================================================
   TABLET: 992px and below
   ==================================================== */
@media (max-width: 992px) {
    .page-hero {
        padding: 60px 0 50px;
        min-height: 240px;
    }
    .page-hero h1 {
        font-size: 2.3rem;
    }

    /* 列表布局改为单列 */
    .news-list-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* 卡片改为纵向布局 */
    .news-item {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 0;
        border-radius: 6px;
    }

    /* ----- 图片区域：高度自适应，完整显示 ----- */
    .news-item .news-image {
        height: auto;           /* 由内容撑开 */
        min-height: 180px;      /* 保证基础高度 */
        max-height: 300px;      /* 限制过高 */
        padding: 20px;          /* 内边距让图片不贴边 */
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .news-item .news-image img {
        width: 100%;
        height: 100%;
        max-height: 260px;      /* 图片最大高度限制 */
        object-fit: contain;    /* 关键：完整显示不变形 */
        padding: 0;
    }

    /* 信息区域 */
    .news-item .news-content {
        padding: 16px 18px 18px;
    }

    /* 侧边栏改为双列 */
    .news-list-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* ====================================================
   MOBILE: 768px and below
   ==================================================== */
@media (max-width: 768px) {
    .page-hero {
        padding: 50px 0 40px;
        min-height: 200px;
    }
    .page-hero h1 {
        font-size: 1.8rem;
    }
    .page-hero p {
        font-size: 1rem;
    }

    /* ----- 图片：更小屏幕适配 ----- */
    .news-item .news-image {
        min-height: 150px;
        max-height: 240px;
        padding: 16px;
    }
    .news-item .news-image img {
        max-height: 200px;
        object-fit: contain;
    }

    .news-item .news-content {
        padding: 14px 16px 16px;
    }
    .news-item .news-title {
        font-size: 0.92rem;
    }
    .news-item .news-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        margin-bottom: 10px;
    }
    .news-item .news-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* 侧边栏改回单列 */
    .news-list-sidebar {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .page-cta {
        padding: 36px 0;
    }
    .page-cta h2 {
        font-size: 1.5rem;
    }

    .pagination .page-item {
        min-width: 32px;
        height: 32px;
        font-size: 0.78rem;
        padding: 0 8px;
    }
}

/* ====================================================
   SMALL MOBILE: 480px and below
   ==================================================== */
@media (max-width: 480px) {
    .page-hero {
        padding: 40px 0 30px;
        min-height: 170px;
    }
    .page-hero h1 {
        font-size: 1.5rem;
    }

    /* ----- 图片：小屏进一步优化 ----- */
    .news-item .news-image {
        min-height: 120px;
        max-height: 190px;
        padding: 12px;
    }
    .news-item .news-image img {
        max-height: 160px;
        object-fit: contain;
    }

    .news-item .news-content {
        padding: 12px 14px 14px;
    }
    .news-item .news-title {
        font-size: 0.85rem;
    }
    .news-item .news-excerpt {
        font-size: 0.75rem;
    }
    .news-item .news-meta .news-category {
        font-size: 0.6rem;
        padding: 1px 8px;
    }

    .sidebar-box {
        padding: 14px 14px 16px;
    }

    .pagination {
        gap: 4px;
    }
    .pagination .page-item {
        min-width: 28px;
        height: 28px;
        font-size: 0.7rem;
        padding: 0 6px;
    }
}