/*
 * BLOG.CSS
 * Styles for the blog index page layout.
 */

.blog-intro {
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.blog-intro h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-intro p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.8;
}

.blog-list-section {
    padding: 4rem 0;
}

/* --- Featured Post --- */
.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
    color: var(--font-color);
    transition: box-shadow 0.3s ease;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 1rem;
}

.featured-post:hover {
    border-color: var(--border-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .featured-post:hover {
    background-color: var(--card-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.featured-post-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.featured-post-content h3 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.featured-post-content .post-meta {
    margin-bottom: 1rem;
}

.featured-post-content .post-excerpt {
    opacity: 0.8;
}

/* --- Post Grid for other articles --- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .featured-post {
        grid-template-columns: 1fr; /* Stack image and text on mobile */
    }

    .featured-post-content h3 {
        font-size: 1.5rem;
        margin-top: 1rem;
    }
}