/* blog_styles.css */

/* 1. Offset the blog content so it’s not hidden by the fixed navbar */
.blog-section {
  padding-top: 0px; /* Adjust based on your navbar height */
  max-width: 800px;   /* Set a maximum width for readability */
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* 2. Top button for viewing previous posts */
.blog-top-btn {
  margin-bottom: 1rem;
  text-align: right;
}

.blog-top-btn .btn-view-all {
  display: inline-block;
  background-color: #0D47A1;
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}

.blog-top-btn .btn-view-all:hover {
  background-color: #64B5F6;
  color: #000;
}

/* 3. Latest blog post styling */
.blog-post {
  margin-bottom: 2rem;
  background-color: #fff;
  padding: 1rem;
  border-radius: 5px;
  overflow: auto; /* Ensures floated elements are contained */
}

.blog-post h3 {
  margin-top: 0;
}

/* 4. Float the top image to the right on desktop with text wrapping */
.blog-post .blog-top-image img {
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
  max-width: 300px;
  height: auto;
  display: block;
}

/* 5. On mobile, remove the float so the headline stays above the image */
@media (max-width: 768px) {
  .blog-post .blog-top-image img {
    float: none;
    margin: 0 auto 1rem auto;
    max-width: 100%;
  }
}

/* 6. Previous Posts Grid Styling */
.previous-posts {
  margin-top: 2rem;
}

.previous-posts h3 {
  margin-bottom: 1rem;
}

.previous-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.previous-post-item {
  background-color: #fff;
  padding: 1rem;
  border-radius: 5px;
  text-align: left;
}

.previous-post-item h4 {
  margin: 0.5rem 0;
  color: #0D47A1;
}

.previous-post-thumb {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.5rem;
}
