/* ============================================================
   904 導入事例ページ専用（case.html）
   読み込み順: style.css → sub.css → case.css
   ※レスポンシブはファイル末尾（820px以下で2列）
============================================================ */

/* ===============================
   カード一覧（3列）
=============================== */
.p-case__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.p-case__item {
  display: flex;
}

/* ===============================
   カード1枚（全体がリンク）
=============================== */
.p-case__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 14px;
  background: #FFFFFF;
  border-radius: 22px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  color: #3C4043;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
/* マウスを乗せると、少し上に浮いて影が濃くなる */
.p-case__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}
/* 押した瞬間（スマートフォンで触れたときも）：少し沈む */
.p-case__card:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
@media (prefers-reduced-motion: reduce) {
  .p-case__card {
    transition: none;
  }
  .p-case__card:hover {
    transform: none;
  }
}

.p-case__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.p-case__photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}
.p-case__photo-img--01 { inset: auto; left: -32%;    top: -0.1%;   width: 164%;    height: 119.27%; object-fit: fill; }
.p-case__photo-img--02 { inset: auto; left: -5.92%;  top: -66.82%; width: 106.01%; height: 253.26%; object-fit: fill; }
.p-case__photo-img--03 { inset: auto; left: -2.95%;  top: -62.7%;  width: 105.91%; height: 253%;    object-fit: fill; }

.p-case__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 15px;
}
.p-case__company {
  margin: 24px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #848484;
}
.p-case__title {
  margin: 11px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: #3C4043;
}
.p-case__data {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1em;
  margin: 14px 0 0;
  padding-bottom: 14px;
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  color: #848484;
}
.p-case__data-label,
.p-case__data-value {
  margin: 0;
}
/* ひとかたまりで折り返す言葉（例：「（連結）」が途中で切れないように） */
.p-case__nowrap {
  display: inline-block;
}
/* カードのいちばん下の段：左に「記事を読む」、右に掲載日（上に1pxの線） */
.p-case__foot {
  display: flex;
  flex-wrap: wrap; /* 幅が足りないときは、掲載日が下の行に回る */
  justify-content: space-between;
  align-items: flex-end;
  gap: 2px 8px;
  margin: auto 0 0;
  padding-top: 11px;
  border-top: 1px solid #BABCBE;
}
/* 「記事を読む」＋別タブで開くマーク（スマートフォンでも押せると分かるように常に表示） */
.p-case__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  color: #3C4043;
}
.p-case__more-icon {
  width: 13px;
  height: 13px;
  display: block;
}
.p-case__date {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 22px;
  color: #848484;
  text-align: right;
  white-space: nowrap; /* 日付の途中で折り返さない */
  margin-left: auto;
}

/* 掲載日の中の改行：480px以下のときだけ効く（下のレスポンシブで表示） */
.p-case__date-br {
  display: none;
}

/* ===============================
   レスポンシブ
=============================== */

/* 820px以下：横3つ → 横2つ */
@media (max-width: 820px) {
  .p-case__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
}

/* 640px以下：2つ並びのまま、すき間と文字を詰める */
@media (max-width: 640px) {
  .p-case__list {
    gap: 24px 12px;
  }
  .p-case__card {
    border-radius: 16px;
  }
  .p-case__body {
    padding: 0 10px;
  }
  .p-case__company {
    margin-top: 14px;
    font-size: 12px;
  }
  .p-case__title {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
  }
  .p-case__data {
    margin-top: 10px;
    padding-bottom: 10px;
    font-size: 11px;
    line-height: 18px;
  }
  /* 2列だと幅が足りないので、掲載日の下に「記事を読む」を置く（どちらも右寄せ） */
  .p-case__foot {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 8px;
  }
  .p-case__more {
    order: 2;
    font-size: 11px;
    line-height: 18px;
  }
  .p-case__more-icon {
    width: 11px;
    height: 11px;
  }
  .p-case__date {
    font-size: 10px;
    line-height: 18px;
  }
}

/* 480px以下：掲載日を「記事掲載日:」のあとで改行 */
@media (max-width: 480px) {
  .p-case__date-br {
    display: inline;
  }
}
