@charset "utf-8";

/* 一覧ページ（/tenponaisou/case/） */
.case-archive .sec-fv {
  height: clamp(160px, 28vw, 280px);
}

@media (max-width: 768px) {
  .case-archive .sec-fv {
    height: clamp(220px, 42vw, 320px);
  }
}

.sec-case {
  margin-bottom: 60px;
}

.case-filter {
  margin: 12px 0 22px;
}

.case-filter__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.case-filter__field {
  display: grid;
  gap: 6px;
}

.case-filter__label {
  font-size: 12px;
  color: #6b7280;
  line-height: 1;
}

.case-filter__select {
  min-width: 180px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}

.case-filter__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* selectの上にラベル（12px）+ gap（6px）があるため、その分だけ下げて揃える */
  margin-top: 18px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0 14px;
  line-height: 1;
  background: #809f49;
  border-color: #809f49;
  color: #fff;
  cursor: pointer;
}

.case-filter__reset {
  height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--black);
  text-decoration: underline;
}

.case__list {
  display: grid;
  /* 絞り込み後にカードが横に伸びすぎないよう、最大幅を制限 */
  grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
  justify-content: center;
  gap: 18px;
}

.case__item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.case__thumb {
  width: 100%;
  flex: 0 0 auto;
}

.case__thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  object-fit: cover;
}

.case__txtarea {
  padding: 12px 14px 14px;
  /* 緑の帯（カード下部） */
  background: #809f49;
}

.case__h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.case__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  justify-content: center;
}

.case__tag {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  height: auto;
  border-radius: 0;
}

.case__tag + .case__tag::before {
  content: " / ";
  color: rgba(255, 255, 255, 0.8);
}

.case__empty {
  padding: 20px 0;
}

/* Pagination: blog.css と同等の見た目に合わせる */
.pagination {
  margin: 24px 0;
}
.pagination__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: var(--black);
  font-size: 20px;
  text-decoration: none;
  line-height: 1;
  user-select: none;
}
.pagination__item.is-current .pagination__btn {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #fff;
}
.pagination__item.is-dots .pagination__btn {
  border-color: transparent;
  background: transparent;
  min-width: auto;
  height: auto;
  padding: 0 6px;
}
.pagination__item.is-disabled .pagination__btn {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  /* SPで左右がギリギリにならないよう少し余白を付ける（施工事例一覧のみ） */
  .case-archive .sec-case.inner {
    padding-left: 12px;
    padding-right: 12px;
  }
  .case__list {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .case__h3 {
    font-size: 18px;
    line-height: 1.4;
    -webkit-line-clamp: 3;
  }
  .case__meta {
    font-size: 12px;
  }
  .pagination__btn {
    min-width: 12px;
    height: 40px;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 18px;
  }
}

