/*
 * TSS RFID Room
 * 利用シーン別ページ：パレット管理
 */

.pallet-pain-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1120px;
}
.pallet-issues-lead { margin-top: 36px !important; }

.pallet-cause {
  background: linear-gradient(90deg, #232a3a 0%, #777d89 100%);
  color: #fff;
}
.pallet-cause .inv-heading,
.pallet-cause .inv-lead { color: #fff !important; }

/* ==========================================================================
   パレット紛失・滞留原因の整理
   ========================================================================== */

.pallet-cause-flow {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  max-width: 1400px;
  margin: 44px auto 0;
  padding: 0;
  list-style: none;
}

.pallet-cause-flow__set {
  display: grid;
  grid-template-rows: auto auto;
  gap: 36px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pallet-cause-flow__question {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  padding: 14px;
  background: #fff;
  color: #4d4d4d;
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
  box-sizing: border-box;
}

.pallet-cause-flow__question::after {
  position: absolute;
  left: 50%;
  bottom: -28px;
  width: 0;
  height: 0;
  border-top: 28px solid #fff;
  border-right: 16px solid transparent;
  border-left: 16px solid transparent;
  content: "";
  transform: translateX(-50%);
}

.pallet-cause-flow__label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 14px 18px;
  background: #171a1b;
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff;
  text-align: center;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
  box-sizing: border-box;
}

.pallet-cause-flow__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #fff;
  list-style: none;
}

.pallet-cause-flow__arrow i {
  font-size: 34px;
  line-height: 1;
}

/* ==========================================================================
   紙・従来とRFIDによるパレット管理フロー比較
   ========================================================================== */

.pallet-comparison {
  display: grid;
  grid-template-columns:
    minmax(200px, .72fr)
    minmax(260px, 1fr)
    minmax(260px, 1fr)
    minmax(200px, .72fr);
  gap: 6px;
  align-items: stretch;
  margin-top: 42px;
}

.pallet-flow {
  min-width: 0;
}

.pallet-flow__title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  margin: 0 0 4px !important;
  padding: 12px 18px !important;
  color: #fff !important;
  text-align: center;
  font-size: 26px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  letter-spacing: .05em;
}

/* 従来側 */
.pallet-flow--old .pallet-flow__title {
  background: #303233;
}

/* RFID側 */
.pallet-flow--rfid .pallet-flow__title {
  background: #a78b00;
}

.pallet-flow__steps {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pallet-flow__step {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin: 0;
  padding: 11px 18px;
  text-align: center;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 600;
  list-style: none;
}

/* 従来側の各ステップ */
.pallet-flow--old .pallet-flow__step {
  background: #858585;
  color: #fff;
}

/* RFID側の各ステップ */
.pallet-flow--rfid .pallet-flow__step {
  background: #fff9df;
  color: #2f3440;
}

.pallet-flow__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  list-style: none;
}

.pallet-flow--old .pallet-flow__arrow {
  color: #1f2536;
}

.pallet-flow--rfid .pallet-flow__arrow {
  color: #b99700;
}

.pallet-flow__arrow i {
  font-size: 30px;
  line-height: 1;
}

.pallet-comparison__visual {
  margin: 0;
  overflow: hidden;
  background: #d9dde4;
}

.pallet-comparison__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-page #sub-nav-cta-bottom {
  display:flex;justify-content:center;align-items:center;padding:3em 0;background:var(--grad-surface);
}
.scene-page #sub-nav-cta-bottom .cta_buttons ul.buttons {
  display:flex;justify-content:center;gap:.75em;margin:0;padding:0;list-style:none;
}
.scene-page #sub-nav-cta-bottom .cta_buttons .button {
  display:flex;align-items:center;justify-content:center;gap:.75em;min-width:280px;height:2.5em;padding:2em;
}
.scene-page #sub-nav-cta-bottom .text_wrap { display:flex;flex-direction:column;gap:4px;text-align:left; }
.scene-page #sub-nav-cta-bottom .cta_consult { background:var(--bg-dark);border:1px solid var(--border-dark);color:#fff!important; }
.scene-page #sub-nav-cta-bottom .cta_catalog { background:#fff;border:1px solid var(--border-dark);color:var(--text-main)!important; }

@media screen and (max-width: 979px) {

  /* 「実はコストの原因は〜」レスポンシブ */
  .pallet-cause-flow {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 760px;
  }

  .pallet-cause-flow__set {
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    grid-template-rows: auto;
    gap: 34px;
    align-items: stretch;
  }

  .pallet-cause-flow__question {
    min-height: 64px;
    font-size: 21px;
  }

  /* 白い吹き出しの三角を右向きに */
  .pallet-cause-flow__question::after {
    top: 50%;
    right: -19px;
    bottom: auto;
    left: auto;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid #fff;
    border-right: 0;
    transform: translateY(-50%);
  }

  .pallet-cause-flow__label {
    min-height: 64px;
    font-size: 24px;
  }

  /* セット同士をつなぐ矢印は残す */
  .pallet-cause-flow__arrow {
    display: flex;
    height: 30px;
  }

  .pallet-cause-flow__arrow i {
    font-size: 30px;
    transform: rotate(90deg);
    padding-bottom: 56%;
  }

  /* 比較部分 */
  .pallet-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pallet-comparison__visual {
    display: none;
  }
}
@media screen and (max-width: 736px) {

  .pallet-pain-grid,
  .pallet-cause-flow,
  .pallet-comparison {
    grid-template-columns: 1fr;
  }
  
  .pallet-cause-flow {
    max-width: 520px;
    gap: 22px;
  }

  .pallet-cause-flow__set {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
  }

  /* タブレット時の矢印位置補正を解除 */
  .pallet-cause-flow__arrow i {
    padding-bottom: 0;
  }

  .pallet-cause-flow__question {
    min-height: auto;
    height: auto;
    font-size: 14px;
  }

  /* 吹き出し三角を再び下向きへ */
  .pallet-cause-flow__question::after {
    top: auto;
    right: auto;
    bottom: -24px;
    left: 50%;
    border-top: 24px solid #fff;
    border-right: 14px solid transparent;
    border-bottom: 0;
    border-left: 14px solid transparent;
    transform: translateX(-50%);
  }

  .pallet-cause-flow__label {
    min-height: auto;
    height: auto;
    font-size: 20px;
    padding: 10px;
  }

  .pallet-cause-flow__arrow {
    min-height: 32px;
  }

  .pallet-cause-flow__arrow i {
    font-size: 28px;
    transform: rotate(90deg);
  }

  /* 従来とRFIDのブロック間に余白 */
  .pallet-comparison {
    gap: 60px;
  }

  /* 左右画像はスマホでは表示しない */
  .pallet-comparison__visual {
    display: none;
  }

  /* 「従来」「RFID」のタイトル */
  .pallet-flow__title {
    min-height: 52px;
    margin-bottom: 14px !important;
    padding: 8px 14px !important;
    font-size: 19px !important;
  }

  /* 「紙」「Excel」「通過」「自動読取り」など */
  .pallet-flow__step {
    min-height: 52px;
    padding: 8px 14px;
    font-size: 17px;
  }

  /* ↓の縦幅 */
  .pallet-flow__arrow {
    min-height: 36px;
  }

  .pallet-flow__arrow i {
    font-size: 26px;
  }

  .scene-page #sub-nav-cta-bottom .cta_buttons ul.buttons {
    flex-direction: column;
  }
}


/* 関連する利用シーン：カンプに合わせて画像とテキストの比率を固定 */
.scene-page--pallet .inv-scene {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 118px;
}
.scene-page--pallet .inv-scene img {
  width: 120px;
  height: 118px;
  object-fit: cover;
  opacity: 1;
}
.scene-page--pallet .inv-scene span {
  position: static;
  display: flex;
  align-items: center;
  padding: 18px 24px;
  background: #2d3343;
}


/* 導入事例が2件の場合：3列分の空きを残さず中央に2列配置 */
.scene-page--pallet #cases .inv-cases {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

@media screen and (max-width: 736px) {
  .scene-page--pallet #cases .inv-cases {
    grid-template-columns: 1fr;
  }
}
