/* ============================= */
/* POSTS */
/* ============================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 2rem;
}

.post-item {
  padding: 0;
  text-align: center;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: start;
  height: 100%;
}

.post-item a {
  color: #444;
  border: 1px solid #f1f1f1;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
  display: block;
  text-decoration: none; /* No underline */
}

.post-item a:hover {
  border-color: #ddd; /* subtle border change */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* subtle shadow below */
  transform: none; /* no transform */
  text-decoration: none; /* Ensure no underline on hover */
}

/* Title styling */
.post-title {
  font-size: 18px;
  color: #585b53;
  margin-top: 0.25rem;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
  text-decoration: none; /* No underline */
  cursor: pointer; /* show pointer on hover */
}

/* Only change color when hovering title itself */
.post-title:hover {
  color: #fa7e00;
}

/* Category styling */
.post-category {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.75rem;
  text-decoration: none; /* No underline */
  cursor: default;
}

/* Intersection Observer blur effect */
.image-wrapper img.lazy-img {
  filter: blur(20px);
  transition: filter 0.3s ease;
}

.image-wrapper img.lazy-img.loaded {
  filter: blur(0);
}

.post-item .image-wrapper {
  width: 100%;
  height: 530px;
  display: flex;
  /*justify-content: center;*/
  align-items: start;
  overflow: hidden;
  position: relative;
}

.post-item img {
  width: 100%;
  /*height: 100%;*/
  /*object-fit: fill;*/
  display: block;
  /* no hover transform */
}
@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-item .image-wrapper {
    height: 400px; /* Adjust height for smaller screens */
  }
}

@media (max-width: 600px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-item .image-wrapper {
    height: 300px; /* Smaller height for mobile */
  }
}
