/* ========================================
   文章详情页样式
   ======================================== */

/* 文章详情页整体布局 */
.article-page {
    padding: 40px 0 60px;
    background: #f8f9fa;
}

.article-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

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

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

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, #4169E1 0%, #5a7fe8 100%);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 25px;
}

.article-meta {
    display: flex;
    gap: 25px;
    color: #888;
    font-size: 14px;
}

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

.meta-item i {
    width: 16px;
    height: 16px;
    background-size: contain;
}

.icon-date::before {
    content: "📅";
}

.icon-view::before {
    content: "👁";
}

.icon-author::before {
    content: "✍";
}

/* 文章封面图 */
.article-cover {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 文章内容 */
.article-content {
    padding: 40px 50px;
}

.article-lead {
    font-size: 17px;
    line-height: 1.9;
    color: #555;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f5 100%);
    padding: 25px 30px;
    border-left: 4px solid #4169E1;
    border-radius: 0 8px 8px 0;
    margin-bottom: 35px;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 35px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e8e8;
}

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

.article-content p {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 20px;
}

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

.article-content li {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 10px;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

.article-content strong {
    color: #1a1a2e;
    font-weight: 600;
}

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

.tag-label {
    font-size: 14px;
    color: #888;
}

.tag {
    display: inline-block;
    padding: 6px 16px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #4169E1;
    color: #fff;
}

/* 分享按钮 */
.article-share {
    padding: 20px 50px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-label {
    font-size: 14px;
    color: #888;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn.wechat {
    background: #07c160;
    color: #fff;
}

.share-btn.weibo {
    background: #e6162d;
    color: #fff;
}

.share-btn.qq {
    background: #12b7f5;
    color: #fff;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 上一篇/下一篇导航 */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #f0f0f0;
    border-top: 1px solid #f0f0f0;
}

.nav-prev,
.nav-next {
    padding: 25px 30px;
    background: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
    background: #f8f9ff;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.nav-title {
    display: block;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-prev:hover .nav-title,
.nav-next:hover .nav-title {
    color: #4169E1;
}

/* 侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

.widget-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
}

/* 作者信息 */
.author-widget {
    text-align: center;
    padding-bottom: 25px;
}

.author-info {
    padding: 25px;
}

.author-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid #4169E1;
    padding: 3px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.author-title {
    font-size: 13px;
    color: #4169E1;
    margin-bottom: 15px;
}

.author-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* 热门文章 */
.hot-list {
    list-style: none;
    padding: 15px 20px;
    margin: 0;
}

.hot-list li {
    margin-bottom: 12px;
}

.hot-list li:last-child {
    margin-bottom: 0;
}

.hot-list a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.hot-list a:hover .hot-title {
    color: #4169E1;
}

.hot-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

.hot-list li:nth-child(1) .hot-num {
    background: #ff4757;
    color: #fff;
}

.hot-list li:nth-child(2) .hot-num {
    background: #ffa502;
    color: #fff;
}

.hot-list li:nth-child(3) .hot-num {
    background: #2ed573;
    color: #fff;
}

.hot-title {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 相关推荐 */
.related-list {
    list-style: none;
    padding: 15px 20px;
    margin: 0;
}

.related-list li {
    margin-bottom: 15px;
}

.related-list li:last-child {
    margin-bottom: 0;
}

.related-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-item:hover .related-title {
    color: #4169E1;
}

.related-thumb {
    width: 90px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.related-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-title {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* 联系方式 */
.contact-list {
    padding: 20px 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
    color: #555;
}

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

.contact-item i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-phone::before {
    content: "📞";
}

.icon-qq::before {
    content: "💬";
}

.icon-wechat::before {
    content: "📱";
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1200px) {
    .article-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 25px;
    }
    
    .article-header,
    .article-content,
    .article-tags,
    .article-share {
        padding-left: 35px;
        padding-right: 35px;
    }
    
    .article-title {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .article-wrapper {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        order: 2;
    }
    
    .article-main {
        order: 1;
    }
    
    .article-cover {
        height: 300px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-content h2 {
        font-size: 20px;
    }
    
    .article-content p,
    .article-content li {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .article-page {
        padding: 20px 0 40px;
    }
    
    .article-header {
        padding: 25px 20px 20px;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .article-cover {
        height: 220px;
    }
    
    .article-content {
        padding: 25px 20px;
    }
    
    .article-lead {
        font-size: 15px;
        padding: 18px 20px;
    }
    
    .article-tags,
    .article-share {
        padding: 20px;
    }
    
    .article-nav {
        grid-template-columns: 1fr;
    }
    
    .nav-prev,
    .nav-next {
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-next {
        border-bottom: none;
    }
}
