/* =============================================
   AID Subpage CSS — 이용약관 / 개인정보 처리방침
   (공통 AID.css 공유 + 이 파일은 서브 전용 레이어)
   ============================================= */
:root{
  --primary-color: #1b3b34;   /* 딥그린 */
  --beige-color:   #f4e8ce;   /* 포인트 */
  --ink-color:     #111;      /* 본문 텍스트 */
  --muted-color:   #6f7674;   /* 보조 텍스트 */
  --surface-1:     #ffffff;   /* 카드/본문 바탕 */
  --surface-2:     #f6f8f7;   /* 옅은 회색 배경 */
  --line-color:    #e7ebe9;   /* 구분선 */
  --shadow-lg:     0 14px 34px rgba(0,0,0,.08);
}

/* ===== 레이아웃 컨테이너 (폭 넓게) ===== */
.legal-container{
  display:flex;
  gap:40px;
  width:min(1280px,94%);
  margin: clamp(36px, 5vw, 72px) auto;
  padding: 0 4px;
}
@media (min-width:1600px){
  .legal-container{ width:min(1400px,90%); }
}
@media (max-width: 960px){
  .legal-container{ flex-direction:column; gap:24px; }
}

/* ===== 사이드바 카테고리 ===== */
.sidebar{
  flex:0 0 300px;
  background: var(--surface-1);
  border:1px solid var(--line-color);
  border-radius:12px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  height: fit-content;
  position: sticky;
  top: 24px; /* 상단 고정 높이(헤더 높이에 맞게 조정 가능) */
}
@media (max-width: 960px){
  .sidebar{ position:static; flex: 0 0 auto; }
}
.sidebar ul{ list-style:none; margin:0; padding:6px; }
.sidebar li{
  display:block;
  padding:14px 14px;
  margin:6px 0;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  color:#2f3634;
  transition: background .25s ease, color .25s ease, transform .15s ease;
}
.sidebar li:hover{ background:#f0f3f2; }
.sidebar li:active{ transform: scale(.99); }
.sidebar li.active{
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 6px 16px rgba(27,59,52,.18);
}

/* 키보드 포커스 접근성 */
.sidebar li:focus{
  outline: 2px solid #9bc1b6;
  outline-offset: 2px;
}

/* ===== 콘텐츠 영역 ===== */
.content{
  flex: 1 1 auto;
  background: var(--surface-1);
  border:1px solid var(--line-color);
  border-radius:12px;
  box-shadow: var(--shadow-lg);
  padding: clamp(20px, 2.4vw, 36px);

  /* 여기부터 추가/수정 */
  position: sticky;
  top: 24px;                         /* 네비/페이지헤더 높이에 맞게 조정 가능 */
  height: calc(100vh - 24px - 24px); /* 상단 여백 + 하단 여백 감안(필요시 조정) */
  overflow-y: auto;                  /* 스크롤은 이 박스 안에서만 */
}
.content-section{ display:none; }
.content-section.active{ display:block; }


/* 타이포 기본 */
.content-section h2{
  margin: 0 0 18px 0;
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 900;
  color: var(--primary-color); /* 시그니처 녹색 */
  text-align: center; /* 가운데 정렬 */
}
.content-section h3{
  margin-top: 2.2em;
  margin-bottom: .6em;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  color: var(--primary-color); /* 시그니처 녹색 */
}
.content-section p{
  color: var(--primary-color); /* 시그니처 녹색 */
  line-height: 1.9;
  margin: .8em 0;
}
.content-section small,
.content-section .muted{ color: var(--muted-color); }

/* 번호/불릿 목록 */
.content-section ol,
.content-section ul{
  padding-left: 1.2em;
  line-height: 1.9;
  margin: .6em 0 1.2em;
  color: var(--primary-color); /* 시그니처 녹색 */
}
.content-section li{ margin: .2em 0; }

/* 인용/콜아웃 */
.content-section blockquote{
  margin: 1.2em 0;
  padding: .2em 0 .2em 14px;
  border-left: 3px solid var(--primary-color);
  color:#3b3f3e;
}

/* 표 기본 (약관/방침에서 자주 사용) */
.content-section table{
  width:100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.95rem;
}
.content-section th,
.content-section td{
  border:1px solid var(--line-color);
  padding: 10px 12px;
  vertical-align: top;
}
.content-section thead th{
  background: var(--surface-2);
  font-weight: 800;
}

/* 링크 톤 */
.content a{ color:#2f3735; text-decoration: underline; text-underline-offset: 2px; }
.content a:hover{ color: var(--primary-color); }

/* 섹션 간 구분선 — 모든 섹션 시작점 동일하게 보정 */
.content-section + .content-section {
  border-top: 1px dashed var(--line-color);
  margin-top: 2.2em;
  padding-top: 1.6em;
}

/* 개인정보 처리방침(두 번째 섹션) 보정 */
.content-section#privacy {
  border-top: none;      /* 구분선 제거 */
  margin-top: 0;         /* 상단 여백 제거 */
  padding-top: 0;        /* 상단 패딩 제거 */
}

/* 모바일 여백 보정 */
@media (max-width: 480px){
  .sidebar li{ padding:12px 12px; }
  .content{ padding: 18px; }
}

/* 프린트 최적화 (인쇄 시 사이드바 숨김, 본문 가득) */
@media print{
  .sidebar{ display:none !important; }
  .legal-container{
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .content{
    border:0; box-shadow:none; padding:0;
  }
}

/* 서브페이지 전용 Sticky Footer */
body.sub-legal {
  display: flex;
  flex-direction: column;
  min-height: 100vh;   /* 본문이 짧아도 화면 높이 채움 */
}

body.sub-legal .legal-container {
  flex: 1 0 auto;      /* 본문 영역이 남는 공간 차지 */
}

body.sub-legal .site-footer {
  margin-top: auto;    /* 푸터를 맨 아래로 밀기 */
}

/* 네비바 바로 아래 페이지 헤더(대 카테고리) */
.page-header {
  background: var(--primary-color); /* 시그니처 딥그린 */
  border-bottom: 1px solid var(--line-color);
  padding: 20px 0;
  text-align: center; /* 가운데 정렬 */
}

.page-header .page-title {
  margin: 0;
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 800;
  color: #fff; /* 글씨 흰색 */
}