/* General Blog Styles */
.blog-hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 2rem;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.blog-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 50vh;
}

/* Post Card Styles */
.post-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

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

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 1rem;
}

.post-card h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.post-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Single Post Styles */
.post-main-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.post-main-content .post-header img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-main-content .post-header h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
}

.post-main-content .author-info {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.post-main-content .author-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
}

.post-main-content .post-body {
    line-height: 1.6;
}

/* Loader */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 3rem auto;
    grid-column: 1 / -1;
    justify-self: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero {
        padding: 3rem 1rem;
    }
    
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .blog-posts-container {
        padding: 1rem;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-posts-container {
        grid-template-columns: 1fr;
    }
}

/* Dark theme overrides */
[data-theme="dark"] .blog-hero h1,
[data-theme="dark"] .blog-hero p {
    color: #e5e7eb;
}

[data-theme="dark"] .post-card {
    background: #374151;
    border-color: #4b5563;
}

[data-theme="dark"] .post-card h2 {
    color: #f9fafb;
}

[data-theme="dark"] .post-full-content h1,
[data-theme="dark"] .post-full-content h2,
[data-theme="dark"] .post-full-content h3,
[data-theme="dark"] .post-full-content h4 {
    color: #f9fafb;
}

[data-theme="dark"] .post-full-content p,
[data-theme="dark"] .post-full-content li {
    color: #d1d5db;
}

[data-theme="dark"] .author-info {
    border-color: #4b5563;
}

[data-theme="dark"] .author-info strong {
    color: #f9fafb;
}

/* Dark mode fallback content styling */
[data-theme="dark"] .fallback-content h2 {
    color: #f9fafb;
}

[data-theme="dark"] .fallback-content p {
    color: #d1d5db;
}

[data-theme="dark"] .fallback-card {
    background: #374151;
    border-color: #4b5563 !important;
}

[data-theme="dark"] .fallback-card h3 {
    color: #f9fafb !important;
}

[data-theme="dark"] .fallback-card p {
    color: #d1d5db !important;
}

[data-theme="dark"] .fallback-content a {
    color: #818cf8 !important;
} 