/* ==================== 文章页样式 ==================== */

/* 文章页面 */
.article-page {
    padding: 40px 0 80px;
    background: var(--bg-gray);
}

.article-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* 文章主体 */
.article-main {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.article-header {
    margin-bottom: 32px;
    /* padding-bottom: 24px; */
    border-bottom: 1px solid var(--border-color);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.article-tag {
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(26, 92, 158, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
}

.article-date {
    font-size: 14px;
    color: var(--text-light);
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.article-author {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-gray);
}

/* 文章封面 */
.article-cover {
    margin-bottom: 32px;
    border-radius: 8px;
    overflow: hidden;
}

/* 文章内容 */
.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-dark);
}

/* 文章底部 */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.article-tags span {
    color: var(--text-gray);
}

.article-tags a {
    font-size: 13px;
    color: var(--primary-color);
    background: rgba(26, 92, 158, 0.08);
    padding: 4px 12px;
    border-radius: 4px;
    transition: var(--transition);
}

.article-tags a:hover {
    background: rgba(26, 92, 158, 0.15);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-gray);
}

.share-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    transition: var(--transition);
}

.share-btn.wechat {
    background: #07c160;
    color: #fff;
}

.share-btn.weibo {
    background: #e6162d;
    color: #fff;
}

.share-btn.qq {
    background: #1296db;
    color: #fff;
}

.share-btn:hover {
    opacity: 0.85;
}

/* 上一篇下一篇 */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 32px;
    border-top: 1px solid var(--border-color);
}

.article-prev,
.article-next {
    padding: 16px;
    background: var(--bg-gray);
    border-radius: 8px;
    transition: var(--transition);
}

.article-prev:hover,
.article-next:hover {
    background: #e8f4fc;
}

.article-prev span:first-child,
.article-next span:first-child {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.article-prev span:last-child,
.article-next span:last-child {
    font-size: 14px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 侧边栏 */
.article-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-list li {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.widget-list a {
    display: block;
}

/* 热门文章：左图右文 */
.widget-list--media .widget-item-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.widget-list--media .widget-item-link:hover .widget-item-title {
    color: var(--primary-color);
}

.widget-item-media {
    flex-shrink: 0;
    width: 88px;
    height: 66px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-gray);
}

.widget-item-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.widget-item-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-item-date {
    font-size: 12px;
    color: var(--text-light);
}

.widget-date {
    font-size: 13px;
    color: var(--text-light);
    display: block;
    margin-bottom: 8px;
}

.widget-list h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.widget-list a:hover h4 {
    color: var(--primary-color);
}

/* 侧边栏CTA */
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.sidebar-cta .widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.widget-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.6;
}

.widget-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 600;
}

.widget-phone svg {
    width: 20px;
    height: 20px;
}

/* 图片占位符 */
.img-placeholder {
    width: 100%;
    background: linear-gradient(135deg, #e8f4fc 0%, #d4e9f7 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    border: 2px dashed #ccc;
}

.img-placeholder span {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.img-placeholder small {
    font-size: 12px;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-item a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
}

.mobile-nav-item.active a {
    color: var(--primary-color);
}

/* 响应式 */
@media (max-width: 992px) {
    .article-wrapper {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .article-main {
        padding: 24px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 20px;
    }
    
    .article-nav {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        grid-template-columns: 1fr;
    }
}
