.custom-posts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.custom-post-item {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 5px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.custom-post-item:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: 0.3s;
  transform: scale(1.1);
}

.custom-post-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.custom-post-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff !important;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 4px;
  text-align: center;
  z-index: 2;
  font-size: 1.2rem !important;
}

/* Single Post Template */
.post-center-wrapper {
  margin: 0 auto;
  padding: 0 20px; /* ewentualny odstęp od krawędzi */
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.custom-post-details {
  h2 {
    font-size: 1.5rem;
    margin: 20px 0;
  }
}

@media screen and (max-width: 768px) {
  .custom-posts-container {
    margin: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .custom-post-item {
    width: 100%;
    height: 200px;
  }

  .custom-post-details {
    h2 {
      font-size: 1.5rem;
    }
  }
}
