﻿/* =============================================
   news.css - 资讯列表页专用样式
   包含：两栏布局、广告位、软件展示区、分页
============================================= */

/* ---- 主体两栏布局 ---- */
.news-main-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding-top: 28px;
    padding-bottom: 20px;
}

/* ---- 左侧文章列表 ---- */
.news-left {
    flex: 1;
    min-width: 0;
}

/* ---- 右侧侧边栏 ---- */
.news-sidebar {
    flex: 0 0 280px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 70px;
}

/* ---- 广告位容器 ---- */
.news-ad-box {
    background: #fff;
    border-radius: 12px;
    border: 1.5px solid #ead8c8;
    box-shadow: 0 2px 10px rgba(60,20,0,0.07);
    overflow: hidden;
}

.news-ad-label {
    background: #fff3ec;
    color: #ff6200;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-bottom: 1px solid #ffe0c8;
    text-transform: uppercase;
}

.news-ad-inner {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-ad-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: opacity 0.18s;
}
.news-ad-inner:hover .news-ad-img { opacity: 0.88; }

/* 广告占位（未配置图片时显示） */
.news-ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    gap: 8px;
    background: linear-gradient(135deg, #fff8f3 0%, #fff0e6 100%);
    border: 2px dashed #ffc49a;
    margin: 0;
    transition: background 0.18s;
    cursor: pointer;
}
.news-ad-inner:hover .news-ad-placeholder {
    background: linear-gradient(135deg, #fff0e6 0%, #ffe0c8 100%);
}
.news-ad-ph-icon { font-size: 2rem; line-height: 1; }
.news-ad-ph-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ff6200;
}
.news-ad-ph-sub {
    font-size: 0.72rem;
    color: #9ca3af;
}

/* ---- 软件推荐上方横幅广告 ---- */
.news-sw-banner-ad {
    width: 100%;
}
.news-sw-banner-ad-link {
    display: block;
    width: 100%;
}
.news-sw-banner-ad-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 960 / 90;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ead8c8;
    display: block;
    transition: opacity 0.18s;
}
.news-sw-banner-ad-link:hover .news-sw-banner-ad-img { opacity: 0.88; }

/* ---- 软件展示区 ---- */
.news-sw-section {
    background: #faf8f5;
    border-top: 2px solid #f0e8e0;
    padding: 28px 0 40px;
}

.news-sw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.news-sw-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
}

.news-sw-more {
    font-size: 0.85rem;
    color: #ff6200;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.15s;
}
.news-sw-more:hover { opacity: 0.75; }

/* 2排×3列网格 - 复用全局 sw-card 样式 */
.news-sw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* 资讯页软件推荐直接复用全局 sw-card 样式 */

/* More 按钮 */
.news-sw-more-wrap {
    text-align: center;
    padding: 20px 0 4px;
}
.news-sw-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 32px;
    background: #fff;
    border: 1.5px solid var(--orange);
    border-radius: 24px;
    color: var(--orange);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
    box-shadow: 0 2px 10px rgba(255,98,0,0.12);
}
.news-sw-more-btn:hover {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,98,0,0.30);
    transform: translateY(-2px);
    opacity: 1;
}

/* ---- 分页 ---- */
.news-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 20px 0 8px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    color: #374151;
    background: #fff;
    border: 1.5px solid #e8e6e3;
    transition: all 0.15s;
    cursor: pointer;
}
.page-btn:hover { border-color: var(--orange); color: var(--orange); opacity: 1; }
.page-btn.page-active {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(255,98,0,0.30);
}
.page-btn.page-disabled {
    color: #c0c4cc;
    background: #f5f5f5;
    border-color: #e8e6e3;
    cursor: default;
    pointer-events: none;
}
.page-prev, .page-next { padding: 0 14px; }
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 36px;
    color: #9ca3af;
    font-size: 0.9rem;
}
.page-info {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-left: 6px;
    white-space: nowrap;
}

/* ---- 响应式 ---- */
@media (max-width: 860px) {
    .news-main-layout {
        flex-direction: column;
    }
    .news-sidebar {
        flex: none;
        width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    /* 平板：3个广告横排 */
    .news-ad-box { flex: 1; min-width: calc(33% - 8px); }
    .news-sw-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .news-sidebar { flex-direction: column; }
    .news-ad-box { min-width: 100%; }
    .news-sw-grid { grid-template-columns: 1fr; gap: 10px; }
    .news-sw-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .news-ad-img { height: 130px; }
    .news-ad-placeholder { height: 130px; }
    .news-pagination { gap: 4px; }
    .page-btn { min-width: 32px; height: 32px; font-size: 0.82rem; padding: 0 8px; }
    .page-info { width: 100%; padding-top: 4px; text-align: center; }
}
