/* ============================================================
   assets/css/style.css — Editorial Magazine Design
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
/* 맑은 고딕 (시스템 폰트 — 별도 import 불필요) */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --ink:        #1c1a17;
  --ink-light:  #4a4540;
  --cream:      #f9f5ef;
  --cream-dark: #efe9df;
  --gold:       #c9a050;
  --gold-light: #e8c878;
  --white:      #ffffff;
  --border:     #e0d8cc;

  /* Category Colors */
  --cars:    #2563eb;
  --health:  #059669;
  --movies:  #dc2626;

  /* Typography */
  --font-display: 'Malgun Gothic', '맑은 고딕', sans-serif;
  --font-body:    'Malgun Gothic', '맑은 고딕', sans-serif;
  --font-ui:      'Malgun Gothic', '맑은 고딕', sans-serif;

  /* Spacing */
  --container: 1180px;
  --radius:    4px;
  --radius-lg: 12px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 맑은 고딕은 이탤릭 서체가 없으므로 기울임 전역 차단 */
em, i, cite, address, dfn,
.article-body em, .article-body i,
.article-intro em, .article-intro i {
  font-style: normal;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 245, 239, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 32px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.site-logo .name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.site-logo .tagline {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--ink-light);
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
  background: var(--cream-dark);
}

.site-nav a.active { color: var(--gold); font-weight: 600; }

.search-toggle {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink-light);
  background: transparent;
  font-size: 1rem;
}
.search-toggle:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ── Search Bar ─────────────────────────────────────────────── */
.search-bar {
  display: none;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.search-bar.open { display: block; }
.search-form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 8px;
}
.search-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  background: var(--cream);
}
.search-form input:focus { border-color: var(--gold); }
.search-form button {
  flex-shrink: 0;
  padding: 11px 22px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-form button:hover { background: var(--gold); }

/* ── Category Pills ─────────────────────────────────────────── */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--white);
}

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
  background: var(--ink);
  padding: 80px 0 60px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(201, 160, 80, 0.12) 0%, transparent 70%),
              radial-gradient(ellipse at 80% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-title em {
  color: var(--gold-light);
}

.hero-excerpt {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.hero-meta .divider { width: 1px; height: 12px; background: rgba(255,255,255,0.2); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: none;
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 160, 80, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.05);
}

.hero-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.hero-image-wrap:hover img { transform: scale(1.03); }

.hero-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 26, 23, 0.4) 0%, transparent 60%);
}

/* ── Decorative Rule ────────────────────────────────────────── */
.section-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}
.section-rule::before, .section-rule::after {
  content: ''; flex: 1;
  height: 1px;
  background: var(--border);
}
.section-rule span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink-light);
  white-space: nowrap;
}

/* ── Section Headers ─────────────────────────────────────────  */
.section {
  padding: 72px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 44px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-header h2 span {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.view-all {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-light);
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.view-all:hover { color: var(--gold); border-color: var(--gold); }

/* ── Post Cards ─────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.posts-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid.cols-1 { grid-template-columns: 1fr; max-width: 640px; }

.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(28, 26, 23, 0.1);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--cream-dark);
}

.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.post-card:hover .card-thumb img { transform: scale(1.05); }

.card-thumb .cat-pill {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
}

.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--cream-dark) 0%, var(--border) 100%);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.post-card:hover .card-title { color: var(--gold); }

.card-excerpt {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-light);
  flex: 1;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--cream-dark);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-light);
}

.card-meta .dot { color: var(--border); }
.card-meta .read-time { margin-left: auto; color: var(--gold); font-weight: 500; }

/* ── Category Strip ─────────────────────────────────────────── */
.cat-strip {
  background: var(--ink);
  padding: 56px 0;
}

.cat-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.cat-strip-card {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
}

.cat-strip-card:hover { background: rgba(255,255,255,0.07); }

.cat-strip-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px; width: 0;
  transition: width 0.4s var(--ease);
}
.cat-strip-card:hover::before { width: 100%; }
.cat-strip-card.cars::before    { background: var(--cars); }
.cat-strip-card.health::before  { background: var(--health); }
.cat-strip-card.movies::before  { background: var(--movies); }

.cat-icon {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.cat-strip-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.cat-strip-card p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

.cat-count {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-top: auto;
}

/* ── Single Post Page ───────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  align-items: start;
}

.post-hero {
  background: var(--ink);
  padding: 64px 0 0;
}

.post-hero-inner {
  max-width: 820px;
}

.post-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.post-kicker .divider {
  height: 1px; flex: 1;
  background: rgba(255,255,255,0.15);
  max-width: 60px;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.post-excerpt-hero {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
  max-width: 680px;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
}

.post-hero-meta strong { color: rgba(255,255,255,0.7); }

.post-featured-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

/* ── Article Content ─────────────────────────────────────────  */
.article-intro {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding-left: 24px;
  margin: 40px 0;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 48px 0 20px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.article-body h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.article-body p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 24px;
}

.article-conclusion {
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 48px;
  border-left: 4px solid var(--gold);
}

.article-conclusion h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.article-conclusion p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-light);
}

/* ── Share Buttons ───────────────────────────────────────────  */
.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 48px 0;
  flex-wrap: wrap;
}

.share-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.share-btn.twitter  { background: #e7f5ff; color: #1d9bf0; }
.share-btn.facebook { background: #eef2fb; color: #1877f2; }
.share-btn.copy-btn { background: var(--cream-dark); color: var(--ink); }
.share-btn:hover    { transform: translateY(-2px); opacity: 0.9; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 28px;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}

.popular-list { list-style: none; }

.popular-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-dark);
  transition: background 0.15s;
}

.popular-item:last-child { border-bottom: none; }

.popular-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream-dark);
  line-height: 1;
  min-width: 28px;
}

.popular-item:hover .popular-num { color: var(--gold); }

.popular-title {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  transition: color 0.2s;
}

.popular-item:hover .popular-title { color: var(--gold); }

.popular-date {
  font-size: 0.72rem;
  color: var(--ink-light);
  margin-top: 3px;
}

/* Category widget */
.cat-list { list-style: none; }

.cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-dark);
  transition: padding-left 0.2s;
}

.cat-list li:last-child { border-bottom: none; }
.cat-list li:hover { padding-left: 4px; }

.cat-list a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-list a:hover { color: var(--gold); }

.cat-count-badge {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--cream-dark);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--ink-light);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-brand .name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: rgba(255,255,255,0.2); }

/* ── Page Hero (Category/Search) ────────────────────────────── */
.page-hero {
  background: var(--ink);
  padding: 60px 0;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-hero p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { margin: 56px 0 0; }

.pagination ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-light);
  border: 1px solid var(--border);
  background: var(--white);
  transition: all 0.2s;
}

.page-link:hover,
.page-link.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.page-link.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
  pointer-events: none;
}

/* ── Related Posts ───────────────────────────────────────────  */
.related-section {
  border-top: 1px solid var(--border);
  padding-top: 48px;
  margin-top: 56px;
}

.related-section h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 28px;
}

/* ── Decorative Divider ──────────────────────────────────────── */
.gold-rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-up {
  animation: fadeUp 0.6s var(--ease) both;
}

.animate-up:nth-child(1) { animation-delay: 0.05s; }
.animate-up:nth-child(2) { animation-delay: 0.12s; }
.animate-up:nth-child(3) { animation-delay: 0.19s; }
.animate-up:nth-child(4) { animation-delay: 0.26s; }
.animate-up:nth-child(5) { animation-delay: 0.33s; }
.animate-up:nth-child(6) { animation-delay: 0.40s; }

/* ── Reading Progress Bar ────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── No Image Fallback ───────────────────────────────────────── */
.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--cream-dark) 0%, var(--border) 100%);
}

/* ── Admin Styles (minimal) ─────────────────────────────────── */
.admin-bar {
  background: #1c1a17;
  color: rgba(255,255,255,0.6);
  padding: 8px 20px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-bar a { color: var(--gold); margin-left: 16px; }

/* ── Mobile Hamburger ────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Mobile Nav ──────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 24px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--cream-dark);
  transition: background 0.15s;
}
.mobile-nav a:hover { background: var(--cream); color: var(--gold); }

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

@media (max-width: 768px) {
  /* Header */
  .site-nav    { display: none !important; }
  .hamburger   { display: flex !important; }
  .header-inner { height: 60px; gap: 12px; }

  /* Hero */
  .hero { padding: 40px 0 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-image-wrap { display: none; }
  .hero-title  { font-size: 1.75rem; }
  .hero-excerpt { font-size: 0.92rem; }
  .hero-meta   { font-size: 0.75rem; gap: 10px; flex-wrap: wrap; }

  /* Category strip */
  .cat-strip   { padding: 32px 0; }
  .cat-strip-grid { grid-template-columns: 1fr; gap: 1px; }
  .cat-strip-card { padding: 24px 20px; }
  .cat-strip-card h3 { font-size: 1.15rem; }

  /* Section */
  .section { padding: 48px 0; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-header h2 { font-size: 1.5rem; }

  /* Post cards - 1 column on mobile */
  .posts-grid { grid-template-columns: 1fr !important; gap: 16px; }
  .card-title  { font-size: 1.05rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding: 40px 0 24px; margin-top: 48px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  /* Post page */
  .post-hero   { padding: 40px 0 0; }
  .post-title  { font-size: 1.65rem; }
  .post-hero-meta { font-size: 0.75rem; gap: 10px; }
  .share-row   { gap: 8px; }
  .share-btn   { font-size: 0.75rem; padding: 7px 12px; }

  /* Popular posts horizontal on mobile */
  .popular-item { gap: 10px; }
  .popular-num  { font-size: 1.1rem; min-width: 22px; }

  /* Search bar */
  .search-form { flex-direction: column; }
  .search-form input { width: 100%; }
}

@media (max-width: 480px) {
  .container   { padding: 0 14px; }
  .card-body   { padding: 16px; }
  .hero        { padding: 32px 0 24px; }
  .hero-title  { font-size: 1.5rem; }
  .btn         { padding: 11px 18px; font-size: 0.82rem; }
  .section     { padding: 36px 0; }
  .cat-strip-card { padding: 20px 16px; }
  .post-title  { font-size: 1.4rem; }
  .article-body h2 { font-size: 1.3rem; }
  .article-body p  { font-size: 0.97rem; }
  .article-intro   { font-size: 1rem; padding-left: 16px; }
  .article-conclusion { padding: 20px; }
  .sidebar-widget { padding: 20px; }

  /* Search form full width */
  .search-form button { width: 100%; }

  /* Page hero */
  .page-hero   { padding: 40px 0; }
  .page-hero h1 { font-size: 1.6rem; }
}

/* ============================================================
   ADDITIONS: Ads, Calculators, Image in posts, Dropdown nav
   ============================================================ */

/* ── Post Page 3-column (Left Ad | Article | Right Ad) ──────── */
.post-page-wrap {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 0;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0;
  align-items: stretch; /* ad-col이 기사 높이만큼 늘어나야 sticky가 동작함 */
}

.post-main {
  min-width: 0;
  padding: 48px 32px;
}

/* ── Ad Columns ─────────────────────────────────────────────── */
.ad-col {
  padding: 40px 12px;
  position: sticky;
  top: 0;
  align-self: start; /* stretch된 그리드 안에서 콘텐츠 높이만 차지하게 유지 */
}

.ad-col.ad-left { padding-left: 16px; }
.ad-col.ad-right { padding-right: 16px; }

.ad-slot-left,
.ad-slot-right {
  width: 160px;
  min-height: 600px;
}

.ad-slot-left ins,
.ad-slot-right ins {
  min-height: 600px;
  width: 160px;
}

/* Ad placeholder (shown before real ads are configured) */
.ad-placeholder {
  width: 160px;
  height: 600px;
  background: var(--cream-dark);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-light);
}

.ad-placeholder span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-light);
}

.ad-placeholder small {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  color: var(--border);
}

/* Mid-article ad — 원본 슬롯은 숨기고 하단 fixed 배너로 대체 */
.ad-slot-mid {
  display: none; /* post.php에서 fixed 배너로 렌더링 */
}

/* ── 하단 고정 광고 배너 ──────────────────────────────────────── */
#ad-fixed-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #fff;
  box-shadow: 0 -3px 16px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 44px 6px 12px;
  min-height: 66px;
  border-top: 1px solid #e5e5e5;
  transition: transform .3s ease;
}

#ad-fixed-bottom.hidden {
  transform: translateY(110%);
}

#ad-fixed-bottom-close {
  position: absolute;
  top: 50%; right: 10px;
  transform: translateY(-50%);
  background: #f0f0f0;
  border: none;
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: #555;
  line-height: 1;
  transition: background .2s;
}

#ad-fixed-bottom-close:hover {
  background: #ddd;
  color: #222;
}


/* ── Article inline images ───────────────────────────────────── */
.article-img {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-img img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
  object-fit: cover;
}

.article-img figcaption {
  padding: 10px 16px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink-light);
  background: var(--cream);
  text-align: center;
}

/* ── Featured image height — 50% reduction (was 500px → 250px) */
.post-featured-img {
  max-height: 250px !important;
  object-fit: cover;
}

/* ── Navbar Dropdown (Calculators) ──────────────────────────── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-drop-btn {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--ink-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.nav-drop-btn:hover,
.nav-drop-btn.active {
  color: var(--gold);
  background: var(--cream-dark);
}

.drop-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(28,26,23,0.15);
  min-width: 200px;
  z-index: 300;
  overflow: hidden;
}

.drop-menu.open { display: block; }

.drop-menu a {
  display: block;
  padding: 12px 18px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--cream-dark);
  transition: background 0.15s, color 0.15s;
}

.drop-menu a:last-child { border-bottom: none; }
.drop-menu a:hover { background: var(--cream); color: var(--gold); }

/* ── Mobile calculator group ─────────────────────────────────── */
.mobile-calc-group {
  background: var(--cream);
  padding: 4px 0;
}

.mobile-group-label {
  display: block;
  padding: 10px 24px 6px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.mobile-calc-link {
  padding-left: 36px !important;
  font-size: 0.88rem !important;
  color: var(--ink-light) !important;
}

/* ── Image Insert Toolbar (admin) ─────────────────────────────── */
.img-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.img-insert-btn {
  padding: 6px 14px;
  background: var(--cream-dark);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s;
}

.img-insert-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.img-toolbar-hint {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--ink-light);
}

/* ── Responsive: ad columns ──────────────────────────────────── */

/* 1024px ~ 1180px : 광고 컬럼 폭을 120px으로 줄여서 유지 */
@media (max-width: 1180px) {
  .post-page-wrap {
    grid-template-columns: 120px 1fr 120px;
    max-width: 100%;
  }
  .ad-slot-left,
  .ad-slot-right {
    width: 120px;
  }
}

/* 900px ~ 1024px : 우측 광고만 숨기고 좌측 광고 유지 */
@media (max-width: 1024px) {
  .post-page-wrap {
    grid-template-columns: 120px 1fr;
  }
  .ad-col.ad-right { display: none; }
  .post-main { padding: 40px 20px; }
}

/* 768px 이하 : 좌우 광고 모두 숨김 */
@media (max-width: 768px) {
  .post-page-wrap {
    grid-template-columns: 1fr;
  }
  .ad-col { display: none; }
  .post-main { padding: 28px 16px; }
  .post-featured-img { max-height: 180px !important; }
}