/**
 * 动态中心详情页样式
 * news-detail.css
 */

/* ===== 面包屑 ===== */
.breadcrumb {
    background: #f8fafc;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: #94a3b8;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #00a6fb;
}

.breadcrumb li:last-child {
    color: #334155;
    font-weight: 500;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Hero区域 ===== */
.news-hero,
.article-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
    padding: 60px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.news-hero::before,
.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.news-hero .container,
.article-hero .container {
    position: relative;
    z-index: 1;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.news-hero h1,
.article-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    max-width: 900px;
}

.news-hero .subtitle,
.article-hero .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.news-hero .article-meta,
.article-hero .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.news-hero .article-meta span,
.article-hero .article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* ===== 文章内容 ===== */
.article-content {
    padding: 60px 0;
    background: white;
}

.article-content .container {
    max-width: 800px;
}

.featured-image {
    margin: 0 0 2.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 内容主体样式 */
.content-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #334155;
}

.content-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.content-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin: 2rem 0 0.75rem;
}

.content-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
    margin: 1.5rem 0 0.5rem;
}

.content-body p {
    margin-bottom: 1.25rem;
    color: #475569;
}

.content-body a {
    color: #00a6fb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.content-body a:hover {
    border-bottom-color: #00a6fb;
}

.content-body ul,
.content-body ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.content-body li {
    margin-bottom: 0.5rem;
    color: #475569;
}

.content-body li::marker {
    color: #00a6fb;
}

.content-body strong {
    color: #1a365d;
    font-weight: 600;
}

.content-body blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #00a6fb;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #0369a1;
}

.content-body blockquote p {
    margin: 0;
    color: inherit;
}

.content-body pre {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #1e293b;
    border-radius: 12px;
    overflow-x: auto;
}

.content-body code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.9em;
}

.content-body pre code {
    color: #e2e8f0;
}

.content-body :not(pre) > code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #e11d48;
}

.content-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.content-body th,
.content-body td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.content-body th {
    background: #f8fafc;
    font-weight: 600;
    color: #1a365d;
}

.content-body tr:last-child td {
    border-bottom: none;
}

.content-body tr:hover td {
    background: #f8fafc;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.content-body hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid #e2e8f0;
}

/* ===== 标签 ===== */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.article-tags .tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.article-tags .tag:hover {
    background: #e2e8f0;
    color: #334155;
}

/* ===== FAQ区域 ===== */
.article-faq {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 16px;
}

.article-faq h2 {
    font-size: 1.5rem;
    color: #1a365d;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.1rem;
    color: #1a365d;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.faq-item h3::before {
    content: 'Q';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #00a6fb;
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
}

.faq-item > div {
    padding-left: 40px;
}

.faq-item p {
    color: #64748b;
    line-height: 1.8;
    margin: 0;
}

/* ===== 相关文章 ===== */
.related-articles {
    background: #f8fafc;
    padding: 60px 0;
}

.related-articles h2 {
    text-align: center;
    font-size: 1.75rem;
    color: #1a365d;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.related-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.related-card h3 a {
    color: #1a365d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-card h3 a:hover {
    color: #00a6fb;
}

.related-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* ===== CTA区域 ===== */
.cta-section {
    background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
    padding: 60px 0;
    text-align: center;
    color: white;
}

.cta-section h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-section .btn-primary {
    display: inline-block;
    background: #00a6fb;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-section .btn-primary:hover {
    background: #0084d4;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 166, 251, 0.4);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .breadcrumb ol {
        font-size: 0.85rem;
    }

    .breadcrumb li:last-child {
        max-width: 200px;
    }

    .news-hero,
    .article-hero {
        padding: 40px 20px;
    }

    .news-hero h1,
    .article-hero h1 {
        font-size: 1.5rem;
    }

    .news-hero .subtitle,
    .article-hero .subtitle {
        font-size: 1rem;
    }

    .news-hero .article-meta,
    .article-hero .article-meta {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .article-content {
        padding: 40px 0;
    }

    .article-content .container {
        padding: 0 20px;
    }

    .content-body {
        font-size: 1rem;
    }

    .content-body h2 {
        font-size: 1.35rem;
    }

    .content-body h3 {
        font-size: 1.15rem;
    }

    .featured-image {
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .article-faq {
        padding: 1.5rem;
    }

    .related-articles {
        padding: 40px 0;
    }

    .related-grid {
        gap: 1rem;
    }

    .related-card {
        padding: 1.25rem;
    }

    .cta-section {
        padding: 40px 20px;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .news-hero h1,
    .article-hero h1 {
        font-size: 1.35rem;
    }

    .category-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .news-hero .article-meta,
    .article-hero .article-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .content-body table {
        display: block;
        overflow-x: auto;
    }
}
