/* GDNOS 博客页面专用样式 */

/* ==================== 博客Hero区域 ==================== */
.blog-hero {
    min-height: 50vh;
    background: var(--gradient-dark);
    position: relative;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(232,135,42,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(15,52,96,0.3) 0%, transparent 50%);
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-badge {
    display: inline-block;
    background: rgba(232,135,42,0.2);
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.blog-hero h1 {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.blog-hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ==================== 博客列表区域 ==================== */
.blog-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ==================== 博客卡片 ==================== */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: var(--transition-default);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--highlight);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #888;
}

.blog-card-date::before {
    content: '📅 ';
}

.blog-card-readtime::before {
    content: '⏱ ';
}

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--highlight);
}

.blog-card-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.blog-card-tags .tag {
    background: #f0f2f5;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.blog-card-link {
    display: inline-block;
    color: var(--highlight);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.blog-card-link:hover {
    transform: translateX(5px);
}

/* ==================== 文章详情页样式 ==================== */
.article-page {
    padding-top: 80px;
}

.article-hero {
    min-height: 45vh;
    background: var(--gradient-dark);
    position: relative;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(232,135,42,0.1) 0%, transparent 50%);
}

.article-header {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.article-category {
    display: inline-block;
    background: rgba(232,135,42,0.2);
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.article-hero h1 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.article-meta span::before {
    margin-right: 6px;
}

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.breadcrumb-nav a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-nav a:hover {
    color: var(--highlight);
}

.breadcrumb-nav span {
    color: #999;
}

.breadcrumb-nav .current {
    color: var(--highlight);
}

/* 文章内容区域 */
.article-content {
    padding: 60px 0;
    background: white;
}

.article-body {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* 文章排版 */
.article-body h2 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

.article-body h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin: 32px 0 16px;
}

.article-body h4 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin: 24px 0 12px;
}

.article-body p {
    line-height: 1.9;
    margin-bottom: 20px;
    color: #444;
}

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

.article-body li {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #444;
}

.article-body ul li::before {
    content: '•';
    color: var(--highlight);
    font-weight: bold;
    margin-right: 10px;
}

.article-body ol {
    counter-reset: item;
}

.article-body ol li::before {
    content: counter(item) '.';
    counter-increment: item;
    color: var(--highlight);
    font-weight: bold;
    margin-right: 10px;
}

/* 表格样式 */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}

.article-body th,
.article-body td {
    padding: 14px 16px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.article-body th {
    background: var(--primary-dark);
    color: white;
    font-weight: 600;
}

.article-body tr:nth-child(even) {
    background: #f8f9fa;
}

.article-body tr:hover {
    background: #f0f4f8;
}

/* 表格响应式 */
.table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.table-wrapper table {
    margin: 0;
}

/* FAQ区块 */
.faq-section {
    margin: 48px 0;
    padding: 32px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--highlight);
}

.faq-section h2 {
    margin-top: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.faq-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.faq-question::before {
    content: 'Q: ';
    color: var(--highlight);
}

.faq-answer {
    color: #555;
    line-height: 1.8;
    padding-left: 20px;
    border-left: 2px solid #ddd;
}

/* 代码块 */
.article-body pre {
    background: #1e3355;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 引用块 */
.article-body blockquote {
    background: linear-gradient(135deg, rgba(232,135,42,0.1) 0%, rgba(42,63,95,0.05) 100%);
    border-left: 4px solid var(--highlight);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
    margin-bottom: 0;
    font-style: italic;
}

/* 强调区块 */
.highlight-box {
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 100%);
    color: white;
    padding: 32px;
    border-radius: 12px;
    margin: 32px 0;
}

.highlight-box h3,
.highlight-box h4 {
    color: var(--highlight);
    margin-top: 0;
}

.highlight-box p {
    color: #e0e0e0;
}

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

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.related-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition-default);
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.related-card h4 {
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-size: 1rem;
}

.related-card p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* ==================== CTA区域 ==================== */
.cta-section {
    padding: 80px 0;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(232,135,42,0.1) 0%, transparent 60%);
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta-content p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==================== 页脚 ==================== */
.footer {
    background: #0a0a14;
    padding: 60px 0 30px;
    color: var(--text-gray);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.footer-logo span {
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-col h4 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 16px;
}

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

.footer-col ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-col ul li a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--highlight);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-hero {
        min-height: 40vh;
        padding: 120px 0 60px;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .article-body {
        padding: 30px 20px;
    }
    
    .article-hero h1 {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
