@charset "utf-8";
/* CSS Document */

/* =================================================================================

   コンテンツ
 
=================================================================================== */

/* ==============================
   categoriesページだけに適用
============================== */

/* categoriesページのみ */
#categories .content-columns {
  width: 100%;
  display: block;
  clear: both; /* ← 横並びを強制解除 */
  margin-top: 100px; /* breadcrumbの下に100px */
}

/* =========================
   カテゴリヘッダー
========================= */
#categories .category-header {
  width: 100%;
  padding: 100px 5% 0; /* 左右パディングを%に変更 */
  box-sizing: border-box;
}

/* =========================
   カテゴリ一覧
========================= */
#categories .cat-list {
  width: 100%;
  max-width: 1116px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: flex-start; /* space-betweenはpaddingで対応 */
  align-items: center;
  flex-wrap: nowrap; /* デフォルトは1行 */
  gap: 0;
  flex-shrink: 1;
  overflow-x: visible;
}

/* categoriesページのみ */
#categories .cat-list {
  width: 100%;
  max-width: 1116px; /* 最大幅 */
  margin: 0 auto; /* ブラウザ中央寄せ */
  padding: 0;
  display: flex;
  justify-content: space-between; /* 左右端に文字をくっつける */
  align-items: center;
  flex-wrap: nowrap; /* デフォルトは1行 */
  gap: 0;
  box-sizing: border-box;
}

/* 各カテゴリ共通 */
#categories .cat-item {
  cursor: pointer;
  text-align: left;
  position: relative;
  margin: 0;
  flex-shrink: 1; /* 幅が足りなくなったら縮む */
  min-width: 0;
  padding-left: clamp(7px, 0.8vw, 30px);
  padding-right: clamp(7px, 3vw, 40px);
  box-sizing: border-box;
}

/* 英語タイトル */
#categories .cat-item .cat-title-en {
  font-family: 'Ropa Sans', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.125rem);
  font-weight: 400;
  margin-bottom: 4px;
}

/* 日本語タイトルも自動縮小 */
#categories .cat-item span,
#categories .cat-item::before {
  font-size: clamp(0.75rem, 1.2vw, 1rem);
}

/* アクティブ */
#categories .cat-item.active,
#categories .cat-item.active .cat-title-en {
  color: rgba(0, 0, 0, 0.3);
}

/* 縦線をpaddingの右端に固定 */
#categories .cat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0; /* padding内の右端に置く */
  transform: translateY(-50%);
  height: 40px;
  width: 1px;
  background-color: #000;
}

#categories .cat-item:first-child {
  padding-left: 0;
}

#categories .cat-item:last-child {
  padding-right: 0;
}

/* 下の横線削除 */
#categories .cat-line {
  display: none;
}

/* =========================
   カテゴリ本文エリア
========================= */
#categories .category-content {
  max-width: 1160px;
  margin: 0 auto;
  width: 80%;
}

/* =========================
   カテゴリタイトル
========================= */
#categories .category-title-area {
  max-width: 1116px;
  margin: 60px auto 24px;
  box-sizing: border-box;
}

#categories .category-title-en {
  font-family: 'Ropa Sans', sans-serif;
  font-size: 3.125rem;
  letter-spacing: 0.6rem;
  font-weight: 400;
  margin-bottom: 4px;
}

#categories .category-title-ja {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.2rem;
  color: #000;
}

/* =========================
   タグエリア全体
========================= */
#categories .tag-area {
  display: flex;
  align-items: flex-start; /* ← 上揃え */
  gap: 30px; /* タイトルとタグの間 */
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 35px 0;
  margin-bottom: 40px;
}

/* =========================
   左側 タイトルエリア
========================= */
#categories .tag-head {
  display: flex;
  flex-direction: column; /* 2行縦並び */
  align-items: flex-start; /* ← 左揃え */
  flex-shrink: 0; /* 幅固定 */
}

/* TAG画像 */
#categories .tag-icon {
  width: 100%;
  max-width: 92px; /* 1440px時最大 */
  height: auto;
}

/* サブタイトル */
#categories .tag-label {
  font-size: 0.75rem; /* 12px → 0.75rem */
  margin-top: 6px;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.5); /* 黒50% */
}

/* =========================
   右側 タグ一覧
========================= */
#categories .tag-list {
  display: flex;
  flex-wrap: wrap; /* ← 自然折り返し */
  justify-content: flex-start; /* ← 左寄せ */
  gap: 8px 7px; /* 縦 横 */
}

/* =========================
   タグ1つ分
========================= */
#categories .tag-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  font-size: 0.75rem; /* 12px → 0.75rem */
  line-height: 1;
  border: 0.5px solid #000;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease; /* ホバーもスムーズ */
}

/* アクティブ状態 */
#categories .tag-item.active {
  background-color: #000;
  color: #fff;
}

/* タグ項目ホバー時 */
#categories .tag-item:hover {
  background-color: #000; /* 黒背景 */
  color: #fff; /* 白文字 */
}

/* 既存の active と被る場合は優先度を調整 */
#categories .tag-item.active {
  background-color: #000; /* 必要に応じて active も黒背景に */
  color: #fff;
}

#categories .article-list-wrapper {
  max-width: 1060px; /* コンテナ幅 */
  margin: 0 auto; /* 中央配置 */
  box-sizing: border-box;
}

#categories .article-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 20px;
  justify-content: center;
}

#categories .article-link {
  width: 100%;
  max-width: 340px;
}

#categories .article-item {
  width: 100%;
  max-width: 340px;
}

#categories .article-item:hover img {
  transform: scale(1.08);
}

/* 画像部分 */
#categories .thumb {
  width: 100%;
  aspect-ratio: 340 / 219; /* 元の画像比率 */
  overflow: hidden;
}

#categories .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

/* グレーのボックス */
#categories .article-content {
  width: 100%;
  aspect-ratio: 340 / 260; /* 元の比率 */
  background: #f2f2f2;
  padding: 20px 30px 30px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* カテゴリ */
#categories .category {
  font-family: 'Ropa Sans', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 0.8125rem);
  font-weight: 400;
  width: 100px;
  height: 23px;
  background: #e0e0e0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

/* タイトル（最大4行） */
#categories .article-title {
  font-size: 1rem; /* 16px → 1rem */
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* タグ */
#categories .tags {
  font-size: 0.75rem; /* 12px → 0.75rem */
  margin-bottom: 12px;
}

/* 日付は右揃え */
#categories .date {
  font-size: 0.75rem; /* 12px → 0.75rem */
  text-align: right;
  font-weight: 600;
  color: #969696;
}

/* 記事内のタグは囲み枠なし */
#categories .article-item .tag-item {
  border: none;
  border-radius: 0;
  background: none;
  padding: 0;
  font-size: 0.75rem; /* 12px → 0.75rem */
  color: #000;
  font-weight: 600;
}

/* ===============================
   CATEGORY COLORS
================================ */

/* Work */
#categories .cat-work .dot,
#categories .category.cat-work,
#categories .cat-work:hover a {
  background: #41bba7;
  border-color: #41bba7;
}

/* Event */
#categories .cat-event .dot,
#categories .category.cat-event,
#categories .cat-event:hover a {
  background: #ffaa00;
  border-color: #ffaa00;
}

/* Student */
#categories .cat-student .dot,
#categories .category.cat-student,
#categories .cat-student:hover a {
  background: #00b4ff;
  border-color: #00b4ff;
}

/* Know-how（ここ修正） */
#categories .cat-know-how .dot,
#categories .category.cat-know-how,
#categories .cat-know-how:hover a {
  background: #8278ff;
  border-color: #8278ff;
}

/* Release */
#categories .cat-release .dot,
#categories .category.cat-release,
#categories .cat-release:hover a {
  background: #ff5e7a;
  border-color: #ff5e7a;
}

/* Other */
#categories .cat-other .dot,
#categories .category.cat-other,
#categories .cat-other:hover a {
  background: #aaaaa0;
  border-color: #aaaaa0;
}

/* ===============================
   各タイトル部分 CATEGORY COLORS
================================ */

/* Work */
#categories .category-title-area[data-cat='work'] .category-title-en {
  color: #41bba7;
}

/* Event */
#categories .category-title-area[data-cat='event'] .category-title-en {
  color: #ffaa00;
}

/* Student */
#categories .category-title-area[data-cat='student'] .category-title-en {
  color: #00b4ff;
}

/* Know-how（修正） */
#categories .category-title-area[data-cat='know-how'] .category-title-en {
  color: #8278ff;
}

/* Release */
#categories .category-title-area[data-cat='release'] .category-title-en {
  color: #ff5e7a;
}

/* Other */
#categories .category-title-area[data-cat='other'] .category-title-en {
  color: #aaaaa0;
}

#categories .cat-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ============================
  ページ送り
============================ */
#categories .wp-pagenavi {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 60px;
  font-family: sans-serif;
}

/* ページ番号 */
#categories .wp-pagenavi .page,
#categories .wp-pagenavi .current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #000;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  transition: all 0.2s ease;
}

#categories .wp-pagenavi .current {
  background: #000;
  color: #fff;
  font-weight: bold;
}

/* … 表示 */
#categories .wp-pagenavi .extend {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0 4px;
  position: relative;
  top: -12px;
}

/* ============================
  前後ボタン（SVG背景）
============================ */

/* « » を非表示 */
#categories .wp-pagenavi .previouspostslink,
#categories .wp-pagenavi .nextpostslink {
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: #000;
  border-radius: 50%;
  transition: all 0.2s ease;
}

/* 前矢印 */
#categories .wp-pagenavi .previouspostslink {
  background-image: url(../images/useful/left-arrow.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 4px;
  margin-right: 10px;
}

/* 次矢印 */
#categories .wp-pagenavi .nextpostslink {
  background-image: url(../images/useful/light-arrow.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 4px;
  margin-left: 10px;
}

/* ホバー */
#categories .wp-pagenavi a:hover {
  transform: translateY(-2px);
}

/* 戻るボタン */
#categories .recomend-link {
  width: 235px;
  display: block;
  position: relative;
  transition: 0.3s;
  margin: 40px auto 12px;
}

#categories .recomend-link:before {
  content: '';
  display: block;
  background: #41bba7;
  width: 100%;
  height: 1px;
  position: absolute;
  left: 0;
  bottom: -12px;
  margin: auto;
}

#categories .recomend-link:after {
  content: '';
  background: #000;
  width: 0;
  height: 1px;
  position: absolute;
  left: 0;
  bottom: -12px;
  transition: 0.3s;
  z-index: 2;
}

#categories .recomend-link span {
  width: 100%;
  display: block;
  background: url(../images/common/arrow.svg) right center / 4px 8px no-repeat;
  position: relative;
}

#categories .recomend-link span:before {
  content: '';
  display: block;
  background: #000;
  width: 40px;
  height: 1px;
  position: absolute;
  top: 50%;
  right: 10px;
  bottom: 0;
  transition: 0.3s;
}

#categories .recomend-link:hover:after {
  width: 100%;
}

/* =================================================================================

   900px
 
=================================================================================== */
@media (max-width: 900px) {
  #categories .category-title-area {
    margin: 50px auto 24px;
  }

  #categories .cat-list {
    overflow-x: scroll;
    overflow-y: hidden;
    flex-wrap: nowrap; /* 折り返さない */
    padding-bottom: 8px; /* スクロール余白 */
    justify-content: flex-start; /* 左詰め */
  }

  #categories .cat-item {
    flex: 0 0 auto; /* 幅はコンテンツに合わせる */
  }

  #categories .article-list {
    grid-template-columns: repeat(2, minmax(0, 340px));
    justify-content: center; /* 2つまとめて中央 */
  }
}
/* =================================================================================

   600px
 
=================================================================================== */
@media (max-width: 600px) {
  #categories .article-list {
    grid-template-columns: minmax(0, 340px);
    justify-content: center;
  }
}

/* 
=================================================================================

   523px
 
================================================================================*/
/* 523px以下：1列表示 + 中央寄せ */
@media (max-width: 523px) {
}
/* 
=================================================================================

   480px
 
================================================================================*/
@media (max-width: 480px) {
  #categories .category-header {
    padding: 10px 5% 0;
  }

  #categories .content-columns {
    margin-top: 10px;
  }
}
