/* /assets/css/pages/article.css - 文章详情页样式 */

/* 文章详情容器 */
.article-detail-container {
    padding: 40px 0;
    background-color: #f9f9f9;
    min-height: calc(100vh - 400px);
}

/* 文章主体区域 */
.article-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 40px;
}

/* 文章头部 */
.article-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(to right, #f8f9fa, #fff);
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #888;
    font-size: 14px;
    margin-top: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    font-size: 16px;
}

/* 文章内容区域 */
.article-content {
    padding: 40px;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* 文章正文样式 */
.article-body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* 文章图片样式 */
.article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 文章段落样式 */
.article-body p {
    margin-bottom: 1.5em;
    text-align: justify;
}

/* 文章标题层级样式 */
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin: 1.5em 0 0.8em;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.article-body h1 {
    font-size: 28px;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 10px;
}

.article-body h2 {
    font-size: 24px;
    border-left: 4px solid #ff6b6b;
    padding-left: 12px;
}

.article-body h3 {
    font-size: 20px;
    color: #555;
}

.article-body h4 {
    font-size: 18px;
    color: #666;
}

/* 列表样式 */
.article-body ul,
.article-body ol {
    margin: 1em 0;
    padding-left: 2em;
}

.article-body li {
    margin-bottom: 0.5em;
}

/* 引用样式 */
.article-body blockquote {
    margin: 1.5em 0;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #ff6b6b;
    border-radius: 4px;
    font-style: italic;
    color: #555;
}

/* 代码块样式 */
.article-body pre {
    margin: 1.5em 0;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid #e1e4e8;
}

.article-body code {
    background: #f5f7fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
}

/* 表格样式 */
.article-body table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    border: 1px solid #e1e4e8;
}

.article-body th,
.article-body td {
    padding: 12px 15px;
    border: 1px solid #e1e4e8;
    text-align: left;
}

.article-body th {
    background: #f8f9fa;
    font-weight: 600;
}

/* 文章底部 */
.article-footer {
    padding: 20px 40px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag {
    padding: 4px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
}

.tag:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.article-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.action-btn.like.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

/* 相关文章区域 */
.related-articles {
    margin-top: 40px;
}

.section-title {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff6b6b;
}

.section-title h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.related-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.related-img {
    height: 180px;
    overflow: hidden;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-item:hover .related-img img {
    transform: scale(1.05);
}

.related-content {
    padding: 20px;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.related-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.related-title a:hover {
    color: #ff6b6b;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 13px;
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 30px;
    padding: 15px 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0 20px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: #ff6b6b;
}

.breadcrumb-item.active a {
    color: #ff6b6b;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #ccc;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .article-detail-container {
        padding: 20px 0;
    }
    
    .article-header,
    .article-content,
    .article-footer {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .related-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .article-title {
        font-size: 20px;
    }
    
    .article-content {
        font-size: 15px;
        padding: 15px;
    }
    
    .article-body h1 {
        font-size: 22px;
    }
    
    .article-body h2 {
        font-size: 20px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
}