/* ============================================================
   favorist.jp コラム一覧（/user_data/column_backnumber.php）
   column_backnumber.css
   ------------------------------------------------------------
   目的：
   ・カテゴリタブ（JSで active 付与）
   ・記事カード：PC 4列 / SP 2列
   ・カード全体 <a> リンク（画像＋テキスト）
   ・画像はトリミングなしで上揃え（高さ差は下に余白）
   ============================================================ */

/* ---------- 全体コンテナ（保険） ---------- */
.cb-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* タイトル（必要ならHTML側で h1 等に付与） */
.cb-page-title{
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .04em;
  margin: 30px 0 18px;
}

/* ---------- フィルタータブ ---------- */
.cb-filter{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 28px;
}

.cb-filter-btn{
  appearance: none;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #333;
  border-radius: 0;            /* 四角 */
  padding: 8px 14px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

/* hover */
.cb-filter-btn:hover{
  background: #f3f3f3;
}

/* active（JSが .is-active を付与） */
.cb-filter-btn.is-active{
  border-color: transparent;
  color: #fff;
}

/* カテゴリごとの active 色 */
.cb-filter-btn.is-active[data-category="all"]{
  background: #333;
}
.cb-filter-btn.is-active[data-category="basic"]{
  background: #2f4f4f; /* ノベルティ基礎知識 */
}
.cb-filter-btn.is-active[data-category="goods"]{
  background: #2b3a67; /* ノベルティグッズ */
}
.cb-filter-btn.is-active[data-category="graduation"]{
  background: #6b4f2a; /* 卒業記念品 */
}
.cb-filter-btn.is-active[data-category="trend"]{
  background: #7a3b52; /* トレンド */
}
.cb-filter-btn.is-active[data-category="sdgs"]{
  background: #1f6f4a; /* サステナブル・SDGs */
}

.cb-filter-btn.is-active[data-category="original"]{
  background: #5a2230; /* オリジナルグッズ： */
}


/* 2段になってもOK：行間だけ少し */
@media (max-width: 767px){
  .cb-filter{
    gap: 8px;
    margin-bottom: 22px;
  }
  .cb-filter-btn{
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ---------- 記事グリッド ---------- */
.cb-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* PC 4列 */
  gap: 26px 26px;
}

@media (max-width: 991px){
  .cb-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px){
  .cb-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* SP 2列 */
    gap: 18px 16px;
  }
}

/* ---------- 記事カード（<a>で全部くくる前提） ---------- */
.cb-card{
  display: block;
  color: inherit;
  text-decoration: none;
}

.cb-card:hover .cb-title{
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* 画像枠（トリミングなし／上揃え） */
.cb-thumb{
  background: #f3f3f3;
  border: 1px solid #ededed;
  overflow: hidden;
}

.cb-thumb img{
  width: 100%;
  height: auto;          /* トリミングなし */
  display: block;
  object-fit: contain;   /* 念のため（効かない環境でも害なし） */
  object-position: top;  /* 上寄せ */
}

/* メタ行：カテゴリ左 / 日付右 */
.cb-meta{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1;
  /* ←ここを薄いグレー寄りに */
  color: #777;
}

/* カテゴリの□囲み（HTMLは <span class="cb-cat"> を想定） */
.cb-cat{
  display: inline-block;
  border: 1px solid #d0d0d0;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;

  /* 文字色は少し薄め */
  color: #777;
  background: #fff;
}

/* 日付（HTMLは <span class="cb-date"> を想定） */
.cb-date{
  font-size: 11px;
  color: #999;          /* カテゴリより更に薄く */
  white-space: nowrap;
}

/* タイトル */
.cb-title{
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  color: #222;
}

/* タイトルが長い場合でも読みやすく */
@media (max-width: 767px){
  .cb-title{
    font-size: 13px;
    line-height: 1.55;
  }
}

/* ---------- フィルターで非表示にする（JSが付与） ---------- */
.cb-hidden{
  display: none !important;
}



