/**
 * PC端文章详情页样式
 *
 * @package HiTemp
 * @since 1.0.0
 */

/* 文章详情页 */
.article-single-page {
    min-height: 100vh;
    background-color: #efefef;
    padding: 12px 0 40px;
}

.article-single-page .container {
    max-width: var(--container-width, 1280px);
    padding-left: 24px;
    padding-right: 24px;
}

/* 布局 */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* 主内容区 */
.article-main {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* 文章头部 */
.article-header {
    margin-bottom: 32px;
}

.article-categories {
    margin-bottom: 16px;
}

.article-categories .back-to-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.article-categories .back-to-category i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.article-categories .back-to-category:hover {
    color: #f66600;
    background: #fff;
    border-color: #f66600;
    transform: translateX(-2px);
}

.article-categories .back-to-category:hover i {
    transform: translateX(-2px);
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #f66600;
    line-height: 1.4;
    margin: 0 0 24px;
    letter-spacing: -0.5px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-author .author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.meta-author .author-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.meta-info {
    display: flex;
    gap: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.meta-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 特色图片 */
.article-featured-image {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 文章内容 */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #334155;
    max-width: 800px;
    margin: 0 auto;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 40px 0 20px;
    padding-left: 16px;
    border-left: 4px solid #f66600;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 32px 0 16px;
}

.article-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 24px 0 12px;
}

.article-content p {
    margin: 0 0 20px;
}

.article-content a {
    color: #f66600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.article-content a:hover {
    border-bottom-color: #f66600;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-content blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #f66600;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.article-content pre {
    margin: 24px 0;
    padding: 20px;
    background: #1e293b;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.article-content code {
    font-family: 'Fira Code', 'Consolas', monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: #e11d48;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.article-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

/* 文章标签 */
.article-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.article-tags .tags-label {
    color: #64748b;
    font-size: 14px;
}

.article-tags .tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-tags .tags-cloud .tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    height: 24px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c2410c;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #fed7aa;
    box-shadow: 0 2px 4px rgba(246, 102, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.article-tags .tags-cloud .tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.article-tags .tags-cloud .tag-item:hover::before {
    left: 100%;
}

.article-tags .tags-cloud .tag-item i {
    font-size: 11px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.article-tags .tags-cloud .tag-item span {
    position: relative;
    z-index: 1;
}

.article-tags .tags-cloud .tag-item:hover {
    background: linear-gradient(135deg, #f66600 0%, #ff8534 100%);
    color: #fff;
    border-color: #f66600;
    box-shadow: 0 4px 12px rgba(246, 102, 0, 0.3);
    transform: translateY(-2px);
}

.article-tags .tags-cloud .tag-item:hover i {
    opacity: 1;
    transform: rotate(-15deg);
}

/* 文章导航 */
.article-navigation {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.article-navigation .nav-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.article-navigation .nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.article-navigation .nav-item:hover {
    background: #fff;
    border-color: #f66600;
    box-shadow: 0 4px 12px rgba(246, 102, 0, 0.1);
    transform: translateY(-2px);
}

.article-navigation .nav-item.disabled {
    opacity: 0.5;
    cursor: default;
    background: #f8fafc;
}

.article-navigation .nav-item.disabled:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.article-navigation .nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    color: #f66600;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.article-navigation .nav-item:hover .nav-icon {
    background: #f66600;
    color: #fff;
}

.article-navigation .nav-content {
    flex: 1;
    min-width: 0;
}

.article-navigation .nav-label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 500;
}

.article-navigation .nav-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.article-navigation .nav-item:hover .nav-title {
    color: #f66600;
}

.article-navigation .nav-next {
    text-align: right;
}

.article-navigation .nav-next .nav-content {
    text-align: right;
}

/* 全站文章推荐 */
.article-recommended {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.article-recommended .recommended-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-recommended .recommended-title i {
    color: #f66600;
    font-size: 18px;
}

/* 全站推荐使用文章分类页的 article-list 样式 */
/* 覆盖文章分类页的样式，改为2列网格布局 */
.article-recommended .article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 0;
}

/* 文章卡片样式 */
.article-recommended .article-item {
    margin-bottom: 0;
}

.article-recommended .article-item .article-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.article-recommended .article-item .article-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.article-recommended .article-item .article-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.article-recommended .article-item .article-icon i {
    font-size: 22px;
    color: #64748b;
}

.article-recommended .article-item .article-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.article-recommended .article-item .article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-recommended .article-item .article-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    width: 0;
}

.article-recommended .article-item .article-title {
    font-size: 16px;
    font-weight: 600;
    color: #f66600;
    margin: 0 0 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.article-recommended .article-item .article-link:hover .article-title {
    color: #d45a00;
}

.article-recommended .article-item .article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #94a3b8;
}

.article-recommended .article-item .meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-recommended .article-item .meta-date i {
    font-size: 12px;
    color: #94a3b8;
}

.article-recommended .article-item .meta-views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-recommended .article-item .meta-views i {
    font-size: 12px;
    color: #94a3b8;
}

/* 常见问题样式 */
.article-main .faq-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    padding-bottom: 0;
}

.article-main .faq-section .recommended-title {
    margin-bottom: 8px;
}

.article-main .faq-section .recommended-title i {
    color: #f66600;
    font-size: 18px;
}

.article-main .faq-section .section-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px;
}

.article-main .faq-section .faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.article-main .faq-section .faq-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-main .faq-section .faq-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-main .faq-section .faq-item:hover {
    border-color: #f66600;
    box-shadow: 0 2px 8px rgba(246, 102, 0, 0.1);
}

.article-main .faq-section .faq-item.active {
    border-color: #f66600;
    box-shadow: 0 4px 12px rgba(246, 102, 0, 0.15);
}

.article-main .faq-section .faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.article-main .faq-section .faq-question:hover {
    background: #f8fafc;
}

.article-main .faq-section .faq-question span {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    line-height: 1.5;
}

.article-main .faq-section .faq-item.active .faq-question span {
    color: #f66600;
}

.article-main .faq-section .faq-question i {
    color: #94a3b8;
    font-size: 14px;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.article-main .faq-section .faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #f66600;
}

.article-main .faq-section .faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.article-main .faq-section .faq-item.active .faq-answer {
    padding: 0 20px 16px;
    max-height: 1000px;
}

.article-main .faq-section .faq-answer p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

/* 侧边栏 */
.article-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: #f66600;
}

/* 作者卡片 */
.author-card .author-info {
    text-align: center;
    margin-bottom: 20px;
}

.author-card .author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.author-card .author-name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}

.author-card .author-bio {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.author-card .author-stats {
    display: flex;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.author-card .stat-item {
    text-align: center;
}

.author-card .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #f66600;
}

.author-card .stat-label {
    font-size: 13px;
    color: #94a3b8;
}

/* 相关文章 */
.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-list li {
    margin-bottom: 12px;
}

.related-list li:last-child {
    margin-bottom: 0;
}

.related-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-list a:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.related-list .related-title {
    flex: 1;
    font-size: 14px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.related-list a:hover .related-title {
    color: #f66600;
}

.related-list .related-date {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

/* 分类列表 */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories-list li {
    margin-bottom: 8px;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.categories-list a:hover {
    background: #f8fafc;
}

.categories-list .cat-name {
    font-size: 14px;
    color: #334155;
}

.categories-list a:hover .cat-name {
    color: #f66600;
}

.categories-list .cat-count {
    font-size: 12px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .article-layout {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }
    
    /* 中等屏幕常见问题改为单列 */
    .article-main .faq-section .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .article-single-page {
        padding: 12px 0 20px;
    }
    
    .article-main {
        padding: 24px;
        border-radius: 12px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-info {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .article-content h2 {
        font-size: 20px;
    }
    
    .article-content h3 {
        font-size: 18px;
    }
    
    .article-navigation .nav-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .article-navigation .nav-next .nav-content {
        text-align: left;
    }
    
    /* posts-grid 响应式样式已在 category.css 中定义 */
    
    .article-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* 移动端全站推荐改为单列 */
    .article-recommended .article-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* 移动端常见问题改为单列 */
    .article-main .faq-section .faq-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .article-main .faq-section .faq-column {
        gap: 12px;
    }
    
    .article-main .faq-section .faq-question {
        padding: 14px 16px;
    }
    
    .article-main .faq-section .faq-question span {
        font-size: 14px;
    }
    
    .article-main .faq-section .faq-item.active .faq-answer {
        padding: 0 16px 14px;
    }
    
    .article-navigation .nav-item {
        padding: 16px;
    }
    
    .article-navigation .nav-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
