/* Blog-specific styles */

.blog-header {
    padding: 120px 20px 80px;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.blog-header .container {
    position: relative;
    z-index: 1;
}

.blog-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    color: #000;
    letter-spacing: -0.02em;
}

.blog-subtitle {
    font-size: 1.3rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
    font-weight: 400;
}

.blog-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent 0%, white 100%);
    pointer-events: none;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid #eaeaea;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-stat {
    text-align: center;
}

.blog-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 8px;
    line-height: 1;
}

.blog-stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.blog-categories {
    padding: 40px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.category-pills {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-pill {
    padding: 10px 24px;
    border-radius: 25px;
    border: 2px solid #dee2e6;
    background: white;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-pill:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.category-pill.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.blog-posts {
    padding: 80px 20px;
    background: white;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.blog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.blog-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-tag.troubleshooting {
    background: #fff3cd;
    color: #856404;
}

.blog-tag.security {
    background: #f8d7da;
    color: #721c24;
}

.blog-tag.performance {
    background: #d1ecf1;
    color: #0c5460;
}

.blog-tag.tutorials {
    background: #d4edda;
    color: #155724;
}

.blog-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #212529;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: #667eea;
}

.blog-card-excerpt {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.read-time {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.read-time::before {
    content: '📖';
    margin-right: 6px;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #764ba2;
    transform: translateX(3px);
}

.blog-cta {
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cta-box {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

.cta-box h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.cta-box p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    line-height: 1.6;
}

/* Article Page Styles */
.article-header {
    padding: 100px 20px 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.article-meta {
    max-width: 800px;
    margin: 0 auto 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0.9;
}

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

.article-title {
    font-size: 3rem;
    font-weight: 700;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.2;
    text-align: center;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #212529;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
    color: #212529;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #212529;
}

.article-content p {
    margin-bottom: 20px;
    color: #212529;
}

.article-content a {
    color: #667eea;
    text-decoration: underline;
}

.article-content a:hover {
    color: #764ba2;
}

.article-content ul,
.article-content ol {
    margin-bottom: 25px;
    padding-left: 30px;
    color: #212529;
}

.article-content li {
    margin-bottom: 12px;
    color: #212529;
}

.article-content code {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #e83e8c;
}

.article-content pre {
    background: #f4f4f4 !important;
    color: #000000 !important;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 25px;
    border: 1px solid #e1e4e8;
}

.article-content pre code {
    background: none !important;
    color: #000000 !important;
    padding: 0;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9em;
}

.article-content pre *,
.article-content pre code * {
    color: #000000 !important;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 1rem;
}

.article-content table th,
.article-content table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
    color: #212529;
}

.article-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

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

.article-content table code {
    font-size: 0.85em;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
    color: #856404 !important;
}

.warning-box * {
    color: #856404 !important;
}

.warning-box strong {
    color: #856404 !important;
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.warning-box p,
.warning-box ul,
.warning-box ol,
.warning-box li {
    color: #856404 !important;
}

.warning-box a {
    color: #856404 !important;
    text-decoration: underline;
    font-weight: 600;
}

.warning-box code {
    background: #fff;
    color: #856404 !important;
}

.info-box {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
    color: #0c5460 !important;
}

.info-box * {
    color: #0c5460 !important;
}

.info-box strong {
    color: #0c5460 !important;
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.info-box p,
.info-box ul,
.info-box ol,
.info-box li {
    color: #0c5460 !important;
}

.info-box a {
    color: #0c5460 !important;
    text-decoration: underline;
    font-weight: 600;
}

.info-box code {
    background: #fff;
    color: #0c5460 !important;
}

.success-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
    color: #155724 !important;
}

.success-box * {
    color: #155724 !important;
}

.success-box strong {
    color: #155724 !important;
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.success-box p,
.success-box ul,
.success-box ol,
.success-box li {
    color: #155724 !important;
}

.success-box a {
    color: #155724 !important;
    text-decoration: underline;
    font-weight: 600;
}

.success-box code {
    background: #fff;
    color: #155724 !important;
}

.article-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin: 60px 0;
    text-align: center;
}

.article-cta h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: white;
}

.article-cta p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.95;
}

.article-cta .btn-primary {
    background: white;
    color: #667eea;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.article-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Featured Badge Styles */
.blog-card.featured {
    border: 2px solid #667eea;
    background: linear-gradient(to bottom, #f8f9ff 0%, #ffffff 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.blog-card.featured:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.25);
}

.featured-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-left: auto;
}

.blog-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-header {
        padding: 80px 20px 60px;
    }

    .blog-title {
        font-size: 2.2rem;
    }

    .blog-subtitle {
        font-size: 1.05rem;
    }

    .blog-stats {
        flex-direction: column;
        gap: 32px;
    }

    .blog-stat-number {
        font-size: 1.8rem;
    }

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

    .article-title {
        font-size: 2rem;
    }

    .article-content h2 {
        font-size: 1.6rem;
    }

    .cta-box h2 {
        font-size: 1.8rem;
    }

    .featured-badge {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
}
