/* ===== 기본 리셋 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a1a; background: #fff; line-height: 1.7; }
a { text-decoration: none; color: inherit; }

/* ===== 네비게이션 ===== */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; border-bottom: 1px solid #eee;
  background: #fff; position: sticky; top: 0; z-index: 100;
}
.nav-logo { font-size: 17px; font-weight: 600; color: #1a1a1a; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: 14px; color: #555; }
.nav-links a:hover { color: #185FA5; }
.nav-cta {
  background: #185FA5; color: #fff !important;
  padding: 8px 18px; border-radius: 8px; font-size: 14px;
}
.nav-hamburger { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: #1a1a1a; }
.nav-mobile {
  display: none; flex-direction: column; background: #fff;
  border-bottom: 1px solid #eee; padding: 0.5rem 0;
}
.nav-mobile a { padding: 0.75rem 2rem; font-size: 15px; color: #333; border-bottom: 1px solid #f5f5f5; }
.nav-mobile.open { display: flex; }

/* ===== 히어로 ===== */
.hero {
  padding: 5rem 2rem 4rem; text-align: center;
  background: #f8f9fb;
}
.hero-badge {
  display: inline-block; background: #EBF3FC; color: #1450A3;
  font-size: 12px; padding: 5px 16px; border-radius: 20px; margin-bottom: 1.5rem;
}
.hero h1 { font-size: 36px; font-weight: 700; line-height: 1.35; margin-bottom: 1rem; color: #111; }
.hero p { font-size: 16px; color: #666; margin-bottom: 2rem; line-height: 1.8; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: #185FA5; color: #fff;
  padding: 13px 28px; border-radius: 8px; font-size: 15px;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: #1450A3; }
.btn-outline {
  background: #fff; color: #333;
  padding: 13px 28px; border-radius: 8px; font-size: 15px;
  border: 1px solid #ddd; display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover { border-color: #185FA5; color: #185FA5; }

/* ===== 실적 바 ===== */
.stats-bar { background: #185FA5; padding: 2.5rem 2rem; }
.stats-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; max-width: 700px; margin: 0 auto; text-align: center;
}
.stat-item h3 { font-size: 28px; font-weight: 700; color: #fff; }
.stat-item p { font-size: 13px; color: #9fc7ef; margin-top: 4px; }

/* ===== 공통 섹션 ===== */
.section { padding: 4rem 2rem; }
.section-alt { background: #f8f9fb; }
.section-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.section-sub { font-size: 14px; color: #888; text-align: center; margin-bottom: 2.5rem; }

/* ===== 업무분야 ===== */
.practice-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; max-width: 720px; margin: 0 auto;
}
.practice-card {
  background: #fff; border: 1px solid #e8e8e8;
  border-radius: 12px; padding: 1.4rem; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.practice-card:hover { border-color: #185FA5; box-shadow: 0 2px 12px rgba(24,95,165,0.08); }
.practice-card.active { border: 2px solid #185FA5; }
.p-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #EBF3FC; display: flex; align-items: center;
  justify-content: center; margin-bottom: 12px;
}
.p-icon i { font-size: 20px; color: #185FA5; }
.practice-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.practice-card p { font-size: 13px; color: #777; line-height: 1.6; }

.detail-box {
  max-width: 720px; margin: 1.5rem auto 0;
  background: #fff; border: 1px solid #e0eaf5;
  border-radius: 12px; padding: 1.25rem 1.5rem; display: none;
}
.detail-box.show { display: block; }
.detail-box h4 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #185FA5; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-tag {
  background: #EBF3FC; color: #1450A3;
  font-size: 13px; padding: 5px 14px; border-radius: 20px;
}

/* ===== 변호사 소개 ===== */
.lawyer-card {
  max-width: 600px; margin: 0 auto;
  background: #fff; border: 1px solid #e8e8e8;
  border-radius: 12px; padding: 2rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.lawyer-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: #185FA5; display: flex; align-items: center;
  justify-content: center; font-size: 28px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.lawyer-info h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.lawyer-info .role { font-size: 13px; color: #185FA5; margin-bottom: 12px; }
.lawyer-info p { font-size: 14px; color: #555; line-height: 1.8; }
.lawyer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lawyer-badge {
  background: #f5f5f5; color: #555;
  font-size: 12px; padding: 4px 12px;
  border-radius: 20px; border: 1px solid #e5e5e5;
}

/* ===== 절차 ===== */
.process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; max-width: 720px; margin: 0 auto;
}
.process-step { text-align: center; padding: 1rem 0.5rem; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: #185FA5; color: #fff;
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.process-step h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.process-step p { font-size: 13px; color: #888; line-height: 1.5; }

/* ===== AI 챗봇 ===== */
.chat-box {
  max-width: 580px; margin: 0 auto;
  background: #fff; border: 1px solid #e8e8e8;
  border-radius: 12px; overflow: hidden;
}
.chat-header {
  background: #185FA5; padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 10px;
}
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #4CAF50; }
.chat-header span { color: #fff; font-size: 14px; font-weight: 500; }
.chat-online { font-size: 12px; color: #9fc7ef; margin-left: auto; }
.chat-messages {
  padding: 1.25rem; min-height: 220px; max-height: 300px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  background: #fafafa;
}
.msg { max-width: 82%; }
.msg-bot { align-self: flex-start; }
.msg-user { align-self: flex-end; }
.msg-bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.msg-bot .msg-bubble { background: #fff; border: 1px solid #eee; border-bottom-left-radius: 4px; }
.msg-user .msg-bubble { background: #185FA5; color: #fff; border-bottom-right-radius: 4px; }
.msg-time { font-size: 11px; color: #bbb; margin-top: 4px; }
.msg-user .msg-time { text-align: right; }
.quick-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-btn {
  background: #fff; border: 1px solid #185FA5; color: #185FA5;
  font-size: 12px; padding: 4px 12px; border-radius: 14px; cursor: pointer;
}
.quick-btn:hover { background: #EBF3FC; }
.typing {
  align-self: flex-start; display: none;
  align-items: center; gap: 4px;
  padding: 10px 14px; background: #fff; border: 1px solid #eee;
  border-radius: 16px; border-bottom-left-radius: 4px;
}
.typing.show { display: flex; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #bbb;
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100%{opacity:0.3} 40%{opacity:1} }
.chat-input-row {
  display: flex; gap: 8px; padding: 1rem;
  border-top: 1px solid #eee; background: #fff;
}
.chat-input-row input {
  flex: 1; padding: 10px 14px; border-radius: 22px;
  border: 1px solid #ddd; font-size: 14px; outline: none;
}
.chat-input-row input:focus { border-color: #185FA5; }
.chat-send {
  background: #185FA5; color: #fff; border: none;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.chat-send:hover { background: #1450A3; }

/* ===== 상담 예약 폼 ===== */
.consult-section { padding: 4rem 2rem; background: #f8f9fb; }
.consult-inner { max-width: 580px; margin: 0 auto; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="text"], input[type="email"], input[type="date"], select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid #ddd; border-radius: 8px;
  background: #fff; color: #1a1a1a;
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: #185FA5; }
textarea { resize: vertical; min-height: 100px; }
.submit-btn {
  width: 100%; background: #185FA5; color: #fff;
  padding: 14px; border-radius: 8px; font-size: 16px;
  border: none; cursor: pointer; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; transition: background 0.2s;
}
.submit-btn:hover { background: #1450A3; }
.submit-btn:disabled { background: #aaa; cursor: not-allowed; }
.form-note { font-size: 12px; color: #aaa; margin-top: 10px; text-align: center; }
.success-msg {
  display: none; background: #e8f5e9; color: #2e7d32;
  padding: 1rem; border-radius: 8px; text-align: center;
  font-size: 14px; margin-top: 1rem; font-weight: 500;
}
.error-msg {
  display: none; background: #fdecea; color: #c62828;
  padding: 1rem; border-radius: 8px; text-align: center;
  font-size: 14px; margin-top: 1rem;
}

/* ===== 연락처 바 ===== */
.contact-bar { padding: 2.5rem 2rem; border-top: 1px solid #eee; background: #fff; }
.contact-inner {
  max-width: 600px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.contact-item { display: flex; align-items: flex-start; gap: 12px; }
.contact-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: #EBF3FC; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.contact-icon i { font-size: 18px; color: #185FA5; }
.contact-item h4 { font-size: 12px; color: #999; margin-bottom: 4px; }
.contact-item p { font-size: 14px; font-weight: 500; line-height: 1.6; }
.contact-item a { color: #185FA5; }

/* ===== 푸터 ===== */
.footer {
  padding: 1.5rem 2rem; border-top: 1px solid #eee;
  background: #f8f9fb;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
.footer p { font-size: 12px; color: #999; }

/* ===== 반응형 ===== */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .hero h1 { font-size: 26px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .practice-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lawyer-card { flex-direction: column; align-items: center; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer { flex-direction: column; text-align: center; }
}
