/* ============================================================
   how.css — 이용방법 페이지 전용 스타일
   ============================================================ */

/* ── 페이지 상단 여백 (fixed nav 80px 보정) ── */
body {
  padding-top: 80px;
}
@media (max-width: 640px) {
  body {
    padding-top: 60px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.how-hero {
  background: linear-gradient(135deg, #1C273F 0%, #1A3A6B 60%, #3883FF 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0 72px;
}

.how-hero .section-eyebrow {
  color: var(--color-primary-light);
}

.how-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 var(--space-5);
}

.how-hero-accent {
  color: var(--color-primary);
}

.how-hero-sub {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ══════════════════════════════════════
   STEPS SECTION
══════════════════════════════════════ */
.how-steps {
  background: var(--bg-surface);
  padding: 80px 0 88px;
}

.how-steps-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

/* ── 각 STEP 카드 ── */
.how-step {
  position: relative;
  flex: 1;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--space-6);
}

/* ── 단계 사이 연결선 (데스크톱) ── */
.how-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 52px; /* 아이콘 원 세로 중앙 */
  right: calc(-50% + 28px);
  width: calc(100% - 56px);
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  opacity: 0.4;
  z-index: 0;
}

/* ── 대형 배경 숫자 ── */
.how-step-num {
  font-size: 5rem;
  font-weight: var(--font-weight-extrabold);
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.12;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: -0.04em;
  z-index: 0;
  user-select: none;
  pointer-events: none;
}

/* ── 전면 숫자 레이블 ── */
.how-step-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

/* ── 아이콘 원형 컨테이너 ── */
.how-step-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  box-shadow: 0 4px 20px var(--color-cta-glow);
  position: relative;
  z-index: 1;
}

.how-step-icon svg {
  color: #fff;
}

/* ── 제목 ── */
.how-step-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 1;
}

/* ── 설명 ── */
.how-step-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

/* ── 시간 배지 ── */
.how-step-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-dark);
  background: var(--color-trust-bg);
  border: 1px solid rgba(56, 131, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   CTA SECTION
══════════════════════════════════════ */
.how-cta {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: 64px 0;
  text-align: center;
}

.how-cta-text {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: var(--font-weight-bold);
  color: #fff;
  margin-bottom: var(--space-8);
  letter-spacing: -0.02em;
}

.how-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.how-cta .btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.how-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* ══════════════════════════════════════
   MOBILE (≤ 640px)
══════════════════════════════════════ */
@media (max-width: 640px) {
  .how-hero {
    padding: 60px 0 56px;
  }

  .how-hero-title {
    font-size: 2rem; /* 32px 최소 */
  }

  .how-steps {
    padding: 56px 0 64px;
  }

  .how-step-icon {
    width: 56px;
    height: 56px;
  }

  .how-steps-wrap {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  /* 모바일: 연결선을 세로로 변경 */
  .how-step:not(:last-child)::after {
    top: auto;
    bottom: -28px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary));
  }

  .how-step {
    max-width: 100%;
    width: 100%;
    padding: var(--space-6) var(--space-4);
    margin-bottom: var(--space-10);
  }

  .how-step:last-child {
    margin-bottom: 0;
  }

  .how-cta-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .how-cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════
   TABLET (641px ~ 1023px)
══════════════════════════════════════ */
@media (min-width: 641px) and (max-width: 1023px) {
  .how-steps-wrap {
    flex-wrap: wrap;
    gap: var(--space-10);
  }

  .how-step {
    flex: 0 0 calc(50% - var(--space-10));
    max-width: 280px;
  }

  /* 태블릿에선 연결선 제거 (복잡해서) */
  .how-step:not(:last-child)::after {
    display: none;
  }
}

/* ══════════════════════════════════════
   이럴 때 이용하세요
══════════════════════════════════════ */
.how-when {
  background: #F3F4F6;
  padding: 80px 0;
}

.how-when-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.how-when-content {
  flex: 1;
}

.how-when-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1C2B4A;
  line-height: 1.3;
  margin-bottom: 12px;
}

.how-when-accent {
  color: #3883FF;
}

.how-when-sub {
  margin-bottom: 8px;
}

.how-when-badge {
  display: inline-block;
  background: #3883FF;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-right: 4px;
}

.how-when-warning {
  font-size: 0.8125rem;
  color: #6B7280;
  line-height: 1.6;
  margin-bottom: 28px;
  padding: 12px 16px;
  background: #fff;
  border-left: 3px solid #EF4444;
  border-radius: 4px;
}

.how-when-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how-when-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.how-when-check {
  width: 28px;
  height: 28px;
  background: #3883FF;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.how-when-illust {
  flex-shrink: 0;
  width: 260px;
}

/* ── 이럴 때 반응형 ── */
@media (max-width: 768px) {
  .how-when-inner {
    flex-direction: column;
    gap: 40px;
  }

  .how-when-illust {
    order: -1;
    width: 200px;
  }
}

@media (max-width: 640px) {
  .how-when {
    padding: 56px 0;
  }

  .how-when-title {
    font-size: 1.375rem;
  }

  .how-when-illust {
    width: 180px;
  }
}
