/* Enhanced Post Grid Layout */
.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-gap: 1.2em;
  margin-bottom: 1.5em;
}

.grid__item {
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
  background-color: #fff;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5em;
}

.grid__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.grid__item .archive__item {
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.grid__item .archive__item-teaser {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.grid__item .archive__item-teaser img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.grid__item .archive__item-content {
  padding: 1em;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.grid__item .archive__item-title {
  margin-top: 0;
  font-size: 1em;
  line-height: 1.25;
  margin-bottom: 0.4em;
}

.grid__item .archive__item-excerpt {
  font-size: 0.85em;
  line-height: 1.4;
  color: #555;
  flex-grow: 1;
}

.grid__item .read-more {
  font-size: 0.75em;
  margin-top: 0.6em;
}

.grid__item .read-more-link {
  color: #2a7ae2;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.grid__item .read-more-link:hover {
  border-bottom: 1px solid #2a7ae2;
}

.grid__item .page__meta {
  margin-top: 0.7em;
  font-size: 0.75em;
  color: #777;
}

.grid__item .post-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 3px;
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .entries-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 1.5em;
  }
  
  .grid__item .archive__item-teaser {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .entries-grid {
    grid-template-columns: 1fr;
    grid-gap: 1.5em;
  }
}

/* Animation for new posts */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.entries-grid .grid__item {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.entries-grid .grid__item:nth-child(2) { animation-delay: 0.1s; }
.entries-grid .grid__item:nth-child(3) { animation-delay: 0.2s; }
.entries-grid .grid__item:nth-child(4) { animation-delay: 0.3s; }
.entries-grid .grid__item:nth-child(5) { animation-delay: 0.4s; }
.entries-grid .grid__item:nth-child(6) { animation-delay: 0.5s; }
