/* Blog Styles */

.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0 4rem;
    margin-top: 70px;
    text-align: center;
}

.blog-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.blog-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.blog-posts {
    padding: 4rem 0;
    min-height: 60vh;
}

.blog-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 1rem;
}

.filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
}

.filter-btn:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.filter-icon {
    font-size: 1.5rem;
}

.filter-label {
    white-space: nowrap;
}

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

.blog-card.hidden {
    display: none;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-readtime {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-title {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.blog-tag {
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.6rem;
}

/* Search Bar */
.blog-search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.blog-search {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.blog-search input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.blog-search input:focus {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.blog-search .search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #9ca3af;
    pointer-events: none;
}

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

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1f2937;
}

.article-content h2 {
    font-size: 2rem;
    color: #1e40af;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #1e40af;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #dc2626;
}

.article-content pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4b5563;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.article-nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.article-nav-link {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.article-nav-link:hover {
    gap: 0.8rem;
}

.back-to-blog {
    display: inline-block;
    margin: 2rem auto;
    text-align: center;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.back-to-blog:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }

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

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

    .article-content {
        font-size: 1rem;
        padding: 2rem 1rem;
    }

    .article-meta {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 5rem 0 3rem;
    }

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

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

/* Active nav link */
.nav-links a.active {
    color: #33ff33;
    font-weight: 700;
}
