/*
 * DB 기반 시술 상세페이지(content-page.inc) 전용 레이아웃.
 * body.cp-page 로 범위를 제한하므로 고정 페이지(rose_*, privacy, terms 등)에는 영향이 없다.
 * 본문 섹션(.cv-sections)에만 타이포그래피를 적용하고, 에디터 본문(page_content)은 자체 CSS 를 유지한다.
 * 모바일은 mobile.css 가 rem 을 720px 기준으로 스케일하므로 rem 값을 720 캔버스 기준으로 잡는다.
 */
body.cp-page {
  --cp-brand: #b14192;
  --cp-accent: #d5127d;
  --cp-ink: #1f2328;
  --cp-text: #3a3f45;
  --cp-muted: #7a8088;
  --cp-line: #e7e3e8;
  --cp-soft: #faf7fa;
}

/* ---------- 왼쪽 안내 패널 ---------- */
body.cp-page .left-area.pc {
  padding: 8rem 5rem 6rem 6rem;
  border-right: 1px solid var(--cp-line);
}
body.cp-page .left-area .catchphrase {
  font-size: 4.2rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 5rem;
}
body.cp-page .left-area .catchphrase .text2 { font-weight: 700; }
body.cp-page .left-area .message {
  text-align: left;   /* content-view 의 전역 .message { text-align: center } 가 왼쪽 패널에 새는 것을 막는다 */
  font-size: 1.7rem;
  line-height: 1.95;
  color: #555b61;
}

/* ---------- 상단 제목 영역 ---------- */
body.cp-page .content-wrapper .content-header {
  min-height: 21rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff 0%, var(--cp-soft) 100%);
  border-bottom: 1px solid var(--cp-line);
}
body.cp-page .content-header .title,
body.cp-page .content-wrapper .content-header .title {
  position: static;
  transform: none;
  width: auto;
  padding: 0 4rem;
  font-size: 4.6rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--cp-ink);
}
body.cp-page .content-header h1.title { font-weight: 700; }
body.cp-page .content-header h1.title:before {
  content: 'ROSE CLINIC';
  display: block;
  margin-bottom: 1.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--cp-brand);
}
body.cp-page .content-header h1.title:after {
  content: '';
  display: block;
  width: 5rem;
  height: 3px;
  margin: 2.2rem auto 0;
  background: var(--cp-accent);
  border-radius: 2px;
}
/* 제목에 <b> 가 섞인 경우(카테고리 첫 페이지)도 위계가 무너지지 않게 */
body.cp-page .content-header h1.title span { font-weight: 400; }
body.cp-page .content-header h1.title b { font-weight: 700; }

/* ---------- 영상 ---------- */
body.cp-page .content-body .youtube-container {
  max-width: 96rem;
  margin: 0 auto;
  padding: 6rem 4rem 1rem;
  display: grid;
  gap: 2.8rem;
}
body.cp-page .content-body .youtube-container .embed-responsive {
  border-radius: 1.2rem;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0.6rem 2.4rem rgba(31, 35, 40, 0.14);
}

/* ---------- 본문 섹션 ---------- */
body.cp-page .cv-sections {
  max-width: 96rem;
  margin: 0 auto;
  padding: 0 4rem;
}
body.cp-page .cv-sections section {
  padding: 6rem 0;
  font-size: 1.9rem;
  line-height: 1.9;
  letter-spacing: -0.01em;
  color: var(--cp-text);
}
/* 구분선: 기존 그룹 규칙(h3 섹션만 선, h4 연속 섹션은 선 없음)을 유지하고 색만 정리 */
body.cp-page .cv-sections section:has(:where(.cv-t3):is(h1,h2,h3,h4,h5,h6)),
body.cp-page .cv-sections section:has(:where(.cv-t1):is(h1,h2,h3,h4,h5,h6)) + section:has(:where(.cv-t4):is(h1,h2,h3,h4,h5,h6)) {
  border-top-color: var(--cp-line) !important;
}
body.cp-page .cv-sections section:has(:where(.cv-t3):is(h1,h2,h3,h4,h5,h6)) + section:has(:where(.cv-t4):is(h1,h2,h3,h4,h5,h6)),
body.cp-page .cv-sections section:has(:where(.cv-t4):is(h1,h2,h3,h4,h5,h6)) + section:has(:where(.cv-t4):is(h1,h2,h3,h4,h5,h6)) {
  padding-bottom: 4.5rem;
}

body.cp-page .cv-sections section :where(.cv-t1):is(h1,h2,h3,h4,h5,h6) {
  margin: 0 0 3.5rem;
  text-align: left;
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--cp-ink);
}
body.cp-page .cv-sections section :where(.cv-t1):is(h1,h2,h3,h4,h5,h6):before {
  padding-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--cp-brand);
}
body.cp-page .cv-sections section :where(.cv-t3):is(h1,h2,h3,h4,h5,h6) {
  margin: 0 0 2.4rem;
  padding: 0;
  text-align: left;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: var(--cp-ink);
}
body.cp-page .cv-sections section :where(.cv-t3):is(h1,h2,h3,h4,h5,h6):before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 2.6rem;
  margin-right: 1.4rem;
  vertical-align: -0.35rem;
  background: var(--cp-accent);
  border-radius: 2px;
}
body.cp-page .cv-sections section :where(.cv-t4):is(h1,h2,h3,h4,h5,h6) {
  margin: 0 0 1.8rem;
  text-align: left;
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--cp-brand);
}
/* h4 로 시작하는 섹션은 직전 섹션의 하위 항목이므로 위쪽 여백 0 (기존 규칙 유지) */

body.cp-page .cv-sections .message {
  text-align: left;
  line-height: 1.9;
  letter-spacing: -0.01em;
  color: var(--cp-text);
}
body.cp-page .cv-sections .message img {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 3rem auto;
  padding: 0;
  border-radius: 0.8rem;
}

/* 목록(desc_list): 핵심 포인트 카드 */
body.cp-page .cv-sections .list-wrapper { text-align: left; }
body.cp-page .cv-sections ul.list {
  display: block;
  margin: 2.4rem 0 0;
  padding: 2.4rem 3rem;
  background: var(--cp-soft);
  border: 1px solid var(--cp-line);
  border-radius: 1.2rem;
}
body.cp-page .cv-sections ul.list li {
  display: block;
  position: relative;
  margin: 0;
  padding: 0.7rem 0 0.7rem 2.4rem;
  list-style: none;
}
body.cp-page .cv-sections ul.list li:before {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 1.75rem;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--cp-accent);
  border-radius: 50%;
}

/* Q & A: 카드 */
body.cp-page .cv-sections .question,
body.cp-page .cv-sections .answer {
  align-items: flex-start;
  font-size: 1.9rem;
  line-height: 1.8;
  background: var(--cp-soft);
  border: 1px solid var(--cp-line);
  padding: 0 3rem;
}
body.cp-page .cv-sections .question {
  margin-top: 3rem;
  padding-top: 2.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 0;
  border-radius: 1.2rem 1.2rem 0 0;
  font-weight: 700;
  color: var(--cp-ink);
}
body.cp-page .cv-sections .answer {
  padding-top: 0;
  padding-bottom: 2.4rem;
  border-top: 0;
  border-radius: 0 0 1.2rem 1.2rem;
  color: var(--cp-text);
}
body.cp-page .cv-sections .question:before,
body.cp-page .cv-sections .answer:before {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  margin: 0 1.6rem 0 0;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
body.cp-page .cv-sections .question:before { background: var(--cp-brand); color: #fff; }
body.cp-page .cv-sections .answer:before { background: #fff; color: var(--cp-brand); border: 1px solid var(--cp-brand); }

/* ---------- Before & After ---------- */
body.cp-page .content-footer {
  padding: 7rem 4rem 8rem;
  background: var(--cp-soft);
  border-top: 1px solid var(--cp-line);
}
body.cp-page .content-footer section { padding: 0; font-size: 1.9rem; }
body.cp-page .before-after .catchphrase {
  margin-bottom: 4rem;
  font-size: 2rem;
  font-weight: 400;
  color: var(--cp-muted);
}
body.cp-page .before-after .cases { width: 66%; }
body.cp-page .before-after .cases img { border-radius: 0.8rem; }

/* ---------- 모바일 (720px 캔버스 기준 rem) ---------- */
@media only screen and (max-width: 986px) {
  body.cp-page .content-wrapper .content-header { min-height: 20rem; margin-bottom: 0; }
  body.cp-page .content-header .title,
  body.cp-page .content-wrapper .content-header .title { font-size: 5.6rem; padding: 0 4rem; }
  body.cp-page .content-header h1.title:before { font-size: 2.2rem; margin-bottom: 2rem; }
  body.cp-page .content-header h1.title:after { width: 8rem; margin-top: 3rem; }

  body.cp-page .content-body .youtube-container { padding: 4rem 4rem 0; gap: 3rem; }
  body.cp-page .content-body .youtube-container .embed-responsive { border-radius: 1.6rem; }

  body.cp-page .cv-sections { padding: 0 4.4rem; }
  body.cp-page .cv-sections section { padding: 6rem 0; font-size: 2.9rem; line-height: 1.8; }
  body.cp-page .cv-sections section:has(:where(.cv-t3):is(h1,h2,h3,h4,h5,h6)) + section:has(:where(.cv-t4):is(h1,h2,h3,h4,h5,h6)),
  body.cp-page .cv-sections section:has(:where(.cv-t4):is(h1,h2,h3,h4,h5,h6)) + section:has(:where(.cv-t4):is(h1,h2,h3,h4,h5,h6)) { padding-bottom: 5rem; }
  body.cp-page .cv-sections section :where(.cv-t1):is(h1,h2,h3,h4,h5,h6) { font-size: 5rem; }
  body.cp-page .cv-sections section :where(.cv-t1):is(h1,h2,h3,h4,h5,h6):before { font-size: 2.2rem; }
  body.cp-page .cv-sections section :where(.cv-t3):is(h1,h2,h3,h4,h5,h6) { font-size: 4.2rem; margin-bottom: 3rem; }
  body.cp-page .cv-sections section :where(.cv-t3):is(h1,h2,h3,h4,h5,h6):before { width: 0.8rem; height: 3.6rem; margin-right: 2rem; vertical-align: -0.5rem; }
  body.cp-page .cv-sections section :where(.cv-t4):is(h1,h2,h3,h4,h5,h6) { font-size: 3.4rem; margin-bottom: 2.2rem; }
  body.cp-page .cv-sections .message img { width: 100%; }

  body.cp-page .cv-sections ul.list { padding: 3rem 3.6rem; border-radius: 1.8rem; }
  body.cp-page .cv-sections ul.list li { padding: 0.9rem 0 0.9rem 3.4rem; }
  body.cp-page .cv-sections ul.list li:before { top: 2.3rem; width: 1.2rem; height: 1.2rem; }

  body.cp-page .cv-sections .question,
  body.cp-page .cv-sections .answer { font-size: 2.9rem; padding-left: 3.6rem; padding-right: 3.6rem; }
  body.cp-page .cv-sections .question { border-radius: 1.8rem 1.8rem 0 0; padding-top: 3rem; padding-bottom: 1.6rem; }
  body.cp-page .cv-sections .answer { border-radius: 0 0 1.8rem 1.8rem; padding-bottom: 3rem; }
  body.cp-page .cv-sections .question:before,
  body.cp-page .cv-sections .answer:before { width: 5.2rem; height: 5.2rem; font-size: 2.4rem; margin-right: 2.2rem; }

  body.cp-page .content-footer { padding: 6rem 4rem 7rem; }
  body.cp-page .before-after .catchphrase { font-size: 2.8rem; }
  body.cp-page .before-after .cases { width: 80%; }
}

/* 본문 제목은 원래 종류(cv-t1~4) 클래스로 모양을 정하고, 태그는 h2부터 매긴다 (content-view.html cv_heading_levels).
   태그가 바뀌어도 모양이 같도록, 예전 태그 규칙(content/top.html .content-body section h1/h3/h4)에서
   받던 속성은 보충하고 새 태그 규칙에서 섞여 드는 속성은 되돌린다. */
body.cp-page .cv-sections section :where(.cv-t1):is(h1,h2,h3,h4,h5,h6) { position: relative; }
body.cp-page .cv-sections section :where(.cv-t1):is(h1,h2,h3,h4,h5,h6):before { content: '로즈피부과'; display: block; width: 100%; }
body.cp-page .cv-sections section :where(.cv-t4):is(h1,h2,h3,h4,h5,h6) { padding: 0; }
