#recent-posts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center
}

#recent-posts .post {
  flex: 1 1 calc(25% - 20px);
  box-sizing: border-box;
}

/* If there are 3 posts */
#recent-posts.posts-count-3 .post {
  flex: 1 1 calc(33.333% - 20px);
}

/* single post */
#recent-posts .post {
  display: inline-flex;
  flex-direction: column;
  text-align: center;
  margin-bottom: 1em;
}
#recent-posts .post p {
  font-size: .9rem
}
#recent-posts .post h2.entry-title {
  font-size: 1.2rem;
}

@media screen and (min-width: 798px) {
	#recent-posts .post {
		min-height: 480px;
	}
}
@media screen and (max-width: 797px) {
	#recent-posts {
		flex-direction: column
	}
}