/* 정책자금 상담 접수 (질문지) — 피그마 시안 기준. base.css 위에 얹는다 */
.contact { padding: 40px 0 60px; }
.contact .container { max-width: 900px; }
.ct-title { font-family: var(--font-title); font-weight: 800; font-size: 30px; color: var(--primary); text-align: center; margin-bottom: 24px; }

/* 안내 박스: 이미지가 있으면 이미지(크기대로), 없으면 파란 테두리 텍스트 박스 */
.guide-box { border: 1.5px solid var(--primary); border-radius: var(--radius); background: var(--white); text-align: center; padding: 22px 20px; margin-bottom: 28px; font-size: 15px; line-height: 1.7; }
.guide-box:has(img) { border: none; background: transparent; padding: 0; }
.guide-box:has(img) h3 { margin-top: 14px; }
.guide-box:has(img) .guide-text { margin-top: 10px; } /* 이미지와 문구 함께 표시 옵션 */
.guide-box img { width: 100%; height: auto; border-radius: var(--radius); }
.guide-box .pc-only { display: block; } .guide-box .mo-only { display: none; }
.guide-box h3 { font-family: var(--font-title); color: var(--primary); font-size: 22px; margin-bottom: 12px; }
.guide-box .guide-text { color: var(--text-sub); }

/* 문항 카드 */
.q-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.q-card.invalid { border-color: var(--danger); }
.q-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.q-comment { font-size: 15px; font-weight: 700; color: var(--danger); margin-top: 10px; line-height: 1.5; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-item { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--radius-sm); background: var(--bg-soft); border: 1px solid transparent; cursor: pointer; font-size: 15px; color: var(--text-sub); }
.radio-item input { display: none; }
.radio-item .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d5d5d5; background: var(--white); flex-shrink: 0; }
.radio-item:has(input:checked) { background: var(--primary-light); border-color: var(--primary); color: var(--text); }
.radio-item:has(input:checked) .dot { border-color: var(--primary); background: var(--primary) url(/img/chk.png) no-repeat center; }

.region-row { display: flex; gap: 10px; }
.region-row .select { flex: 1; }
.phone-row { display: flex; align-items: center; gap: 8px; }
.phone-row .input { text-align: center; font-family: var(--font-num); font-size: 17px; letter-spacing: 2px; }
.phone-row .input.fixed { background: var(--bg-soft); color: var(--text-sub); }
.phone-row span { color: var(--muted); }
.phone-row .input { flex: 1; min-width: 0; }
.phone-row .fixed { flex: 0 0 64px; }

/* 전문가 수: 3열 카드 */
.expert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.expert-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 22px 12px 18px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; text-align: center; }
.expert-item input { display: none; }
.expert-item .cnt { font-size: 16px; color: var(--text-sub); }
.expert-item .cnt b { font-family: var(--font-num); font-size: 30px; color: var(--primary); font-weight: 700; margin-right: 2px; }
.expert-item .sub { font-size: 12px; color: var(--muted); }
.expert-item:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.expert-item.best { z-index: 1; }
.expert-item .badge-best { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--danger); color: var(--white); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; white-space: nowrap; }

/* 12번 동의: 기존 사이트 디자인 유지 */
.f-personal input { display: none; }
.f-personal label { width: 100%; padding: 14px; font-size: 14px; font-weight: 500; display: flex; justify-content: center; align-items: center; gap: 7px; border-radius: var(--radius-sm); border: 1px solid var(--danger); color: var(--danger); cursor: pointer; }
.f-personal label i::before { content: "✓"; font-style: normal; font-weight: 800; }
.f-personal label span { color: var(--white); font-size: 12px; padding: 2px 6px; border-radius: 3px; background: rgba(0,0,0,.25); }
.f-personal input:checked + label { background: var(--primary-light); border-color: var(--primary-border); color: var(--primary); }
.f-personal input:checked + label p::before { content: "개인정보 수집 및 이용에 동의합니다."; }
.f-personal input:checked + label p { font-size: 0; }
.f-personal input:checked + label p::before { font-size: 14px; }

/* 접수 버튼 */
.submit-wrap { display: flex; justify-content: center; margin-top: 30px; }
.btn-submit { background: var(--primary); color: var(--white); border-radius: var(--radius-sm); padding: 14px 44px; font-size: 18px; font-weight: 800; line-height: 1.35; text-align: center; }
.btn-submit small { display: block; font-size: 14px; font-weight: 600; opacity: .95; font-family: var(--font-num); }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }

/* 개인정보 처리방침 팝업 (기존 사이트 구조) */
.popup-wrapper { position: fixed; inset: 0; display: none; justify-content: center; align-items: center; background: rgba(0,0,0,.4); z-index: 999; }
.popup-closeBtn { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); width: 48px; height: 48px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; box-shadow: 0 0 20px rgba(0,0,0,.2); }
.popup-closeBtn img { width: 40%; }
.popup { width: 640px; max-width: 92%; max-height: 65vh; padding: 36px; border-radius: 8px; background: var(--white); overflow-y: auto; }
.popup-personal h5 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.popup-personal p { font-size: 14px; line-height: 1.7; color: var(--text-sub); }

@media (max-width: 768px) {
  .contact { padding: 24px 0 40px; }
  .ct-title { font-size: 24px; }
  .guide-box .pc-only { display: none; } .guide-box .mo-only { display: block; }
  .q-card { padding: 16px; }
  .q-title { font-size: 16px; }
  .q-comment { font-size: 14px; }
  .phone-row { gap: 6px; }
  .phone-row .input { padding: 0 6px; letter-spacing: 1px; font-size: 16px; }
  .radio-item { padding: 12px 14px; font-size: 14px; }
  .expert-grid { gap: 10px; }
  .expert-item { min-height: 100px; padding: 18px 6px 14px; }
  .expert-item .cnt b { font-size: 26px; }
  .expert-item .sub { font-size: 11px; }
  .expert-item .badge-best { font-size: 11px; padding: 3px 6px; }
  .btn-submit { width: 100%; }
  .popup { width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; padding: 80px 20px 40px; }
  .popup-closeBtn { bottom: auto; top: 20px; border-radius: 6px; background: #111; box-shadow: none; }
  .popup-closeBtn img { filter: invert(1); }
}

/* 선택 표시: :has() 를 모르는 구형 브라우저용 (contact.js 가 .checked 를 붙인다). :has() 규칙과 한 줄에 묶으면 구형 브라우저가 규칙 전체를 버리므로 따로 둔다 */
.radio-item.checked { background: var(--primary-light); border-color: var(--primary); color: var(--text); }
.radio-item.checked .dot { border-color: var(--primary); background: var(--primary) url(/img/chk.png) no-repeat center; }
.expert-item.checked { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
