/* =========================
   カード一覧
========================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 24px;
  align-items: stretch;
}


/* =========================
   カード
========================= */

.card-item {
  display: flex;
  flex-direction: column;

  padding: 30px;
  box-sizing: border-box;

  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;

  text-decoration: none;

  /* うっすらとしたシャドウ */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}


/* =========================
   イラスト
========================= */

.card-image {
  display: flex;
  align-items: center;
  justify-content: center;

  /*
   * 画像の実寸がバラバラでも
   * 見出しの位置を揃えるため固定
   */
  height: 180px;
  flex-shrink: 0;
}

.card-image img {
  display: block;

  width: auto;
  height: auto;

  /* 画像を少し小さめに */
  max-width: 80%;
  max-height: 165px;
}


/* =========================
   見出し
========================= */

.card-title {
  position: relative;

  /*
   * 画像との間隔
   * 以前の10pxから18pxへ
   */
  margin: 18px 0 0;

  /* 矢印のため右側に余白 */
  padding: 0 28px 0 0;

  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}


/* =========================
   矢印
========================= */

.card-arrow {
  position: absolute;
  right: 0;
  bottom: 0;

  font-size: 30px;
  font-weight: 400;
  line-height: 1;

  transition: transform 0.3s ease;
}


/* =========================
   ホバー
========================= */

.card-item:hover {
  border-color: #ddd;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-item:hover .card-arrow {
  transform: translateX(4px);
}


/* =========================
   タブレット
========================= */

@media screen and (max-width: 900px) {

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .card-item {
    padding: 18px 24px 18px;
  }

  .card-image {
    height: 170px;
  }

  .card-image img {
    max-width: 80%;
    max-height: 155px;
  }

  .card-title {
    margin-top: 15px;
    font-size: 18px;
  }
}


/* =========================
   スマートフォン
========================= */

@media screen and (max-width: 600px) {

  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-item {
    padding: 18px 20px;
  }

  .card-image {
    height: auto;
  }

  .card-image img {
    max-width: 80%;
    max-height: 200px;
  }

  .card-title {
    margin-top: 15px;
    font-size: 18px;
  }
}