/* ══════════════════════════════════════════════════════════════════════
   blog.css — 블로그 목록(blog.html)과 글 본문(blog/*.html)에서만 쓴다.

   styles.css 다음에 읽힌다. 색·글꼴·간격은 전부 styles.css 의 변수를 쓴다.
   여기서 새 색을 만들지 않는다 — 사이트가 두 벌의 색을 갖게 되면 곧 어긋난다.

   ■ 본문 활자는 다른 페이지와 다르게 잡았다.
     소개 페이지는 훑어보는 곳이라 짧은 문장을 크게 띄우지만, 블로그는 **끝까지 읽는 곳**이다.
     한 줄 길이를 34em 안으로 묶고 줄간격을 넉넉히 둔다. 눈이 다음 줄 첫 글자를
     못 찾으면 거기서 읽기를 그만둔다.
   ══════════════════════════════════════════════════════════════════════ */

/* ── 목록 ─────────────────────────────────────────────────────── */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.blog-item {
  display: block;
  background: var(--white);
  padding: 28px 4px;
  transition: background 0.2s;
}

.blog-item:hover { background: var(--paper); }

.blog-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  color: var(--gray-light);
}

.blog-item-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.blog-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.blog-item:hover .blog-item-title { color: var(--accent); }

.blog-item-summary {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray);
  max-width: 44rem;
}

/* 글이 아직 없을 때 — 빈 화면을 그대로 두지 않는다 */
.blog-empty {
  padding: 56px 0;
  text-align: center;
  color: var(--gray);
}

/* ── 글 본문 ──────────────────────────────────────────────────── */

.post-hero {
  padding: calc(var(--nav-h) + 56px) 0 40px;
  border-bottom: 1px solid var(--line);
}

.post-hero-inner,
.post-body,
.post-foot {
  width: min(38rem, calc(100% - 40px));
  margin-inline: auto;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.8125rem;
  color: var(--gray-light);
}

.post-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 16px;
}

.post-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--gray);
}

.post-body {
  padding: 48px 0 8px;
  /* 34em 을 넘기지 않는다. 한 줄이 길면 다음 줄을 찾다가 읽기를 놓는다. */
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 1.9;
}

.post-body > * + * { margin-top: 1.5em; }

.post-body h2 {
  margin-top: 2.4em;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.post-body h3 {
  margin-top: 2em;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.45;
}

.post-body strong { font-weight: 700; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body ul,
.post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: 0.6em; }

/* 인용 — 환자의 말을 옮길 때 쓴다 */
.post-body blockquote {
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #3a3a3a;
}

/* 짚고 넘어가는 상자 — 한 글에 하나면 충분하다. 여러 개면 아무것도 안 짚은 것이 된다. */
.post-note {
  padding: 20px 24px;
  background: var(--paper);
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.post-note strong { color: var(--black); }

/* 그림 — 본문 폭(34em)에 맞춘다. 도식에 글자가 들어 있어 폭을 넘기면 오히려 작아 보인다.
   width·height 를 <img> 에 적어 둔다: 그림이 늦게 오면 글이 아래로 밀리는 것(레이아웃 흔들림)을 막는다.
   loading="lazy" 는 첫 그림에는 붙이지 않는다 — 화면 첫머리 그림을 늦게 부르면 오히려 늦게 뜬다. */
.post-figure { margin-left: 0; margin-right: 0; }
.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
}
.post-figure figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--gray-light);
}

/* 영상 — 쇼츠는 세로(9:16)라 본문 폭을 다 쓰면 화면보다 길어진다. 폭을 360px 로 묶는다.
   iframe 은 높이를 스스로 못 정하므로 비율 상자 안에 꽉 채운다. */
.post-video { margin-left: 0; margin-right: 0; text-align: center; }
.post-video-frame {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.post-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-video figcaption {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--gray-light);
}
.post-video figcaption a { color: var(--gray); text-decoration: underline; text-underline-offset: 3px; }

/* 번역 표시 — 원문을 쓴 사람과 옮긴 방식을 숨기지 않는다 */
.post-translation {
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--gray-light);
}

/* 참고문헌 — 의학 정보에는 출처가 따라가야 한다(앱이 이 일로 한 번 반려됐다) */
.post-refs {
  margin-top: 2.4em;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--gray);
}
.post-refs h2 { margin-top: 0 !important; font-size: 0.9375rem !important; }
.post-refs ol { padding-left: 1.2em; }
.post-refs li + li { margin-top: 0.5em; }
.post-refs a { word-break: break-all; }

/* ── 글 끝 ────────────────────────────────────────────────────── */

.post-foot { padding: 40px 0 8px; }

/* 의료 정보를 다루는 글이다. 읽는 사람이 이 글로 자기 상태를 판단하고
   병원에 안 가는 일이 없도록, 모든 글 끝에 같은 문장을 둔다. 지우지 말 것. */
.post-disclaimer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--gray-light);
}

.post-cta {
  padding: 28px;
  background: var(--accent-soft);
  border-radius: 16px;
  text-align: center;
}

.post-cta p {
  margin-bottom: 18px;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #1a1a1a;
}

.post-cta-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.post-nav {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.post-nav a { color: var(--accent); }
.post-nav .is-empty { visibility: hidden; }

@media (max-width: 768px) {
  .post-hero { padding: calc(var(--nav-h) + 36px) 0 32px; }
  .post-body { padding-top: 36px; font-size: 1rem; line-height: 1.85; }
  .blog-item { padding: 22px 4px; }
  .blog-item-title { font-size: 1.125rem; }
  .post-cta { padding: 24px 20px; }
}

/* 글쓴이 — 의료 정보는 「누가 썼나」를 검색엔진이 따로 본다(구조화 데이터만으로는 사람 눈에 안 보인다).
   이름은 한의원 안내 쪽으로 잇는다. 그 쪽에 약력이 있다. */
.post-byline {
  margin-top: -4px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--gray);
}
.post-byline a { color: var(--black); font-weight: 600; text-decoration: none; }
.post-byline a:hover { color: var(--accent); }

/* ── 다른 언어판으로 가는 링크 ──
   글은 언어별로 주소가 나뉘어 있다(영문 /blog/…, 한글 /blog/ko/…).
   헤더의 KO/EN 버튼은 사이트 틀의 언어만 바꾸므로, 글 자체를 바꿔 읽을 길을 따로 둔다. */
.post-altlang {
  margin-top: 20px;
  font-size: 0.875rem;
}
.post-altlang a {
  color: var(--gray);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-altlang a:hover { color: var(--accent); }

/* 앞뒤 글이 없을 때 자리만 지킨다(가운데 「글 목록」이 가운데에 오도록) */
.post-nav .is-empty { visibility: hidden; flex: 1; }
