/* ===== 기본 설정 ===== */
:root {
  --navy: #6b6478;
  --navy-dark: #46414f;
  --accent: #a396d1;
  --accent-dark: #8271bd;
  --text: #3c3a42;
  --text-light: #8c899a;
  --border: #e3e1ea;
  --bg-soft: #f4f3f8;
  --white: #fbfbfe;
  --radius: 12px;
  --max-width: 860px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  word-break: keep-all;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== 헤더 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: none;
}
.btn--header {
  background: var(--accent);
  color: var(--white);
  padding: 9px 18px;
  font-size: 0.88rem;
}

/* ===== 히어로 ===== */
.hero {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--white) 100%);
  padding: 32px 20px 8px;
}
.hero__inner { max-width: var(--max-width); margin: 0 auto; }
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0 0 12px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--navy); }

h1 {
  font-size: 1.7rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.lead-answer {
  font-size: 1.02rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 22px;
}
.lead-answer strong { color: var(--accent-dark); }

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}
.btn--primary {
  background: var(--accent);
  color: var(--white);
  padding: 14px 22px;
  font-size: 1rem;
}
.btn--outline {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--navy);
  padding: 13px 22px;
  font-size: 1rem;
}

/* ===== 본문 ===== */
article {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4px 20px 40px;
}

section { margin: 34px 0; }

h2 {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 0 0 14px;
  padding-top: 6px;
  border-top: 3px solid var(--navy-dark);
  padding-top: 12px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
  margin: 20px 0 8px;
}
p { margin: 0 0 14px; color: var(--text); }
ul, ol { padding-left: 1.2em; margin: 0 0 16px; }
li { margin-bottom: 6px; }

figure { margin: 0 0 18px; }
figure img { border-radius: var(--radius); }
figcaption {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 6px;
  text-align: center;
}

.img-grid-intro {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0 0 10px;
}
.img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 20px;
}
.img-grid figure { margin: 0; }
.img-grid img { aspect-ratio: 3/4; object-fit: cover; }
.img-grid figcaption {
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  line-height: 1.35;
}

/* 표 */
.table-wrap { overflow-x: auto; margin: 0 0 18px; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 480px;
}
caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 6px;
}
th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
thead th {
  background: var(--navy-dark);
  color: var(--white);
  font-weight: 700;
}
tbody tr:nth-child(even) { background: var(--bg-soft); }

/* 안내 박스 */
.info-box {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 18px;
  border: 1px solid var(--border);
}
.info-box h3 { margin-top: 0; }
.info-box--warn {
  background: #e9e6f0;
  border-color: #b7aed4;
}
.info-box--tip {
  background: #f0eef7;
  border-color: #d3cce8;
}

/* 절차 스텝 */
.steps { list-style: none; padding: 0; margin: 0 0 18px; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 4px 0 12px 42px;
  border-left: 2px solid var(--border);
  margin-left: 16px;
}
.steps li:last-child { border-left-color: transparent; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -17px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { display: block; color: var(--navy-dark); margin-bottom: 2px; }

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--navy-dark);
  display: flex;
  gap: 8px;
}
.faq-item h3::before { content: "Q"; color: var(--accent); font-weight: 900; }
.faq-item p {
  margin: 0;
  display: flex;
  gap: 8px;
  color: var(--text);
}
.faq-item p::before { content: "A"; color: var(--navy); font-weight: 900; flex-shrink: 0; }

.updated-note {
  font-size: 0.82rem;
  color: var(--text-light);
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 30px;
}

/* ===== 비포/애프터 카드 ===== */
.ba-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.ba-card__pair {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
}
.ba-card__item { position: relative; margin: 0; background: var(--white); }
.ba-card__item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.ba-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.02em;
}
.ba-card__badge--before { background: rgba(70, 65, 79, 0.78); }
.ba-card__badge--after { background: var(--accent); }
.ba-card__arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(70, 65, 79, 0.35);
  z-index: 2;
}
.ba-card__caption {
  padding: 12px 16px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
}

/* CTA 배너 */
.cta-banner {
  background: var(--navy-dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  margin: 30px 0;
}
.cta-banner h2 {
  color: var(--white);
  border-top: none;
  padding-top: 0;
  margin-bottom: 8px;
}
.cta-banner p { color: #dcd8ec; margin-bottom: 16px; }
.cta-banner .btn--primary { padding: 14px 28px; font-size: 1.05rem; }

/* ===== 카드형 내비게이션 ===== */
.nav-cards {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 20px 40px;
}
.nav-cards__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin: 0 0 14px;
  border-top: none;
  padding-top: 0;
}
.nav-cards__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.nav-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.15s, transform 0.15s;
}
.nav-card:hover { box-shadow: 0 6px 16px rgba(70,65,79,0.14); transform: translateY(-2px); }
.nav-card__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.nav-card__body { display: block; padding: 12px 14px; }
.nav-card__label { display: block; font-weight: 700; color: var(--navy-dark); font-size: 0.95rem; margin-bottom: 4px; }
.nav-card__desc { display: block; font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }
.nav-card--cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
}
.nav-card--cta .nav-card__label { color: var(--white); }
.nav-card--cta .nav-card__desc { color: #ece8f7; }
.nav-card--cta .nav-card__body { text-align: center; }

/* ===== 상담 페이지 전용 ===== */
.consult-actions {
  display: grid;
  gap: 12px;
  margin: 0 0 26px;
}
.btn--call, .btn--sms {
  padding: 18px;
  font-size: 1.1rem;
  border-radius: var(--radius);
}
.btn--call { background: var(--accent); color: var(--white); }
.btn--sms { background: var(--navy); color: var(--white); }
.consult-hours {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

/* ===== 푸터 ===== */
.site-footer {
  background: #2f2b38;
  color: #ffffff;
  margin-top: 30px;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 20px 34px;
}
.site-footer__nap p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.7; color: #ffffff; }
.site-footer__nap strong { color: #ffffff; font-weight: 800; }
.site-footer__nap a { color: #e3d6ff; font-weight: 700; text-decoration: underline; }
.site-footer__nap a:hover { color: #ffffff; }
.site-footer__copy { margin-top: 10px; color: #cfccdc; font-size: 0.8rem; }

/* ===== 메인으로 돌아가기 플로팅 배너 ===== */
.floating-home {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-dark);
  color: var(--white);
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(70, 65, 79, 0.35);
  font-weight: 700;
  font-size: 0.82rem;
  transition: background 0.15s, opacity 0.2s, transform 0.2s;
}
.floating-home:hover { background: var(--accent); }
.floating-home--hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}
.floating-home__thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

/* ===== 반응형 ===== */
@media (min-width: 640px) {
  h1 { font-size: 2.05rem; }
  h2 { font-size: 1.5rem; }
  .nav-cards__grid { grid-template-columns: repeat(3, 1fr); }
  .consult-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .img-grid { grid-template-columns: repeat(2, 1fr); }
  .img-grid figure:nth-child(3) { grid-column: span 2; }
}
