/* ── Reset & Variables ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/*
  Pretendard Variable weight 체계
  ─────────────────────────────────
  본문 일반    : 400 (Regular)
  본문 강조    : 500 (Medium)
  UI 라벨/버튼 : 600 (SemiBold)
  제목/헤딩    : 700 (Bold)
  히어로/강조  : 800 (ExtraBold)
*/

:root {
  --primary: #1a56db;
  --primary-dark: #1240a8;
  --primary-light: #e8f0fe;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.12), 0 8px 32px rgba(0,0,0,.08);

  /* 카테고리 색상 */
  --cat-support: #10b981;
  --cat-finance: #0ea5e9;
  --cat-press: #6366f1;
  --cat-policy: #f59e0b;
  --cat-contest: #ef4444;
  --cat-edu: #8b5cf6;

  --header-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}
.logo-icon { font-size: 1.4rem; }
.logo-text { letter-spacing: -.03em; }

.main-nav {
  display: flex;
  gap: .25rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .8rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all .15s;
}
.nav-link:hover, .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.nav-icon { font-size: 1rem; }

.header-search {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}
.header-search input {
  padding: .45rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  width: 200px;
  outline: none;
  font-family: inherit;
  transition: border .15s;
}
.header-search input:focus { border-color: var(--primary); }
.header-search button {
  padding: .45rem .8rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: .875rem;
  transition: background .15s;
}
.header-search button:hover { background: var(--primary-dark); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  display: block;
  transition: all .2s;
}

/* ── Mobile Nav ─────────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  padding: .9rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 500;
  transition: background .1s;
}
.mobile-nav-link:hover { background: var(--primary-light); }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f2044 0%, #1a3a6b 50%, #1e4d8c 100%);
  color: #fff;
  padding: 4rem 0 3rem;
}
.hero .container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.04em;
}
.hero-sub {
  font-size: 1.1rem;
  font-weight: 400;
  opacity: .85;
  margin-top: .75rem;
  letter-spacing: -.01em;
  word-break: keep-all;
}
.hero-search {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  max-width: 540px;
}
.hero-search input {
  flex: 1;
  padding: .85rem 1.2rem;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border .15s;
}
.hero-search input::placeholder { color: rgba(255,255,255,.6); }
.hero-search input:focus { border-color: rgba(255,255,255,.6); }
.hero-search button {
  padding: .85rem 1.6rem;
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .1s, background .15s;
  font-family: inherit;
}
.hero-search button:hover { background: #e58c00; transform: translateY(-1px); }


/* ── Quick Cats ─────────────────────────────────────────────────────── */
.quick-cats {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.quick-cats .container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .75rem;
}
.quick-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .9rem .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .15s;
  text-align: center;
  cursor: pointer;
}
.quick-cat-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.qcat-icon { font-size: 1.75rem; }
.qcat-cnt { font-size: 1.1rem; font-weight: 800; letter-spacing: -.03em; margin-top: .25rem; color: var(--text); }
.qcat-name { font-weight: 600; font-size: .85rem; margin-top: .1rem; }
.qcat-desc { font-size: .7rem; color: var(--text-muted); margin-top: .1rem; }

/* ── Sections ───────────────────────────────────────────────────────── */
.section { padding: 2.5rem 0; }
.section-gray { background: #f1f5f9; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.03em;
}
.section-more {
  color: var(--primary);
  font-size: .9rem;
  font-weight: 500;
}
.section-more:hover { text-decoration: underline; }

/* ── Post Cards ─────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: all .2s;
  cursor: pointer;
}
.post-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.featured-card { border-top: 3px solid var(--primary); }

.card-cat {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .5rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-summary {
  font-size: .875rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .75rem;
}

/* ── Badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 20px;
}
.badge-deadline { background: #fef3c7; color: #92400e; }
.badge-budget { background: #d1fae5; color: #065f46; }
.badge-region { background: #ede9fe; color: #4c1d95; }

/* ── List Grid ──────────────────────────────────────────────────────── */
/* 썸네일 있는 카테고리는 그리드 레이아웃 혼용 */
.list-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.list-grid.has-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ── 썸네일 이미지 카드 ─────────────────────────────────────────────── */
.thumb-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .2s;
  text-decoration: none;
  color: inherit;
}
.thumb-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.thumb-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
}
.thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.thumb-card:hover .thumb-img-wrap img { transform: scale(1.04); }
.thumb-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #e8f0fe 0%, #dbeafe 100%);
  color: var(--primary);
}
.thumb-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .35rem;
}
.thumb-source {
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .02em;
}
.thumb-title {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.thumb-summary {
  font-size: .8rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thumb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .6rem;
  border-top: 1px solid #f1f5f9;
}
.thumb-date {
  font-size: .73rem;
  font-weight: 400;
  color: #94a3b8;
}
.thumb-badge {
  font-size: .68rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
}

/* ── 포스트 상단 썸네일 ─────────────────────────────────────────────── */
.post-thumbnail {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  background: #f1f5f9;
}
.post-thumbnail img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.list-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  gap: 1rem;
  transition: all .15s;
}
.list-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(3px);
}
.list-card-left { flex: 1; min-width: 0; }
.list-card-right { flex-shrink: 0; text-align: right; min-width: 130px; }

.list-cat-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: .4rem;
}
.list-title {
  font-size: .97rem;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-summary {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-meta {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
.list-date {
  font-size: .75rem;
  color: #94a3b8;
  margin-top: .4rem;
}

/* ── Tags ───────────────────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.tag {
  font-size: .72rem;
  background: #f1f5f9;
  color: var(--text-muted);
  padding: .15rem .5rem;
  border-radius: 4px;
  font-weight: 500;
}

/* ── Page Hero ──────────────────────────────────────────────────────── */
.page-hero {
  padding: 2.5rem 0;
  color: #fff;
}
.page-hero-content {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.page-hero-icon { font-size: 2.5rem; }
.page-hero-content h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.035em; }
.page-hero-content p { opacity: .85; }

/* ── Deadline Tabs ──────────────────────────────────────────────────── */
.deadline-tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.dl-tab {
  padding: .4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .15s;
  background: var(--bg-white);
}
.dl-tab:hover { border-color: var(--primary); color: var(--primary); }
.dl-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Filter Bar ─────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: .75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.filter-bar input {
  flex: 1;
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  min-width: 200px;
}
.filter-bar input:focus { border-color: var(--primary); }
.filter-bar button {
  padding: .65rem 1.2rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
}
.filter-bar button:hover { background: var(--primary-dark); }
.filter-select {
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  min-width: 120px;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.list-source-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: .35rem;
}
.clear-btn {
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .85rem;
  color: var(--text-muted);
  transition: all .1s;
}
.clear-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

.result-info {
  margin-bottom: 1.25rem;
  font-size: .875rem;
  color: var(--text-muted);
}

/* ── Pagination ─────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-btn {
  padding: .45rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Post Detail ────────────────────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.post-article {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.post-breadcrumb {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.post-breadcrumb a { color: var(--primary); }
.post-breadcrumb a:hover { text-decoration: underline; }

.post-category-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .75rem;
}
.post-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.035em;
  margin-bottom: 1rem;
  word-break: keep-all;
}
.post-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: .82rem;
  font-weight: 400;
  color: var(--text-muted);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-left: auto;
  padding: .3rem .75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Toast */
.copy-toast {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-1rem);
  background: #1e293b;
  color: #fff;
  padding: .65rem 1.4rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  font-family: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
  white-space: nowrap;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.post-summary-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.25rem 0;
}
.post-summary-text {
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: .75rem;
  word-break: keep-all;
}
.post-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}
.meta-item { display: flex; flex-direction: column; gap: .15rem; }
.meta-label { font-size: .72rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.meta-value { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.meta-value.deadline { color: #dc2626; }

/* 가이드(MD) 추가 스타일 */
.guide-body h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; margin: 2rem 0 .75rem; padding-bottom: .4rem; border-bottom: 2px solid var(--primary-light); }
.guide-body h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; margin: 1.5rem 0 .5rem; }
.guide-body ul, .guide-body ol { padding-left: 1.4rem; margin: .75rem 0; }
.guide-body li { margin-bottom: .35rem; line-height: 1.7; }
.guide-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.guide-body th { background: var(--primary-light); color: var(--primary); font-weight: 700; padding: .55rem .75rem; border: 1px solid var(--border); }
.guide-body td { padding: .5rem .75rem; border: 1px solid var(--border); }
.guide-body tr:nth-child(even) td { background: #f8fafc; }
.guide-body blockquote { border-left: 3px solid var(--primary); background: var(--primary-light); padding: .75rem 1rem; margin: 1rem 0; border-radius: 0 8px 8px 0; font-size: .93rem; color: var(--primary-dark); }
.guide-body code { background: #f1f5f9; padding: .15rem .4rem; border-radius: 4px; font-size: .88em; }
.guide-body strong { font-weight: 700; color: var(--text); }
.guide-body hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.post-body {
  line-height: 1.9;
  font-size: .97rem;
  margin: 1.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.post-body p {
  margin: 0 0 .75rem;
}
.post-body p.p-sm {
  margin-bottom: .2rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.post-body p:last-child { margin-bottom: 0; }
.post-body .body-list {
  margin: 0 0 .75rem 0;
  padding-left: 0;
  list-style: none;
}
.post-body .body-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: .4rem;
  font-weight: 600;
  line-height: 1.7;
}
.post-body .body-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.post-summary-text {
  font-size: .95rem;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-line;
  margin-bottom: .75rem;
}

.post-links-section {
  margin: 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.source-notice {
  font-size: .75rem;
  color: var(--text-muted);
}
.post-actions { margin-top: 1.5rem; display: flex; gap: .75rem; }

/* ── 소스별 추가 정보 (meta) ────────────────────────────────────────── */
.post-meta-extra {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.meta-extra-title {
  font-size: .85rem;
  font-weight: 700;
  padding: .65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.meta-extra-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.meta-extra-item {
  padding: .75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
}
.meta-extra-item:last-child { border-bottom: none; }
.meta-extra-item dt {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: .25rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.meta-extra-item dd {
  font-size: .875rem;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}

/* ── 첨부파일 ───────────────────────────────────────────────────────── */
.attachments {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.attachments-title {
  font-size: .85rem;
  font-weight: 700;
  padding: .65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.attachments-list {
  list-style: none;
}
.attachments-list li {
  border-bottom: 1px solid #f1f5f9;
}
.attachments-list li:last-child { border-bottom: none; }
.attachment-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1rem;
  font-size: .875rem;
  transition: background .1s;
}
.attachment-link:hover { background: var(--primary-light); }
.attachment-icon { font-size: 1.1rem; flex-shrink: 0; }
.attachment-name { flex: 1; color: var(--text); word-break: break-all; }
.attachment-dl {
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: .1rem .45rem;
  flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: .7rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  transition: all .15s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-dima {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .85rem 1.75rem;
  background: #3dd4b4;
  color: #0d3d33;
  border-radius: 10px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  transition: all .15s;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(61, 212, 180, .35);
}
.btn-dima:hover {
  background: #2bbfa0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 212, 180, .45);
  color: #0d3d33;
}

.btn-secondary {
  display: inline-block;
  padding: .7rem 1.5rem;
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
  font-size: .9rem;
  transition: all .15s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ── Partner CTA ────────────────────────────────────────────────────── */
.partner-cta-block {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
}
.partner-cta-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .6rem 1.25rem .4rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.partner-cta-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.partner-cta-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.1rem 1.25rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  border-right: 1px solid var(--border);
}
.partner-cta-card:last-child { border-right: none; }
.partner-cta-card:hover { background: var(--primary-light); }
.partner-cta-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 20px;
  background: #fff0e8;
  color: #ff7324;
  width: fit-content;
}
.partner-cta-card.morak .partner-cta-tag {
  background: #ffe5ea;
  color: #FF0033;
}
.partner-cta-headline {
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.partner-cta-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.partner-cta-link {
  font-size: .8rem;
  font-weight: 600;
  color: #ff7324;
  margin-top: .2rem;
}
.partner-cta-card.morak .partner-cta-link { color: #FF0033; }

.partner-cta-tag-row {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.partner-cta-card.dima {
  background: linear-gradient(135deg, #f0fdf9 0%, #e6faf5 100%);
  border-color: #3dd4b4;
  transition: all .18s;
}
.partner-cta-card.dima:hover {
  background: linear-gradient(135deg, #e0faf4 0%, #ccf5eb 100%);
  border-color: #2bbfa0;
  box-shadow: 0 4px 16px rgba(61, 212, 180, .2);
  transform: translateY(-2px);
}
.partner-cta-card.dima .partner-cta-tag {
  background: #ccf5eb;
  color: #0d6b56;
}
.partner-cta-card.dima .partner-cta-headline {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0d3d33;
}
.partner-cta-card.dima .partner-cta-desc {
  font-size: .85rem;
  color: #1a6b56;
  font-weight: 500;
}
.partner-cta-link.dima-link {
  color: #0d6b56;
  font-weight: 700;
  font-size: .88rem;
}

/* 사이드바용 단독 CTA */
.sidebar-partner-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  text-decoration: none;
  color: inherit;
}
.sidebar-partner-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .12rem .45rem;
  border-radius: 20px;
  background: #fff0e8;
  color: #ff7324;
  width: fit-content;
}
.sidebar-partner-tag.video {
  background: #ffe5ea;
  color: #FF0033;
}
.sidebar-partner-headline {
  font-size: .87rem;
  font-weight: 700;
  line-height: 1.4;
}
.sidebar-partner-desc {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.sidebar-partner-cta {
  display: inline-block;
  margin-top: .35rem;
  padding: .5rem 1rem;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  background: #ff7324;
  color: #fff;
  transition: background .12s;
  width: 100%;
  box-sizing: border-box;
}
.sidebar-partner-card:hover .sidebar-partner-cta { background: #e05e0f; }
.sidebar-partner-cta.video {
  background: #FF0033;
  color: #fff;
}
.sidebar-partner-card:hover .sidebar-partner-cta.video { background: #cc0029; }

@media (max-width: 640px) {
  .partner-cta-cards { grid-template-columns: 1fr; }
  .partner-cta-card { border-right: none; border-bottom: 1px solid var(--border); }
  .partner-cta-card:last-child { border-bottom: none; }
}

/* ── Sidebar ────────────────────────────────────────────────────────── */
.post-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-block {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.sidebar-title {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .6rem 0;
  border-bottom: 1px solid #f1f5f9;
  transition: color .1s;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover { color: var(--primary); }
.sidebar-item-title { font-size: .85rem; font-weight: 500; line-height: 1.4; }
.sidebar-item-meta { font-size: .75rem; color: var(--text-muted); }
.sidebar-cat-link {
  display: block;
  padding: .5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: .9rem;
  transition: color .1s;
}
.sidebar-cat-link:last-child { border-bottom: none; }
.sidebar-cat-link:hover { color: var(--primary); }

/* ── Search Header ──────────────────────────────────────────────────── */
.search-header { margin-bottom: 1.5rem; }
.search-header h2 { font-size: 1.4rem; font-weight: 700; }
.search-header p { color: var(--text-muted); margin-top: .3rem; }

/* ── Empty State ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-state p { font-size: 1.1rem; margin-bottom: 1.5rem; }

/* ── Admin ──────────────────────────────────────────────────────────── */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.admin-header h2 { font-size: 1.5rem; font-weight: 700; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th {
  background: #f1f5f9;
  padding: .75rem 1rem;
  font-size: .82rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: .7rem 1rem;
  font-size: .875rem;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}
.admin-table tr:hover td { background: #f8fafc; }
.admin-title { max-width: 280px; }
.admin-title a { color: var(--primary); }
.admin-actions { white-space: nowrap; display: flex; gap: .4rem; }
.btn-sm {
  display: inline-block;
  padding: .25rem .65rem;
  font-size: .78rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  background: var(--bg-white);
  transition: all .1s;
}
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { border-color: #fca5a5; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; border-color: #dc2626; }

.admin-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.form-row { display: flex; flex-direction: column; gap: .4rem; }
.form-row label { font-size: .85rem; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--primary);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .75rem; margin-top: .5rem; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .75rem;
}
.footer-brand p { font-size: .875rem; line-height: 1.7; }
.footer-links h4 { color: #e2e8f0; font-size: .9rem; margin-bottom: .75rem; }
.footer-links a {
  display: block;
  font-size: .85rem;
  margin-bottom: .4rem;
  transition: color .1s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  font-size: .78rem;
  text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .main-nav, .header-search { display: none; }
  .hamburger { display: flex; }
  .card-grid { grid-template-columns: 1fr; }
  .list-card { flex-direction: column; gap: .5rem; }
  .list-card-right { text-align: left; min-width: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .quick-cats .container { grid-template-columns: repeat(4, 1fr); }
  .list-grid.has-thumbs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .post-thumbnail { max-height: 240px; }
  .post-thumbnail img { max-height: 240px; }
}
@media (max-width: 480px) {
  .list-grid.has-thumbs { grid-template-columns: 1fr; }
  .quick-cats .container { grid-template-columns: repeat(3, 1fr); }
}
