.related-posts {
  margin-top: 2em;
}

.related-posts h3 {
  font-size: 1.5em;
  margin-bottom: 1em;
  text-align: center;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5em;
  justify-content: center;      
  justify-items: center;        
  max-width: 1200px;            
  margin: 0 auto;               
  align-items: stretch; 
}

.related-post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  min-width: 250px;       
  margin: 0 auto;         
  display: flex;
  flex-direction: column;
}

.related-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.related-post-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.related-post-thumb img {
  width: 100%;
  object-fit: cover;
}

.related-post-content {
  padding-left: 1em;
  padding-right: 1em;
  flex-grow: 1;
}

.related-post-content h4 {
  font-size: 1.1em;
  margin-bottom: 0.5em;
  color: #222;
}

.related-post-content p {
  color: #555;
  font-size: 0.95em;
  line-height: 1.4em;
  margin: 0;
}

@media (max-width: 768px) {
  .related-post-card {
    max-width: 90%;
  }
}
