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


.related-posts h2 {
  font-size: 1.5em;
  margin-bottom: 1em;
  text-align: center;
}

.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(190px, 1fr));
  gap: 0.2em;
  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: 190px;
  margin: 0 auto;
  border: 1px solid black;
}

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

.related-post-card a {
  text-decoration: none;
  height: 100%;
  flex-grow: 1;
}

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

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

.related-post-content h3 {
  font-size: inherit;
    /* color: #1C668A;  */
    color: #4A4063;
    text-decoration: none;
    font-weight: 600;
    text-align: left;
}

.related-post-card h3:hover {
    /* color: #E76F51; */
    color: #4A4063;
    text-decoration: underline;
    font-weight: 600;
}

.related-post-content .titleh3 {
  font-size: inherit;
    /* color: #1C668A;  */
    color: #4A4063;
    text-decoration: none;
    font-weight: 600;
    text-align: left;
}

.related-post-card .titleh3:hover {
    /* color: #E76F51; */
    color: #4A4063;
    text-decoration: underline;
    font-weight: 600;
}



.related-post-content p {
    font-size: 0.8em;
}

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