.listpage {
  background-color: #f6f4f2;
  padding: 106px 0;
  width: 100%;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 3%;
  row-gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1240px;
  justify-content: center;
}

.category-list li {
  width: 20%;
  height: 55px;
}

.category-list li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 18px;
  background-color: #4b4138;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.category-list li a:hover {
  opacity: 0.8;
}

.category-list li a.current-cat {
  background-color: #fff;
  color: #4b4138;
  border: 1px solid #4b4138;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
  gap: 60px;
  margin: 77px auto;
  max-width: 1100px;
}

.post-card {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 6%;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.post-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover; 
}

.post-meta {
  padding: 0;
  font-size: 0.9rem;
  color: #777;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-category {
  font-weight: bold;
  color: #FFF;
  font-size: 15px;
  background-color: #4b4138;
  width: 160px;
  padding: 2% 0;
  display: inline-block;
  text-align: center;
  border-radius: 5px;
}

.post-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin: 12px 0 6px 0;
}

.post-excerpt {
  padding-top: 10px;
  margin-top: 5px;
  font-size: 1rem;
  color: #555;
  border-top: 1px solid #4b4138;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
}

.pagination a, .pagination span {
  display: inline-block;
  margin: 0 5px;
  text-align: center;
  border-radius: 5px;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid #4b4138; 
  width: 25px;
  height: 25px;
}

.pagination .current {
  background-color: #4b4138; /* 現在のページ背景色 */
  color: #fff; /* 現在のページの文字色を白に */
}

/* 現在のページ以外のリンク */
.pagination a {
  background-color: #fff; /* 背景色は白 */
  color: #4b4138; /* 文字色は青 */
}

/* ホバー時 */
.pagination a:hover {
  background-color: #4b4138; /* ホバー時の背景色 */
  color: #fff; /* 文字色を白に */
}

/* 最初と最後のページのリンク（省略されないように） */
.pagination .first, .pagination .last {
  padding: 10px 20px;
}

@media screen and (max-width: 480px) {
  .listpage {
    margin-top: 20%;
  }
  
  .category-list li {
    width: 70%;
  }
  
  .post-card {
    margin: 0 30px;
  }

}