/*
Theme Name: NF SEO
Description: SEO 팩토리 사이트 테마 — 상단 글 카드 · 본문 + 고정 사이드바 · 상담 띠 · 고정 연락 버튼 구조. 사이트 정보는 발행할 때 'nf_site' 옵션으로 들어온다.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: nf-seo
*/

/* 색은 업종별로 :root 의 --p(주색) · --a(강조색)를 덮어쓴다 */
:root { --p: #1f2d4d; --a: #b8924a; --ink: #1f2937; --sub: #5b6472; --muted: #8a94a3; --line: #e5e8ed; --panel: #f6f7f9; --band: #f1f2f4; }

* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; background: #fff; color: var(--ink); font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', -apple-system, sans-serif; font-size: 16px; line-height: 1.8; word-break: keep-all; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.nf-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── 머리 ── */
.nf-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.admin-bar .nf-header { top: 32px; }
.nf-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.nf-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.nf-logo-mark { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; }
/* 올린 로고는 모양 그대로 (가로로 긴 로고가 정사각형으로 잘리지 않게) */
.nf-logo-img { display: block; width: auto; height: 40px; max-width: 180px; flex-shrink: 0; object-fit: contain; }
.nf-logo-mark { display: flex; align-items: center; justify-content: center; background: var(--p); color: #fff; font-weight: 800; font-size: 17px; }
.nf-logo-text { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.nf-logo-text b { font-size: 18px; font-weight: 800; white-space: nowrap; }
.nf-logo-text small { font-size: 11px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-call-pill { flex-shrink: 0; padding: 9px 18px; border-radius: 999px; background: var(--p); color: #fff; font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; }
.nf-call-pill:hover { filter: brightness(1.15); }

/* ── 글 카드 ── */
.nf-cards { display: grid; gap: 22px; }
.nf-cards-top { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 32px 0 44px; }
.nf-cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 24px 0 32px; }
.nf-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.nf-card:hover { box-shadow: 0 10px 28px rgba(15, 23, 42, .10); transform: translateY(-2px); }
.nf-card-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--p); }
.nf-card-ph { display: flex; align-items: flex-end; padding: 26px; background: linear-gradient(160deg, var(--p), #0f172a); color: #fff; }
.nf-card-ph b { font-size: 22px; line-height: 1.4; }
.nf-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.nf-card-body small { font-size: 11px; letter-spacing: .06em; color: var(--p); font-weight: 700; }
.nf-card-body strong { font-size: 15px; line-height: 1.5; font-weight: 600; }
.nf-card-body em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── 본문 + 사이드바 ── */
.nf-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; padding-bottom: 64px; }
.nf-pt { padding-top: 28px; }
.nf-main { min-width: 0; padding-top: 8px; }
.nf-crumb { font-size: 12px; letter-spacing: .04em; color: var(--muted); margin: 0 0 10px; }
.nf-crumb a { text-decoration: none; }
.nf-crumb a:hover { color: var(--p); }
.nf-crumb i { font-style: normal; margin: 0 8px; }
.nf-title { font-size: 31px; line-height: 1.38; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; }
.nf-meta { color: var(--muted); font-size: 13px; margin: -4px 0 22px; }
.nf-lead { font-size: 17px; color: var(--sub); margin: 0 0 24px; }
.nf-eyebrow { display: block; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 11px; letter-spacing: .16em; color: var(--a); font-weight: 600; text-transform: uppercase; }

.nf-img { display: block; width: 100%; height: auto; border-radius: 12px; margin: 6px 0 26px; }
/* 본문 이미지 (사이트 만들기에서 정한 순서·링크·설명) */
.nf-figure { margin: 6px 0 26px; }
.nf-figure .nf-img { margin: 0; }
.nf-figure a { display: block; border-radius: 12px; overflow: hidden; }
.nf-figure a .nf-img { transition: transform .25s ease, opacity .2s ease; }
.nf-figure a:hover .nf-img { transform: scale(1.015); opacity: .94; }
.nf-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }
/* 메인 상단 갤러리 — 올린 사진을 순서대로 모아 보인다 (본문 위) */
.nf-gallery { margin: 6px 0 32px; }
.nf-gallery .nf-figure { margin: 0 0 14px; }
.nf-gallery .nf-figure:last-child { margin-bottom: 0; }
.nf-toc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin: 0 0 40px; }
.nf-toc strong { display: block; font-size: 12px; letter-spacing: .16em; color: var(--p); margin-bottom: 6px; }
.nf-toc ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 2; }
.nf-toc a { text-decoration: none; color: var(--sub); }
.nf-toc a:hover { color: var(--p); text-decoration: underline; }

.nf-sec { margin: 0 0 46px; }
.nf-sec h2 { font-size: 23px; line-height: 1.45; font-weight: 800; margin: 6px 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.nf-sec p { margin: 0 0 14px; }
.nf-checks { list-style: none; padding: 0; margin: 8px 0 16px; }
.nf-checks li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.nf-checks li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--p); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.nf-note { background: var(--panel); border-left: 3px solid var(--a); border-radius: 0 10px 10px 0; padding: 12px 16px; font-size: 15px; color: var(--sub); margin: 14px 0; }
.nf-steps { list-style: none; padding: 0; margin: 14px 0; counter-reset: s; }
.nf-steps li { counter-increment: s; display: flex; gap: 14px; align-items: baseline; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.nf-steps li::before { content: counter(s); flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px; background: var(--p); color: #fff; font-size: 13px; font-weight: 700; text-align: center; line-height: 26px; }
.nf-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.nf-people div { border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-align: center; }
.nf-people b { display: block; font-size: 18px; color: var(--p); }
.nf-people small { color: var(--muted); }
.nf-faq details { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 8px; }
.nf-faq summary { font-weight: 700; cursor: pointer; }
.nf-faq details p { margin: 10px 0 0; color: var(--sub); }
.nf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.nf-tags a { font-size: 12px; color: var(--sub); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; text-decoration: none; }
.nf-tags a:hover { color: var(--p); border-color: var(--p); }

/* 하위 글 끝 상담 상자 (메인 키워드 링크) */
.nf-consult { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 8px 0 26px; background: var(--panel); }
.nf-consult b { display: block; font-size: 17px; margin-bottom: 4px; }
.nf-consult p { margin: 0 0 12px; color: var(--sub); font-size: 15px; }
.nf-consult p a { color: var(--p); font-weight: 700; }
.nf-consult-call { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--p); color: #fff; font-weight: 800; text-decoration: none; font-size: 14px; }
.nf-disc { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin: 26px 0 18px; }
.nf-prevnext { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.nf-prevnext a { text-decoration: none; color: var(--sub); }
.nf-prevnext a:hover { color: var(--p); }
.nf-prevnext .next { margin-left: auto; text-align: right; }

/* 글 목록 쪽 번호 */
.nf-pages, .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.nf-pages a, .nf-pages span, .nav-links a, .nav-links span { min-width: 36px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: 14px; }
.nav-links .current, .nf-pages .current { background: var(--p); border-color: var(--p); color: #fff; }

/* ── 사이드바 (고정) ── */
.nf-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
.admin-bar .nf-side { top: 124px; }
.nf-side-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: 13px; color: var(--sub); line-height: 1.7; }
.nf-side-card h3, .nf-side-card h4 { margin: 6px 0 6px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.nf-side-card p { margin: 0 0 14px; }
.nf-tap { display: flex; flex-direction: column; align-items: center; padding: 14px; border-radius: 10px; background: var(--p); color: #fff; text-decoration: none; }
.nf-tap b { font-size: 19px; letter-spacing: .02em; }
.nf-tap small { font-size: 10px; letter-spacing: .2em; opacity: .85; }
.nf-side .nf-checks { margin: 4px 0 0; }
.nf-side .nf-checks li { padding-left: 22px; margin-bottom: 4px; }
.nf-side .nf-checks li::before { width: auto; height: auto; background: none; color: var(--p); font-weight: 800; top: 0; line-height: 1.7; }
.nf-office { display: grid; grid-template-columns: 64px 1fr; gap: 8px 10px; margin: 10px 0 0; }
.nf-office dt { color: var(--muted); }
.nf-office dd { margin: 0; color: var(--ink); }

/* ── 상담 띠 · 바닥 ── */
.nf-band { background: var(--band); padding: 64px 0; text-align: center; }
.nf-band h2 { font-size: 28px; line-height: 1.4; margin: 10px 0 12px; }
.nf-band p { color: var(--sub); max-width: 640px; margin: 0 auto 26px; }
.nf-band-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.nf-band-btn { display: inline-flex; align-items: center; gap: 12px; min-width: 210px; padding: 14px 26px; border-radius: 999px; text-decoration: none; text-align: left; }
.nf-band-btn b { display: block; font-size: 16px; }
.nf-band-btn small { display: block; font-size: 12px; opacity: .8; }
.nf-band-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.nf-band-btn.solid { background: var(--p); color: #fff; }
.nf-band-btn.line { background: #fff; color: var(--p); border: 1.5px solid var(--p); }
.nf-band-note { font-size: 12px; color: var(--muted); margin-top: 18px; }
.nf-footer { border-top: 1px solid var(--line); padding: 40px 0 110px; font-size: 13px; color: var(--sub); }
.nf-footer b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.nf-footer p { margin: 0 0 4px; }
.nf-footer .nf-disc { border: 0; padding: 14px 0 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.nf-copy { color: var(--muted); margin-top: 12px !important; }

/* ── 고정 연락 버튼: PC 오른쪽 세로, 모바일 아래 가로 ── */
.nf-float { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .10); overflow: hidden; }
.nf-float a { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; padding: 11px 4px; font-size: 11px; color: var(--sub); text-decoration: none; border-bottom: 1px solid var(--line); }
.nf-float a:last-child { border-bottom: 0; }
.nf-float a:hover { background: var(--panel); color: var(--p); }
.nf-float svg { width: 20px; height: 20px; }

@media (max-width: 1240px) { .nf-float { right: 8px; } }
@media (max-width: 960px) {
  .nf-cols { grid-template-columns: 1fr; gap: 28px; }
  .nf-side { position: static; }
  .nf-cards-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nf-float { top: auto; bottom: 0; left: 0; right: 0; transform: none; flex-direction: row; border-radius: 0; border-width: 1px 0 0; }
  .nf-float a { flex: 1; width: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .nf-float a:last-child { border-right: 0; }
}
@media (max-width: 600px) {
  .nf-title { font-size: 25px; }
  .nf-sec h2 { font-size: 20px; }
  .nf-cards-list { grid-template-columns: 1fr; }
  /* 상단 카드는 모바일에서 옆으로 넘기는 캐러셀 */
  .nf-cards-top { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 20px -20px 32px; padding: 0 20px 6px; }
  .nf-cards-top .nf-card { flex: 0 0 76%; scroll-snap-align: start; }
  .nf-logo-text small { display: none; }
  .nf-call-pill { padding: 8px 14px; font-size: 13px; }
  .nf-band h2 { font-size: 23px; }
}
