/* ============================================================
 * 详情页改版 2026-10-29（Hermes）
 * 适用：问答详情 /q_{id}.html、文章详情 /article/{id}.html
 * 策略：注入式覆盖，不改模板结构
 * 挂载：由 jxc_blue/html/{question,article}/detail.php 的 meta_script 块引入
 * 回滚：删除 detail.php 里对应的 <link> 一行
 * ============================================================ */

/* ---------- 1. 主标题：从 20.8px 放大到 30px，行高 1.35 ---------- */
/* 问答详情页标题 */
.aw-left h2.title,
.aw-left .mb-3.title {
    font-size: 28px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    letter-spacing: -0.4px;
    color: #0f172a !important;
    margin-bottom: 18px !important;
}

/* 文章详情页标题 */
.aw-article > h2,
article.aw-article h2:first-of-type {
    font-size: 28px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    letter-spacing: -0.4px;
    color: #0f172a !important;
    margin-bottom: 20px !important;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f7;
}

/* ---------- 2. 详情页顶部信息条（作者/时间/数据）---------- */
.aw-author-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    margin-bottom: 20px !important;
}
.aw-author-info img {
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    object-fit: cover;
}
.aw-author-info .aw-user-name,
.aw-author-info a {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.aw-author-info a:hover { color: #2563eb; }

/* ---------- 3. 正文卡片化：白底 + 圆角 + 内边距 ---------- */
.aw-left .aw-mod {
    background: #fff;
    border-radius: 12px !important;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
    padding: 24px 26px !important;
    margin-bottom: 18px !important;
}

/* 正文排版：行高、字号、段距 */
.aw-left .aw-mod p,
.aw-left .aw-mod .mb-0 {
    font-size: 15.5px !important;
    line-height: 1.9 !important;
    color: #334155 !important;
    margin-bottom: 14px !important;
}
.aw-left .aw-mod img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
}

/* ---------- 4. 回答区：卡片 + 左侧强调边框 ---------- */
.aw-left .aw-mod[id^="answer"],
.aw-left .answer-item,
.aw-left .aw-answer-list > div {
    background: #fff;
    border-radius: 12px !important;
    border: 1px solid #eef2f7 !important;
    border-left: 3px solid #2563eb !important;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
    padding: 22px 24px !important;
    margin-bottom: 16px !important;
}

/* 回答者信息行 */
.answerCommentHeader,
.aw-answer-list .aw-item-meta {
    padding-bottom: 12px !important;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px !important;
}

/* ---------- 5. 元信息胶囊化（关注/浏览/回答数）---------- */
.aw-question-detail-meta,
.mb-3 .aw-small,
h2 ~ .text-color-999 {
    font-size: 13px;
    color: #64748b;
}

/* 顶部统计数字强化 */
.aw-left .text-color-999 em,
.aw-left .aw-small em {
    color: #2563eb;
    font-weight: 700;
    font-style: normal;
}

/* ---------- 6. 标签胶囊（继承 unify2026，此处补详情页特有）---------- */
.aw-left .aw-tag .tag,
.aw-left .topic-tag {
    display: inline-block;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
    padding: 4px 14px !important;
    font-size: 13px !important;
    margin: 0 8px 8px 0 !important;
    text-decoration: none;
    transition: all .15s;
}
.aw-left .aw-tag .tag:hover,
.aw-left .topic-tag:hover {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}

/* ---------- 7. 操作按钮行（关注/回答/邀请/收藏/分享）---------- */
.aw-left .aw-mod .btn,
.aw-left .aw-question-actions .btn {
    border-radius: 8px !important;
    font-size: 13.5px !important;
    padding: 7px 16px !important;
    transition: all .15s;
}
.aw-left .btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
}
.aw-left .btn-primary:hover {
    background: #1d4ed8 !important;
}
.aw-left .btn-outline-secondary,
.aw-left .btn-default {
    border-color: #e2e8f0 !important;
    color: #475569 !important;
    background: #fff !important;
}
.aw-left .btn-outline-secondary:hover,
.aw-left .btn-default:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

/* ---------- 8. 右侧栏卡片统一（与话题页一致）---------- */
.aw-right .r-box,
.aw-right .bg-white {
    background: #fff;
    border-radius: 12px !important;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
    margin-bottom: 16px !important;
    overflow: hidden;
}
.aw-right .r-title,
.aw-right h4 {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

/* 侧栏列表项 */
.aw-right dl,
.aw-right .aw-related-item {
    padding: 11px 16px !important;
    margin: 0 !important;
    border-bottom: 1px solid #f8fafc;
    font-size: 13.5px;
    line-height: 1.65;
    transition: background .15s;
}
.aw-right dl:last-child { border-bottom: 0; }
.aw-right dl:hover { background: #fafcff; }
.aw-right dl a {
    color: #334155;
    text-decoration: none;
    display: block;
}
.aw-right dl a:hover { color: #2563eb; }

/* ---------- 9. 相关内容/相关问题区块 ---------- */
.aw-left .r-box,
.aw-left .aw-mod-head + .row {
    border-radius: 12px;
}

/* ---------- 10. 响应式：移动端 ---------- */
@media (max-width: 767px) {
    .aw-left h2.title,
    .aw-left .mb-3.title,
    article.aw-article > h2,
    article.aw-article h2:first-of-type,
    .aw-article > h2 {
        font-size: 22px !important;
        line-height: 1.45 !important;
    }
    .aw-left .aw-mod {
        padding: 18px 16px !important;
        border-radius: 10px !important;
    }
    .aw-left .aw-mod p {
        font-size: 15px !important;
    }
    .aw-author-info {
        padding: 10px 12px;
        gap: 8px;
    }
}

/* ============================================================
 * 11. 文章详情页专用（2026-10-29 补）
 * 结构实测：article.aw-article > h2 + .aw-author-info + .aw-content(137个p)
 * 正文不在 .aw-mod 里，必须单独指定 .aw-content
 * ============================================================ */

/* 正文容器卡片化 */
.aw-article .aw-content {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
    padding: 28px 30px !important;
    margin-top: 0 !important;
}

/* 正文排版：字号/行高/段距 */
.aw-article .aw-content p {
    font-size: 15.5px !important;
    line-height: 1.9 !important;
    color: #334155 !important;
    margin-bottom: 16px !important;
}

/* 正文里的小标题（h3/h4/h5/h6）层级 */
.aw-article .aw-content h3,
.aw-article .aw-content h4,
.aw-article .aw-content h5 {
    font-size: 19px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 28px 0 14px !important;
    padding-left: 12px;
    border-left: 4px solid #2563eb;
    line-height: 1.5;
}

.aw-article .aw-content h6 {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 24px 0 12px !important;
    line-height: 1.5;
}

/* 正文图片 */
.aw-article .aw-content img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    display: block;
}

/* 正文引用/提示块 */
.aw-article .aw-content blockquote {
    background: #f8fafc;
    border-left: 4px solid #93c5fd;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 16px 0;
    color: #475569;
}

/* 发布时间 + 标签区 */
.aw-article + *, .aw-article ~ * {
    --noop: 0;
}

/* 文章底部标签胶囊 */
.aw-article .aw-content ~ div .tag,
.aw-article .aw-tag .tag {
    display: inline-block;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
    padding: 4px 14px !important;
    font-size: 13px !important;
    margin: 0 8px 8px 0 !important;
}

/* 移动端 */
@media (max-width: 767px) {
    .aw-article .aw-content {
        padding: 20px 16px !important;
        border-radius: 10px;
    }
    .aw-article .aw-content p {
        font-size: 15px !important;
        line-height: 1.85 !important;
    }
    .aw-article .aw-content h3,
    .aw-article .aw-content h4 {
        font-size: 17px !important;
    }
}

/* ============================================================
 * 侧边栏修复补丁 - 2026-11-08
 * 目的：确保 col-md-9 和 col-md-3 正常并排显示
 * ============================================================ */

/* 1. 确保容器使用 Flexbox */
.aw-wrap .container > .row {
    display: flex;
    flex-wrap: wrap;
}

/* 2. 修复侧边栏宽度和位置 */
.aw-right.col-md-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.aw-left.col-md-9 {
    flex: 0 0 75% !important;
    max-width: 75% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* 3. 防止侧边栏内容溢出 */
.aw-right {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.aw-right * {
    max-width: 100%;
    box-sizing: border-box;
}

/* 4. 清除浮动 */
.aw-wrap .container > .row::after {
    content: "";
    display: table;
    clear: both;
}

/* 5. 侧边栏内部卡片不要超宽 */
.aw-right .r-box,
.aw-right .bg-white,
.aw-right > div {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* 6. 响应式：平板和手机 */
@media (max-width: 991px) {
    .aw-left.col-md-9,
    .aw-right.col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .aw-right {
        margin-top: 20px;
    }
}

@media (max-width: 767px) {
    .aw-wrap .container > .row {
        display: block;
    }
    
    .aw-left,
    .aw-right {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
