/* === FILTER BUTTONS & PAGER BUTTONS === */
.filter-buttons,
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.2rem;
}

.filter-buttons {
  margin-bottom: 0;
}

.pager {
  margin-top: 0.2rem;
}

.filter-buttons button,
.pager button {
  background: #e2e8f0;
  color: #1d4f91;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.pager button {
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
}

.filter-buttons button:hover,
.filter-buttons button.active,
.pager button:hover,
.pager button.active {
  background: #1d4f91;
  color: #fff;
}

.filter-buttons button:focus,
.pager button:focus {
  outline: 3px solid #1d4f91;
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .filter-buttons {
    gap: 0.2rem;
  }

  .filter-buttons button {
    width: auto;
    padding: 0.4rem 0.8rem;
  }
}

/* === POST LIST === */
.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 1024px) {
  .post-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === POST ITEM === */
.post-item {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.2rem;
  border: 1px solid #eee;
  background: #fff;
}

.post-item img {
  display: block;
  flex-shrink: 0;
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.post-text {
  flex: 1;
  min-width: 0;
  padding: 0 0.5rem 0.5rem 0.5rem;
}

.post-text h2 {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.post-text h2 a {
  color: #111;
  text-decoration: none;
}

.post-text h2 a:hover,
.post-text h2 a:focus {
  color: #1d4f91;
  text-decoration: underline;
  outline: none;
}

.post-text small {
  color: #555;
  font-size: 0.6rem;
  font-weight: 400;
}

/* === DESKTOP: Post item vertikal === */
@media (min-width: 1024px) {
  .post-item {
      text-align: left;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
      padding: 0.2rem;
      border: 1px solid #eee;
      background: #fff;
  }

  .post-item img {
    width: 150px;
    height: 110px;
  }

  .post-text {
    width: 100%;
  }

  .post-text h2,
  .post-text small {
    text-align: left;
  }
}