/* Related Posts Section */
.related-posts {
    margin-top: 3rem;
    padding: 2rem 0 1rem 0; /* Consistent padding */
    background-color: #ffffff; /* Slight background difference */
}

/* Apply site-container padding within related posts */
.related-posts-container {
    width: 100%; /* Take full width */
    max-width: 1170px; /* Match site max-width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    /* Match breakpoints */
}
@media (max-width: 1199px) {
    .related-posts-container {
        max-width: 992px;
    }
}
@media (max-width: 991px) {
    .related-posts-container {
        max-width: 748px;
    }
}
/* End site-container match */

.related-posts-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 1.5rem; /* Consistent gap */
}

.related-posts-placeholder {
    text-align: center;
    color: #555;
    font-style: italic;
    grid-column: 1 / -1; /* Span full grid width if no posts */
}

/* Style for potential related post cards */
.related-posts-grid .post-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    text-decoration: none; /* Remove underline from link */
    display: flex; /* Use flex for better control */
    flex-direction: column;
}

.related-posts-grid .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.09);
}

.related-posts-grid .post-card-thumbnail {
    line-height: 0; /* Remove space below image */
    position: relative; /* For potential overlays */
    overflow: hidden;
}

.related-posts-grid .post-card-thumbnail img {
    /* Styles are now in style.css: width, height, object-fit */
    display: block; /* Ensure image behaves like a block */
}

.related-posts-grid .post-card-content {
    padding: 1rem 1.25rem; /* Slightly more horizontal padding */
    flex-grow: 1; /* Allow content to fill space */
    display: flex;
    flex-direction: column;
}

.related-posts-grid .post-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0; /* Add bottom margin */
    line-height: 1.4;
    color: var(--text-color);
    /* Add ellipsis for long titles if needed */
    /* display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden; */
}

/* Optional: Add meta like date or category */
.related-posts-grid .post-card-meta {
    font-size: 0.8rem;
    color: #555;
    margin-top: auto; /* Push meta to bottom if content varies */
    padding-top: 0.5rem;
} 