/* ===================================================
   article-detail.css - 文章详情页样式
   =================================================== */

:root {
    --ad-primary: #d63384;
    --ad-primary-dark: #b71c1c;
    --ad-accent: #ff6600;
    --ad-bg: #f8f9fc;
    --ad-card-bg: #ffffff;
    --ad-text: #1a1a1a;
    --ad-text-secondary: #555;
    --ad-text-muted: #999;
    --ad-border: #e9eaec;
    --ad-radius: 12px;
    --ad-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    --ad-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* ========== 顶部 Banner ========== */
.article-banner {
    width: 100%;
    height: 380px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.article-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.3) 100%);
}
@media (max-width: 768px) { .article-banner { height: 220px; } }

/* ========== 面包屑 ========== */
.detail-breadcrumb-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 20px 0;
}
.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ad-text-muted);
    background: transparent;
}
.detail-breadcrumb a { color: var(--ad-text-secondary); text-decoration: none; transition: color 0.2s; }
.detail-breadcrumb a:hover { color: var(--ad-primary); }
.detail-breadcrumb .sep { color: #d1d5db; font-size: 11px; }
.detail-breadcrumb .current { color: var(--ad-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }

/* ========== 主容器 ========== */
.detail-section {
    max-width: 1140px;
    margin: 24px auto 50px;
    padding: 0 20px;
}

/* ========== 文章详情卡片 ========== */
.detail-card {
    background: var(--ad-card-bg);
    border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow);
    overflow: hidden;
    border: 1px solid #f0f1f3;
}

/* ---------- 卡片头部：左右分栏 ---------- */
.detail-card-top {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

/* 左侧缩略图 */
.detail-thumb-wrap {
    flex: 0 0 420px;
    max-width: 420px;
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.detail-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 300px;
    max-height: 400px;
    transition: transform 0.4s ease;
}
.detail-thumb-wrap img:hover {
    transform: scale(1.03);
}

/* 右侧信息区 */
.detail-info-wrap {
    flex: 1;
    min-width: 280px;
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

/* 标题 */
.detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ad-text);
    line-height: 1.5;
    margin: 0;
    word-break: break-all;
}

/* 元信息行 */
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #eee;
}
.detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ad-text-muted);
    white-space: nowrap;
}
.detail-meta-item i { font-size: 15px; color: #bbb; }
.detail-meta-item .meta-label { color: #aaa; margin-right: 2px; }
.detail-meta-item .meta-value {
    color: var(--ad-text-secondary);
    font-weight: 500;
}

/* 标签 */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.detail-tag {
    display: inline-block;
    padding: 4px 14px;
    background: #fdf2f8;
    color: var(--ad-primary);
    border: 1px solid #fce4ec;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 900;
    transition: all 0.2s;
}
.detail-tag:hover {
    background: var(--ad-primary);
    color: #fff;
    border-color: var(--ad-primary);
}

/* 摘要描述 */
.detail-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 联系我们按钮 */
.detail-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 36px;
    background: linear-gradient(135deg, var(--ad-primary-dark), #c62828);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(183, 28, 28, 0.3);
    align-self: flex-start;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.detail-contact-btn:hover {
    background: linear-gradient(135deg, #8e0000, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(183, 28, 28, 0.45);
    color: #fff;
    text-decoration: none;
}
.detail-contact-btn:active { transform: translateY(0); }

/* ---------- 内容分隔线 / 锚点导航 ---------- */
.detail-divider {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 40px;
    background: #fafbfc;
    border-top: 1px solid #f0f1f3;
    border-bottom: 1px solid #f0f1f3;
}
.detail-divider-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    position: relative;
    transition: all 0.25s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.detail-divider-text i { font-size: 14px; transition: color 0.25s; }
.detail-divider-text:hover {
    color: var(--ad-text);
    text-decoration: none;
    border-bottom-color: #ddd;
}
.detail-divider-text.active,
.detail-divider-text.active:hover {
    color: var(--ad-primary-dark);
    border-bottom-color: var(--ad-primary-dark);
}
.detail-divider-text.active i { color: var(--ad-primary-dark); }

/* ---------- 卡片底部：正文内容 ---------- */
.detail-card-body {
    padding: 40px 44px 44px;
}
@media (max-width: 768px) { .detail-card-body { padding: 24px 20px 28px; } }

.detail-content {
    color: #2c2c2c;
    font-size: 15px;
    line-height: 1.9;
    word-break: break-word;
    text-align: justify;
}
.detail-content p { margin-bottom: 18px; line-height: 1.9; }
.detail-content h2,
.detail-content h3,
.detail-content h4 {
    margin-top: 28px;
    margin-bottom: 14px;
    font-weight: 700;
    color: #111;
}
.detail-content h2 { font-size: 20px; border-left: 4px solid var(--ad-primary-dark); padding-left: 14px; }
.detail-content h3 { font-size: 18px; }
.detail-content h4 { font-size: 16px; }
.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
}
.detail-content ul, .detail-content ol { padding-left: 22px; margin-bottom: 18px; }
.detail-content li { margin-bottom: 6px; line-height: 1.8; }
.detail-content a { color: var(--ad-primary-dark); text-decoration: none; }
.detail-content a:hover { text-decoration: underline; }
.detail-content blockquote {
    border-left: 4px solid var(--ad-primary-dark);
    padding: 14px 20px;
    margin: 20px 0;
    background: #fff5f5;
    border-radius: 0 8px 8px 0;
    color: #831843;
    font-style: italic;
}
.detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.detail-content table th,
.detail-content table td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: left;
}
.detail-content table th { background: #f9fafb; font-weight: 600; color: #374151; }

/* ========== 无缩略图时的占位图标 ========== */
.detail-thumb-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ccc;
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
}
.detail-thumb-placeholder i { font-size: 64px; margin-bottom: 10px; }
.detail-thumb-placeholder span { font-size: 14px; color: #999; }

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .detail-card-top { flex-direction: column; }
    .detail-thumb-wrap {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }
    .detail-thumb-wrap img { min-height: 220px; max-height: 300px; }
    .detail-info-wrap { padding: 28px 30px; }
}

@media (max-width: 768px) {
    .detail-section { margin-top: 12px; margin-bottom: 30px; }

    .detail-info-wrap { padding: 22px 20px; gap: 16px; }
    .detail-title { font-size: 18px; }
    .detail-meta { gap: 14px; padding-bottom: 14px; }
    .detail-meta-item { font-size: 12px; }
    .detail-contact-btn { padding: 10px 24px; font-size: 14px; width: 100%; justify-content: center; }
    .detail-content { font-size: 14px; }

    .detail-divider { padding: 0 20px; }
    .detail-divider-text { font-size: 13px; padding: 12px 16px; }
}

@media (max-width: 480px) {
    .detail-thumb-wrap img { min-height: 180px; max-height: 240px; }
    .detail-info-wrap { padding: 18px 16px; gap: 14px; }
    .detail-title { font-size: 16px; }
    .detail-card-body { padding: 18px 16px 22px; }
    .detail-divider { padding: 0 12px; }
    .detail-divider-text { padding: 10px 12px; font-size: 12px; }
    .detail-meta { gap: 10px; }
}
