/* Main container styling */
.blog-container {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
    width: calc(100% - 40px); /* Account for padding */
    max-width: 1000px;
    box-sizing: border-box; /* Include padding in width calculation */
}

.blog-container > * {
    margin: 10px; /* Adds spacing around all items */
}

.blog-container > *:first-child {
    margin-left: 0; /* Removes left margin for the first item */
}

/* Blog post styling */
.blog-post {
    flex: 1 1 calc(33.33% - 20px); /* Responsive: 3 columns on large screens */
    margin: 10px;
    box-sizing: border-box; /* Include margins in width calculation */
    background-color: #f9f9f9; /* Optional background color */
    border: 1px solid #ddd; /* Optional border */
    border-radius: 8px; /* Rounded corners for posts */
    overflow: hidden; /* Prevent content spilling outside */
    text-align: center; /* Center content inside each post */
	padding: 10px;
}

.blog-post-single {
    max-width: 1000px; 
    width: calc(100% - 40px); /* Adjust width to account for padding */
    margin: 0 auto;
    text-align: left;
    border: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
}

.blog-post img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
}

.blog-post h2 {
    font-size: 1.5em;
    margin: 10px 0;
}

.blog-post p {
    font-size: 1em;
    color: #555;
    text-align: left; /* Fix alignment for blog post excerpts */
}

.blog-post a {
    display: inline-block;
    margin-top: 10px;
    color: #007BFF;
    text-decoration: none;
}

.blog-post a:hover {
    text-decoration: underline;
}

.blog-post:hover {
    background-color: #bdf4e0;
}

.blog-post-single:hover {
    background-color: #ffffff;
}

/* Link styling for blog posts */
.blog-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-post-link:hover .blog-post {
    transform: scale(1.02);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Intro and conclusion sections */
.blog-intro, .blog-conclusion {
    padding: 20px; 
    background-color: #f9f9f9; 
    border: 1px solid #ddd;
    border-radius: 5px; 
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); 
    margin-bottom: 20px; 
}

.blog-intro p, .blog-conclusion p {
    font-size: 1.1em; 
    line-height: 1.6;
    color: #333; 
}

.blog-conclusion a {
    display: inline-block;
    margin-top: 10px; 
    color: #ffffff; 
    text-decoration: none;
}

/* Read More button styling */
.read-more-button {
    display: inline-block;
    background-color: #004c97;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    text-align: center;
}

.read-more-button:hover {
    text-decoration: none !important;
    background-color: #2291ff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-post {
        flex: 1 1 100%; /* Switch to single column layout */
    }

    .blog-container {
        padding: 10px; /* Reduce padding on smaller screens */
        width: calc(100% - 20px); /* Prevent overflow on mobile */
    }

    .blog-post-single {
        width: calc(100% - 20px); /* Prevent overflow on mobile */
    }
}
