/* ================================================
   Chart & Process 視覺化元件
   ================================================ */

/* ───── 流程步驟（六步驟視覺化） ───── */
.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 60px 0 80px;
  position: relative;
}

.process-step-card {
  display: grid;
  grid-template-columns: 120px 1fr 280px;
  gap: 32px;
  padding: 36px;
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: 18px;
  margin-bottom: 24px;
  position: relative;
  transition: all 0.3s var(--ease);
}
.process-step-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 16px 40px rgba(13,79,74,0.1);
  transform: translateY(-2px);
}
/* 連接線：底部到下一張卡 */
.process-step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 80px;
  bottom: -32px;
  width: 2px; height: 32px;
  background-image: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent) 50%, transparent 50%, transparent 100%);
  background-size: 100% 8px;
  background-repeat: repeat-y;
}

.process-step-card .step-num {
  font-family: var(--font-hand, "Caveat", cursive);
  font-size: 5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 0.9;
  opacity: 0.85;
  transform: rotate(-4deg);
}

.process-step-card .step-body h3 {
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: var(--color-ink);
}
.process-step-card .step-body .step-subtitle {
  font-family: var(--font-hand, "Caveat", cursive);
  font-size: 1.4rem;
  color: var(--color-primary);
  display: block;
  margin-bottom: 16px;
  transform: rotate(-0.5deg);
  display: inline-block;
}
.process-step-card .step-body p {
  color: var(--color-ink-soft);
  font-size: 0.96rem;
  line-height: 1.75;
  margin: 0 0 16px;
}

.process-step-card .step-deliverables {
  background: var(--color-bg-soft);
  border-radius: 12px;
  padding: 20px 22px;
  border-left: 4px solid var(--color-accent);
}
.process-step-card .step-deliverables h5 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 12px;
}
.process-step-card .step-deliverables ul {
  margin: 0; padding: 0;
}
.process-step-card .step-deliverables li {
  padding: 4px 0 4px 20px;
  font-size: 0.88rem;
  color: var(--color-ink-soft);
  position: relative;
  line-height: 1.5;
}
.process-step-card .step-deliverables li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 12px; height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 6 Q 4 9, 5 9 Q 7 6, 10 3' stroke='%233ec79a' stroke-width='1.8' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
}

@media (max-width: 900px) {
  .process-step-card { grid-template-columns: 80px 1fr; gap: 20px; padding: 24px; }
  .process-step-card .step-deliverables { grid-column: 1 / -1; }
  .process-step-card .step-num { font-size: 3.5rem; }
  .process-step-card:not(:last-child)::after { left: 56px; }
}

/* ───── 客戶類型四宮格 ───── */
.customer-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 48px 0;
}
@media (max-width: 900px) { .customer-types-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .customer-types-grid { grid-template-columns: 1fr; } }

.customer-card {
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all 0.3s var(--ease);
  overflow: hidden;
}
.customer-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.customer-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(13,79,74,0.12);
}
.customer-card:hover::before { transform: scaleX(1); }
.customer-card .customer-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  background: var(--gradient-card);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
}
.customer-card .customer-icon svg { width: 38px; height: 38px; }
.customer-card h3 {
  font-size: 1.15rem;
  margin: 0 0 12px;
  color: var(--color-ink);
}
.customer-card p {
  font-size: 0.9rem;
  color: var(--color-ink-soft);
  line-height: 1.7;
  margin: 0 0 16px;
}
.customer-card .keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.customer-card .keywords span {
  font-size: 0.74rem;
  padding: 4px 10px;
  background: var(--color-bg-muted);
  color: var(--color-primary);
  border-radius: 99px;
  font-weight: 600;
}

/* ───── 用電負載曲線圖 ───── */
.load-chart {
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: 18px;
  padding: 32px 24px 16px;
}
.load-chart-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--color-ink);
}
.load-chart-subtitle {
  font-size: 0.88rem;
  color: var(--color-ink-muted);
  margin: 0 0 20px;
}
.load-chart svg { width: 100%; height: auto; display: block; }
.load-chart-legend {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--color-line);
  font-size: 0.85rem;
}
.load-chart-legend .legend-item {
  display: flex; align-items: center; gap: 8px;
  color: var(--color-ink-soft);
}
.load-chart-legend .legend-color {
  display: inline-block;
  width: 16px; height: 4px;
  border-radius: 2px;
}

/* ───── ROI 比較條形圖 ───── */
.roi-chart {
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: 18px;
  padding: 32px;
}
.roi-bar {
  margin-bottom: 24px;
}
.roi-bar-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.roi-bar-head .label {
  font-weight: 600;
  color: var(--color-ink);
  font-size: 0.95rem;
}
.roi-bar-head .value {
  font-family: var(--font-hand, cursive);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
}
.roi-bar-track {
  height: 28px;
  background: var(--color-bg-muted);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.roi-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 14px;
  position: relative;
  transition: width 1.2s var(--ease);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 14px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}
.roi-bar-fill.muted {
  background: linear-gradient(90deg, #8da6a3 0%, #b0c2bf 100%);
}

/* ───── 財務分析能力清單 ───── */
.fin-capabilities {
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: 22px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.fin-capabilities::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 100% 0%, rgba(62,199,154,0.25) 0%, transparent 60%),
    radial-gradient(40% 60% at 0% 100%, rgba(0,0,0,0.2) 0%, transparent 60%);
}
.fin-capabilities > * { position: relative; z-index: 1; }
.fin-capabilities h3 {
  color: #fff;
  font-size: 1.6rem;
  margin: 0 0 8px;
}
.fin-capabilities .subtitle {
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
  font-size: 0.95rem;
}
.fin-capabilities .fin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 700px) { .fin-capabilities .fin-grid { grid-template-columns: 1fr; } }
.fin-capabilities .fin-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  border-left: 3px solid var(--color-accent);
  font-size: 0.92rem;
  line-height: 1.6;
}
.fin-capabilities .fin-item::before {
  content: "▸";
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ───── 互動式案場卡片 ───── */
.projects-interactive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.project-int-card {
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  position: relative;
  display: flex; flex-direction: column;
}
.project-int-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(13,79,74,0.15);
}
.project-int-card .pi-img {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.project-int-card .pi-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6,47,44,0.85) 100%);
}
.project-int-card .pi-tag {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  padding: 6px 12px;
  background: rgba(255,255,255,0.95);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}
.project-int-card .pi-status {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
}
.project-int-card .pi-status.online { background: var(--color-accent); color: var(--color-primary-dark); }
.project-int-card .pi-status.building { background: #ffa726; color: #5a3500; }
.project-int-card .pi-status.consult { background: rgba(255,255,255,0.85); color: var(--color-primary); }

.project-int-card .pi-img-meta {
  position: absolute;
  bottom: 16px; left: 20px; right: 20px;
  z-index: 2;
  color: #fff;
}
.project-int-card .pi-img-meta .capacity {
  font-family: var(--font-hand, cursive);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}
.project-int-card .pi-img-meta .loc {
  font-size: 0.85rem;
  opacity: 0.85;
}

.project-int-card .pi-body {
  padding: 24px 26px 28px;
  flex: 1;
  display: flex; flex-direction: column;
}
.project-int-card .pi-body h3 {
  font-size: 1.15rem;
  margin: 0 0 10px;
  color: var(--color-ink);
  line-height: 1.4;
}
.project-int-card .pi-body .pi-summary {
  font-size: 0.92rem;
  color: var(--color-ink-soft);
  line-height: 1.7;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-int-card .pi-cta {
  margin-top: auto;
  display: flex; align-items: center; gap: 6px;
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 700;
}
.project-int-card .pi-cta::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}
.project-int-card:hover .pi-cta::after { transform: translateX(4px); }

/* ───── 案場 Modal ───── */
.proj-modal {
  position: fixed;
  inset: 0;
  background: rgba(6,47,44,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 20px;
  animation: modalFadeIn 0.25s ease;
}
.proj-modal.open { display: flex; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.proj-modal-content {
  background: #fff;
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  position: relative;
  animation: modalSlideUp 0.35s var(--ease);
  margin: auto;
}
@keyframes modalSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.proj-modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--color-ink);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: none;
  transition: all 0.2s;
}
.proj-modal-close:hover { background: #fff; transform: rotate(90deg); }

.proj-modal-hero {
  aspect-ratio: 21/9;
  background-size: cover;
  background-position: center;
  position: relative;
}
.proj-modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6,47,44,0.92) 100%);
}
.proj-modal-hero-content {
  position: absolute;
  bottom: 32px; left: 36px; right: 36px;
  z-index: 2;
  color: #fff;
}
.proj-modal-hero-content .tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.proj-modal-hero-content h2 {
  color: #fff;
  font-size: 1.8rem;
  margin: 0;
  line-height: 1.2;
}

.proj-modal-body {
  padding: 36px 40px 40px;
}
.proj-modal-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--color-line);
}
@media (max-width: 700px) { .proj-modal-meta { grid-template-columns: repeat(2, 1fr); } }
.proj-modal-meta .meta-item small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin-bottom: 4px;
}
.proj-modal-meta .meta-item strong {
  display: block;
  font-size: 1rem;
  color: var(--color-ink);
  font-weight: 700;
}
.proj-modal-body h3 {
  font-size: 1.15rem;
  margin: 0 0 14px;
  color: var(--color-ink);
}
.proj-modal-body .summary {
  font-size: 1rem;
  color: var(--color-ink-soft);
  line-height: 1.85;
  margin-bottom: 28px;
}
.proj-modal-body .highlights {
  background: var(--color-bg-soft);
  border-radius: 14px;
  padding: 24px 28px;
  border-left: 4px solid var(--color-accent);
}
.proj-modal-body .highlights ul { margin: 0; padding: 0; list-style: none; }
.proj-modal-body .highlights li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  line-height: 1.7;
}
.proj-modal-body .highlights li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M2 7 Q 5 11, 6 11 Q 9 7, 12 3' stroke='%233ec79a' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
}

.proj-modal-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 600px) { .proj-modal-gallery { grid-template-columns: repeat(2, 1fr); } }
.proj-modal-gallery .gallery-img {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.proj-modal-gallery .gallery-img:hover { transform: scale(1.04); }

/* ───── 大清單 ───── */
.big-list-wrap {
  background: #fff;
  border: 2px solid var(--color-ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 8px 8px 0 rgba(13,79,74,0.08);
}
.big-list-head {
  display: grid;
  grid-template-columns: 60px 1.8fr 1fr 1.1fr 1fr 110px 100px;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 16px 24px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  gap: 16px;
}
.big-list-row {
  display: grid;
  grid-template-columns: 60px 1.8fr 1fr 1.1fr 1fr 110px 100px;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px dashed var(--color-line);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  gap: 16px;
}
.big-list-row:last-child { border-bottom: none; }
.big-list-row:hover {
  background: rgba(62,199,154,0.06);
  transform: translateX(4px);
}
.big-list-row .bl-num {
  width: 40px; height: 40px;
  background: var(--color-bg-muted);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hand, cursive);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
}
.big-list-row .bl-name {
  font-weight: 700;
  color: var(--color-ink);
  font-size: 1rem;
  line-height: 1.4;
}
.big-list-row .bl-owner {
  font-size: 0.82rem;
  color: var(--color-ink-muted);
  margin-top: 4px;
}
.big-list-row .bl-cell {
  font-size: 0.92rem;
  color: var(--color-ink-soft);
}
.big-list-row .bl-cell.capacity {
  font-family: var(--font-hand, cursive);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}
.big-list-row .bl-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}
.big-list-row .bl-status.online { background: rgba(62,199,154,0.18); color: #1a7a72; }
.big-list-row .bl-status.building { background: rgba(255,167,38,0.18); color: #c77800; }
.big-list-row .bl-status.consult { background: rgba(13,79,74,0.12); color: var(--color-primary); }
.big-list-row .bl-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
}
.big-list-row .bl-cta::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
.big-list-row:hover .bl-cta::after { transform: translateX(4px); }

@media (max-width: 900px) {
  .big-list-head { display: none; }
  .big-list-row {
    grid-template-columns: 50px 1fr;
    gap: 12px;
    padding: 20px;
  }
  .big-list-row .bl-cell.capacity,
  .big-list-row .bl-cell.type,
  .big-list-row .bl-cell.role,
  .big-list-row .bl-cta { grid-column: 2; font-size: 0.85rem; justify-content: flex-start; }
  .big-list-row .bl-status { justify-self: start; }
}

/* ───── 篩選按鈕 ───── */
.proj-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 40px 0 8px;
}
.proj-filter button {
  padding: 10px 22px;
  border: 1.5px solid var(--color-line);
  background: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.proj-filter button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.proj-filter button.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
