/* Blog Listing Page Styles */

/* Hero Section */
.blog-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.03) 0%, rgba(124, 58, 237, 0.02) 100%);
    border-bottom: 1px solid var(--border-light);
}

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

.blog-hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Blog Listing */
.blog-listing {
    padding: 80px 0;
    min-height: 60vh;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

/* Post Card */
.post-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.post-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.meta-separator {
    color: var(--border-color);
}

.post-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 12px;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--accent-primary);
}

.post-summary {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: auto;
}

.read-more:hover {
    gap: 10px;
    color: var(--accent-secondary);
}

.read-more svg {
    transition: transform 0.2s ease;
}

.read-more:hover svg {
    transform: translateX(2px);
}

/* No Posts State */
.no-posts {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.no-posts p {
    font-size: 18px;
}

/* Newsletter CTA Section */
.blog-cta-section {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.05) 0%, rgba(124, 58, 237, 0.03) 100%);
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

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

.blog-cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.blog-cta-content > p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 100px 0 40px;
    }

    .blog-hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .blog-listing {
        padding: 60px 0;
    }

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

    .post-title {
        font-size: 22px;
    }

    .blog-cta-section {
        padding: 60px 0;
    }

    .blog-cta-content h2 {
        font-size: 28px;
    }

    .blog-cta-content > p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .post-card {
        border-radius: 12px;
    }

    .post-content {
        padding: 20px;
    }

    .post-title {
        font-size: 20px;
    }

    .post-summary {
        font-size: 15px;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    .post-card,
    .post-image,
    .read-more,
    .read-more svg {
        transition: none;
    }

    .post-card:hover {
        transform: none;
    }

    .post-card:hover .post-image {
        transform: none;
    }
}

/* Loading skeleton for images */
.post-image-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-accent) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.post-image-link {
    position: relative;
}

.post-image {
    position: relative;
    z-index: 2;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
