/* =========================================================
 * 놓치지마 공통 디자인
 * 색은 아래 :root 에서 한 번에 바꿀 수 있어요.
 * ========================================================= */
:root {
  --brand: #0f766e;        /* 짙은 청록: 로고·버튼 */
  --brand-dark: #0b5952;
  --brand-soft: #e6f4f2;
  --accent: #f59e0b;       /* 노랑: 강조 */
  --accent-soft: #fff6e0;
  --danger: #dc2626;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f8f7;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(15, 40, 35, 0.06);
  --max: 1040px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: var(--brand); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.35; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- 상단 메뉴 ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 20px; white-space: nowrap; }
.logo-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 17px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--text); padding: 8px 10px; border-radius: 10px; font-size: 15px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.nav-cta { background: var(--accent); color: #3b2600; font-weight: 700; }
.nav a.nav-cta:hover { background: #e08e00; color: #2a1b00; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: 15px; color: var(--text); cursor: pointer; }

@media (max-width: 1000px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
}

/* ---------- 카드·글 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 18px 0; }
.content h2 { font-size: 21px; margin: 0 0 10px; }
.content h3 { font-size: 18px; margin: 20px 0 8px; }
.content p, .content li { margin: 6px 0; }
.note { color: var(--muted); font-size: 15px; }
.page-title { margin: 28px 0 4px; font-size: 28px; }
.page-lead { color: var(--muted); margin: 0 0 8px; }

/* ---------- 홈 ---------- */
.hero { background: linear-gradient(135deg, var(--brand) 0%, #14907f 60%, #1aa38f 100%); color: #fff; padding: 44px 0 52px; }
.hero h1 { font-size: 34px; margin: 10px 0 12px; }
.hero p { margin: 0 0 22px; opacity: 0.95; max-width: 560px; }
.hero-inner { display: flex; align-items: center; gap: 24px; }
.hero-text { flex: 1 1 0; min-width: 0; }
.hero-art { flex: 0 0 300px; width: 300px; height: auto; filter: drop-shadow(0 18px 28px rgba(4, 40, 35, 0.35)); }
@media (max-width: 720px) {
  .hero-inner { flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
  .hero-art { order: -1; flex-basis: auto; width: 190px; margin: 0 auto; }
  .hero p { margin-left: auto; margin-right: auto; }
}
.hero-badge { display: inline-block; background: rgba(255,255,255,0.18); padding: 4px 12px; border-radius: 999px; font-size: 14px; }
.btn { display: inline-block; text-decoration: none; border: 0; border-radius: 12px; padding: 14px 22px; font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-accent { background: var(--accent); color: #3b2600; }
.btn-accent:hover { background: #e08e00; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }

.section-title { font-size: 22px; margin: 32px 0 4px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.cat-card { display: block; text-decoration: none; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.cat-icon { font-size: 28px; }
.cat-name { font-weight: 800; font-size: 18px; margin: 4px 0 2px; }
.cat-desc { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ---------- 글 목록 ---------- */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-item { border-bottom: 1px solid var(--line); }
.post-item:last-child { border-bottom: 0; }
.post-item a { display: block; padding: 14px 2px; text-decoration: none; color: var(--text); }
.post-item a:hover .post-title { color: var(--brand); }
.post-title { font-weight: 700; font-size: 17px; }
.post-meta { color: var(--muted); font-size: 14px; }
.tag { display: inline-block; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); margin-right: 6px; }
.tag-closed { background: #fde8e8; color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 26px 8px; }

/* ---------- 혜택 글 (글 틀) ---------- */
.summary-box { background: var(--accent-soft); border: 1px solid #f5d48a; border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; }
.summary-box dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 0; }
.summary-box dt { font-weight: 800; color: #8a5a00; }
.summary-box dd { margin: 0; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 8px 0 8px 32px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: "☐"; position: absolute; left: 4px; top: 6px; font-size: 19px; color: var(--brand); }
.steps { padding-left: 22px; }
.steps li { margin: 8px 0; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 8px 0; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; }
.source-box { font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.closed-banner { background: #fde8e8; color: #7f1d1d; border-radius: 12px; padding: 12px 16px; font-weight: 700; }

/* ---------- 지원금 찾기 퀴즈 ---------- */
.quiz-wrap { max-width: 640px; margin: 0 auto; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0 18px; }
.progress-bar { height: 100%; width: 0; background: var(--brand); transition: width .25s; }
.q-step { color: var(--brand-dark); font-weight: 700; font-size: 15px; }
.q-title { font-size: 23px; margin: 4px 0 6px; }
.q-help { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.options { display: grid; gap: 10px; }
.option { text-align: left; width: 100%; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 15px 16px; font-size: 17px; font-family: inherit; color: var(--text); cursor: pointer; }
.option:hover { border-color: var(--brand); background: var(--brand-soft); }
.option:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; font-family: inherit; padding: 6px 0; }

.result-head { text-align: center; }
.result-count { font-size: 42px; font-weight: 900; color: var(--brand); line-height: 1.2; }
.benefit { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; background: #fff; }
.benefit h3 { margin: 4px 0 6px; font-size: 19px; }
.benefit .why { font-size: 14px; color: var(--brand-dark); background: var(--brand-soft); display: inline-block; padding: 2px 10px; border-radius: 999px; }
.benefit p { margin: 6px 0; }
.benefit a.go { font-weight: 700; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0; }
.warn { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; font-size: 15px; }

/* ---------- 글 속 그림 (그래프·일정표) ---------- */
.figure { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 18px 0; box-shadow: var(--shadow); }
.figure svg { display: block; width: 100%; height: auto; max-width: 560px; margin: 0 auto; }
.figure figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }
.figure-title { font-weight: 800; font-size: 18px; margin: 0 0 12px; text-align: center; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; counter-reset: tl; }
.timeline li { position: relative; background: var(--brand-soft); border-radius: 14px; padding: 14px 12px 12px; text-align: center; }
.timeline li::before { counter-increment: tl; content: counter(tl); display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.timeline li.hl { background: var(--accent-soft); }
.timeline li.hl::before { background: var(--accent); color: #3b2600; }
.tl-when { display: block; font-weight: 800; color: var(--brand-dark); font-size: 15px; }
.tl-what { display: block; font-size: 15px; line-height: 1.45; margin-top: 2px; }
@media (max-width: 700px) {
  .timeline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .timeline { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .figure { padding: 14px 10px; margin: 14px -4px; }
}

/* ---------- 광고 자리 ---------- */
.ad-slot { margin: 18px 0; }

/* ---------- 하단 ---------- */
.site-footer { margin-top: 40px; background: #fff; border-top: 1px solid var(--line); padding: 26px 0 34px; font-size: 15px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--brand); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 32px 0 38px; }
  .hero h1 { font-size: 27px; }
  .page-title { font-size: 24px; }
  .card { padding: 18px; }
  .summary-box dl { grid-template-columns: 76px 1fr; }
  .q-title { font-size: 21px; }
}
