.archive-header {
  text-align: left;
  border-bottom: 1px solid #ddd;
  padding: 120px 50px 50px;
}

.archive-header .en-title {
  font-size: 5rem;
  margin: 0;
  font-family: 'houschka-pro', sans-serif;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
}

.archive-header .jp-title {
  font-size: 1.5rem;
  color: #555;
}


.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 50px 0;
}

.fillterbase {
  display: inline-block;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1em;
  width: 100%;
}

.filter-row h3 {
  margin: 0;
  margin-right: 10px;
  white-space: nowrap;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.filter-list > a,
.filter-list > .filter-item {
  background: #fff;
  padding: 5px 10px;
  border: 1px solid #777;
  font-size: 0.8em;
  color: #777;
  text-decoration: none;
  display: inline-block;
}

.filter-list a:hover {
  background: #777;
  color: #fff;
}

/* Active filter item styling */
.filter-list .filter-item.active {
  background: #333;
  color: #fff;
  border-color: #333;
  cursor: default;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  /* 3列 */
  gap: 20px;
  /* カード間の余白 */
  padding-top: 50px;
}

/* 最後のコンテンツを左寄せにする指定 */
.card-grid:after {
  content: "";
  display: block;
  width: 300px;  /* .boxに指定したwidthと同じ幅を指定する */
  height: 0;
}

.card {
  /* background-image: url('../assets/images/section-bg--right.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; */
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  /* height: 400px; */
  cursor: pointer;
  width: 300px;
  /* box-shadow: 2px 1px 4px rgba(0, 0, 0, 0.2); */
}

.card--fixed {
  height: 400px;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img {
  width: 100%;
  height: 50%;
}

.card-img img {
  width: 100%; 
  height: 100%;
  object-fit: cover;
  /* display: block; */
}

.card-body {
  height: 50%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
}

.card-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  line-clamp: 2;
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: left;
}

.card-category > p {
  font-size: 0.85rem;
  background: #eee;
  border-radius: 5px;
  padding: 5px 10px;
}

.card-tags {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 5px
}

.card-tags > p {
  background: #fff;
  padding: 5px 10px;
  border: 1px solid #777;
  font-size: 0.8em;
  color: #777;
}

.categorypage-back {
  background-color: #fff;
}

/* スマホ対応のメディアクエリ */
@media (max-width: 768px) {
  .archive-header {
    padding: 80px 20px 30px;
    text-align: center;
  }
  
  .archive-header .en-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  
  .archive-header .jp-title {
    font-size: 1.1rem;
    margin-top: 10px;
  }
  
  .container {
    width: 95%;
    padding: 30px 0;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
  }
  
  .filter-row h3 {
    font-size: 1.1rem;
    margin: 0;
    margin-bottom: 10px;
  }
  
  .filter-list {
    gap: 6px;
    justify-content: flex-start;
  }
  
  .filter-list > a,
  .filter-list > .filter-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
  }
  
  .card-grid {
    flex-direction: column;
    gap: 20px;
    padding-top: 30px;
    align-items: center;
  }
  
  .card-grid:after {
    display: none;
  }
  
  .card {
    width: 100%;
    max-width: 400px;
    height: auto;
  }
  
  .card--fixed {
    height: auto;
    min-height: 300px;
  }
  
  .card:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .card-img {
    height: 200px;
  }
  
  .card-body {
    padding: 15px;
    gap: 8px;
  }
  
  .card-title {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .card-category > p {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
  
  .card-tags {
    gap: 4px;
  }
  
  .card-tags > p {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
  
  .pagination {
    margin-top: 30px;
    text-align: center;
  }
  
  .pagination ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .pagination li {
    display: inline-block;
  }
  
  .pagination a,
  .pagination span {
    display: block;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: #fff;
  }
  
  .pagination .current {
    background: #333;
    color: #fff;
    border-color: #333;
  }
  
  .pagination a:hover {
    background: #f5f5f5;
  }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
  .archive-header {
    padding: 100px 30px 40px;
  }
  
  .archive-header .en-title {
    font-size: 3.5rem;
  }
  
  .archive-header .jp-title {
    font-size: 1.3rem;
  }
  
  .container {
    width: 95%;
    padding: 40px 0;
  }
  
  .card-grid {
    gap: 15px;
  }
  
  .card {
    width: 45%;
    max-width: 350px;
  }
  
  .card-img {
    height: 180px;
  }
  
  .card-body {
    padding: 18px;
  }
  
  .card-title {
    font-size: 1.05rem;
  }
}
