/* ============================================================
   PAGE: blog (article + index)
   ============================================================ */

/* ----- Article layout --------------------------------------- */
.article-page {
  padding: clamp(48px, 7vw, 88px) 0 clamp(80px, 10vw, 120px);
}
.article-page .container { max-width: var(--container); }

.article-header {
  margin-bottom: 40px;
  text-align: left;
}
.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 16px;
  transition: color var(--t-base);
}
.article-eyebrow:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}

.article-lead {
  font-size: var(--text-lg);
  color: var(--slate);
  line-height: 1.55;
  margin-bottom: 22px;
  max-width: 620px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 500;
}
.article-meta time { color: var(--muted); }
.article-meta-dot {
  width: 4px; height: 4px;
  background: var(--border);
  border-radius: 50%;
}

/* ----- Prose body ------------------------------------------- */
.prose {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--slate);
}

.prose h2 {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 56px 0 16px;
}
.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-family: var(--font-head);
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 40px 0 12px;
}

.prose h4 {
  font-family: var(--font-head);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--ink);
  margin: 24px 0 8px;
}

.prose p {
  margin: 16px 0;
}

.prose ul, .prose ol {
  margin: 16px 0 16px 24px;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--muted); }

.prose strong { color: var(--ink); font-weight: 700; }
.prose em { font-style: italic; }

.prose a:not(.btn) {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font-weight: 600;
  transition: color var(--t-base);
}
.prose a:not(.btn):hover { color: var(--blue-dark); }

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

.prose blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 3px solid var(--blue);
  background: var(--blue-tint);
  font-style: italic;
  color: var(--slate);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose pre, .prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}
.prose code {
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Artwork figure inside prose */
.prose figure {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
}
.prose figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.prose figure figcaption {
  margin-top: 10px;
  font-size: var(--text-sm);
  color: var(--muted);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* Featured artwork — limited width so portraits don't overwhelm */
.prose .figure-featured img {
  max-width: 480px;
  margin: 0 auto;
}

/* Smaller inline thumbnail */
.prose .figure-thumb img {
  max-width: 360px;
  margin: 0 auto;
}

/* Gallery grid for multiple artworks */
.prose .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin: 32px 0;
}
.prose .gallery figure {
  margin: 0;
}
/* 사진이 없는 작품. 목록에서 빼면 제목이 말하는 점수와 실제 개수가 어긋나므로
   싣되, 이미지 칸을 비워두면 그리드가 무너진다. 같은 4:3 자리를 차지하는
   빈 판으로 대신하고 카드라는 것만 알아볼 수 있게 한다. */
.prose .gallery figure.no-image::before {
  content: "";
  display: block;
  aspect-ratio: 4 / 3;
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.prose .gallery img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.prose .gallery figcaption {
  text-align: left;
  font-style: normal;
  font-size: var(--text-xs);
  color: var(--slate);
  margin-top: 8px;
}
.prose .gallery .gallery-name {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
  font-size: var(--text-base);
}

/* Image attribution at end of article */
.prose .credits {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
}
.prose .credits a { color: var(--muted); text-decoration: underline; }

/* Audio preview row inside prose */
.prose .audio-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--blue-soft);
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--blue);
}
.prose .audio-preview svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
}

/* Location pill inline (e.g., for masterpiece room numbers) */
.prose .loc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.85em;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

/* ----- In-article CTA box ----------------------------------- */
.cta-box {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-tinted);
  border: 1px solid var(--border-tinted);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.cta-box-title {
  font-family: var(--font-head);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.4px;
}
.cta-box-text {
  font-size: var(--text-md);
  color: var(--slate);
  line-height: 1.55;
}

/* ----- Related posts ---------------------------------------- */
.related {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.related-title {
  font-family: var(--font-head);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.related-list a {
  display: block;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  transition: border-color var(--t-base), transform var(--t-base);
}
.related-list a:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

/* ----- Blog index (post list) -------------------------------- */
.blog-index { padding: clamp(56px, 8vw, 96px) 0 clamp(80px, 10vw, 120px); }
.blog-index .container { max-width: var(--container); }

.blog-index-header {
  margin-bottom: 44px;
}
.blog-index-kicker {
  display: block;
  font-family: var(--font-head);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--forest);
  margin: 18px 0 10px;
}
.blog-index-header h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}
/* 제목 아래 짧은 금색 선. 머리말과 목록 사이의 경계를 만든다. */
.blog-index-header::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* 박물관 허브(/{locale}/blog/museum/{slug}/)로 가는 링크 행. */
.blog-index-museums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.blog-index-museums a {
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  transition: border-color var(--t-base), color var(--t-base);
}
.blog-index-museums a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.post-item:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

/* 사진은 세로 비율로 자른다. 싣는 그림 대부분이 세로 초상이라 가로로
   자르면 얼굴이 잘려 나간다. object-position 을 위로 당긴 것도 같은 이유다. */
.post-thumb {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
}
.post-thumb img {
  display: block;
  width: 100%;
  /* height:auto 가 있어야 aspect-ratio 가 산다. <img height> 속성은 UA
     스타일시트에서 실제 height 로 들어오고, height 가 auto 가 아니면
     aspect-ratio 는 무시된다. 속성 자체는 CLS 때문에 남겨 둔다. */
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 28%;
  transition: transform var(--t-slow) var(--t-ease);
}
.post-item:hover .post-thumb img { transform: scale(1.04); }

.post-item-eyebrow {
  display: block;
  font-family: var(--font-head);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 8px;
}
.post-item h2 {
  font-family: var(--font-head);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.post-item p {
  font-size: var(--text-base);
  color: var(--slate);
  line-height: 1.55;
}
.post-item .article-meta { margin-top: 12px; }

/* 맨 위 한 편(최신 글)은 사진을 크게 세워 대표로 쓴다. */
.post-item-hero {
  grid-template-columns: clamp(240px, 38%, 340px) minmax(0, 1fr);
  gap: 32px;
  padding: 20px;
}
.post-item-hero .post-thumb img {
  aspect-ratio: 4 / 5;
}
.post-item-hero .post-text { padding-right: 12px; }
.post-item-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.post-item-hero p {
  font-size: var(--text-md);
  line-height: 1.6;
}
.post-item-hero .article-meta { margin-top: 16px; }

/* ----- Responsive ------------------------------------------- */
@media (max-width: 640px) {
  .prose { font-size: var(--text-md); }
  .cta-box { padding: 24px 20px; }

  /* 좁은 화면에서도 일반 카드는 가로 배치를 유지한다. 세로로 쌓으면 사진을
     가로 비율로 잘라야 하고, 세로 초상이 대부분이라 그 편이 더 나쁘다.
     대표 카드만 쌓되 4:3 으로 완만하게 자른다. */
  .post-item {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }
  .post-item h2 { font-size: var(--text-md); }
  .post-item p { font-size: var(--text-sm); }
  /* 글 칸이 좁아 날짜와 읽는 시간이 단어 중간에서 끊긴다(ja 의 "2026年8月16 일").
     조각을 통째로 다음 줄로 넘긴다. */
  .post-item .article-meta {
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: var(--text-xs);
  }
  .post-item .article-meta > * { white-space: nowrap; }

  .post-item-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
  }
  .post-item-hero .post-thumb img { aspect-ratio: 4 / 3; }
  .post-item-hero .post-text { padding: 0 4px 4px; }
  .post-item-hero h2 { font-size: var(--text-2xl); }
  .post-item-hero p { font-size: var(--text-base); }
}

/* ----- 전환 구좌 ------------------------------------------- */
/* 퀵리스트 직후 CTA — 클릭 히트맵상 참여가 가장 높은 지점이다.
   기존에는 유일한 CTA 박스가 기사 최하단에만 있었다. */
.quick-cta { text-align: center; margin: 28px 0 8px; }
.quick-cta .btn { display: inline-flex; }
.quick-cta-note { margin: 10px 0 0; font-size: var(--text-sm); color: var(--stone); }

/* 모바일 스티키 CTA — 수십 스크린짜리 기사를 따라다닌다.
   600px 스크롤 후 JS 가 hidden 을 푼다(즉시 덮으면 이탈만 늘린다). */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 248, 243, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(31, 31, 31, 0.08);
}
.sticky-cta .btn { width: 100%; justify-content: center; }
@media (max-width: 768px) {
  .sticky-cta:not([hidden]) { display: block; }
}
