/*
 * 文章正文排版样式（2026-11-20 提取自 article.php 的内联 <style>）
 * 供易学文章详情页（yixue_article.php）复用，保证与养生文章正文观感一致。
 * ⛔ article.php 本身未改动，此文件是它的样式副本。
 */
:root {
            --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', 'SimSun', serif;
        }
        .article-body { line-height: 1.9; color: #333; font-size: 16px; text-align: justify; overflow-x: auto; -webkit-overflow-scrolling: touch; word-wrap: break-word; letter-spacing: .3px; padding: 0 10px; }
        .article-body h1,.article-body h2,.article-body h3,.article-body h4,.article-body h5,.article-body h6 { font-family: var(--font); color: var(--primary); font-weight: 700; line-height: 1.3; margin: 1.2rem 0 .6rem; }
        .article-body h1 { font-size: 26px; } .article-body h2 { font-size: 22px; } .article-body h3 { font-size: 19px; } .article-body h4 { font-size: 17px; } .article-body h5 { font-size: 15px; } .article-body h6 { font-size: 14px; }
        /* 章节标题：底部淡线 + 浅底渐变，不用左侧竖线，避免满屏竖线 */
        .article-body h2 { font-size: 21px; color: var(--primary); margin: 2.4rem 0 1.1rem; padding: .5rem 0 .55rem; border-bottom: 1px solid rgba(139,26,26,0.10); line-height: 1.45; background: linear-gradient(180deg, rgba(139,26,26,0.03), rgba(139,26,26,0)); }
        .article-body strong, .article-body b { font-weight: 700; color: #a8472e; } .article-body em, .article-body i { font-style: italic; } .article-body u { text-decoration: underline; }
        .article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; cursor: zoom-in; }
        /* 图片放大查看（lightbox） */
        .img-lightbox {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.9);
            z-index: 99999;
            cursor: zoom-out;
            -webkit-box-align: center; -ms-flex-align: center; align-items: center;
            -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
        }
        .img-lightbox.open { display: -webkit-box; display: -ms-flexbox; display: flex; }
        .img-lightbox img {
            max-width: 92%;
            max-height: 92%;
            border-radius: 6px;
            box-shadow: 0 6px 40px rgba(0,0,0,0.5);
            -webkit-transition: -webkit-transform .2s ease; transition: transform .2s ease;
        }
        .img-lightbox .lb-close {
            position: absolute; top: 18px; right: 22px;
            width: 42px; height: 42px; border-radius: 50%;
            background: rgba(255,255,255,0.15);
            border: none; color: #fff; font-size: 26px; line-height: 42px;
            cursor: pointer; text-align: center;
        }
        /* 引用框：对齐「岐黄」HTML 规范视觉——米黄底、赭石左线、衬线体、暖褐字 */
        .article-body blockquote { border-left: 4px solid #8b6914; padding: .8rem 1.2rem; background: #f5efe0; border-radius: 0 8px 8px 0; margin: 1.1rem 0; color: #5a4a2a; font-family: 'Songti SC','STSong','SimSun','Noto Serif SC',serif; font-size: 15.5px; line-height: 1.95; }
        .article-body p { margin-bottom: 1.15rem; }
        /* 导语：略大、柔和，拉开与正文的层次 */
        .article-body p.lead { font-size: 1.06rem; color: #3a2e22; line-height: 1.95; margin-bottom: 1.6rem; }
        /* 文末提示/引导：对齐「岐黄」HTML 规范视觉——浅鹅黄底、琥珀左线、深褐黄字 */
        .article-body p.note { font-size: .88rem; color: #6b4e00; background: #fff8e1; border-left: 4px solid #d4a017; padding: .9rem 1.1rem; border-radius: 0 8px 8px 0; margin-top: 1.8rem; line-height: 1.85; }
        .article-body ul,ol { padding-left: 1.5rem; margin-bottom: 1rem; }
        /* 枚举列表：卡片式条目，圆点标记 + 浅底卡片，不用左侧竖线 */
        .article-body ul.enum { list-style: none; padding-left: 0; margin: .3rem 0 1.25rem; }
        .article-body ul.enum li { position: relative; padding: .55rem .85rem .55rem 1.85rem; margin-bottom: .55rem; background: var(--bg-card); border-radius: 8px; line-height: 1.85; box-shadow: inset 0 0 0 1px rgba(139,26,26,0.06); }
        .article-body ul.enum li::before { content: ''; position: absolute; left: .7rem; top: 1.15rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--primary); }
        .article-body ul.enum li strong { color: #a8472e; }
        /* 保留 Quill 编辑器的对齐样式 */
        .article-body [style*="text-align:justify"],
        .article-body [style*="text-align: justify"],
        .article-body p[style*="justify"] { text-align: justify !important; }
        .article-body [style*="text-align:center"],
        .article-body [style*="text-align: center"],
        .article-body p[style*="center"] { text-align: center !important; }
        .article-body [style*="text-align:right"],
        .article-body [style*="text-align: right"],
        .article-body p[style*="right"] { text-align: right !important; }
        .article-body [style*="text-align:left"],
        .article-body [style*="text-align: left"],
        .article-body p[style*="left"] { text-align: left !important; }
        /* 面包屑行：左侧面包屑 + 右侧「编辑本文」（仅管理员可见）
           放在同一行可避免打乱 .article-top-left 与右侧营销卡片的底部对齐 */
        .article-crumb-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
        .article-crumb-row .article-breadcrumb { margin-bottom: 0; min-width: 0; flex: 1 1 auto; }
        .article-admin-edit {
            display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
            padding: 6px 14px; border-radius: 20px;
            background: var(--primary); color: #fff; text-decoration: none;
            font-size: .82rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
            box-shadow: 0 2px 10px rgba(139,26,26,.20);
            transition: background .18s, transform .18s, box-shadow .18s;
        }
        .article-admin-edit:hover { background: #6D1414; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(139,26,26,.28); }
        .article-admin-edit i { font-size: .8rem; }
        /* 字号调节控件 */
        .font-size-bar {
            display: flex; align-items: center; gap: 6px; margin-bottom: 1.2rem;
            padding: 10px 14px; background: var(--bg-card); border-radius: 10px;
            border: 1px solid var(--border);
        }
        .font-size-bar .fs-label {
            font-size: .85rem; color: var(--text-light); margin-right: 4px;
            white-space: nowrap; display: flex; align-items: center; gap: 4px;
        }
        .font-size-bar .fs-btn {
            width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
            background: #fff; color: var(--dark); cursor: pointer; font-size: 1rem;
            font-weight: 400; display: flex; align-items: center; justify-content: center;
            transition: all .18s; user-select: none; line-height: 1;
        }
        .font-size-bar .fs-btn:hover { border-color: var(--primary); color: var(--primary); background: #fff8f5; }
        .font-size-bar .fs-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
        .font-size-bar .fs-reset {
            padding: 0 14px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
            background: #fff; color: var(--text-light); cursor: pointer; font-size: .85rem;
            transition: all .18s; white-space: nowrap;
        }
        .font-size-bar .fs-reset:hover { border-color: var(--primary); color: var(--primary); }
        .comment-item { border-bottom: 1px solid var(--border); padding: 1.2rem 0; }
        .comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font); flex-shrink: 0; }
        /* 表格样式（移动端横向滚动，避免撑破布局） */
        .article-body table {
            width: 100%;
            max-width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            table-layout: auto;
            font-size: 14px;
        }
        .article-body table th,
        .article-body table td {
            border: 1px solid #ddd;
            padding: 8px 10px;
            min-width: 48px;
            text-align: left;
            vertical-align: top;
            word-break: break-word;
        }
        .article-body table th {
            background: #f5f0eb;
            font-weight: 700;
            color: #8B1A1A;
            text-align: center;
        }
        .article-body table tr:nth-child(even) {
            background: #fdf8f0;
        }
        @media (max-width: 768px) {
            .article-body table { font-size: 13px; }
            .article-body table th, .article-body table td { padding: 6px 8px; min-width: 40px; }
            .article-body h1 { font-size: 22px; } .article-body h2 { font-size: 19px; } .article-body h3 { font-size: 17px; }
        }
        /* 侧边栏营销卡片：按登录/会员状态变化（顶部） */
        .mkt-card { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 1.6rem 1.5rem; margin-bottom: 1.5rem; color: #fff; box-shadow: 0 8px 24px rgba(139,26,26,.12); }
        .mkt-card::after { content: ''; position: absolute; right: -34px; bottom: -34px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
        .mkt-card .mkt-icon { font-size: 2rem; margin-bottom: .7rem; display: inline-block; color: var(--gold); }
        .mkt-card h5 { font-family: var(--font); color: #fff; margin-bottom: .5rem; font-size: 1.15rem; line-height: 1.4; }
        .mkt-card p { font-size: .85rem; line-height: 1.75; margin-bottom: 1rem; opacity: .92; }
        .mkt-card .mkt-links { display: flex; flex-direction: column; gap: .6rem; }
        .mkt-card .mkt-links a { display: block; text-align: center; padding: .6rem 1rem; border-radius: 8px; font-size: .92rem; text-decoration: none; font-weight: 600; transition: all .2s; }
        .mkt-card .mkt-links a.primary { background: var(--gold); color: var(--dark); }
        .mkt-card .mkt-links a.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
        .mkt-card .mkt-links a.ghost { background: rgba(255,255,255,.14); color: #fff; }
        .mkt-card .mkt-links a.ghost:hover { background: rgba(255,255,255,.24); }
        .mkt-guest { background: linear-gradient(135deg, #8B1A1A 0%, #5A0E0E 100%); }
        .mkt-nonmember { background: linear-gradient(135deg, #8B1A1A 0%, #3D1408 100%); }
        .mkt-member { background: linear-gradient(135deg, #B8860B 0%, #8B6914 100%); }
        .mkt-vip { background: linear-gradient(135deg, #6B3FA0 0%, #3D1F66 100%); }
        .mkt-renew { background: linear-gradient(135deg, #C0392B 0%, #8E2A1E 100%); }
        .mkt-expired { background: linear-gradient(135deg, #A0522D 0%, #5C2E14 100%); }

        /* 电脑版文章详情页双栏对齐网格：
           - 第一行：标题/meta/摘要（左） + 营销卡片（右），底部对齐
           - 第二行：封面/正文/留言（左） + 相关文章/分类/热门（右），顶部对齐 */
        @media (min-width: 992px) {
            .article-detail-grid {
                display: grid;
                grid-template-columns: 2fr 1fr; /* 保持原 8:4 比例 */
                gap: 0 1.5rem;                   /* 横向间距 1.5rem */
                align-items: start;
                --bs-gutter-x: 0;               /* 覆盖 Bootstrap .row 的负边距 */
                margin-left: 0;
                margin-right: 0;
            }
            .article-detail-grid > [class*="col-"] {
                display: contents;
                padding-left: 0;
                padding-right: 0;
            }
            /* 顶部行：摘要底部 与 营销卡片底部 对齐 */
            .article-top-left {
                grid-column: 1;
                grid-row: 1;
                align-self: end;
            }
            .article-top-right {
                grid-column: 2;
                grid-row: 1;
                align-self: end;
            }
            /* 中部行：封面顶部 与 相关文章顶部 对齐 */
            .article-mid-left {
                grid-column: 1;
                grid-row: 2;
                align-self: start;
            }
            .article-mid-right {
                grid-column: 2;
                grid-row: 2;
                align-self: start;
            }
            /* 消除最外层列的 Bootstrap 内边距，统一由 grid gap 控制 */
            .article-detail-col-main,
            .article-detail-col-side {
                padding-left: 0 !important;
                padding-right: 0 !important;
            }
        }
