.tutorial {
  background: #fff;
  min-height: 100vh;
  padding-top: 10px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}
/* 背景裝飾：淡色圓形 */
.tutorial::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(13, 110, 253, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.tutorial::after {
  content: "";
  position: absolute;
  bottom: 200px;
  left: -150px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(102, 16, 242, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.tutorial > .container > .card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  position: relative;
  z-index: 1;
}
/* 主標題 */
.tutorial-header {
  text-align: center;
  padding: 2.5rem 0 2rem;
  position: relative;
}
.tutorial-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  background: #1a1a2e;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tutorial-header p {
  color: #64748b;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
/* 主標題下方分隔線 - 漸層動畫 */
.tutorial-header::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #0d6efd 0%, #6610f2 50%, #0d6efd 100%);
  background-size: 200% 100%;
  margin: 0 auto;
  border-radius: 2px;
  animation: shimmerLine 3s ease infinite;
}
@keyframes shimmerLine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* 步驟容器 - 含連接線 */
.tutorial-steps {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  position: relative;
}
/* 步驟間垂直連接線 */
.tutorial-steps::before {
  content: "";
  position: absolute;
  left: calc(1.5rem + 24px);
  top: 60px;
  bottom: 60px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    #0d6efd 0px,
    #0d6efd 8px,
    transparent 8px,
    transparent 16px
  );
  opacity: 0.4;
}
/* 單一步驟區塊 */
.tutorial-step {
  display: flex;
  gap: 2rem;
  padding: 2rem 1.5rem;
  border-bottom: none;
  align-items: flex-start;
  position: relative;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}
.tutorial-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #0d6efd 0%, #6610f2 100%);
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* 步驟區塊 hover 效果 */
.tutorial-step:hover {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.03) 0%, rgba(102, 16, 242, 0.02) 100%);
  transform: translateX(8px);
}
.tutorial-step:hover::before {
  opacity: 1;
}
/* 步驟編號 - 漸層底 */
.tutorial-step-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  color: #fff;
  border-radius: 14px;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}
.tutorial-step:hover .tutorial-step-number {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}
/* 內容區 */
.tutorial-step-content {
  flex: 1;
  min-width: 0;
}
/* 步驟標題 - 漸層底線 hover */
.tutorial-step-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
  margin-top: 0;
  display: inline-block;
  position: relative;
}
.tutorial-step-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d6efd 0%, #6610f2 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.tutorial-step:hover .tutorial-step-title::after {
  width: 100%;
}
/* 圖片區 */
.tutorial-step-image {
  margin-bottom: 1rem;
}
.tutorial-step-image img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
/* 步驟說明 */
.tutorial-step-desc {
  font-size: 1.2rem;
  color: #64748b;
  line-height: 1.7;
  margin: 0;
  transition: color 0.3s ease;
}
.tutorial-step:hover .tutorial-step-desc {
  color: #475569;
}
/* 交錯進場動畫 */
.tutorial-step {
  opacity: 0;
}
/* 奇數從左進場 */
.tutorial-step:nth-child(odd) {
  transform: translateX(-40px);
  animation: slideFromLeft 0.6s ease forwards;
}
/* 偶數從右進場 */
.tutorial-step:nth-child(even) {
  transform: translateX(40px);
  animation: slideFromRight 0.6s ease forwards;
}
.tutorial-step:nth-child(1) { animation-delay: 0.1s; }
.tutorial-step:nth-child(2) { animation-delay: 0.25s; }
.tutorial-step:nth-child(3) { animation-delay: 0.4s; }
.tutorial-step:nth-child(4) { animation-delay: 0.55s; }

@keyframes slideFromLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideFromRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* 聯繫表單區塊 */
.tutorial-contact {
  max-width: 600px;
  margin: 3rem auto 2rem;
  padding: 2.5rem;
  background: #f8fafc;
  border-radius: 0;
  border-top: 1px solid #e2e8f0;
  box-shadow: none;
}
.tutorial-contact h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
  text-align: center;
}
.tutorial-contact > p {
  text-align: center;
  color: #64748b;
  margin-bottom: 2rem;
}
.tutorial-contact .form-control {
  border-radius: 0;
  border: none;
  border-bottom: 2px solid #e2e8f0;
  background: transparent;
  padding: 0.75rem 0;
  transition: border-color 0.2s ease;
}
.tutorial-contact .form-control:focus {
  border-color: #0d6efd;
  box-shadow: none;
  background: transparent;
}
.tutorial-contact .form-floating > label {
  padding-left: 0;
}
.tutorial-contact .btn-primary {
  background: #0d6efd;
  border: none;
  border-radius: 0;
  padding: 0.85rem 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s ease;
}
.tutorial-contact .btn-primary:hover {
  background: #0b5ed7;
}
/* RWD：小螢幕調整 */
@media (max-width: 768px) {
  /* 隱藏背景裝飾 */
  .tutorial::before,
  .tutorial::after {
    display: none;
  }
  .tutorial-header h1 {
    font-size: 2rem;
  }
  /* 隱藏連接線 */
  .tutorial-steps::before {
    display: none;
  }
  .tutorial-step {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }
  /* 移動端：hover 效果調整 */
  .tutorial-step:hover {
    transform: translateX(0);
    background: rgba(13, 110, 253, 0.02);
  }
  .tutorial-step::before {
    display: none;
  }
  .tutorial-step-number {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
    border-radius: 12px;
  }
  .tutorial-step:hover .tutorial-step-number {
    transform: scale(1.05) rotate(0deg);
  }
  .tutorial-step-title {
    font-size: 1.25rem;
  }
  .tutorial-step-desc {
    font-size: 1rem;
  }
  /* 圖片懸浮效果調整 */
  .tutorial-step:hover .tutorial-step-image img {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.12);
  }
  .tutorial-contact {
    padding: 1.5rem;
    margin: 2rem 0.5rem;
  }
  /* 移動端進場動畫統一 */
  .tutorial-step:nth-child(odd),
  .tutorial-step:nth-child(even) {
    transform: translateY(20px);
    animation: mobileSlideUp 0.5s ease forwards;
  }
  @keyframes mobileSlideUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
