/* ============================================================
   記事内の縦の流れ図（ol.qc-post-flow）
   QuadWAN「ご注文の流れ」（pages/services.css の .qc-service-process）の見た目と動きの写し。
   縦の線で番号の丸をつなぎ、丸から次の丸へ光の粒が流れ、着いたときに次の丸が光る（1区間 1.5秒・10ステップまで 1周 15秒）。
   本文に qc-post-flow がある記事でだけ読み込む（functions.php の quadcom_post_flow_assets）
   ============================================================ */

.entry-content ol.qc-post-flow {
  list-style: none;
  padding: 0;
  margin: 32px 0 40px;
  counter-reset: qc-post-flow;
  position: relative;
  isolation: isolate; /* 線と粒（z-index: -1）を本文の背景より前に出す */
}
.entry-content ol.qc-post-flow::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 29px;
  top: 30px;
  bottom: 30px;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(29, 67, 130, .3) 0%,
    rgba(96, 165, 250, .5) 50%,
    rgba(29, 67, 130, .3) 100%);
}
.entry-content ol.qc-post-flow > li {
  position: relative;
  margin: 0;
  padding: 0 0 28px 84px;
  min-height: 60px;
  counter-increment: qc-post-flow;
}
.entry-content ol.qc-post-flow > li:last-child { padding-bottom: 0; }
.entry-content ol.qc-post-flow > li::before {
  content: counter(qc-post-flow, decimal-leading-zero);
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid rgba(29, 67, 130, .15);
  background-color: #fff;
  background-image: linear-gradient(135deg, #1D4382, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.02em;
  box-shadow: 0 4px 12px rgba(29, 67, 130, .1);
  transition: transform .3s ease, box-shadow .3s ease;
}
.entry-content ol.qc-post-flow > li:hover::before {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(29, 67, 130, .25);
}
/* 丸の白い下地（線と粒を丸の後ろに隠す） */
.entry-content ol.qc-post-flow > li::after {
  content: '';
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
}
.entry-content .qc-post-flow__title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin: 6px 0 6px;
}
.entry-content .qc-post-flow__desc {
  font-size: 15px;
  line-height: 1.8;
  color: #475569;
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  /* 粒：自分の丸の中心 → 次の丸の中心 */
  .entry-content ol.qc-post-flow > li:not(:last-child) .qc-post-flow__desc::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 24px;
    top: 30px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .15), 0 0 16px rgba(37, 99, 235, .5);
    opacity: 0;
    animation: qc-post-flow-dot 15s linear infinite;
  }
  .entry-content ol.qc-post-flow > li::before { animation: qc-post-flow-step 15s ease-out infinite; }
  .entry-content ol.qc-post-flow > li:nth-child(2)::before,
  .entry-content ol.qc-post-flow > li:nth-child(2) .qc-post-flow__desc::after { animation-delay: 1.5s; }
  .entry-content ol.qc-post-flow > li:nth-child(3)::before,
  .entry-content ol.qc-post-flow > li:nth-child(3) .qc-post-flow__desc::after { animation-delay: 3s; }
  .entry-content ol.qc-post-flow > li:nth-child(4)::before,
  .entry-content ol.qc-post-flow > li:nth-child(4) .qc-post-flow__desc::after { animation-delay: 4.5s; }
  .entry-content ol.qc-post-flow > li:nth-child(5)::before,
  .entry-content ol.qc-post-flow > li:nth-child(5) .qc-post-flow__desc::after { animation-delay: 6s; }
  .entry-content ol.qc-post-flow > li:nth-child(6)::before,
  .entry-content ol.qc-post-flow > li:nth-child(6) .qc-post-flow__desc::after { animation-delay: 7.5s; }
  .entry-content ol.qc-post-flow > li:nth-child(7)::before,
  .entry-content ol.qc-post-flow > li:nth-child(7) .qc-post-flow__desc::after { animation-delay: 9s; }
  .entry-content ol.qc-post-flow > li:nth-child(8)::before,
  .entry-content ol.qc-post-flow > li:nth-child(8) .qc-post-flow__desc::after { animation-delay: 10.5s; }
  .entry-content ol.qc-post-flow > li:nth-child(9)::before,
  .entry-content ol.qc-post-flow > li:nth-child(9) .qc-post-flow__desc::after { animation-delay: 12s; }
  .entry-content ol.qc-post-flow > li:nth-child(10)::before { animation-delay: 13.5s; }

  /* 1.5秒で次の丸に着く（1周 15秒の 10%） */
  @keyframes qc-post-flow-dot {
    0% { top: 30px; opacity: 0; }
    1.6%, 8.4% { opacity: 1; }
    10%, 100% { top: calc(100% + 30px); opacity: 0; }
  }
  /* 丸が光る（粒が着いたとき。最初の丸は1周の始まり） */
  @keyframes qc-post-flow-step {
    0% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .5), 0 0 22px rgba(37, 99, 235, .35); border-color: rgba(37, 99, 235, .6); }
    10%, 100% { box-shadow: 0 4px 12px rgba(29, 67, 130, .1); border-color: rgba(29, 67, 130, .15); }
  }
}
