﻿/* ============================================================
   pj3a — 土木 / 道路工程分包商頁 (pj3_a1 無 AI 版、pj3_a2 AI 版共用)
   版面沿用 pj3.css (主視覺、痛點、價格、結尾、浮動列)，這裡只放新區塊：
   收入 / 成本雙線流程、需求對應卡片、月報表示意、導入步驟卡、AI 問答示意。
   ============================================================ */

/* ---------- 共用：捲到畫面內才播放 (pj3a.js 加 .is-in) ---------- */
.pj3a-reveal:not(.is-in), .pj3a-reveal:not(.is-in) * { animation-play-state: paused !important; }
@keyframes pj3a-grow { from { transform: scaleX(0); } }
@keyframes pj3a-up { from { opacity: 0; transform: translateY(14px); } }

/* 痛點示意畫面的徽章：數字版 */
.pj3a-badge b { font-size: 1.6rem; }

/* ---------- ③ 收入 / 成本雙線流程 (石板藍底) ---------- */
.pj3a-lanes { display: grid; gap: 18px; }
.pj3a-lane {
    display: grid; grid-template-columns: 190px 1fr; align-items: stretch; border-radius: var(--p3-radius);
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); overflow: hidden;
}
.pj3a-lane__h { padding: 22px 22px; border-right: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; justify-content: center; }
.pj3a-lane__h b { font-size: 1.2rem; color: #fff; }
.pj3a-lane__h small { font-size: .85rem; color: #c9d4e6; margin-top: .2rem; }
.pj3a-lane__h::before { content: ""; width: 28px; height: 3px; border-radius: 2px; margin-bottom: 12px; background: var(--p3-gold); }
.pj3a-lane--out .pj3a-lane__h::before { background: #8fb8ff; }
.pj3a-lane ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.pj3a-lane li { position: relative; padding: 22px 26px 22px 20px; animation: pj3a-up .5s ease-out both; }
.pj3a-lane li + li { border-left: 1px dashed rgba(255,255,255,.14); }
.pj3a-lane li:not(:last-child)::after {
    content: ""; position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; z-index: 1;
    border-top: 1.5px solid var(--p3-gold); border-right: 1.5px solid var(--p3-gold); transform: rotate(45deg);
}
.pj3a-lane--out li:not(:last-child)::after { border-color: #8fb8ff; }
.pj3a-lane li b { display: block; color: #fff; font-size: 1.02rem; margin-bottom: .25rem; }
.pj3a-lane li span { display: block; color: #c9d4e6; font-size: .84rem; line-height: 1.55; }
.pj3a-lane li:nth-child(2) { animation-delay: .1s; } .pj3a-lane li:nth-child(3) { animation-delay: .2s; }
.pj3a-lane li:nth-child(4) { animation-delay: .3s; } .pj3a-lane li:nth-child(5) { animation-delay: .4s; }
.pj3a-lane--out li { animation-delay: .5s; } .pj3a-lane--out li:nth-child(2) { animation-delay: .6s; }
.pj3a-lane--out li:nth-child(3) { animation-delay: .7s; } .pj3a-lane--out li:nth-child(4) { animation-delay: .8s; }
.pj3a-lane--out li:nth-child(5) { animation-delay: .9s; }

.pj3a-hub {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px;
    padding: 18px 24px; border-radius: 999px; background: #fff; color: var(--p3-deep); text-align: center;
    box-shadow: 0 16px 40px rgba(5,10,25,.3); margin: 0 8%;
}
.pj3a-hub small { font-size: .85rem; color: var(--p3-muted); }
.pj3a-hub b { font-size: 1.1rem; }
.pj3a-hub em { font-style: normal; color: var(--p3-accent); }
.pj3a-lanes__note { margin: 28px auto 0; max-width: 720px; text-align: center; color: #c9d4e6 !important; font-size: .95rem; line-height: 1.8; }

/* ---------- ④ 需求對應卡片 (白底) ---------- */
.pj3a-needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pj3a-need {
    position: relative; display: flex; flex-direction: column; border-radius: var(--p3-radius); padding: 28px 26px 26px;
    background: #fff; border: 1px solid var(--p3-line); transition: box-shadow .25s, transform .25s, border-color .25s;
}
.pj3a-need:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 20px 44px rgba(31,43,69,.12); }
.pj3a-need__no { font-size: 2.2rem; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--p3-accent); margin-bottom: 16px; }
.pj3a-need__q {
    font-size: .88rem; color: var(--p3-slate); background: var(--p3-tint); border-radius: 4px 12px 12px 12px;
    padding: 8px 12px; margin-bottom: 14px; line-height: 1.6; align-self: flex-start;
}
.pj3a-need__q::before { content: "你說："; font-weight: 600; }
.pj3a-need h3 { font-size: 1.2rem; font-weight: 700; color: var(--p3-ink); margin-bottom: .7rem; }
.pj3a-need p { margin: 0; line-height: 1.75; font-size: .95rem; }
.pj3a-io { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 14px; font-size: .78rem; font-weight: 600; }
.pj3a-io span { padding: .22rem .6rem; border-radius: 6px; border: 1px solid var(--p3-line); color: var(--p3-slate); background: #fff; }
.pj3a-io span:last-child { background: var(--p3-deep); border-color: var(--p3-deep); color: #fff; }
.pj3a-io i { position: relative; width: 18px; height: 1.5px; background: var(--p3-accent); }
.pj3a-io i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1.5px solid var(--p3-accent); border-right: 1.5px solid var(--p3-accent); transform: rotate(45deg); }

/* ---------- ⑤ 月報表示意 (淡藍底) ---------- */
.pj3a-reports { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start; }
.pj3a-reports__side { display: grid; gap: 22px; }
.pj3a-rpt { background: #fff; border-radius: var(--p3-radius); padding: 22px 24px; box-shadow: 0 14px 34px rgba(31,43,69,.08); }
.pj3a-rpt__h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pj3a-rpt__h b { font-size: 1.05rem; color: var(--p3-ink); }
.pj3a-rpt__h small { font-size: .78rem; color: var(--p3-muted); }
.pj3a-rpt__foot { margin: 12px 0 0; font-size: .8rem; color: var(--p3-muted); }

.pj3a-table-wrap { overflow-x: auto; }
.pj3a-table { width: 100%; border-collapse: collapse; font-size: .88rem; white-space: nowrap; }
.pj3a-table th { font-weight: 600; font-size: .76rem; color: var(--p3-muted); text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--p3-line); }
.pj3a-table td { text-align: right; padding: 10px 10px; border-bottom: 1px solid #eef1f6; color: var(--p3-ink); font-variant-numeric: tabular-nums; }
.pj3a-table th:first-child, .pj3a-table td:first-child { text-align: left; padding-left: 0; }
.pj3a-table td:first-child small { display: block; font-size: .72rem; color: var(--p3-muted); }
.pj3a-table .gm { font-weight: 700; color: #138a63; }
.pj3a-table .gm.neg { color: #d63b40; }
.pj3a-table tr.neg td { background: #fff6f6; }

.pj3a-ar { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
.pj3a-ring {
    --v: 70; position: relative; width: 112px; height: 112px; border-radius: 50%;
    background: conic-gradient(var(--p3-accent) calc(var(--v) * 1%), var(--p3-tint) 0);
}
.pj3a-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.pj3a-ring span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pj3a-ring b { font-size: 1.5rem; line-height: 1.1; color: var(--p3-ink); }
.pj3a-ring small { font-size: .7rem; color: var(--p3-muted); }
.pj3a-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pj3a-bars li { display: grid; grid-template-columns: 54px 1fr 38px; align-items: center; gap: 8px; font-size: .8rem; }
.pj3a-bars li > div { height: 8px; border-radius: 6px; background: var(--p3-tint); overflow: hidden; }
.pj3a-bars i { display: block; height: 100%; border-radius: 6px; background: var(--p3-accent); transform-origin: left; animation: pj3a-grow 1.3s .2s ease-out both; }
.pj3a-bars em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.pj3a-bars li.warn i { background: linear-gradient(90deg, #ffb020, #e5484d); }
.pj3a-bars li.warn em { color: #d63b40; font-weight: 700; }

.pj3a-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pj3a-chips li { font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; background: var(--p3-tint); color: var(--p3-slate); }

.pj3-section--tint .pj3-full { background: #fff; }

/* ---------- ⑨ 結尾：導入步驟卡 ---------- */
.pj3a-steps { background: #fff; color: var(--p3-ink); border-radius: var(--p3-radius); padding: 26px 26px 22px; box-shadow: 0 30px 70px rgba(5,10,25,.45); }
.pj3a-steps > b { display: block; font-size: 1.1rem; margin-bottom: .2rem; }
.pj3a-steps > small { display: block; color: var(--p3-muted); font-size: .85rem; margin-bottom: 14px; }
.pj3a-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: s3; }
.pj3a-steps li { counter-increment: s3; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--p3-line); font-size: .92rem; line-height: 1.6; color: var(--p3-muted); }
.pj3a-steps li::before {
    content: counter(s3); width: 26px; height: 26px; border-radius: 50%; background: var(--p3-tint); color: var(--p3-accent);
    font-weight: 700; font-size: .82rem; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.pj3a-steps li b { display: block; color: var(--p3-ink); font-size: .98rem; }

/* ---------- AI 版：問問工程 AI 示意 ---------- */
.pj3a-ask { background: #fff; border-radius: var(--p3-radius); box-shadow: 0 24px 60px rgba(5,10,25,.35); overflow: hidden; color: var(--p3-ink); }
.pj3a-ask__h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--p3-line); }
.pj3a-ask__h b { display: block; font-size: .98rem; }
.pj3a-ask__h small { font-size: .75rem; color: #20b486; }
.pj3a-ask__log { padding: 18px; display: grid; gap: 12px; background: #fafbfd; }
.pj3a-ask__me, .pj3a-ask__ai { max-width: 88%; padding: 10px 14px; font-size: .9rem; line-height: 1.65; animation: pj3a-up .45s ease-out both; }
.pj3a-ask__me { justify-self: end; background: var(--p3-deep); color: #fff; border-radius: 14px 4px 14px 14px; }
.pj3a-ask__ai { justify-self: start; background: #fff; border: 1px solid var(--p3-line); border-radius: 4px 14px 14px 14px; }
.pj3a-ask__ai ul { margin: 6px 0 0; padding-left: 1.1rem; }
.pj3a-ask__ai .neg { color: #d63b40; font-weight: 700; }
.pj3a-ask__log > :nth-child(2) { animation-delay: .5s; } .pj3a-ask__log > :nth-child(3) { animation-delay: 1.3s; }
.pj3a-ask__log > :nth-child(4) { animation-delay: 1.8s; }
.pj3a-ask__q { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--p3-line); }
.pj3a-ask__q button {
    border: 1px solid var(--p3-line); background: #fff; border-radius: 999px; padding: .35rem .85rem; font-size: .82rem;
    color: var(--p3-deep); cursor: pointer; font-family: var(--p3-font); transition: background .2s, color .2s;
}
.pj3a-ask__q button:hover { background: var(--p3-deep); color: #fff; }
.pj3a-aiwrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 34px; align-items: start; }
.pj3a-aiwrap .pj3a-ask { position: sticky; top: 110px; }
.pj3a-aiwrap .pj3-ai-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pj3a-aiwrap .pj3-ai { padding: 22px 22px 24px; }
.pj3a-aiwrap .pj3-ai__top { margin-bottom: 12px; min-height: 0; }
.pj3a-aiwrap .pj3-ai__no { font-size: 1.8rem; }
.pj3a-aiwrap .pj3-ai h3 { font-size: 1.08rem; }
.pj3a-aiwrap .pj3-ai p { font-size: .88rem; }

/* ---------- RWD ---------- */
@media (max-width: 1199.98px) {
    .pj3a-lane li { padding: 20px 18px 20px 16px; }
}
@media (max-width: 991.98px) {
    .pj3a-lane { grid-template-columns: 1fr; }
    .pj3a-lane__h { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding: 18px 20px; }
    .pj3a-lane ol { grid-template-columns: 1fr; }
    .pj3a-lane li { padding: 14px 20px 14px 44px; }
    .pj3a-lane li + li { border-left: 0; border-top: 1px dashed rgba(255,255,255,.14); }
    .pj3a-lane li::before { content: ""; position: absolute; left: 20px; top: 21px; width: 9px; height: 9px; border-radius: 50%; background: var(--p3-gold); }
    .pj3a-lane--out li::before { background: #8fb8ff; }
    .pj3a-lane li:not(:last-child)::after { display: none; }
    .pj3a-hub { margin: 0; border-radius: var(--p3-radius); }
    .pj3a-needs { grid-template-columns: repeat(2, 1fr); }
    .pj3a-reports { grid-template-columns: 1fr; }
    .pj3a-aiwrap { grid-template-columns: 1fr; }
    .pj3a-aiwrap .pj3a-ask { position: static; }
}
@media (max-width: 767.98px) {
    .pj3a-needs { grid-template-columns: 1fr; }
    .pj3a-aiwrap .pj3-ai-grid { grid-template-columns: 1fr; }
    .pj3a-ar { grid-template-columns: 1fr; justify-items: center; }
    .pj3a-ar .pj3a-bars { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .pj3a-lane li, .pj3a-bars i, .pj3a-ask__me, .pj3a-ask__ai { animation: none !important; }
}
