
/* 1. 상단 안내 헤더 */
.section-contact-hero {
  padding: 56px 16px 24px;
  background-color: var(--color-bg-dark, #0B1120);
  color: #F8FAFC;
  text-align: center;
  box-sizing: border-box;
}

.hero-partner-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #60A5FA;
  background-color: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.contact-page-title {
  font-size: 32px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.contact-page-desc {
  font-size: 16px;
  color: #94A3B8;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  word-break: keep-all;
}

/* 2. 폼 섹션 공통 래퍼 (다크 배경 위의 밝은 카드) */
.section-contact-form {
  padding: 32px 16px 64px;
  background-color: var(--color-bg-dark, #0B1120);
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

.form-card {
  background-color: #FFFFFF;
  color: #0F172A;
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  width: 100%;
}

.form-header {
  margin-bottom: 28px;
  text-align: left;
}

.form-badge {
  display: inline-block;
  background-color: #EFF6FF;
  color: #1D4ED8;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.form-title {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.form-subtitle {
  font-size: 15px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
  word-break: keep-all;
}

/* 3. 선택한 구성 미리보기 상자 (?calc=) */
.calc-preview-box {
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
  box-sizing: border-box;
}

.calc-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.calc-preview-badge {
  font-size: 12px;
  font-weight: 700;
  color: #1D4ED8;
  background-color: #DBEAFE;
  padding: 2px 8px;
  border-radius: 4px;
}

.btn-calc-clear {
  background: transparent;
  border: none;
  font-size: 14px;
  color: #64748B;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
}

.btn-calc-clear:hover {
  color: #0F172A;
  background-color: rgba(0, 0, 0, 0.05);
}

.calc-preview-content {
  font-size: 14px;
  font-weight: 600;
  color: #1E3A8A;
  line-height: 1.5;
  word-break: break-all;
}

/* 4. 입력 칸 및 라벨 (접근성: 16px 이상, 최소 44px 터치 영역) */
.form-group {
  margin-bottom: 20px;
}

.form-label,
.form-legend {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 8px;
  line-height: 1.4;
}

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.required {
  color: #DC2626;
  margin-left: 2px;
  font-weight: 700;
}

.optional {
  color: #64748B;
  font-size: 13px;
  font-weight: 400;
  margin-left: 4px;
}

.form-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.75;
}

.form-input,
.form-textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  color: #0F172A;
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 48px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #94A3B8;
  font-size: 15px;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.form-input.is-invalid,
.form-textarea.is-invalid {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-error {
  color: #DC2626;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  min-height: 18px;
  line-height: 1.4;
}

/* 5. 관심 서비스 칩 체크박스 그리드 */
.service-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.service-chip-label {
  display: block;
  cursor: pointer;
  user-select: none;
}

.service-chip-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.service-chip-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background-color: #F8FAFC;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
  text-align: center;
  box-sizing: border-box;
  gap: 6px;
}

.service-chip-box:hover {
  background-color: #F1F5F9;
  border-color: #CBD5E1;
}

.service-check-icon {
  display: none;
  font-size: 13px;
  font-weight: 900;
  color: #1D4ED8;
}

.service-chip-input:checked + .service-chip-box {
  background-color: #EFF6FF;
  border-color: #2563EB;
  color: #1D4ED8;
  font-weight: 700;
}

.service-chip-input:checked + .service-chip-box .service-check-icon {
  display: inline-block;
}

.service-chip-input:focus-visible + .service-chip-box {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* 6. 공통 체크박스 그룹 */
.form-check-group {
  margin-bottom: 16px;
  box-sizing: border-box;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  min-height: 44px;
  padding: 6px 0;
  user-select: none;
  box-sizing: border-box;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #CBD5E1;
  border-radius: 6px;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.checkbox-input:checked + .checkbox-custom {
  background-color: #2563EB;
  border-color: #2563EB;
}

.checkbox-input:checked + .checkbox-custom::after {
  content: "✓";
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.checkbox-input:focus-visible + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.checkbox-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.checkbox-main-text {
  font-size: 15px;
  color: #1E293B;
  font-weight: 700;
}

.checkbox-sub-text {
  font-size: 13px;
  color: #64748B;
  margin-top: 2px;
}

/* 문의 쿠폰 받기 강조 박스 */
.coupon-check-group {
  background-color: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.coupon-check-group .checkbox-main-text {
  color: #92400E;
}

.coupon-check-group .checkbox-sub-text {
  color: #B45309;
  font-weight: 600;
}

.coupon-check-group .checkbox-custom {
  border-color: #D97706;
}

/* 7. 개인정보 수집·이용 동의 */
.privacy-agreement-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.privacy-details {
  margin-top: 8px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background-color: #F8FAFC;
  overflow: hidden;
}

.privacy-summary {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  min-height: 44px;
  box-sizing: border-box;
}

.privacy-summary::-webkit-details-marker {
  display: none;
}

.privacy-arrow {
  font-size: 10px;
  color: #94A3B8;
  transition: transform 0.2s ease;
}

.privacy-details[open] .privacy-arrow {
  transform: rotate(180deg);
}

.privacy-details-body {
  padding: 12px 14px;
  border-top: 1px solid #E2E8F0;
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
}

.privacy-terms-list {
  margin: 0;
  padding-left: 18px;
}

.privacy-terms-list li {
  margin-bottom: 6px;
}

.privacy-terms-list li:last-child {
  margin-bottom: 0;
}

/* 8. 전송 버튼 */
.form-submit-wrap {
  margin-top: 28px;
}

.form-global-error {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.btn-form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  background-color: #2563EB;
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25);
  box-sizing: border-box;
}

.btn-form-submit:hover {
  background-color: #1D4ED8;
}

.btn-form-submit:active {
  transform: scale(0.99);
}

.btn-form-submit:disabled,
.btn-form-submit.is-submitting {
  background-color: #94A3B8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.submit-note {
  text-align: center;
  font-size: 12px;
  color: #64748B;
  margin: 12px 0 0;
}

/* 9. 접수 완료 화면 */
.form-success-card {
  text-align: center;
  padding: 32px 16px;
}

.success-icon {
  width: 56px;
  height: 56px;
  line-height: 56px;
  border-radius: 50%;
  background-color: #DCFCE7;
  color: #16A34A;
  font-size: 28px;
  font-weight: 900;
  margin: 0 auto 16px;
}

.success-title {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 10px;
  line-height: 1.3;
}

.success-desc {
  font-size: 15px;
  color: #475569;
  margin: 0 0 24px;
  line-height: 1.6;
  word-break: keep-all;
}

.success-coupon-notice {
  background-color: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 auto 24px;
  max-width: 420px;
}

.success-coupon-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #92400E;
  background-color: #FDE68A;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.success-coupon-text {
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
  margin: 0;
}

.btn-success-tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  background-color: #0F172A;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.btn-success-tel:hover {
  background-color: #1E293B;
}

/* 10. endpoint가 null일 때 대체 카드 */
.form-fallback-card {
  background-color: #FFFFFF;
  color: #0F172A;
  border-radius: 16px;
  padding: 40px 28px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  width: 100%;
}

.form-fallback-badge {
  display: inline-block;
  background-color: #EFF6FF;
  color: #1D4ED8;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.form-fallback-title {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 10px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.form-fallback-desc {
  font-size: 15px;
  color: #475569;
  margin: 0 auto 32px;
  line-height: 1.6;
  max-width: 520px;
  word-break: keep-all;
}

.form-fallback-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.btn-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.btn-fallback:active {
  transform: scale(0.98);
}

.btn-fallback-tel {
  background-color: #2563EB;
  color: #FFFFFF;
}

.btn-fallback-tel:hover {
  background-color: #1D4ED8;
}

.btn-fallback-sms {
  background-color: #0F172A;
  color: #FFFFFF;
}

.btn-fallback-sms:hover {
  background-color: #1E293B;
}

.btn-fallback-kakao {
  background-color: #FEE500;
  color: #191919;
}

.btn-fallback-kakao:hover {
  background-color: #FDD835;
}

.fallback-icon {
  font-size: 20px;
  line-height: 1;
}

.fallback-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.fallback-btn-text strong {
  font-size: 15px;
  line-height: 1.2;
}

.fallback-btn-text small {
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.2;
}

.fallback-footer-note {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

/* 11. 반응형 분기점 (375px 모바일 화면 가로 스크롤 완전 방지) */
@media (max-width: 640px) {
  .form-fallback-buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section-contact-hero {
    padding: 36px 16px 16px;
  }

  .contact-page-title {
    font-size: 24px;
  }

  .form-card,
  .form-fallback-card {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .form-title,
  .form-fallback-title {
    font-size: 20px;
  }

  .service-checkbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 360px) {
  .service-checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* 상담 폼 관심 서비스 보조 문구 (대표 요청 10-21) */
.service-name { display: inline-flex; flex-direction: column; line-height: 1.25; }
.service-sub { display: block; font-size: .72rem; font-weight: 500; opacity: .75; margin-top: 2px; white-space: nowrap; }