/* Posts Archive Widget Styles */
.posts-archive-widget {
  width: 100%;
}

.posts-archive-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

/* Responsive Grid */
@media (max-width: 1024px) {
  .posts-archive-grid {
    grid-template-columns: repeat(var(--columns-tablet, 2), 1fr);
  }
}

@media (max-width: 768px) {
  .posts-archive-grid {
    grid-template-columns: repeat(var(--columns-mobile, 1), 1fr);
    gap: 20px;
  }
}

/* Post Item */
.post-item {
  display: flex;
  flex-direction: column;
}

/* Post Thumbnail */
.post-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

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

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

.post-thumbnail a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Post Content */
.post-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-title {
  margin: 15px 0 15px 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
}

.post-title a {
  color: #000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-excerpt {
  margin: 0 0 15px 0;
  color: #000;
  line-height: 1.6;
  flex-grow: 1;
}

.post-read-more {
  display: inline-block;
  color: #000;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  margin-top: auto;
}

.post-read-more:hover {
  color: #000;
}

/* Pagination */
.posts-pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.posts-pagination .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  background: #fff;
  color: #212c3e;
  text-decoration: none;

  transition: all 0.3s ease;
}

.posts-pagination .page-numbers:hover,
.posts-pagination .page-numbers.current {
  background: #212c3e;
  color: #fff;
}

.posts-pagination .page-numbers.prev,
.posts-pagination .page-numbers.next {
  font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .post-content {
    padding: 15px;
  }

  .post-title {
    font-size: 18px;
  }

  .posts-pagination .page-numbers {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .post-item {
    background: #1a1a1a;
    border: 1px solid #333;
  }

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

  .post-excerpt {
    color: #ccc;
  }

  .posts-pagination .page-numbers {
    background: #333;
    color: #fff;
  }

  .posts-pagination .page-numbers:hover,
  .posts-pagination .page-numbers.current {
    background: #007cba;
  }
}

/* Animation for loading */
.post-item {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animation for multiple items */
.post-item:nth-child(1) {
  animation-delay: 0.1s;
}
.post-item:nth-child(2) {
  animation-delay: 0.2s;
}
.post-item:nth-child(3) {
  animation-delay: 0.3s;
}
.post-item:nth-child(4) {
  animation-delay: 0.4s;
}
.post-item:nth-child(5) {
  animation-delay: 0.5s;
}
.post-item:nth-child(6) {
  animation-delay: 0.6s;
}
