/* ============================================================
   페이대장 — Policy Pages Shared Stylesheet
   적용 파일: terms.html, privacy.html
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Pretendard', sans-serif;
  color: #334155;
  background: #f8fafb;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

/* ============================================================
   HEADER — 상단 고정 헤더
   ============================================================ */
.terms-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.terms-header-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
}

/* ── 로고 ── */
.terms-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.terms-logo img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(0,212,170,.35);
}
.terms-logo span {
  font-family: 'Pretendard', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0d2137;
}

/* ── 뒤로가기 링크 ── */
.terms-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color .15s;
}
.terms-back:hover { color: #00be96; }

/* ============================================================
   LAYOUT — 본문 래퍼
   ============================================================ */
.terms-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

/* ============================================================
   PAGE TITLE — 페이지 상단 타이틀 영역
   ============================================================ */
.terms-page-title {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 2px solid #00be96;
}
.terms-page-title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0d2137;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.terms-page-title p {
  font-size: .88rem;
  color: #64748b;
}

/* ── 시행일 뱃지 ── */
.terms-effective {
  display: inline-block;
  margin-top: 10px;
  background: #edfdf8;
  color: #00a884;
  border: 1px solid #80edd6;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: .78rem;
  font-weight: 700;
}

/* ============================================================
   TOC — 목차
   ============================================================ */
.terms-toc {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 40px;
}
.terms-toc h2 {
  font-size: .9rem;
  font-weight: 800;
  color: #0d2137;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terms-toc h2::before {
  content: '';
  display: inline-block;
  width: 4px; height: 16px;
  background: #00be96;
  border-radius: 2px;
}
.terms-toc ol {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 24px;
  padding-left: 0;
  list-style: none;
}
.terms-toc ol li { counter-increment: none; }
.terms-toc a {
  font-size: .83rem;
  color: #64748b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: color .15s;
}
.terms-toc a:hover { color: #00be96; }
.terms-toc a .toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: #f0f4f8;
  color: #94a3b8;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.terms-toc a:hover .toc-num { background: #edfdf8; color: #00be96; }

/* ============================================================
   CHAPTER — 장(章) 구분 헤더  [terms.html 전용]
   ============================================================ */
.terms-chapter { margin-bottom: 48px; }
.terms-chapter-title {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #00be96, #00a884);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.terms-chapter-title .chapter-num {
  background: rgba(255,255,255,.25);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* ============================================================
   ARTICLE — 조(條) 카드  [공통]
   ============================================================ */
.terms-article {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 14px;
  scroll-margin-top: 80px;
}
.terms-article:hover {
  border-color: #80edd6;
  box-shadow: 0 2px 12px rgba(0,212,170,.08);
}

/* ── 조 타이틀 행 ── */
.terms-article-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* ── 조 번호 뱃지 (terms.html: 아웃라인 스타일) ── */
.terms-article-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px; height: 28px;
  background: #edfdf8;
  color: #00a884;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid #c0f7eb;
  padding: 0 4px;
}

/* ── 조 번호 뱃지 (privacy.html: 그라디언트 필드 스타일) ── */
.terms-article-num--filled {
  background: linear-gradient(135deg, #00d4aa, #00be96);
  color: #fff;
  border: none;
  min-width: 36px; height: 36px;
  border-radius: 8px;
  font-size: .78rem;
  margin-top: 2px;
}

/* ── 조 제목 텍스트 ── */
.terms-article h3,
.terms-article-title h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #0d2137;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

/* ── 본문 텍스트 ── */
.terms-article p {
  font-size: .9rem;
  color: #475569;
  margin-bottom: 10px;
  line-height: 1.85;
}
.terms-article p:last-child { margin-bottom: 0; }

/* ── 조 타이틀 구분선 (privacy.html 스타일) ── */
.terms-article-title--bordered {
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 18px;
  align-items: flex-start;
}

/* ============================================================
   CLAUSE — 항(項) ①②③  [terms.html 전용]
   ============================================================ */
.terms-clause {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: .9rem;
  color: #475569;
  line-height: 1.85;
}
.terms-clause:last-child { margin-bottom: 0; }
.clause-num {
  flex-shrink: 0;
  font-weight: 700;
  color: #00a884;
  min-width: 20px;
}

/* ============================================================
   LISTS — 목록
   ============================================================ */

/* ── 불릿 리스트 (공통) ── */
.terms-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 14px;
}

/* terms.html: 번호 뱃지 스타일 */
.terms-list--numbered {
  margin: 10px 0 0 30px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.terms-list--numbered li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .88rem;
  color: #475569;
  line-height: 1.75;
}
.terms-list--numbered li .list-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  background: #f0f4f8;
  color: #64748b;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* privacy.html: 점 불릿 스타일 */
.terms-list--bullet li {
  font-size: .88rem;
  color: #475569;
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.8;
  border-bottom: 1px dashed #f1f5f9;
}
.terms-list--bullet li:last-child { border-bottom: none; }
.terms-list--bullet li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: #00be96;
  font-weight: 700;
}

/* ── 번호 카운터 리스트 (privacy.html) ── */
.terms-numlist {
  padding-left: 0;
  margin: 8px 0 14px;
  list-style: none;
  counter-reset: numlist;
}
.terms-numlist > li {
  font-size: .88rem;
  color: #475569;
  padding: 6px 0 6px 30px;
  position: relative;
  line-height: 1.85;
  counter-increment: numlist;
}
.terms-numlist > li::before {
  content: counter(numlist) '.';
  position: absolute;
  left: 0;
  color: #00be96;
  font-weight: 800;
  min-width: 24px;
}

/* ── 서브 리스트 (한글 가나다 카운터) ── */
.terms-sublist {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 4px 0;
  counter-reset: sublist;
}
.terms-sublist li {
  font-size: .86rem;
  color: #64748b;
  padding: 4px 0 4px 28px;
  position: relative;
  counter-increment: sublist;
  line-height: 1.8;
}
.terms-sublist li::before {
  content: counter(sublist, hangul) '.';
  position: absolute;
  left: 0;
  color: #94a3b8;
  font-weight: 700;
}

/* ============================================================
   TABLE — 표
   ============================================================ */
.terms-table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.terms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.terms-table th {
  background: #f0fdf9;
  color: #0d2137;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid #b2f0e0;
  text-align: left;
  white-space: nowrap;
}
.terms-table td {
  padding: 9px 14px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.terms-table tr:last-child td { border-bottom: none; }
.terms-table tr:nth-child(even) td { background: #f8fafb; }

/* ============================================================
   HIGHLIGHT BOX — 강조 박스
   ============================================================ */
.terms-highlight {
  background: #f0fdf9;
  border-left: 4px solid #00be96;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: .88rem;
  color: #334155;
  line-height: 1.8;
}
.terms-highlight strong { color: #00a884; }

/* ============================================================
   CONTACT CARD — 담당자 카드 그리드
   ============================================================ */
.terms-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.terms-contact-card {
  background: #f8fafb;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
}
.terms-contact-card h4 {
  font-size: .9rem;
  font-weight: 800;
  color: #0d2137;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terms-contact-card h4 i { color: #00be96; }
.terms-contact-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  font-size: .83rem;
}
.terms-contact-card dt { color: #94a3b8; font-weight: 600; white-space: nowrap; }
.terms-contact-card dd { color: #475569; }

/* ============================================================
   ADDENDUM — 부칙
   ============================================================ */

/* terms.html 스타일 */
.terms-addendum {
  background: #f0fdf9;
  border: 1px solid #c0f7eb;
  border-radius: 12px;
  padding: 22px 28px;
  margin-top: 16px;
}
.terms-addendum h3 {
  font-size: .95rem;
  font-weight: 800;
  color: #00a884;
  margin-bottom: 8px;
}
.terms-addendum p {
  font-size: .88rem;
  color: #475569;
}

/* privacy.html 스타일 (중앙 정렬 강조형) */
.terms-addendum--center {
  background: #fff;
  border: 2px solid #00be96;
  border-radius: 14px;
  padding: 28px 36px;
  margin-top: 12px;
  text-align: center;
}
.terms-addendum--center p {
  font-size: .95rem;
  color: #0d2137;
  font-weight: 700;
}
.terms-addendum--center span {
  display: inline-block;
  margin-top: 8px;
  font-size: .85rem;
  color: #64748b;
  font-weight: 400;
}

/* ============================================================
   TOP BUTTON — 상단 이동 버튼  [terms.html 전용]
   ============================================================ */
.terms-top-btn {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.terms-top-btn a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: #00be96;
  color: #fff;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.terms-top-btn a:hover { background: #00a884; transform: translateY(-2px); }

/* ============================================================
   SUBSECTION TITLE — 소항목 제목  [privacy.html 전용]
   ============================================================ */
.subsection-title {
  font-weight: 700;
  color: #0d2137;
  margin: 16px 0 6px;
  font-size: .9rem;
}
.subsection-title:first-of-type { margin-top: 0; }

/* ── 마케팅 동의 보조 텍스트 ── */
.text-muted-sm {
  color: #94a3b8;
  font-size: .82rem;
}

/* ============================================================
   FOOTER — 하단 링크
   ============================================================ */
.terms-footer {
  text-align: center;
  padding: 32px 20px;
  font-size: .8rem;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
}
.terms-footer a {
  color: #64748b;
  text-decoration: none;
  margin: 0 6px;
}
.terms-footer a:hover { color: #00be96; }
.terms-footer-copy {
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE — 반응형
   ============================================================ */
@media (max-width: 640px) {
  .terms-wrap          { padding: 32px 16px 60px; }
  .terms-page-title h1 { font-size: 1.35rem; }
  .terms-toc           { padding: 20px 18px; }
  .terms-toc ol        { grid-template-columns: 1fr; }
  .terms-article       { padding: 18px 16px; }
  .terms-chapter-title { font-size: .9rem; padding: 11px 16px; }
  .terms-list--numbered { margin-left: 10px; }
  .terms-addendum--center { padding: 22px 18px; }
}
