/* css/blog.css - Styles for Blog Grid and Single Blog Posts */

/* --- Blog Grid on Homepage (id="blog-grid-container") --- */
/* This selector is already in style.css, these are enhancements or overrides */
/* If you want ALL blog grid styles here, move them from style.css */

.blog-grid { /* Used on index.html */
    display: grid;
    gap: 1.5rem;
    /* Default to 1 column, style.css media queries will make it 2 or 4 */
}

.blog-card { /* Used on index.html */
    background: var(--bg-card);
    border-radius: var(--card-radius);
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.blog-card img.blog-card-image { /* Added class for clarity */
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--separator-color); /* Subtle separator */
}
.blog-card-content {
    padding: 1.25rem; /* Slightly more padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-content h4.blog-card-title { /* Added class */
    font-size: 1.1rem; /* Slightly larger */
    font-weight: 600; /* Bolder */
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}
.blog-card-content p.blog-card-excerpt { /* Added class */
    font-size: 0.9rem; /* Slightly larger */
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1; /* Allows excerpt to take space if title is short */
}
.blog-card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: auto; /* Pushes meta to bottom of card content */
    padding-top: 0.5rem;
    border-top: 1px solid var(--separator-color);
    opacity: 0.8;
}


/* --- Single Blog Post Page (blogX.html) --- */
.blog-post-main {
    padding: 2rem 0; /* Vertical padding for the main content area of a blog post */
}

.blog-article { /* The .container class will handle max-width and horizontal padding */
    background-color: var(--bg-card);
    padding: 2rem 2.5rem; /* Padding inside the article card */
    border-radius: var(--card-radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.blog-article-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--separator-color);
}

.blog-article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.blog-article-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.blog-article-meta .author-name {
    font-weight: 500;
    color: var(--text-primary);
}
.blog-article-meta .separator {
    margin: 0 0.5em;
}

.blog-feature-image {
    width: 100%;
    max-height: 450px; /* Limit feature image height */
    object-fit: cover;
    border-radius: calc(var(--card-radius) / 2);
    margin-top: 1rem; /* Space above image if meta is short */
    margin-bottom: 2rem; /* Space below feature image */
}

.blog-article-content {
    font-size: 1.05rem; /* Comfortable reading size */
    line-height: 1.8;
    color: var(--text-primary); /* Slightly softer than pure black if text-primary is very dark */
}

.blog-article-content p {
    margin-bottom: 1.5em;
}

.blog-article-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 1em;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.3em;
    display: inline-block; /* Make border only as wide as text */
}
.blog-article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: var(--text-primary);
}

.blog-article-content ul,
.blog-article-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em; /* Indent list items */
}
.blog-article-content li {
    margin-bottom: 0.5em;
}

.blog-article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-article-content figure {
    margin: 2em 0;
    text-align: center;
}
.blog-article-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--card-radius) / 2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.blog-article-content figure figcaption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5em;
    font-style: italic;
}

.blog-article-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.blog-article-content a:hover {
    text-decoration: underline;
}

.blog-article-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--separator-color);
    text-align: center;
}
.btn-back-to-blog {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.btn-back-to-blog:hover {
    background-color: color-mix(in srgb, var(--primary-color) 85%, black);
}


@media (max-width: 767px) {
    .blog-article {
        padding: 1.5rem;
    }
    .blog-article-title {
        font-size: 1.8rem;
    }
    .blog-article-meta {
        font-size: 0.8rem;
    }
    .blog-feature-image {
        max-height: 300px;
        margin-bottom: 1.5rem;
    }
    .blog-article-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    .blog-article-content h2 {
        font-size: 1.5rem;
    }
    .blog-article-content h3 {
        font-size: 1.3rem;
    }
}