/* ═══════════════════════════════════════════════════════
   MEDI KOREA — Post (Article) Page Styles 2026
   post.php 전용 · mk-magazine.css와 함께 로딩
   ═══════════════════════════════════════════════════════ */

/* ── Breadcrumb ── */
.post-breadcrumb {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-warm);
}
.post-bc-inner {
  width: min(calc(100% - 48px), var(--max-w));
  margin: 0 auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim); font-weight: 500;
}
.post-bc-inner a { color: var(--text-sub); transition: color var(--fast); }
.post-bc-inner a:hover { color: var(--blue); }
.bc-sep { color: var(--text-dim); }

/* ── Article Header ── */
.post-header-area {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 56px;
}
.post-header-inner {
  width: min(calc(100% - 48px), var(--max-w));
  margin: 0 auto;
  max-width: 780px;
}
.post-cat-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.post-cat-label::before {
  content: ''; width: 16px; height: 1.5px; background: currentColor;
}
.post-title {
  font-size: clamp(26px, 3.5vw, 48px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.2;
  color: var(--text); margin-bottom: 28px;
}
.post-meta-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; font-size: 12.5px; color: var(--text-dim); font-weight: 500;
}
.post-author-row {
  display: flex; align-items: center; gap: 8px;
}
.post-author-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid var(--line-md);
}
.post-author-name { font-weight: 600; color: var(--text-sub); }
.bsep {
  display: inline-block; width: 2px; height: 2px;
  background: var(--text-dim); border-radius: 50%;
}
.post-updated { color: var(--text-dim); }

/* Admin Bar */
.post-admin-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.post-admin-bar span { color: var(--text-dim); font-weight: 600; }
.post-admin-bar a {
  color: var(--blue); font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--line-md); transition: all var(--fast);
}
.post-admin-bar a:hover { background: var(--blue-bg); }
.post-admin-bar a.del { color: #dc2626; border-color: #fca5a5; }
.post-admin-bar a.del:hover { background: #fef2f2; }

/* ── Thumbnail ── */
.post-thumb-wrap {
  background: var(--bg-sub);
  border-bottom: 1px solid var(--line);
}
.post-thumb-inner {
  width: min(calc(100% - 48px), var(--max-w));
  margin: 0 auto; padding: 0;
  max-width: 900px;
}
.post-thumb-inner img {
  width: 100%; height: auto;
  display: block;
  max-height: 520px; object-fit: cover;
}

/* ── Body Layout ── */
.post-body-wrap {
  padding: 72px 0 100px;
}
.post-body-inner {
  width: min(calc(100% - 48px), var(--max-w));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 80px;
  align-items: start;
}

/* ── Content Column ── */
.post-content-col {}
.post-content {
  font-size: 16px; line-height: 1.9;
  color: var(--text-sub);
  max-width: 720px;
}

/* Quill 에디터 본문 스타일 리셋 */
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  color: var(--text); letter-spacing: -.025em;
  font-weight: 750; line-height: 1.3; margin: 2em 0 .8em;
}
.post-content h2 { font-size: 1.55em; }
.post-content h3 { font-size: 1.25em; }
.post-content h4 { font-size: 1.1em; }
.post-content p { margin-bottom: 1.4em; }
.post-content ul, .post-content ol {
  margin: 1em 0 1.4em 1.5em; padding: 0;
}
.post-content li { margin-bottom: .5em; }
.post-content strong { color: var(--text); font-weight: 700; }
.post-content em { font-style: italic; }
.post-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote {
  margin: 2em 0; padding: 20px 24px;
  border-left: 3px solid var(--blue);
  background: var(--bg-warm);
  color: var(--text); font-weight: 600;
  font-size: .95em; border-radius: 0 8px 8px 0;
}
.post-content img {
  max-width: 100%; height: auto; border-radius: 8px;
  margin: 1.5em 0;
}
.post-content hr {
  border: none; border-top: 1px solid var(--line);
  margin: 2.5em 0;
}
.post-content pre, .post-content code {
  font-family: 'Courier New', monospace;
  background: var(--bg-sub); border-radius: 6px;
  font-size: .88em;
}
.post-content pre { padding: 16px 20px; overflow-x: auto; margin: 1.5em 0; }
.post-content code { padding: 2px 6px; }

/* Empty body */
.post-empty {
  padding: 64px 0; text-align: center;
  font-size: 14px; color: var(--text-dim);
}
.post-empty a {
  display: inline-block; margin-top: 12px;
  color: var(--blue); font-weight: 600;
}

/* ── Tags ── */
.post-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 40px; padding-top: 32px;
  border-top: 1px solid var(--line);
}
.post-tag {
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-sub);
  border: 1px solid var(--line-md); transition: all var(--fast);
}
.post-tag:hover { border-color: var(--blue); color: var(--blue); }

/* ── Author Card ── */
.post-author-card {
  display: flex; gap: 16px; align-items: center;
  margin-top: 40px; padding: 24px 28px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-warm);
}
.author-card-photo {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--line-md);
}
.author-card-body {}
.author-card-name {
  font-size: 14px; font-weight: 750; letter-spacing: -.015em;
  color: var(--text); margin-bottom: 4px;
}
.author-card-bio {
  font-size: 12.5px; color: var(--text-dim); line-height: 1.6;
}

/* ── Inquiry (본문 내) ── */
.post-inquiry {
  margin-top: 48px; padding: 36px 36px;
  background: var(--dark);
  border-radius: 12px;
}
.post-inquiry-label {
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
  margin-bottom: 10px;
}
.post-inquiry-title {
  font-size: clamp(20px, 2.2vw, 28px); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.25;
  color: #fff; margin-bottom: 12px;
}
.post-inquiry-desc {
  font-size: 14px; color: rgba(255,255,255,.5); line-height: 1.75;
  margin-bottom: 24px;
}
.post-inquiry-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  background: #FEE500; color: #1a1a1a;
  transition: opacity var(--fast);
}
.post-inquiry-btn:hover { opacity: .9; }
.kakao-icon {
  width: 18px; height: 18px; flex-shrink: 0;
}

/* ── Prev/Next Navigation ── */
.post-adjacent {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; margin-top: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}
.post-adj-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px 0; background: var(--bg);
  transition: background var(--fast);
}
.post-adj-prev { padding-right: 24px; }
.post-adj-next { padding-left: 24px; text-align: right; }
.post-adj-item:hover { background: var(--bg-warm); }
.post-adj-dir {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--text-dim); text-transform: uppercase;
}
.post-adj-title {
  font-size: 14px; font-weight: 650; letter-spacing: -.015em;
  color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.post-adj-empty { background: var(--bg); }

/* ── Related Articles ── */
.post-related { margin-top: 48px; }
.post-related-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 24px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.post-related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.related-card { display: block; }
.related-card-thumb {
  aspect-ratio: 3/2; border-radius: 6px; overflow: hidden;
  background: var(--bg-sub); margin-bottom: 12px;
}
.related-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s var(--ease);
}
.related-card:hover .related-card-thumb img { transform: scale(1.04); }
.related-card-cat {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 6px;
}
.related-card-title {
  font-size: 13.5px; font-weight: 700; letter-spacing: -.015em;
  line-height: 1.4; color: var(--text); margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--fast);
}
.related-card:hover .related-card-title { color: var(--blue); }
.related-card-date { font-size: 11px; color: var(--text-dim); }

/* ── Sidebar ── */
.post-sidebar {
  position: relative;
}
.sidebar-sticky {
  position: sticky; top: calc(var(--hh) + 32px);
}
.sidebar-block {
  margin-bottom: 28px; padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.sidebar-block:last-child { border-bottom: none; margin-bottom: 0; }
.sidebar-block-title {
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 16px;
}
.sidebar-cat-list { display: flex; flex-direction: column; }
.sidebar-cat-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--text-sub);
  transition: color var(--fast);
}
.sidebar-cat-item:last-child { border-bottom: none; }
.sidebar-cat-item:hover { color: var(--text); }
.sidebar-cat-item.active { color: var(--text); font-weight: 700; }
.sidebar-cat-count {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-sub); padding: 2px 7px; border-radius: 999px;
}

/* Sidebar Inquiry */
.sidebar-inquiry {
  padding: 24px;
  background: var(--dark); border-radius: 10px;
}
.sidebar-inquiry-title {
  font-size: 14px; font-weight: 750; letter-spacing: -.02em;
  color: #fff; margin-bottom: 8px; line-height: 1.4;
}
.sidebar-inquiry-desc {
  font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.65;
  margin-bottom: 16px;
}
.sidebar-inquiry-btn {
  display: block; text-align: center;
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  background: var(--blue); color: #fff;
  transition: background var(--fast);
}
.sidebar-inquiry-btn:hover { background: var(--blue-dk); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .post-body-inner { grid-template-columns: 1fr 260px; gap: 56px; }
}
@media (max-width: 900px) {
  .post-body-inner { grid-template-columns: 1fr; }
  .post-sidebar { display: none; } /* 모바일에서 사이드바 숨김 */
  .post-related-grid { grid-template-columns: repeat(2, 1fr); }
  .post-adjacent { grid-template-columns: 1fr; }
  .post-adj-next { text-align: left; padding-left: 0; }
}
@media (max-width: 640px) {
  .post-header-inner { max-width: 100%; }
  .post-body-inner { width: calc(100% - 32px); }
  .post-bc-inner { width: calc(100% - 32px); }
  .post-header-area { padding: 40px 0 36px; }
  .post-body-wrap { padding: 48px 0 72px; }
  .post-content { font-size: 15px; }
  .post-related-grid { grid-template-columns: 1fr; }
  .post-thumb-inner { width: 100%; }
  .post-inquiry { padding: 28px 24px; }
}

@media (max-width: 390px) {
  .post-title { font-size: clamp(22px, 7vw, 32px); }
  .post-body-inner { width: calc(100% - 24px); }
  .post-bc-inner   { width: calc(100% - 24px); }
  .post-content    { font-size: 14.5px; }
  .post-inquiry    { padding: 24px 16px; }
  .post-inquiry-title { font-size: 18px; }
  .post-adjacent   { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .post-body-inner { width: calc(100% - 16px); }
  .post-bc-inner   { width: calc(100% - 16px); }
  .post-title      { font-size: 22px; }
}
