/* ========== WPS PC 下载/拉起 悬浮下载栏 (WPS 品牌红, 柔和渐变) ========== */
.wps-download-bar {
    display: none; /* 默认隐藏, 由 JS 按页面类型控制 */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(180deg, #dd3332 0%, #c42e2d 55%, #b02928 100%);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
    z-index: 9999;
}

.wps-download-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px 0 20px;
}

.wps-download-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.wps-download-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    padding: 4px;
}

.wps-download-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wps-download-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.wps-download-sub {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
}

.wps-download-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wps-dl-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: 0.2s;
    user-select: none;
}

.wps-dl-open {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.wps-dl-open:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
}

.wps-dl-download {
    background: #fff;
    color: #c42e2d;
    border-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.wps-dl-download:hover {
    background: #faf0f0;
    color: #b02928;
}

/* ========== WPS 正文内 CTA (WPS 品牌红, 柔和渐变) ========== */
.wps-inline-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0;
    padding: 20px 24px;
    background: linear-gradient(180deg, #dd3332 0%, #c42e2d 55%, #b02928 100%);
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 2px 10px rgba(198, 46, 45, 0.25);
}

.wps-inline-cta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wps-inline-cta .wps-inline-cta-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    padding: 4px;
}

.wps-inline-cta-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.wps-inline-cta-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0;
}

.wps-inline-cta-sub {
    font-size: 13px;
    opacity: 0.92;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 4px;
    line-height: 1.4;
}

.wps-inline-cta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wps-inline-cta .wps-dl-open {
    background: rgba(255, 255, 255, 0.18);
}

.wps-inline-cta .wps-dl-download {
    background: #fff;
}

/* 正文内图片限宽, 避免从线上抓取的大图撑破版面 */
.detail_main .detail_article img,
.detail_article img {
    max-width: 100%;
    height: auto;
}

/* 移动端: 隐藏悬浮栏 + 正文 CTA (MVP 移动端不展示) */
@media (max-width: 768px) {
    .wps-download-bar {
        display: none !important;
    }
    .wps-inline-cta {
        display: none !important;
    }
}

/* ========== 移动端 header 适配修复 (覆盖 CDN 样式, 避免标题与汉堡重叠) ========== */
@media (max-width: 919px) {
    .header .mobile-title {
        margin-left: 70px;
        padding-left: 10px;
        text-align: left;
        font-size: 16px;
        line-height: 48px;
        font-weight: 700;
        color: #16181f;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header .mobile-menu-btn {
        left: 12px;
    }
}

/* ========== 移动端内容适配 (覆盖 CDN 样式, 列表/正文/分页) ========== */
@media (max-width: 767px) {
    /* 首页/列表: 卡片边距收紧, 图片自适应 */
    .index-list-cont {
        margin: 0 6px;
        border-radius: 10px;
    }
    .index-list-title {
        margin: 0 14px;
        font-size: 17px;
        padding: 16px 0;
    }
    .article-index-item {
        margin: 0 14px;
        padding: 14px 0;
    }
    .article-index-item .article-index-img {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-top: 10px;
    }
    .article-index-item-top {
        flex-direction: column-reverse;
    }
    .article-index-item-content {
        width: 100%;
        padding-top: 0;
    }
    .article-index-item .article-index-title {
        font-size: 15px;
        line-height: 22px;
        max-height: none;
        margin-bottom: 6px;
    }
    .article-index-item .article-index-summary {
        font-size: 13px;
        line-height: 20px;
        -webkit-line-clamp: 2;
    }
    .article-index-item-bottom {
        margin-top: 10px;
    }
    .tag-name {
        margin-right: 10px;
        margin-bottom: 6px;
    }

    /* 文章详情: 正文排版 */
    .detail_main {
        padding: 6px 6px 0;
    }
    .detail_main h1 {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        font-size: 20px;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .detail_article {
        font-size: 15px;
        line-height: 26px;
        overflow-wrap: break-word;
    }
    .detail_article h2,
    .detail_article h3 {
        margin-top: 18px;
        font-size: 18px;
        line-height: 1.4;
    }
    .detail_article img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 6px;
    }
    .detail_article table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* 面包屑/分页 */
    .breadcrumb {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 10px;
    }
    .pagination {
        padding: 0 10px;
        overflow-x: auto;
    }
    .pagination ul {
        flex-wrap: nowrap;
    }

    /* 页脚 */
    .p-footer .footer-container {
        padding: 0 12px;
    }
}
