/* =============================================
   코액티브 엔젤코치 코칭챗 신청 — 스타일시트
   ============================================= */

/* ── 1. 디자인 토큰 (CSS 변수) ── */
:root {
  /* 기본 색상 (브랜드: 주로 사용되는 무채색 계열) */
  --ink:        #474747;   /* Dark Gray */
  --muted:      #767676;   /* Medium Gray (AA 텍스트 대비 충족) */
  --light-gray: #e5e5e5;   /* Light Gray */
  --white:      #fcfcfc;
  --border:     #dcdcdc;

  /* 포인트 색상 (브랜드: 강조용으로 절제해서 사용) */
  --green:           #075b5c;
  --green-light:     #e3edec;
  --pink:            #c43b8d;
  --pink-light:      #f8e7f1;
  --blue:            #0eb5e0;
  --blue-light:      #e2f6fb;
  --dark-blue:       #263b76;
  --dark-blue-light: #e8ecf5;
  --orange:          #e37f37;
  --orange-light:    #fbeadd;

  --radius:       14px;
  --shadow:       0 1px 6px rgba(71, 71, 71, 0.08);
  --shadow-hover: 0 10px 26px rgba(71, 71, 71, 0.14);

  --font-primary:   "Helvetica Neue", Helvetica, Arial, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-secondary: "Merriweather", "Noto Serif KR", Georgia, serif;
}


/* ── 2. 리셋 & 기본 ── */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-primary);
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }


/* ── 3. 브랜드 패턴 바 ── */
.pattern-bar {
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, var(--dark-blue), var(--blue), var(--green), var(--orange), var(--pink));
}


/* ── 4. 로고 ── */
.logo-mark {
  display: block;
  margin: 0 auto 22px;
  height: 64px;
  width: auto;
}


/* ── 5. 진행 단계 스테퍼 ── */
.stepper {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 252, 252, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.stepper-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  overflow-x: auto;
}

.step-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
}

.step-dot.active {
  background: var(--green-light);
  color: var(--green);
  font-weight: 700;
}

.step-dot .num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.step-dot.active .num { background: var(--green); }

.step-arrow { color: var(--border); font-size: 12px; }

@media (max-width: 480px) {
  .stepper-inner { gap: 4px; padding: 8px 12px; font-size: 11px; }
  .step-dot      { padding: 3px 7px; gap: 4px; }
  .step-dot .num { width: 16px; height: 16px; font-size: 10px; }
}


/* ── 6. 히어로 섹션 ── */
.hero {
  padding: 56px 24px 48px;
  text-align: center;
  background: var(--white);
}

.hero h1 {
  font-family: var(--font-primary);
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 20px;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

.hero p.lede {
  max-width: 620px;
  margin: 0 auto 10px;
  color: #4a4a4a;
  font-size: 15.5px;
  font-family: var(--font-secondary);
  font-weight: 400;
}

@media (max-width: 480px) {
  .hero             { padding: 36px 16px 32px; }
  .hero h1          { font-size: 24px; margin: 0 0 14px; }
  .hero p.lede      { font-size: 14px; }
  .logo-mark        { height: 48px; margin-bottom: 16px; }
}

/* 프로세스 흐름 카드 */
.flow-strip {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 36px auto 0;
  max-width: 920px;
  width: 100%;
}

.flow-item {
  flex: 1 1 0;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  font-size: 12.5px;
  color: var(--ink);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: var(--shadow);
}

.flow-item b {
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.flow-sep {
  flex: 0 0 auto;
  align-self: center;
  color: var(--border);
  font-size: 16px;
}

@media (max-width: 680px) {
  .flow-strip { flex-direction: column; max-width: 320px; gap: 0; }
  .flow-sep   { transform: rotate(90deg); margin: 2px auto; }
  .flow-item  { width: 100%; }
}

/* CTA 버튼 */
.cta-btn {
  margin-top: 36px;
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
}

.cta-btn:hover {
  background: var(--dark-blue);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .cta-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 28px auto 0;
    padding: 16px 20px;
    font-size: 16px;
    text-align: center;
  }
}


/* ── 7. 코치 목록 섹션 ── */
.section { padding: 56px 24px; }

#view-list    { background: var(--light-gray); }
#view-success { background: var(--light-gray); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 6px;
}

.count-badge   { font-size: 14px; color: var(--muted); }
.count-badge b { color: var(--green); }

@media (max-width: 480px) {
  .section          { padding: 32px 14px; }
  .section-head h2  { font-size: 20px; }
}

/* 검색 & 필터 컨트롤 바 */
.controls {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 49px;
  z-index: 40;
}

.search-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.search-row input {
  flex: 1 1 480px;
  max-width: 480px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  font-family: var(--font-primary);
  color: var(--ink);
  background: var(--white);
}

.search-row input:focus { border-color: var(--green); }

@media (max-width: 480px) {
  .controls            { padding: 12px; border-radius: 10px; top: 45px; }
  .search-row input    { padding: 10px 12px; font-size: 14px; }
}

/* 태그 필터 칩 */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.12s;
  font-family: var(--font-primary);
}

.chip:hover          { border-color: var(--green); }
.chip.active         { color: #fff; }
.chip.reset          { color: var(--muted); }
.chip.reset.active   { background: var(--ink); border-color: var(--ink); color: #fff; }

@media (max-width: 480px) {
  .chip { padding: 6px 11px; font-size: 12px; }
}

/* 코치 카드 그리드 */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1023px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width:  767px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width:  360px) { .grid { grid-template-columns: 1fr; gap: 10px; } }

/* 코치 카드 */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--green);
}

.card .photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--light-gray);
  overflow: hidden;
  position: relative;
}

.card .photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: 34px;
  font-weight: 700;
  color: #fff;
}

.card-body {
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-name    { font-family: var(--font-primary); font-weight: 700; font-size: 15px; color: var(--ink); margin: 0 0 2px; }
.card-org     { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.card-tagline { font-family: var(--font-secondary); font-style: italic; font-size: 12.5px; color: #4a4a4a; margin: 0 0 10px; flex: 1; }
.card-tagline::before { content: "\201C"; }
.card-tagline::after  { content: "\201D"; }
.card-tags    { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }

.tag-pill {
  font-family: var(--font-primary);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.card-btn {
  margin-top: auto;
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-primary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
}

.card:hover .card-btn {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}


/* ── 8. 코치 상세 모달 ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 30, 30, 0.55);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay.show { display: flex; }

.modal {
  background: var(--white);
  border-radius: 18px;
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal-top {
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 10px;
}

.modal-content {
  padding: 0 32px 32px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.modal-photo {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--light-gray);
}

.modal-photo img             { width: 100%; height: 100%; object-fit: cover; }
.modal-photo .avatar-fallback { font-size: 44px; }
.modal-info                  { flex: 1; min-width: 220px; }

.modal-info h3 {
  font-family: var(--font-primary);
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--ink);
}

.modal-info .org     { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.modal-info .tagline { font-family: var(--font-secondary); font-size: 15px; color: #3a3a3a; margin-bottom: 14px; font-style: italic; }
.modal-info .tagline::before { content: "\201C"; }
.modal-info .tagline::after  { content: "\201D"; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-primary);
}

.btn-primary:hover { background: var(--dark-blue); }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-primary);
}

/* 모달 모바일: 하단 시트로 전환 */
@media (max-width: 540px) {
  .overlay         { padding: 0; align-items: flex-end; }
  .modal           { border-radius: 18px 18px 0 0; max-height: 92vh; width: 100%; }
  .modal-content   { padding: 0 18px 28px; flex-direction: column; align-items: center; gap: 16px; }
  .modal-photo     { width: 100px; height: 100px; }
  .modal-info      { min-width: 0; width: 100%; }
  .modal-info h3   { font-size: 18px; }
  .modal-actions   { flex-direction: column; }
  .btn-primary,
  .btn-secondary   { width: 100%; text-align: center; padding: 14px 20px; font-size: 15px; }
}


/* ── 9. 신청 폼 섹션 ── */
.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

@media (max-width: 480px) {
  .form-section { padding: 20px 16px; border-radius: 14px; }
  .field input,
  .field textarea { font-size: 16px; } /* iOS 자동 확대 방지 */
  .submit-btn     { padding: 16px; font-size: 15px; }
}

/* 선택된 코치 박스 */
.selected-coach {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green-light);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 26px;
}

.selected-coach img,
.selected-coach .avatar-fallback {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.selected-coach .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

.selected-coach .sc-info        { flex: 1; }
.selected-coach .sc-info b      { display: block; font-size: 14.5px; color: var(--ink); font-family: var(--font-primary); }
.selected-coach .sc-info span   { font-size: 12px; color: var(--muted); }

.selected-coach button {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-primary);
}

.no-coach {
  text-align: center;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 26px;
}

/* 입력 필드 */
.field              { margin-bottom: 18px; }

.field label {
  display: block;
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.field .req { color: #c0392b; }

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-primary);
  outline: none;
  color: var(--ink);
  background: var(--white);
}

.field input:focus,
.field textarea:focus { border-color: var(--green); }

.field textarea { resize: vertical; min-height: 80px; }

.field .err { color: #c0392b; font-size: 12px; margin-top: 4px; display: none; }

/* 희망 일정 날짜 행 */
.date-row       { display: flex; gap: 8px; flex-wrap: wrap; }
.date-row input { flex: 1; min-width: 130px; }

@media (max-width: 480px) {
  .date-row       { flex-direction: column; }
  .date-row input { min-width: 0; width: 100%; font-size: 16px; }
}

/* 개인정보 동의 */
.consent-box {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin: 22px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.consent-check       { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; color: var(--ink); }
.consent-check input { margin-top: 3px; }

/* 제출 버튼 */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--light-gray);
  color: #a0a0a0;
  border: none;
  border-radius: 12px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: not-allowed;
  transition: 0.15s;
}

.submit-btn.enabled          { background: var(--green); color: #fff; cursor: pointer; }
.submit-btn.enabled:hover    { background: var(--dark-blue); }


/* ── 10. 신청 완료 화면 ── */
.success-box {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
}

.success-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

.success-box h2 { font-family: var(--font-primary); font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.success-box p  { font-family: var(--font-secondary); color: #4a4a4a; font-size: 14.5px; margin-bottom: 26px; }

.success-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 26px;
  text-align: left;
}

.success-card img,
.success-card .avatar-fallback { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }

.success-card .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
}

.success-dates {
  display: inline-block;
  text-align: left;
  background: var(--green-light);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 auto 8px;
  max-width: 360px;
}

.success-dates b   { display: block; font-size: 13px; color: var(--green); margin-bottom: 6px; font-family: var(--font-primary); }
.success-dates div { font-size: 13.5px; color: var(--ink); font-family: var(--font-primary); padding: 2px 0; }

@media (max-width: 480px) {
  .success-box    { padding: 10px 0; }
  .success-card   { flex-direction: column; text-align: center; width: 100%; box-sizing: border-box; }
  .success-dates  { width: 100%; max-width: 100%; }
}


/* ── 11. 푸터 ── */
footer {
  text-align: center;
  padding: 36px 24px;
  color: var(--muted);
  font-size: 12.5px;
  font-family: var(--font-secondary);
  font-style: italic;
  background: var(--white);
}
