
/* --- 記事一覧のデザイン --- */

/* 全体のコンテナ */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 画面幅に応じて列数を自動調整 */
  gap: 30px; /* カード間の余白 */
  padding: 30px 15px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 各記事カード */
.article-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden; /* 角丸を画像に適用するため */
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

/* カードにマウスを乗せた時のエフェクト */
.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* カード全体をリンクにする */
.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%; /* 親要素の高さいっぱいに広げる */
}

/* アイキャッチ画像 */
.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9; /* 画像の比率を16:9に固定 */
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像の比率を保ったままトリミング */
}

/* カードのコンテンツ部分 */
.card-content {
  padding: 20px 25px;
  flex-grow: 1; /* コンテンツ部分がカードの高さいっぱいに広がる */
  display: flex;
  flex-direction: column;
}

/* カテゴリータグ */
.card-category {
  display: inline-block;
  background-color: #2c3e50; /* 指定のカラーコード */
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 12px;
  align-self: flex-start; /* 左上に配置 */
}

/* 記事タイトル */
.card-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 10px 0;
  line-height: 1.4;
  color: #2c3e50; /* 指定のカラーコード */
}

/* 抜粋文 */
.card-excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  margin: 0 0 15px 0;
  flex-grow: 1; /* 日付を一番下に配置するために空間を埋める */
}

/* 投稿日 */
.card-date {
  font-size: 13px;
  color: #888;
  text-align: right; /* 右寄せ */
  margin-top: auto; /* 自動で上にマージンを取り、一番下に配置 */
}

/* --- レスポンシブ対応 (スマートフォン) --- */
@media (max-width: 768px) {
  .article-list {
    gap: 20px;
    padding: 20px 10px;
  }
  .card-content {
    padding: 15px 20px;
  }
  .card-title {
    font-size: 18px;
  }
}



