/* page-article-detail.css - 文章详情页专用样式
   公告详情/分支动态详情 共用此样式，保证两页布局一致。
   侧栏样式（.news-side/.side-card/.side-news-* 等）复用 page-announcements-index.css */

/* ================= 详情页 Hero（标题区） ================= */
.article-hero {
    padding: 26px 30px 22px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #FFF5EC 0%, #FFEFD8 100%);
    border: 1px solid rgba(193, 57, 44, 0.12);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}
.article-hero::after {
    content: "📜";
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-size: 180px;
    opacity: 0.04;
    pointer-events: none;
    line-height: 1;
}
.article-crumb {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.article-crumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .15s;
}
.article-crumb a:hover { color: var(--primary); }
.article-crumb .sep { margin: 0 6px; color: #ccc; }
.article-crumb .current { color: var(--text-primary); font-weight: 500; }

.article-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.article-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}
.article-update-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
}

/* ================= 详情页 正文卡片 ================= */
.article-body-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.article-ops {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: -8px 0 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--border);
}
.article-ops .btn { padding: 6px 16px; font-size: 13px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; transition: all .15s; }
.article-ops .btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.article-ops .btn-primary:hover { background: #B44027; }
.article-ops .btn-danger { background: #fff; color: #F56C6C; border-color: #F56C6C; }
.article-ops .btn-danger:hover { background: #F56C6C; color: #fff; }

/* 富文本正文：图片自适应、段落间距、表格安全 */
.article-content { font-size: 16px; line-height: 1.85; color: var(--text-primary); word-wrap: break-word; overflow-wrap: break-word; }
.article-content :first-child { margin-top: 0; }
.article-content p { margin: 0 0 16px; }
.article-content h2,
.article-content h3,
.article-content h4 { margin: 24px 0 12px; font-weight: 600; line-height: 1.5; }
.article-content h2 { font-size: 20px; }
.article-content h3 { font-size: 18px; }
.article-content h4 { font-size: 16px; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; display: block; }
.article-content a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(193, 57, 44, 0.3); transition: border-color .15s; }
.article-content a:hover { border-bottom-color: var(--primary); }
.article-content ul,
.article-content ol { margin: 0 0 16px; padding-left: 26px; }
.article-content li { margin: 6px 0; }
.article-content blockquote {
    margin: 16px 0;
    padding: 12px 18px;
    background: #FAFBFC;
    border-left: 4px solid var(--primary);
    border-radius: 0 6px 6px 0;
    color: var(--text-secondary);
    font-size: 15px;
}
.article-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 14px 18px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    margin: 14px 0;
}
.article-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: #c7254e;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
}
.article-content th,
.article-content td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}
.article-content th { background: #FAFBFC; font-weight: 600; }

/* ================= 详情页底部：返回按钮 ================= */
.article-back-foot {
    margin-top: 28px;
    text-align: center;
}
.article-back-foot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
    box-shadow: 0 2px 8px rgba(193, 57, 44, 0.18);
}
.article-back-foot a:hover {
    background: #B44027;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(193, 57, 44, 0.28);
}

/* ================= 相关文章 ================= */
.related-block {
    margin-top: 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
}
.related-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 12px;
    position: relative;
}
.related-title::before {
    content: "";
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), #FFB199);
    border-radius: 3px;
}
.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.related-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}
.related-list li:last-child { border-bottom: none; }
.related-list a {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .15s;
}
.related-list a:hover { color: var(--primary); }
.related-list .date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-light);
}
.related-empty {
    margin: 0;
    padding: 12px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

/* 分支动态详情：相关动态卡片网格（保持原样优化） */
.feed-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.feed-related-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #FAFBFC;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all .15s;
}
.feed-related-item:hover {
    border-color: rgba(193, 57, 44, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.feed-related-cover {
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}
.feed-related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.feed-related-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #c0c4cc;
}
.feed-related-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feed-related-date {
    font-size: 12px;
    color: var(--text-light);
}

/* ========================================================= */
/* ================= 响应式：手机端（≤768px） =============== */
/* ========================================================= */
@media (max-width: 768px) {
    .article-hero {
        padding: 18px 18px;
        margin-bottom: 18px;
    }
    .article-hero::after { font-size: 120px; right: -30px; bottom: -10px; }
    .article-crumb { font-size: 12px; margin-bottom: 10px; }
    .article-meta-row { gap: 8px; font-size: 12px; margin-bottom: 10px; }
    .article-title {
        font-size: 22px;
        line-height: 1.4;
        letter-spacing: 0.3px;
    }

    .article-body-card {
        padding: 18px 16px;
        border-radius: 10px;
    }
    .article-ops {
        margin: -4px 0 14px;
        padding-bottom: 14px;
    }
    .article-content { font-size: 15px; line-height: 1.8; }
    .article-content p { margin: 0 0 14px; }
    .article-content h2 { font-size: 18px; }
    .article-content h3 { font-size: 16px; }
    .article-content img { margin: 10px 0; }

    .article-back-foot { margin-top: 22px; }
    .article-back-foot a { width: 100%; justify-content: center; padding: 12px 16px; font-size: 15px; }

    .related-block { padding: 16px; margin-top: 22px; border-radius: 10px; }
    .related-title { font-size: 15px; margin-bottom: 12px; }
    .related-list a { font-size: 13px; }
    .related-list .date { font-size: 11px; }

    /* 分支动态相关卡片：手机单列 */
    .feed-related-grid { grid-template-columns: 1fr; }
    .feed-related-cover { height: 90px; }
}

/* 小屏（≤480px）微调 */
@media (max-width: 480px) {
    .article-title { font-size: 19px; }
    .article-body-card { padding: 16px 14px; }
    .article-content { font-size: 14px; line-height: 1.75; }
}
