/*
Theme Name: 초록집사 Child (GeneratePress)
Theme URI: https://chorokjip.com
Description: GeneratePress 자식 테마. 초록집사 디자인 토큰(색상·폰트), 콜아웃 박스(핵심요약·실수·체크리스트), 작성자 박스, 카드, 잎맥 헤어라인을 담았습니다. 본문은 블록 에디터 + GenerateBlocks로 작성하고, 콜아웃은 등록된 블록 패턴으로 불러 씁니다.
Author: 식집사
Template: generatepress
Version: 1.1.0
Text Domain: chorokjip-child
*/

/* ───────────────────────────────────────────────
   1. 디자인 토큰
   ─────────────────────────────────────────────── */
:root {
  --ck-main: #2f7d4f;
  --ck-main-dark: #1f5736;
  --ck-main-soft: #5aa777;
  --ck-sub: #f3f7f2;
  --ck-ink: #1c2620;
  --ck-muted: #5d6b62;
  --ck-line: #e1eae3;
  --ck-earth: #a9794f;
  --ck-radius: 14px;
}

/* 폰트는 functions.php에서 Pretendard CDN을 불러옵니다 */
body,
.entry-content,
button,
input,
select,
textarea {
  font-family: "Pretendard", "Apple SD Gothic Neo", -apple-system, "Noto Sans KR", sans-serif;
}

/* ───────────────────────────────────────────────
   2. 본문 타이포그래피 (GeneratePress .entry-content 안)
   ─────────────────────────────────────────────── */
.entry-content {
  color: var(--ck-ink);
  line-height: 1.8;
}
.entry-content h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.7rem;
  padding-top: 0.4rem;
  letter-spacing: -0.01em;
}
.entry-content h3 {
  font-size: 1.12rem;
  margin: 1.5rem 0 0.6rem;
}
.entry-content p { margin: 0 0 1rem; }
.entry-content a { color: var(--ck-main-dark); }

/* ───────────────────────────────────────────────
   3. 콜아웃 박스 (블록 패턴에서 className="callout key|warn|check")
   Group 블록 → <div class="wp-block-group callout key"> 형태로 출력
   ─────────────────────────────────────────────── */
.callout {
  border-radius: 12px;
  padding: 18px 22px;
  margin: 1.6rem 0;
}
.callout > h4,
.callout .wp-block-heading {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.callout ul,
.callout ol {
  margin: 0;
  padding-left: 1.25rem;
}
.callout li { margin: 0.25rem 0; }

.callout.key {
  background: #eef6f0;
  border: 1px solid #cfe6d6;
}
.callout.warn {
  background: #fbf4ec;
  border: 1px solid #ecdcc6;
}
.callout.check {
  background: #fff;
  border: 1px dashed var(--ck-main-soft);
}
.callout.check ul { padding-left: 0; list-style: none; }
.callout.check li {
  list-style: none;
  padding-left: 26px;
  position: relative;
}
.callout.check li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: var(--ck-main);
  font-weight: 700;
}

/* ───────────────────────────────────────────────
   4. 작성자 박스 (className="ck-author-box")
   ─────────────────────────────────────────────── */
.ck-author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--ck-sub);
  border: 1px solid var(--ck-line);
  border-radius: 12px;
  padding: 20px;
  margin: 2rem 0;
}
.ck-author-box .ck-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--ck-main);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.ck-author-box .ck-author-name {
  margin: 0 0 4px;
  font-weight: 700;
}
.ck-author-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ck-muted);
}

/* ───────────────────────────────────────────────
   5. 잎맥 헤어라인 (구분선) — className="ck-veinline"
   Separator 블록 또는 빈 단락에 클래스로 사용
   ─────────────────────────────────────────────── */
.ck-veinline {
  height: 1px;
  border: 0;
  margin: 2rem 0;
  background: linear-gradient(90deg, transparent, var(--ck-main-soft), transparent);
  opacity: 0.55;
}

/* ───────────────────────────────────────────────
   6. 카드 유틸 (GenerateBlocks로 카테고리/글 카드 만들 때 활용)
   ─────────────────────────────────────────────── */
.ck-card {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius);
  padding: 22px;
  transition: border-color 0.15s, transform 0.15s;
}
.ck-card:hover {
  border-color: var(--ck-main-soft);
  transform: translateY(-2px);
}
.ck-cat-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ck-main);
  letter-spacing: 0.03em;
}

/* 핵심요약/체크리스트 등 박스 안 제목의 이모지 정렬 보정 */
.callout .wp-block-heading { line-height: 1.4; }

/* ───────────────────────────────────────────────
   7. 버튼 톤 보정 (GP 버튼을 초록집 메인 컬러로)
   ─────────────────────────────────────────────── */
.wp-block-button.is-style-ck-primary .wp-block-button__link {
  background: var(--ck-main);
  color: #fff;
  border-radius: 11px;
}
.wp-block-button.is-style-ck-primary .wp-block-button__link:hover {
  background: var(--ck-main-dark);
}

/* 업데이트 안내 문구 (className="ck-update-note") */
.ck-update-note {
  font-size: 0.82rem;
  color: var(--ck-muted);
  background: var(--ck-sub);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 1.6rem 0 0;
}
