/* 🏛️ 쇼미허브 (ShowMeHub) 정통 에디토리얼 스타일시트 (Happytree 24번 기반) */

:root {
  --bg-primary: #fdfdfd;
  --bg-surface: #ffffff;
  --text-main: #1f2328;
  --text-sub: #57606a;
  --text-muted: #8c959f;
  --border-light: #e1e4e8;
  --accent-red: #b33939; /* 정통 옻칠/주홍빛 포인트 */
  --accent-blue: #218c74; /* 청홍 조화 청록빛 */
  --badge-bg: #f1f2f6;
  --max-width: 1120px;
  --article-width: 840px; /* PC 데스크톱에서 시원하고 넉넉한 본문 폭 */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.85;
  letter-spacing: -0.015em;
  word-break: keep-all;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area .brand-logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.logo-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.main-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--accent-red);
  background: var(--badge-bg);
}

/* Hero Section */
.hero-section {
  background: #fbf9f5;
  border-bottom: 1px solid var(--border-light);
  padding: 60px 24px;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: #fdf0ee;
  color: var(--accent-red);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero-desc {
  font-size: 17px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* Main Container (Index Grid) */
.main-container {
  max-width: var(--max-width);
  margin: 40px auto 80px;
  padding: 0 24px;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  border-bottom: 2px solid #f1f2f6;
  padding-bottom: 14px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #f1f2f6;
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--text-main);
  color: #fff;
}

/* Article Card Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

.article-card-thumb {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 14px;
  background: #f1ede4;
  border: 1px solid #eae5da;
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .article-card-thumb img {
  transform: scale(1.04);
}

.card-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-main);
}

.card-summary {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid #f1f2f6;
  padding-top: 12px;
}

/* ==========================================================================
   Article Detail Page (정통 에디토리얼 모바일 반응형 완결 레이아웃)
   ========================================================================== */
.article-wrapper {
  width: 100%;
  background-color: var(--bg-surface);
  min-height: calc(100vh - 200px);
  padding: 40px 0 100px;
}

.article-container {
  width: 100%;
  max-width: var(--article-width); /* PC 화면에서 840px 시원한 너비 */
  margin: 0 auto; /* 화면 정중앙 안착 (좌측 쏠림 원천 방지) */
  padding: 0 24px;
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.category-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-red);
  background: #fdf0ee;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}

.article-date, .read-time {
  font-size: 13.5px;
  color: var(--text-muted);
}

.article-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 18px;
  word-break: keep-all;
}

.article-lead {
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 20px;
  word-break: keep-all;
}

.author-box {
  font-size: 14px;
  color: var(--text-muted);
}

/* Table of Contents (TOC) */
.article-toc {
  background: #fcfbfa;
  border: 1px solid #e9e3d8;
  border-radius: 8px;
  padding: 22px 26px;
  margin: 30px 0 45px;
}

.article-toc .toc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.article-toc ul {
  list-style: none;
}

.article-toc li {
  margin-bottom: 8px;
}

.article-toc a {
  font-size: 15px;
  color: var(--text-sub);
  font-weight: 500;
  transition: color 0.2s;
}

.article-toc a:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

/* Article Body Typography */
.article-content {
  font-size: 18px; /* PC 데스크톱에서 시원하고 편안한 글자 크기 */
  line-height: 1.95;
  color: #24292f;
}

.article-content h2 {
  font-size: 25px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 54px;
  margin-bottom: 20px;
  padding-left: 14px;
  position: relative;
  letter-spacing: -0.02em;
}

.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  background-color: var(--accent-red);
  border-radius: 2px;
}

.article-content h3 {
  font-size: 21px;
  font-weight: 700;
  margin-top: 38px;
  margin-bottom: 16px;
  color: #2c3e50;
}

.article-content p {
  margin-bottom: 22px;
  word-break: keep-all;
}

.article-content blockquote {
  margin: 36px 0;
  padding: 20px 24px;
  background-color: #fcf9f5;
  border-left: 4px solid var(--accent-red);
  border-radius: 0 8px 8px 0;
  font-size: 16.5px;
  color: #4a3b32;
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  margin: 24px 0 32px 24px;
  line-height: 1.85;
}

.article-content li {
  margin-bottom: 12px;
}

/* 🖼️ 진짜 모바일 반응형 이미지: PC에서는 시원하고 큼직하게 본문 폭에 맞추고, 스마트폰에서는 자동 조절 */
.archive-figure {
  width: 100%;
  margin: 40px 0;
  padding: 14px;
  background: #fdfbf7;
  border: 1px solid #e8e1d5;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.archive-figure img {
  width: 100%;
  height: auto;
  max-height: 520px; /* PC 데스크톱에서 큼직하고 시원하게 렌더링 */
  object-fit: contain;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

.archive-caption {
  margin-top: 14px;
  font-size: 14px;
  color: #6d4c41;
  line-height: 1.6;
  text-align: center;
}

.archive-caption strong {
  color: var(--accent-red);
}

.article-footer-nav {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.share-box p {
  font-size: 14.5px;
  color: var(--text-muted);
}

.btn-back {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-red);
  padding: 10px 18px;
  background: #fdf0ee;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: var(--accent-red);
  color: #fff;
}

/* Google AdSense Safeguard */
ins.adsbygoogle:empty {
  display: none !important;
}

.ad-container-native {
  margin: 40px 0;
  text-align: center;
}

/* Footer */
.site-footer {
  background: #1e272e;
  color: #d2dae2;
  padding: 60px 24px 40px;
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  display: block;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 14px;
  color: #808e9b;
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  border-top: 1px solid #2f3640;
  padding-top: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: #d2dae2;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 13px;
  color: #485460;
}

/* ==========================================================================
   진짜 모바일 반응형 미디어 쿼리 (스마트폰 & 태블릿 자동 반응)
   ========================================================================== */
@media (max-width: 992px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-title { font-size: 26px; }
  .article-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 14px; align-items: flex-start; }
  .main-nav { flex-wrap: wrap; gap: 8px; }
  .article-card-thumb { height: 160px; }

  /* 스마트폰 본문 최적화 (화면 100% 채움) */
  .article-wrapper { padding: 24px 0 60px; }
  .article-container { padding: 0 16px; }
  .article-title { font-size: 25px; line-height: 1.35; }
  .article-lead { font-size: 15.5px; }
  .article-content { font-size: 16.5px; line-height: 1.85; }
  .article-content h2 { font-size: 21px; margin-top: 40px; }
  
  /* 스마트폰 화면에서 이미지가 부드럽게 100% 축소 피팅 */
  .archive-figure {
    margin: 24px 0;
    padding: 8px;
  }
  .archive-figure img {
    max-height: 300px; /* 폰 화면에서 콤팩트하게 핏 */
  }
  .archive-caption { font-size: 12.5px; }
}
