.wp-block-category-posts {
  margin: 2rem 0;
}

.category-posts-header {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.75rem;
}

.category-posts-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a202c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-count {
  font-size: 0.875rem;
  font-weight: 400;
  color: #718096;
  background: #f7fafc;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.category-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.category-post-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.25rem;
}

.post-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.post-title a {
  color: #2d3748;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: #3182ce;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: #718096;
}

.post-date,
.post-author {
  display: flex;
  align-items: center;
}

.post-excerpt {
  color: #4a5568;
  line-height: 1.6;
  font-size: 0.9rem;
}

.no-posts-message {
  text-align: center;
  color: #718096;
  font-style: italic;
  padding: 2rem;
  background: #f7fafc;
  border-radius: 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .category-posts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-posts-title {
    font-size: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .post-content {
    padding: 1rem;
  }

  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .category-posts-title {
    color: #f7fafc;
  }

  .category-post-item {
    background: #2d3748;
    border-color: #4a5568;
  }

  .post-title a {
    color: #f7fafc;
  }

  .post-title a:hover {
    color: #63b3ed;
  }

  .post-excerpt {
    color: #cbd5e0;
  }

  .no-posts-message {
    background: #4a5568;
    color: #cbd5e0;
  }
}
