/* ============================================
   Card Grid (Posts)
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 992px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Post Card */
.post-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.post-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-card-img {
  transform: scale(1.03);
}

.post-card-img-wrapper {
  overflow: hidden;
  height: 180px;
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title:hover {
  color: var(--primary-light);
}

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.post-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.post-card-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(41, 170, 221, 0.08);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
}

[data-theme="dark"] .post-card-tag {
  background: rgba(79, 209, 197, 0.12);
}

/* Post Card Animations */
.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }
.post-card:nth-child(7) { animation-delay: 0.7s; }
.post-card:nth-child(8) { animation-delay: 0.8s; }
.post-card:nth-child(9) { animation-delay: 0.9s; }

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.pagination a {
  color: var(--text);
  background: var(--bg-white);
  box-shadow: var(--shadow);
}

.pagination a:hover {
  background: var(--accent);
  color: #fff;
}

.pagination .current {
  background: var(--accent);
  color: #fff;
}
