/* 文章详情页样式 */

/* 文章页面布局 */
.article-page {
    padding: 40px 0 60px;
    background: #f8f9fa;
    min-height: 70vh;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 35px;
    align-items: start;
}

/* 文章主体 */
.article-main {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* 文章头部 */
.article-header {
    padding: 40px 45px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.article-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #FF6B35, #FF8C5A);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 28px;
    color: #222;
    line-height: 1.4;
    margin-bottom: 18px;
    font-weight: 700;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 13px;
    color: #999;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: #FF6B35;
}

/* 文章正文 */
.article-content {
    padding: 35px 45px 40px;
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

.article-content h2 {
    font-size: 19px;
    color: #222;
    margin-top: 35px;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid #FF6B35;
    font-weight: 700;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content p {
    margin-bottom: 16px;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin: 15px 0 20px 25px;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-content strong {
    color: #222;
    font-weight: 700;
}

.article-content a {
    color: #FF6B35;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #c7254e;
}

/* 文章标签 */
.article-tags {
    padding: 25px 45px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tag-label {
    font-size: 13px;
    color: #999;
    font-weight: 600;
}

.article-tags a {
    display: inline-block;
    padding: 5px 14px;
    background: #f5f5f5;
    color: #666;
    border-radius: 15px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.article-tags a:hover {
    background: #FF6B35;
    color: #fff;
}

/* 分享区域 */
.article-share {
    padding: 20px 45px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.article-share span {
    font-size: 13px;
    color: #999;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
}

.share-btn.wechat { background: #07C160; }
.share-btn.qq { background: #12B7F5; }
.share-btn.weibo { background: #E6162D; }

.share-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

/* 相关文章 */
.related-articles {
    padding: 30px 45px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.related-articles h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.related-card {
    display: flex;
    gap: 15px;
    padding: 18px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
    text-decoration: none;
    transition: all 0.3s;
}

.related-card:hover {
    border-color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.related-card i {
    font-size: 22px;
    color: #FF6B35;
    margin-top: 3px;
    flex-shrink: 0;
}

.related-card div {
    min-width: 0;
}

.related-card strong {
    display: block;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 6px;
}

.related-card span {
    font-size: 12px;
    color: #999;
}

/* 文章底部CTA */
.article-cta {
    padding: 40px 45px;
    background: linear-gradient(135deg, #FF6B35, #FF8C5A);
    border-radius: 0 0 16px 16px;
}

.article-cta .cta-content {
    text-align: center;
}

.article-cta h3 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 10px;
}

.article-cta p {
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 25px;
}

.cta-btn {
    display: inline-block;
    padding: 14px 45px;
    background: #fff;
    color: #FF6B35;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-btn:hover {
    background: #333;
    color: #fff;
    transform: translateY(-2px);
}

/* 侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}

.sidebar-card {
    background: #fff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.sidebar-card h4 {
    font-size: 15px;
    color: #333;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h4 i {
    color: #FF6B35;
}

.sidebar-card p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.sidebar-card p strong {
    color: #FF6B35;
    font-size: 16px;
}

.sidebar-btn {
    display: block;
    text-align: center;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FF6B35, #FF8C5A);
    color: #fff;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s;
}

.sidebar-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.course-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: all 0.3s;
}

.course-item:last-child {
    border-bottom: none;
}

.course-item i {
    width: 32px;
    height: 32px;
    background: #FFF5F0;
    color: #FF6B35;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.course-item span {
    font-size: 13px;
    color: #555;
    transition: color 0.3s;
}

.course-item:hover span {
    color: #FF6B35;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}

.category-list a:last-child {
    border-bottom: none;
}

.category-list a:hover {
    color: #FF6B35;
}

.category-list span {
    color: #999;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 25px 20px 20px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    .article-content {
        padding: 25px 20px 30px;
    }

    .article-content h2 {
        font-size: 17px;
    }

    .article-tags,
    .article-share,
    .related-articles,
    .article-cta {
        padding-left: 20px;
        padding-right: 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .article-meta {
        gap: 15px;
    }
}
