/**
 * Knowledge Page Styles
 * 知识中心页面样式
 */

/* ========================================
   Site Header - 通用头部样式
======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
}

.site-header .container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header .main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-header .logo img {
    height: 40px;
    width: auto;
}

.site-header .logo span {
    font-size: 18px;
    font-weight: 600;
    color: #1a365d;
}

.site-header .nav-menu {
    display: flex;
    list-style: none;
    gap: 36px;
    margin: 0;
    padding: 0;
}

.site-header .nav-menu li a {
    font-size: 15px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 0;
    position: relative;
}

.site-header .nav-menu li a:hover {
    color: #2C5F8D;
}

.site-header .nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2C5F8D;
    transition: width 0.2s;
}

.site-header .nav-menu li a:hover::after {
    width: 100%;
}

.site-header .nav-actions .btn-primary {
    background: #2C5F8D;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.site-header .nav-actions .btn-primary:hover {
    background: #1a4a6e;
}

.site-header .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.site-header .mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #374151;
    transition: all 0.3s;
}

/* 移动端导航 */
@media (max-width: 768px) {
    .site-header .nav-menu {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .site-header .nav-menu.active {
        display: flex;
    }

    .site-header .nav-menu li a {
        padding: 15px 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .site-header .nav-actions {
        display: none;
    }

    .site-header .mobile-menu-toggle {
        display: flex;
    }
}

/* ========================================
   Site Footer - 通用底部样式
======================================== */
.site-footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    padding: 60px 0 0;
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer .footer-brand img {
    width: 48px;
    height: 48px;
}

.site-footer .footer-brand h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.site-footer .footer-brand p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.site-footer .footer-links h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
}

.site-footer .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-links li {
    margin-bottom: 10px;
}

.site-footer .footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.site-footer .footer-links a:hover {
    color: #fff;
}

.site-footer .footer-contact h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
}

.site-footer .footer-contact p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-footer .footer-contact i {
    width: 16px;
    color: #64748b;
}

.site-footer .social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.site-footer .social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s;
}

.site-footer .social-links a:hover {
    background: #2C5F8D;
    color: #fff;
}

.site-footer .footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.site-footer .footer-bottom p {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 8px;
}

.site-footer .footer-bottom a {
    color: #64748b;
    text-decoration: none;
}

.site-footer .footer-bottom a:hover {
    color: #94a3b8;
}

/* 移动端底部响应式 */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 0;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .site-footer .footer-brand {
        text-align: center;
        align-items: center;
    }

    .site-footer .footer-links,
    .site-footer .footer-contact {
        text-align: center;
    }

    .site-footer .footer-contact p {
        justify-content: center;
    }

    .site-footer .social-links {
        justify-content: center;
    }
}

/* ========================================
   Main Content - 主内容区域（避免被固定头部遮挡）
======================================== */
main {
    padding-top: 0; /* Hero 区域会自己处理 padding */
}

/* 知识中心通用样式 */
.knowledge-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
    padding: 100px 0 60px;
    color: #fff;
}

.knowledge-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.knowledge-hero .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.knowledge-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.knowledge-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 文章内容区域 */
.knowledge-content {
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}

.knowledge-content .container {
    max-width: 800px;
}

.knowledge-content h2 {
    color: #1a365d;
    margin: 2.5rem 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.knowledge-content h3 {
    color: #334155;
    margin: 1.5rem 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.knowledge-content p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.knowledge-content ul,
.knowledge-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #475569;
}

.knowledge-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.knowledge-content strong {
    color: #1e293b;
    font-weight: 600;
}

.knowledge-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #64748b;
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* 相关文章区域 */
.related-articles {
    background: #f8fafc;
    padding: 60px 0;
}

.related-articles h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a365d;
    font-size: 1.75rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.related-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.related-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.related-card h3 a {
    color: #1a365d;
    text-decoration: none;
    transition: color 0.2s;
}

.related-card h3 a:hover {
    color: #2563eb;
}

.related-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* CTA 区域 */
.cta-section {
    background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
    padding: 60px 0;
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-section .btn {
    background: #00a6fb;
    color: #fff;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.2s;
}

.cta-section .btn:hover {
    background: #0095e0;
    transform: translateY(-2px);
}

/* 知识中心列表页 */
.knowledge-list {
    padding: 60px 0;
}

.knowledge-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.article-card h3 a {
    color: #1a365d;
    text-decoration: none;
}

.article-card .article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.article-card .article-summary {
    color: #64748b;
    line-height: 1.6;
}

.article-card .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.article-card .tag {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .knowledge-hero {
        padding: 80px 20px 40px;
    }

    .knowledge-hero h1 {
        font-size: 1.6rem;
    }

    .knowledge-content {
        padding: 40px 20px;
    }

    .knowledge-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .related-articles {
        padding: 40px 0;
    }

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

/* 社交分享浮动按钮 */
.social-share-float {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.share-weibo {
    background: #e6162d;
}

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

/* 微信二维码弹窗 */
.wechat-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.wechat-qr-content {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.wechat-qr-content .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .social-share-float {
        right: 10px;
        bottom: 80px;
        top: auto;
        transform: none;
    }

    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
