/* =========================================================================
   case.css — リクルートX 導入事例ページ（case.html 専用）
   依存: css/tokens.css → css/style.css の後に読み込む
   デザイン: 「デザイン候補/事例.png」のモックを忠実に再現し、
   　　　　　青のアクセントをブランドのピンク #ec2d87 / 黒系 #0a0a0c に置換
   ブレークポイント（DEVICE-RULES §3）: SP ≤768 / TAB 769–1024 / PC ≥1025
   ========================================================================= */

/* ナビはブランド標準（style.css の .rx-nav）に統一。このページ固有の上書きは行わない。 */

/* =====================================================================
   ページヘッダー: 左テキスト / 右写真（左へ白フェード）
   ===================================================================== */
.rx-chero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #ffffff 0%, #fdf2f8 55%, #fbeaf3 100%);
  padding: calc(64px + clamp(40px, 7vw, 80px)) 0 clamp(44px, 7vw, 84px);
}
.rx-chero__photo {
  position: absolute;
  top: 0;
  right: 0;
  width: min(56%, 1100px);
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* 左端・下端を背景に溶かす（モックの白フェード） */
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.92) 45%, transparent 98%);
  mask-image: linear-gradient(to left, rgba(0,0,0,.92) 45%, transparent 98%);
}
.rx-chero::after {
  /* 写真の下端を背景色へなじませる薄いグラデ */
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(56%, 1100px);
  height: 38%;
  background: linear-gradient(to top, rgba(251, 234, 243, .85), transparent);
  pointer-events: none;
}
.rx-chero__inner {
  position: relative;
  z-index: 1;
  /* 広い画面ほど横を広く使う（中央寄りすぎを解消） */
  max-width: clamp(1200px, 92vw, 1760px);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}
.rx-chero__eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #ec2d87;
  margin: 0 0 clamp(10px, 1.5vw, 16px);
}
.rx-chero__heading {
  font-family: 'Zen Kaku Gothic Antique', 'Hiragino Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(2.125rem, 1.5rem + 2.8vw, 3.5rem);
  line-height: 1.25;
  letter-spacing: .02em;
  color: #0a0a0c;
  margin: 0 0 clamp(12px, 2vw, 20px);
}
.rx-chero__lead {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 400;
  font-size: clamp(.9375rem, .9rem + .25vw, 1.0625rem);
  line-height: 1.9;
  color: #3f4651;
  max-width: 34em;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* SP: 写真は薄く背景化して文字の可読性を確保 */
@media (max-width: 768px) {
  .rx-chero__photo { width: 100%; opacity: .3; }
  .rx-chero::after { width: 100%; }
}

/* =====================================================================
   事例一覧: フィルタ + 2カラムカード
   ===================================================================== */
.rx-clist {
  background: #fff;
  padding: clamp(36px, 5vw, 64px) 0 clamp(72px, 10vw, 128px);
}
.rx-clist__inner {
  /* 広い画面ほど横を広く使う（中央寄りすぎを解消・事例カードを大きく） */
  max-width: clamp(1200px, 92vw, 1760px);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* フィルタ: 非選択はテキスト / 選択中は黒ピル（モック準拠） */
.rx-clist__filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.5vw, 14px);
  margin: 0 0 clamp(32px, 5vw, 52px);
}
.rx-clist__filter-btn {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 500;
  font-size: .9375rem;
  letter-spacing: .04em;
  color: #0a0a0c;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: .65em 1.5em;
  min-height: 44px;                       /* タップ領域（DEVICE-RULES §12） */
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.rx-clist__filter-btn:hover { color: #ec2d87; }
.rx-clist__filter-btn[aria-pressed="true"] {
  background: #0a0a0c;
  color: #fff;
  font-weight: 700;
}

/* グリッド: PC=2カラム / SP=1カラム */
.rx-clist__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 2.5vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) { .rx-clist__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- カード
   PC: グリッド3列（24% / 14% / 1fr）
   - 写真は 1〜2列目（=幅38%）を縦いっぱいに敷く
   - 指標タイルは 2〜3列目 → 写真の右端に少し重なる（モックの浮きタイル）
   ---------------------------------------------------------------- */
.rx-ccard {
  display: grid;
  grid-template-columns: 24% 14% 1fr;
  grid-template-rows: auto auto auto;
  background: #fff;
  border: 1px solid #ecedf1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  min-width: 0;
}
.rx-ccard[hidden] { display: none; }

.rx-ccard__media {
  grid-column: 1 / 3;
  grid-row: 1 / 4;
  position: relative;
  margin: 0;
  min-height: 100%;
  background: #eef0f4;
}
.rx-ccard__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rx-ccard__body {
  grid-column: 3;
  grid-row: 1;
  padding: clamp(20px, 2.4vw, 28px) clamp(20px, 2.4vw, 28px) 14px;
  min-width: 0;
}
.rx-ccard__cat {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 500;
  font-size: .8125rem;
  letter-spacing: .04em;
  color: #ec2d87;
  margin: 0 0 8px;
}
.rx-ccard__cat span { color: #c4c9d2; margin: 0 .3em; }
.rx-ccard__company {
  font-family: 'Zen Kaku Gothic Antique', 'Hiragino Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.125rem, 1.05rem + .4vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: .01em;
  color: #0a0a0c;
  margin: 0 0 8px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.rx-ccard__desc {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 400;
  font-size: .875rem;
  line-height: 1.75;
  color: #3f4651;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 指標タイル: 写真に少し重ねて浮かせる */
.rx-ccard__stats {
  grid-column: 2 / 4;
  grid-row: 2;
  position: relative;
  z-index: 1;
  display: flex;             /* 等幅gridから可変flexへ: 内容が広いタイルは必要分だけ広がる */
  flex-wrap: wrap;           /* 1行に収まらなければ折り返し、カードが縦に伸びる（動的サイズ）*/
  gap: clamp(8px, 1vw, 12px);
  margin: 10px 0 0;
  padding: 0 clamp(20px, 2.4vw, 28px) 0 0;
  list-style: none;
}
.rx-ccard__stats li {
  flex: 1 1 0;               /* 通常は等幅、必要時のみ min-content まで広がる */
  min-width: min-content;    /* 数字＋単位より狭くならない＝見切れない */
  background: #fff;
  border: 1px solid #f0f0f3;
  border-radius: 12px;
  padding: clamp(10px, 1.2vw, 14px) clamp(10px, 1.2vw, 14px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .09);
}
.rx-ccard__stat-label {
  display: block;
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-size: .75rem;
  letter-spacing: .04em;
  color: #6e7280;
  margin-bottom: 4px;
  white-space: nowrap;       /* 「アルバイト応募単価」等が途中で割れないよう1行に保つ
                                （タイルは min-width:min-content で必要分だけ広がる）*/
}
.rx-ccard__stat-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;           /* 収まらない時は「矢印だけ」が下に回る（数字＋単位は分離しない）*/
  gap: 2px 4px;
  min-width: 0;
  font-family: 'Inter', 'Zen Kaku Gothic Antique', sans-serif;
  color: #ec2d87;
}
/* 数字＋単位は常に一体（「9,487」と「円」を別行にしない）*/
.rx-ccard__stat-fig {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
}
.rx-ccard__stat-value b {
  font-weight: 700;
  font-size: clamp(1.25rem, 1.05rem + .55vw, 1.5rem);
  line-height: 1.1;
  letter-spacing: -.01em;
}
.rx-ccard__stat-value small {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 700;
  font-size: .75rem;
}
.rx-ccard__stat-arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
}

/* 詳しく見る（ビルド済みカードでは <a> タグに変わる） */
.rx-ccard__more {
  text-decoration: none;
  grid-column: 3;
  grid-row: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .04em;
  color: #ec2d87;
  margin: 0;
  padding: 14px clamp(20px, 2.4vw, 28px) clamp(18px, 2vw, 24px) 0;
}
.rx-ccard__more svg { width: 15px; height: 15px; }

/* SP/TAB(〜899px): 写真を上に積む */
@media (max-width: 899px) {
  .rx-ccard {
    display: flex;
    flex-direction: column;
  }
  .rx-ccard__media {
    min-height: 0;
    height: clamp(170px, 42vw, 260px);
  }
  .rx-ccard__body { padding: 20px 20px 12px; }
  .rx-ccard__stats {
    margin: 0;
    padding: 0 20px;
  }
  .rx-ccard__stats li { box-shadow: none; background: #fafafa; border-color: #f0f0f3; }
  .rx-ccard__more { padding: 12px 20px 18px 0; align-self: flex-end; }
}
/* 極小幅: タイル内の数字を少し詰める */
@media (max-width: 380px) {
  .rx-ccard__stat-value b { font-size: 1.1875rem; }
  .rx-ccard__stat-value small { font-size: .6875rem; }
  .rx-ccard__stat-arrow { width: 12px; height: 12px; }
}

.rx-clist__disclaimer {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-size: .8125rem;
  line-height: 1.8;
  color: #6e7280;
  text-align: center;
  margin: clamp(28px, 4vw, 44px) auto 0;
  max-width: 640px;
}

/* =====================================================================
   CTA
   ===================================================================== */
.rx-ccta {
  background: #fafafa;
  padding: clamp(72px, 10vw, 140px) 0;
}
.rx-ccta__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  text-align: center;
}
.rx-ccta__heading {
  font-family: 'Zen Kaku Gothic Antique', 'Hiragino Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  line-height: 1.45;
  letter-spacing: .02em;
  color: #0a0a0c;
  margin: 0 0 clamp(12px, 2vw, 18px);
  word-break: keep-all;
}
.rx-ccta__lead {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-size: clamp(.9375rem, .9rem + .25vw, 1.0625rem);
  line-height: 1.9;
  color: #3f4651;
  margin: 0 0 clamp(28px, 4vw, 40px);
  word-break: keep-all;
}
.rx-ccta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .04em;
  color: #fff;
  background: #0a0a0c;
  border-radius: 999px;
  padding: 16px 40px;
  min-height: 52px;
  transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.rx-ccta__btn:hover {
  background: #26262b;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(10, 10, 12, .25);
}
.rx-ccta__btn svg { width: 16px; height: 16px; }
