/*
  archive-works.css
  archive-works.php(Works一覧ページ)専用のスタイルをまとめるファイル。
  https://chiburutechpro.com/news/ のカードデザインを参考に実装。
*/

/* このCSSは/works/・/works-category/〜の両方で読み込まれる */
h1 {
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 8px;
}

/* 見出しの下に短い線を引き、見出しだと一目で分かるようにする(front-titleと同じデザイン) */
h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #3f955b;
}

/* ===== Works一覧カード ここから ===== */
/* 不要になった場合はこのブロックとarchive-works.php内の該当箇所を削除すればOK */
.work-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px 30px;
  margin-top: 40px;
}

@media (min-width: 769px) {
  .work-list {
    grid-template-columns: 1fr 1fr;
  }
}

.post-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #aaa;
  transition: transform 0.3s ease;
}

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

.post-content {
  padding: 20px 0 0;
}

/* カテゴリータブ(.category_link_list)の色分け。バッジ本体(.post-category)はcomponent.cssで共通定義しているので、ここでは色の値だけ揃える */
.category_link_list a.business {
  background-color: #3f955b;
  border-color: #3f955b;
}

.category_link_list a.work {
  background-color: #ec5f20;
  border-color: #ec5f20;
}

.category_link_list a.study {
  background-color: #def9e5;
  border-color: #def9e5;
  color: #111;
}

.post-date {
  font-weight: 700;
  font-size: 14px;
  color: #767676;
}

.post-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.6;
  margin-top: 12px;
}

.post-title a {
  color: #111;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: #767676;
}
/* ===== Works一覧カード ここまで ===== */

/* ===== カテゴリー絞り込みタブ ここから ===== */
/* chiburutechpro.com/news/の.category_link_listを参考に実装。不要になった場合はこのブロックとarchive-works.php内の該当箇所を削除すればOK */
.category_link_list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 auto 60px;
  padding-left: 0;
}

@media (min-width: 769px) {
  .category_link_list {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.category_link_list a {
  display: block;
  width: 100%;
  padding: 15px 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  background-color: #000;
  border: 1px solid #000;
  position: relative;
  transition: 0.3s ease;
}

/* 右端の矢印アイコン(border 2辺を45度回転させて作る) */
.category_link_list a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
}

/* すべてみる(黒)のホバー */
.category_link_list a:hover {
  background-color: #fff;
  color: #000;
  border-color: #000;
}

.category_link_list a.business:hover {
  background-color: #fff;
  color: #3f955b;
  border-color: #3f955b;
}

.category_link_list a.work:hover {
  background-color: #fff;
  color: #ec5f20;
  border-color: #ec5f20;
}

.category_link_list a.study:hover {
  background-color: #fff;
  color: #111;
  border-color: #def9e5;
}
/* ===== カテゴリー絞り込みタブ ここまで ===== */

/* ===== ページネーション ここから ===== */
/* chiburutechpro.com/news/のページネーションを参考に実装(配色はサイトの黒基調に合わせて変更) */
/* 不要になった場合はこのブロックとarchive-works.php・taxonomy-works_category.php内の該当箇所を削除すればOK */
.pagination .nav-links {
  display: block;
  text-align: center;
  margin: 60px 0 0;
}

.pagination .nav-links .page-numbers {
  display: inline-block;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  padding: 6px 12px;
  border: 1px solid #000;
  margin: 0 8px 0 0;
  position: relative;
  transition: opacity 0.2s ease;
  vertical-align: middle;
}

.pagination .nav-links .page-numbers:last-child {
  margin-right: 0;
}

.pagination .nav-links .page-numbers.current {
  background-color: #000;
  border-color: #000;
  color: #fff;
}

.pagination .nav-links a.page-numbers:hover {
  background-color: #fff;
  color: #000;
  opacity: 0.7;
}

.pagination .nav-links .page-numbers.dots {
  border: none;
  padding: 6px 4px;
}

/* 前へ/次へは文字を消してCSSだけの矢印アイコンにする */
.pagination .nav-links a.next.page-numbers,
.pagination .nav-links a.prev.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 31px;
  padding: 0;
  vertical-align: middle;
}

.pagination .nav-links a.next.page-numbers::after,
.pagination .nav-links a.prev.page-numbers::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.pagination .nav-links a.next.page-numbers::after {
  transform: rotate(-45deg);
}

.pagination .nav-links a.prev.page-numbers::after {
  transform: rotate(135deg);
}
/* ===== ページネーション ここまで ===== */
