/* Blog Page Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adjusted min-width to allow 3 columns */
    gap: 30px;
}

@media (min-width: 992px) { /* Apply for desktop screens */
    .blog-grid {
        grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    }
}

.blog-post-preview {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden; /* Ensures image corners are rounded if image itself isn't */
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-post-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.blog-post-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency in grid */
    object-fit: cover; /* Ensures image covers the area, cropping if necessary */
    display: block; /* Ensure it behaves as a block element */
}

.blog-post-content {
    padding: 20px;
    flex-grow: 1; /* Allows content to take available space */
    display: flex;
    flex-direction: column;
}

.blog-post-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: left; /* Override general h2 centering */
}
.blog-post-title a {
    text-decoration: none !important; /* Ensure no underline */
    color: var(--primary-color-darker) !important; /* Ensure color is applied */
}
.blog-post-title a:hover {
    color: var(--primary-color);
}

.blog-post-meta {
    font-size: 0.85em;
    color: var(--text-color-light);
    margin-bottom: 15px;
}

.blog-post-excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes button to bottom */
}

.btn-small {
    padding: 8px 18px !important; /* Smaller padding for read more */
    font-size: 0.9em !important;
    align-self: flex-start; /* Align button to the left */
}

/* Single Article Page Styles */
.blog-article-full .article-header {
    text-align: center;
    margin-bottom: 30px;
}
.blog-article-full .article-header h1 {
    font-size: 2.5em; /* Larger title for single article */
    margin-bottom: 10px;
    color: var(--dark-gray);
}
.blog-article-full .article-meta {
    font-size: 0.9em;
    color: var(--text-color-light);
    margin-bottom: 20px;
}
.article-banner-image {
    width: 100%;
    max-height: 400px; /* Limit banner height */
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.article-content {
    font-size: 1.05em;
    line-height: 1.8;
}
.article-content h2 {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 15px;
    text-align: left; /* Align subheadings to left */
    color: var(--primary-color-darker);
}
.article-content p {
    margin-bottom: 20px;
}
.article-content ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}
.article-content ul li {
    margin-bottom: 10px;
}
.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
}
.article-content a:hover {
    color: var(--primary-color-darker);
}

.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}
.article-footer p {
    font-size: 0.9em;
    color: var(--text-color-light);
}
.article-footer p a {
    color: var(--primary-color);
    text-decoration: none;
}
.article-footer p a:hover {
    text-decoration: underline;
}
.article-footer .btn {
    margin-top: 15px;
}
