/**
 * 게시글 본문 전용 스타일 (칼럼·후기 상세)
 * 사이트 전역 CSS와 분리해 블로그형 가독성 유지
 */

.gonggam-post {
  max-width: 720px;
  margin: 0 auto;
}

/* ── 상단 메타 (본문과 분리) ── */
.gonggam-post__back {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}

.gonggam-post__back a {
  color: var(--at-neutral-600, #5c6b62);
  text-decoration: none;
}

.gonggam-post__back a:hover {
  color: var(--at-theme-primary, #134e2f);
  text-decoration: underline;
}

.gonggam-post__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem) !important;
  font-weight: 700;
  line-height: 1.35 !important;
  letter-spacing: -0.03em !important;
  color: var(--at-neutral-900, #1a1f1c) !important;
  word-break: keep-all;
}

.gonggam-post__date {
  display: block;
  margin: 0 0 2rem;
  font-size: 0.9375rem;
  color: var(--at-neutral-500, #6b7280);
  letter-spacing: 0;
}

.gonggam-post__thumb {
  margin: 0 0 2.5rem;
}

.gonggam-post__thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ── 본문 영역: 전역 스타일 초기화 후 재정의 ── */
.gonggam-post-content {
  font-family: var(--at-ff-body, "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #2d3436;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.gonggam-post-content > *:first-child {
  margin-top: 0;
}

.gonggam-post-content > *:last-child {
  margin-bottom: 0;
}

/* 전역 h2(60px+)·subpage-section 규칙 무력화 */
.subpage-main .subpage-section .gonggam-post-content h1,
.subpage-main .subpage-section .gonggam-post-content h2,
.subpage-main .subpage-section .gonggam-post-content h3,
.subpage-main .subpage-section .gonggam-post-content h4,
.subpage-main .subpage-section .gonggam-post-content h5,
.subpage-main .subpage-section .gonggam-post-content h6 {
  margin: 2.25rem 0 1rem;
  font-weight: 700;
  line-height: 1.45 !important;
  letter-spacing: -0.02em !important;
  color: #1a1f1c !important;
  font-family: inherit;
}

.subpage-main .subpage-section .gonggam-post-content h1 {
  font-size: 1.5rem !important;
}

.subpage-main .subpage-section .gonggam-post-content h2 {
  font-size: 1.375rem !important;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(19, 19, 22, 0.08);
}

.subpage-main .subpage-section .gonggam-post-content h3 {
  font-size: 1.2rem !important;
}

.subpage-main .subpage-section .gonggam-post-content h4 {
  font-size: 1.1rem !important;
}

.gonggam-post-content p {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem !important;
  line-height: 1.85 !important;
  letter-spacing: -0.01em !important;
  color: #2d3436 !important;
}

.gonggam-post-content strong,
.gonggam-post-content b {
  font-weight: 700;
  color: #1a1f1c;
}

.gonggam-post-content em,
.gonggam-post-content i {
  font-style: italic;
}

.gonggam-post-content a {
  color: var(--at-theme-primary, #134e2f);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gonggam-post-content a:hover {
  color: #0d3d24;
}

.gonggam-post-content ul,
.gonggam-post-content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  list-style-position: outside;
}

.gonggam-post-content ul {
  list-style-type: disc;
}

.gonggam-post-content ol {
  list-style-type: decimal;
}

.gonggam-post-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
  font-size: 1.0625rem !important;
  line-height: 1.75 !important;
  color: #2d3436 !important;
  letter-spacing: -0.01em !important;
}

.gonggam-post-content li::marker {
  color: var(--at-theme-primary, #134e2f);
}

.gonggam-post-content ul ul,
.gonggam-post-content ol ol,
.gonggam-post-content ul ol,
.gonggam-post-content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.gonggam-post-content blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--at-theme-primary, #134e2f);
  background: #f7f9f8;
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #3d4843;
}

.gonggam-post-content blockquote p {
  margin-bottom: 0.5rem;
}

.gonggam-post-content blockquote p:last-child {
  margin-bottom: 0;
}

.gonggam-post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.75rem auto;
  border-radius: 8px;
}

.gonggam-post-content figure {
  margin: 1.75rem 0;
}

.gonggam-post-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

.gonggam-post-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgba(19, 19, 22, 0.1);
}

.gonggam-post-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.gonggam-post-content th,
.gonggam-post-content td {
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(19, 19, 22, 0.12);
  text-align: left;
}

.gonggam-post-content th {
  background: #f4f6f5;
  font-weight: 600;
}

.gonggam-post-content pre,
.gonggam-post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.gonggam-post-content pre {
  margin: 1.5rem 0;
  padding: 1rem;
  overflow-x: auto;
  background: #f4f6f5;
  border-radius: 8px;
}

@media (max-width: 767px) {
  .gonggam-post-content {
    font-size: 1rem;
  }

  .gonggam-post-content p,
  .gonggam-post-content li {
    font-size: 1rem !important;
  }

  .subpage-main .subpage-section .gonggam-post-content h2 {
    font-size: 1.25rem !important;
  }
}
