/* ============================================================
   全站页面样式：博客 / 资讯 列表页 + 详情页 + 错误页
   来源：设计稿 member-perks/news-page.css，按项目适配：
   - 缩略图支持真实 img（无图回退渐变色块）
   - 详情正文 .article-copy 扩充富文本规则（h2/h3/ul/blockquote/img…）
   - 补充空列表提示 .empty-tip 与错误页 .error-wrap
   ============================================================ */

@font-face {
    font-family: "fangYuan";
    font-weight: 400;
    src: url("https://cdn.xljsci.com/fonts/AlimamaFangYuanTiVF-Thin.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "puHui65";
    src: url("https://cdn.xljsci.com/fonts/Alibaba_PuHuiTi_2.0_65_Medium_65_Medium.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "puHui75";
    src: url("https://cdn.xljsci.com/fonts/Alibaba_PuHuiTi_2.0_75_SemiBold_75_SemiBold.ttf") format("truetype");
    font-display: swap;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    background: #f3f5f8;
    color: #262626;
    font-family: "puHui65", "Microsoft YaHei", "PingFang SC", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
}

.flex {
    display: flex;
}

.flex-center {
    align-items: center;
}

.flex-between {
    justify-content: space-between;
}

/* ===== 页头 ===== */
.header-box {
    position: relative;
    z-index: 100;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.header_inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 1200px;
    height: 72px;
    margin: 0 auto;
    padding: 0 5px;
}

.header_inner > a img {
    width: 256px;
    height: auto;
}

.title {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 48px;
}

.nav-item-wrapper {
    display: flex;
    align-items: center;
    height: 25px;
}

.title a {
    color: #35566b;
    font-family: "fangYuan", "Microsoft YaHei", sans-serif;
    font-size: 16px;
}

.title a:hover {
    color: #30c88d;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 32px;
    border-radius: 4px;
    background: #262626;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.features-dropdown {
    position: absolute;
    top: 72px;
    left: 0;
    z-index: 200;
    display: none;
    width: 100%;
    padding: 24px 0 30px;
    background: #fff;
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.1), inset 0 1px 0 #f1f1f1;
}

.features-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 1200px;
    margin: 0 auto;
}

.dropdown-sidebar {
    display: flex;
    gap: 16px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 157px;
    height: 48px;
    gap: 8px;
    padding: 13px 16px;
    border-radius: 8px;
    color: #262626;
    cursor: pointer;
    font-family: "puHui75", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.sidebar-item svg {
    display: block;
}

.sidebar-item svg g path:first-child,
.sidebar-item-1 g[id="Vector"] path:last-child,
.sidebar-item-5 svg path {
    fill: #262626;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: #f2f4f7;
}

.dropdown-content {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 16px;
    padding-left: 8px;
}

.content-w {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.content-w-item {
    width: 156px;
    height: 32px;
    padding: 6px 16px;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    font-family: "puHui65", "Microsoft YaHei", sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.content-w-item:hover {
    background: #f2f4f7;
    color: #262626;
}

/* ===== 主体 ===== */
.page-body {
    width: 100%;
    min-height: calc(100vh - 72px);
    padding: 0 0 24px;
    background: #fff;
}

.page-inner {
    width: 1208px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0 16px;
    color: #7B838B;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #03A35E;
}

.content-layout {
    display: flex;
    align-items: flex-start;
    column-gap: 40px;
}

.content-main {
    width: 848px;
    min-width: 0;
    flex: 0 0 848px;
}

.content-side {
    width: 320px;
    flex: 0 0 320px;
}

/* ===== 右栏：相关推荐 ===== */
.side-card {
    border: 1px solid #DDE1E7;
    background: #fff;
    border-radius: 3px 3px 3px 3px;

}

.side-card-title {
    padding: 17px 17px 12px;
    border-bottom: 1px solid #DDE1E7;
    color: #262626;
    font-size: 14px;
    font-weight: 700;
}

.side-list {
    padding: 8px 0;
}

.side-link {
    display: block;
    padding: 0px 17px;
    overflow: hidden;
    color: #262626;
    font-size: 14px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 16px;
}

.side-link:last-child {
    margin-bottom: 8px;
}

.side-link:hover,
.side-link.active {
    color: #03A35E;
}

/* ===== 列表页：文章行 ===== */
.article-item {
    display: flex;
    gap: 32px;
    padding: 24px 8px;
    border-bottom: 1px solid #DDE1E7;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.article-item:hover {
    background: #F8F9FB;
    border-radius: 3px 3px 3px 3px;
}
.article-item:first-child{
    padding-top: 0;
}
.article-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.article-thumb {
    position: relative;
    width: 208px;
    height: 132px;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6238, #ff8c4e);
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-item.featured .article-thumb {
    width: 208px;
    height: 132px;
}

.article-thumb::before,
.article-thumb::after {
    position: absolute;
    border-radius: 999px;
    content: "";
}

.article-thumb::before {
    right: -16px;
    bottom: -16px;
    width: 84px;
    height: 84px;
    background: rgba(255, 255, 255, 0.14);
}

.article-thumb::after {
    top: 16px;
    left: 14px;
    width: 46px;
    height: 8px;
    background: rgba(255, 255, 255, 0.36);
}

/* 有真实缩略图时隐藏装饰圆点 */
.article-thumb.has-img::before,
.article-thumb.has-img::after {
    display: none;
}

.thumb-blue { background: linear-gradient(135deg, #0350df, #3eb4ff); }
.thumb-purple { background: linear-gradient(135deg, #33256f, #7a57ff); }
.thumb-cyan { background: linear-gradient(135deg, #0b95da, #77dbff); }
.thumb-teal { background: linear-gradient(135deg, #0f4e73, #5ca6d0); }
.thumb-slate { background: linear-gradient(135deg, #d8e1ea, #93a8bb); }
.thumb-orange { background: linear-gradient(135deg, #ff5b35, #ff894c); }

.article-body {
    min-width: 0;
    flex: 1;
}

.article-title {
    display: -webkit-box;
    overflow: hidden;
    color: #262626;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.article-item:hover .article-title {
    color: #03A35E;
}

.article-summary {
    font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
    display: -webkit-box;
    overflow: hidden;
    margin-top: 16px;
    color: #7B838B;
    font-size: 14px;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.article-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #B7BBC9;
    font-size: 12px;
}
.article-meta{
    display: flex;
    justify-content: space-between;
}
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    color: #B7BBC9;
    font-size: 12px;
    justify-content: center;
    margin-bottom: 32px;
    margin-top: 16px;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 32px 0 26px;
    color: #262626;
    font-size: 13px;
}

.pager-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #DDE1E7;
    border-radius: 3px;
    background: #fff;
}

a.pager-item:hover {
    border-color: #262626;
}

.pager-item.active {
    border-color: #262626;
    color: #262626;
}

.pager-item.disabled {
    color: #c4ced4;
    cursor: not-allowed;
}

.jump-box {
    width: 36px;
    height: 22px;
    border: 1px solid #dfe4ea;
    border-radius: 2px;
    outline: none;
    text-align: center;
}

.jump-box:focus {
    border-color: #03A35E;
}

/* ===== 详情页 ===== */
.detail-title {
    margin: 0px 0 16px;
    color: #262626;
    font-family: "puHui75", "Microsoft YaHei", sans-serif;
    font-size: 28px;
    line-height: 1.35;
    text-align: center;
}

.detail-cover {
    position: relative;
    width: 100%;
    max-width: 760px;
    height: 230px;
    margin: 12px auto 18px;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #17a7e8, #0c73d6);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-cover::after {
    position: absolute;
    bottom: 0;
    left: 41%;
    width: 42%;
    height: 26px;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 93, 160, 0.8);
    content: "";
}

.detail-cover-bottle {
    position: absolute;
    top: 38px;
    left: 62%;
    z-index: 1;
    width: 60px;
    height: 128px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px 14px 16px 16px;
    background: linear-gradient(180deg, rgba(30, 39, 89, 0.55), rgba(24, 115, 204, 0.78));
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.18);
}

.detail-cover-bottle::before {
    position: absolute;
    top: 48px;
    left: 8px;
    width: 44px;
    color: rgba(255, 255, 255, 0.9);
    content: "COVID-19";
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
}

.detail-cover-bottle::after {
    position: absolute;
    top: -12px;
    left: 11px;
    width: 38px;
    height: 18px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #8d0014, #2e0012);
    content: "";
}

/* 无封面文章时隐藏封面占位 */
.detail-cover.empty {
    display: none;
}

/* ===== 详情正文（富文本） ===== */
.article-copy {
    color: #50555d;
    font-size: 16px;
    line-height: 26px;
}

.article-copy p {
    margin: 0 0 20px;
    text-indent: 2em;
}

.article-copy h2,
.article-copy h3,
.article-copy h4 {
    margin: 1.2em 0 .5em;
    color: #262626;
    line-height: 1.5;
    text-indent: 0;
}

.article-copy h2 { font-size: 20px; font-family: "puHui75", "Microsoft YaHei", sans-serif; }
.article-copy h3 { font-size: 17px; font-family: "puHui75", "Microsoft YaHei", sans-serif; }
.article-copy h4 { font-size: 15px; font-family: "puHui75", "Microsoft YaHei", sans-serif; }

.article-copy ol,
.article-copy ul {
    margin: 0 0 12px 1.4em;
    padding: 0;
}

.article-copy li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.article-copy img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 6px auto;
}

.article-copy blockquote {
    margin: 0 0 12px;
    padding: 10px 16px;
    border-left: 3px solid #03A35E;
    border-radius: 0 8px 8px 0;
    background: #f7fcfa;
    color: #50555d;
    text-indent: 0;
}

.article-copy pre {
    margin: 0 0 12px;
    padding: 14px;
    overflow-x: auto;
    border-radius: 8px;
    background: #0f2b33;
    color: #d9f3ea;
    font-size: 13px;
    text-indent: 0;
}

.article-copy code {
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef4f0;
    color: #04794b;
    font-size: .9em;
}

.article-copy pre code {
    padding: 0;
    background: none;
    color: inherit;
}

.article-copy table {
    width: 100%;
    margin: 0 0 12px;
    border-collapse: collapse;
}

.article-copy th,
.article-copy td {
    padding: 8px 12px;
    border: 1px solid #DDE1E7;
}

.article-copy th {
    background: #f7f9fb;
}

.article-copy a {
    color: #04794b;
}

/* ===== 上一篇 / 下一篇 ===== */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    color: #7B838B;
    font-size: 14px;
}

.article-nav a {
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-nav a:hover {
    color: #03A35E;
}

.article-nav a:last-child {
    text-align: right;
}

.article-nav .nav-placeholder {
    max-width: 46%;
}

/* ===== 空列表提示 ===== */
.empty-tip {
    padding: 70px 0;
    color: #7B838B;
    font-size: 15px;
    text-align: center;
}

/* ===== 错误页 ===== */
.error-wrap {
    padding: 90px 20px 60px;
    text-align: center;
}

.error-code {
    color: #03A35E;
    font-family: "puHui75", "Microsoft YaHei", sans-serif;
    font-size: 72px;
    line-height: 1;
}

.error-msg {
    margin: 18px 0 30px;
    color: #50555d;
    font-size: 16px;
}

.error-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 9px 26px;
    border: 1px solid #03A35E;
    border-radius: 999px;
    color: #03A35E;
    font-size: 14px;
}

.btn:hover {
    background: #03A35E;
    color: #fff;
}

.btn.solid {
    background: #03A35E;
    color: #fff;
}

.btn.solid:hover {
    background: #04794b;
}

/* ===== 响应式 ===== */
@media (max-width: 1240px) {
    .header_inner,
    .features-dropdown-inner {
        width: 1100px;
    }

    .page-inner {
        width: calc(100% - 24px);
    }
}

@media (max-width: 980px) {
    .header_inner,
    .features-dropdown-inner {
        width: calc(100% - 24px);
    }

    .title {
        gap: 20px;
        flex-wrap: wrap;
    }

    .dropdown-sidebar {
        flex-wrap: wrap;
    }

    .content-layout {
        display: block;
    }

    .content-main,
    .content-side {
        width: 100%;
        flex-basis: auto;
    }

    .content-side {
        margin-top: 40px;
    }
}

@media (max-width: 640px) {
    .article-item {
        gap: 16px;
    }

    .article-thumb {
        width: 120px;
        height: 80px;
    }

    .article-item.featured .article-thumb {
        width: 120px;
        height: 80px;
    }

    .article-summary {
        -webkit-line-clamp: 1;
    }

    .article-nav {
        flex-direction: column;
    }

    .article-nav a,
    .article-nav .nav-placeholder {
        max-width: 100%;
        text-align: left;
    }
}
