/* ============================================================
   元件：製作流程（components/processSteps.php 專用）
   含 .sw-process（區塊背景/裝飾）/ .sw-steps / .sw-step / .sw-mini-cta / .sw-more-plans
   案例與方案（.sw-process-head / .sw-case-tab / .sw-pricing-split / .sw-plan-* 等）
   已拆至 css/components/case-plans.css。
   注意：相對路徑 ../../img 與原 css/pages 同深度，搬移後不變。
   ============================================================ */

/* ---- 製作流程（淺底；4×2 蛇形流程卡 + 區塊背景） ---- */
.sw-process {
  position: relative;
  z-index: 0;
  padding: 250px 0 180px;
  background: url('../../img/sw-process-bg.png') center center/cover no-repeat;
  color: var(--c-text-2);
}

@media(max-width: 1199px) {
  .sw-process {
    padding: 250px 0px 110px;
  }
  .sw-process .sw-steps-container {
    max-width: 100%!important;
    padding: 0;
  }
}

@media(max-width: 991px) {
  .sw-process {
    padding: 250px 0 20px;
  }
}

#sw-process-icon-block {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.sw-process-left-top-img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  min-height: 300px;
  height: calc(100vw / 1920 * 639);
}

.sw-process-left-mid-img {
  position: absolute;
  top: 48%;
  left: 5%;
  min-height: 200px;
  height: calc(100vw / 1920 * 366);
}

.sw-process-right-mid-img {
  position: absolute;
  top: 30%;
  right: 0;
  min-height: 400px;
  height: calc(100vw / 1920 * 1061);
}
@media (max-width: 991px) {
  .sw-process-left-top-img {
    top: 60px;
  }
  .sw-process-left-mid-img {
    top: 18%;
    left: -20%;
  }
  .sw-process-right-mid-img {
    right: -15%;
    top: 10%;
  }
}
/* 7 步驟流程（4×2 蛇形：上排左→右、下排右→左，諮詢卡置左下） */
.sw-steps {
  list-style: none;
  margin: 0 0 215px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: 75px 24px;
}

.sw-steps-mobile {
  display: none;
  overflow: hidden;
}

.sw-steps > :nth-child(1) {
  grid-area: 1 / 1;
}
.sw-steps > :nth-child(2) {
  grid-area: 1 / 2;
}
.sw-steps > :nth-child(3) {
  grid-area: 1 / 3;
}
.sw-steps > :nth-child(4) {
  grid-area: 1 / 4;
}
.sw-steps > :nth-child(5) {
  grid-area: 2 / 4;
}
.sw-steps > :nth-child(6) {
  grid-area: 2 / 3;
}
.sw-steps > :nth-child(7) {
  grid-area: 2 / 2;
}
.sw-steps > :nth-child(8) {
  grid-area: 2 / 1;
}

.sw-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  min-height: 205px;
  padding: 24px 28px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--c-on-dark);
  border-radius: 20px;
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.12);
}

.sw-step-icon {
  width: 88px;
  height: 71px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sw-step-icon img {
  max-height: 71px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.sw-step-title {
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--c-bg-black);
  margin: 0;
  letter-spacing: -0.45px;
}

.sw-step-desc {
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: 1.5;
  color: var(--c-bg-black);
  margin: 0;
  letter-spacing: -0.3px;
}

/* 橘色圓形箭頭（串接流向，1~7 卡） */
.sw-steps .sw-step:nth-child(-n + 7)::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;

  background: url('../../img/sw-step-right-arrow.svg') no-repeat center /
    contain;
  background-size: 15px 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(243, 152, 0, 0.4);
  z-index: 3;
}

.sw-steps .sw-step:nth-child(-n + 7)::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--c-brand-hover), var(--c-brand));
  z-index: 3;
}

/* 上排 1,2,3：向右箭頭 */
.sw-steps .sw-step:nth-child(1)::after,
.sw-steps .sw-step:nth-child(2)::after,
.sw-steps .sw-step:nth-child(3)::after,
.sw-steps .sw-step:nth-child(1)::before,
.sw-steps .sw-step:nth-child(2)::before,
.sw-steps .sw-step:nth-child(3)::before {
  top: 50%;
  right: -45px;
  transform: translateY(-50%);
}

/* 第 4 張：向下箭頭（轉折處） */
.sw-steps .sw-step:nth-child(4)::after,
.sw-steps .sw-step:nth-child(4)::before {
  left: 50%;
  bottom: -68px;
  transform: translateX(-50%) rotate(90deg);
}

/* 下排 5,6,7：向左箭頭 */
.sw-steps .sw-step:nth-child(5)::after,
.sw-steps .sw-step:nth-child(6)::after,
.sw-steps .sw-step:nth-child(7)::after,
.sw-steps .sw-step:nth-child(5)::before,
.sw-steps .sw-step:nth-child(6)::before,
.sw-steps .sw-step:nth-child(7)::before {
  content: '';
  top: 50%;
  left: -45px;
  transform: translateY(-50%) scale(-1);
}

/* 諮詢卡（蛇形左下格，橘→黑漸層） */
.sw-step--cta {
  background: linear-gradient(
    -45deg,
    var(--c-yellow) 0%,
    var(--c-bg-dark) 42%,
    var(--c-bg-dark) 100%
  );
  border: 0;
  color: var(--c-on-dark);
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25);
  gap: 18px;
}

.sw-mini-cta-text {
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--c-on-dark);
  margin: 0;
  line-height: 1.5;
  text-align: center;
}

.sw-mini-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: transparent;
  border: 1px solid var(--c-on-dark);
  color: var(--c-on-dark);
  text-decoration: none;
  border-radius: 40px;
  font-size: var(--fs-base);
  letter-spacing: 1px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.sw-mini-cta-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--c-on-dark);
}

.sw-mini-cta-arrow {
  width: 22px;
  height: 16px;
  background: url('../../img/sw-mini-cta-btn-icon.svg') no-repeat center /
    contain;
}


/* More Plans 圓形指示（置於步驟與案例方案標題之間，水平置中） */
.sw-more-plans {
  display: block;
  width: 125px;
  height: 125px;
  margin: 8px auto clamp(40px, 5vw, 67px);
  border-radius: 50%;
  border: 1px solid var(--c-brand);
  color: var(--c-brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 1px;
  transition: transform 0.2s ease;
  position: relative;
}
.sw-more-plans::before {
  content: '';
  position: absolute;
  bottom: 85%;
  left: 50%;
  transform: translateX(-50%);
  height: 92px;
  width: 1px;
  background: var(--c-brand);
}
.sw-more-plans:hover {
  transform: scale(1.06);
  color: var(--c-brand);
}

.sw-more-plans-circle {
  line-height: 1.3;
}
@media (max-width: 991px) {
  .sw-more-plans {
    display: none;
  }
}

/* ============ RWD ============ */
@media (max-width: 1199.98px) {
  /* 蛇形改為一般 2 欄流（重置 grid-area、隱藏箭頭） */
  .sw-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 24px;
    margin-bottom: 161px;
  }
  .sw-steps-pc {
    display: none;
  }
  .sw-steps-mobile {
    display: block;
    padding: 0 10px 25px;
  }
  .sw-steps-mobile .swiper-wrapper {
  }
  .sw-steps-mobile .swiper-slide {
    z-index: 0;
  }
  .sw-steps-mobile .swiper-slide {
    position: relative;
    z-index: 1;
  }

  .sw-steps-mobile .swiper-slide-active {
    z-index: 10;
  }
  .sw-steps-mobile .swiper-slide-prev {
    z-index: 11;
  }
  .sw-steps-mobile .sw-step {
    position: relative;
    z-index: 2;
    padding: 24px 20px 14px;
  }

  .sw-steps > * {
    grid-area: auto !important;
  }

  .sw-steps .sw-step::after,
  .sw-steps .sw-step::before {
    top: 50%;
    right: -40px;
    transform: translateY(-50%);
  }

  .sw-steps .sw-step.sw-step--cta::after,
  .sw-steps .sw-step.sw-step--cta::before {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .sw-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .sw-steps {
    grid-template-columns: 1fr;
    margin-bottom: 60px;
  }
}
