/* 콘텐츠 글 상세 페이지 공통 스타일.
   정적 생성 글(/pages/contents/post/{id}/)과 동적 폴백 템플릿이 함께 사용한다. */
:root {
  --blue: #FF3659;
  --ink: #2B2D42;
  --muted: #667085;
  --line: #e4e7ec;
  --soft: #f6f8fb;
  --max: 760px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 96px 0 96px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; margin-bottom: 28px; }
.back:hover { color: var(--blue); }
.cat { color: var(--blue); font-size: 13px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 14px 0; font-size: clamp(28px, 4.5vw, 40px); line-height: 1.3; font-weight: 700; word-break: keep-all; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.body-content { font-size: 17px; line-height: 1.9; word-break: keep-all; }
.body-content h2 { font-size: 24px; font-weight: 700; margin: 40px 0 16px; }
.body-content h3 { font-size: 19px; font-weight: 800; margin: 28px 0 12px; }
.body-content p { margin: 0 0 20px; }
.body-content ul, .body-content ol { margin: 0 0 20px; padding-left: 22px; }
.body-content li { margin-bottom: 8px; }
.body-content img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 24px auto; }
.body-content a { color: var(--blue); text-decoration: underline; }
/* 본문 이미지 정렬·크기 (관리자 에디터와 동일 규칙) */
.body-content img.img-left { margin-left: 0; margin-right: auto; }
.body-content img.img-right { margin-left: auto; margin-right: 0; }
.body-content img.img-center { margin-left: auto; margin-right: auto; }
.body-content img.img-w-40 { width: 40%; }
.body-content img.img-w-70 { width: 70%; }
.body-content img.img-w-100 { width: 100%; }
/* 텍스트 정렬 (Quill align) */
.body-content .ql-align-center { text-align: center; }
.body-content .ql-align-right { text-align: right; }
.body-content .ql-align-justify { text-align: justify; }
/* 인용구 */
.body-content blockquote { border-left: 4px solid var(--blue); margin: 24px 0; padding: 10px 20px; color: #334; background: #f6f8fc; border-radius: 0 8px 8px 0; }
.not-found { color: var(--muted); font-size: 15px; }

.post-cta {
  margin-top: 56px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  padding: 34px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.post-cta h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; word-break: keep-all; }
.post-cta p { margin: 0; color: rgba(255,255,255,.65); font-size: 14px; word-break: keep-all; }
.post-cta a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 800; text-decoration: none;
  transition: background .15s ease;
}
.post-cta a:hover { background: #E01B45; }

.related { margin-top: 52px; }
.related h2 { margin: 0 0 18px; font-size: 19px; font-weight: 700; }
.related-list { display: grid; gap: 10px; }
.related-list a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.related-list a:hover { border-color: rgba(255,54,89,.35); background: #FFF8F9; }
.related-list .r-cat { color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.related-list .r-title { display: block; margin-top: 4px; font-size: 15px; font-weight: 800; line-height: 1.5; word-break: keep-all; }

@media (max-width: 640px) {
  .container { padding: 80px 0 64px; }
}
