/* nx.css — 신규 20개 상세페이지 전용 스타일 (style.css/detail.css 이후 로드, 기존 클래스 미변경) */
.nx-ph { position: relative; overflow: hidden; background: #e8cfa8; margin: 0; }
.nx-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-ph[data-lightbox] { cursor: zoom-in; }
.nx-ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; font-size: 12.5px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(30,16,6,.78)); }
.r11 { aspect-ratio: 1/1; } .r34 { aspect-ratio: 3/4; } .r43 { aspect-ratio: 4/3; } .r169 { aspect-ratio: 16/9; }

.nx-sec { padding: 80px 0; }
.nx-sec.alt { background: var(--bg-alt); }
.nx-sec.dark { background: #20150c; color: #f5ebdc; }
.nx-sec.dark .section-head p, .nx-sec.dark p { color: #d9c9b2; }
.nx-sec h2 { font-size: clamp(26px, 3.4vw, 38px); }
.nx-sec .lead { margin-top: 14px; color: var(--text-dim); max-width: 760px; font-size: 16px; line-height: 1.75; }
.nx-sec p { line-height: 1.75; }
.nx-prose p + p { margin-top: 14px; }
.nx-prose { max-width: 820px; color: var(--text-dim); font-size: 15.5px; }
.nx-two { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.nx-two.rev > :first-child { order: 2; }

/* HERO variants — 헤더가 투명(흰 글자)이므로 모두 어두운 배경 */
.nx-hero { background: #20150c; color: #fff; padding: 130px 0 56px; position: relative; overflow: hidden; }
.nx-hero h1 { font-size: clamp(34px, 5.4vw, 60px); margin-top: 10px; }
.nx-hero .answer { margin-top: 18px; color: #eadfcd; font-size: 17px; line-height: 1.75; max-width: 640px; }
.nx-hero .btn-row { margin-top: 28px; }
.nx-hero .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.nx-hero-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.nx-hero-bg { padding: 180px 0 90px; }
.nx-hero-bg > .bg { position: absolute; inset: 0; }
.nx-hero-bg > .bg img { width: 100%; height: 100%; object-fit: cover; }
.nx-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(25,13,5,.9) 25%, rgba(25,13,5,.45)); }
.nx-hero-bg .container { position: relative; z-index: 2; }
.nx-hero-center { text-align: center; }
.nx-hero-center .answer { margin-left: auto; margin-right: auto; }
.nx-hero-center .btn-row { justify-content: center; }
.nx-hero-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
.nx-hero-panel { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: stretch; }
.nx-hero-panel aside { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); padding: 24px; align-self: center; }
.nx-hero-panel aside h2 { font-size: 15px; letter-spacing: .08em; color: #ffb199; }
.nx-hero-panel aside li { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 14.5px; }
.nx-hero-panel aside li:last-child { border: none; }
.nx-hero-banner { display: grid; grid-template-columns: 1fr; gap: 36px; }
.nx-hero-banner .nx-ph { margin-top: 8px; }
.nx-crumb { font-size: 12.5px; color: #cdbba0; margin-bottom: 6px; }
.nx-crumb a:hover { text-decoration: underline; }

/* 핵심정보 카드 */
.nx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 32px; }
.nx-card { background: var(--surface); border: 1px solid var(--border); padding: 22px; }
.nx-card .k { font-size: 11.5px; letter-spacing: .12em; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.nx-card h3 { font-size: 17px; margin-top: 8px; }
.nx-card p { margin-top: 8px; font-size: 14px; color: var(--text-dim); line-height: 1.65; }
.nx-sec.dark .nx-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); }
.nx-sec.dark .nx-card p { color: #d9c9b2; }

/* 체크리스트 카드형 */
.nx-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 30px; }
.nx-check { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); padding: 18px 20px; }
.nx-check::before { content: '☐'; font-size: 24px; line-height: 1; color: var(--accent); flex: 0 0 auto; }
.nx-check h3 { font-size: 16px; }
.nx-check p { margin-top: 6px; font-size: 14px; color: var(--text-dim); line-height: 1.65; }
.nx-checks.done .nx-check::before { content: '☑'; }

/* 단계 가로형 / 세로형 */
.nx-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin-top: 34px; counter-reset: s; }
.nx-step { position: relative; padding: 24px 20px 20px; border: 1px solid var(--border); background: var(--surface); margin-left: -1px; counter-increment: s; }
.nx-step::before { content: counter(s, decimal-leading-zero); display: block; font-size: 30px; font-weight: 800; color: var(--accent); }
.nx-step h3 { font-size: 16px; margin-top: 6px; }
.nx-step p { margin-top: 8px; font-size: 13.5px; color: var(--text-dim); line-height: 1.65; }
.nx-vsteps { margin-top: 30px; display: flex; flex-direction: column; gap: 0; counter-reset: v; }
.nx-vstep { display: grid; grid-template-columns: 64px 1fr 220px; gap: 24px; padding: 26px 0; border-top: 1px solid var(--border); align-items: center; counter-increment: v; }
.nx-vstep:last-child { border-bottom: 1px solid var(--border); }
.nx-vstep::before { content: counter(v, decimal-leading-zero); font-size: 34px; font-weight: 800; color: var(--accent); }
.nx-vstep h3 { font-size: 18px; }
.nx-vstep p { margin-top: 8px; font-size: 14.5px; color: var(--text-dim); line-height: 1.7; }

/* 타임라인 */
.nx-tl { position: relative; margin-top: 34px; padding-left: 34px; }
.nx-tl::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--accent); opacity: .4; }
.nx-tl-item { position: relative; padding: 0 0 30px; }
.nx-tl-item::before { content: ''; position: absolute; left: -33px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.nx-tl-item .when { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.nx-tl-item h3 { font-size: 18px; margin-top: 4px; }
.nx-tl-item p { margin-top: 6px; font-size: 14.5px; color: var(--text-dim); max-width: 680px; line-height: 1.7; }

/* 표 */
.nx-table-wrap { overflow-x: auto; border: 1px solid var(--border); margin-top: 28px; }
.nx-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14.5px; min-width: 560px; }
.nx-table th, .nx-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.6; }
.nx-table th { background: #2b2016; color: #fff; font-weight: 700; }
.nx-table tbody tr:last-child td { border-bottom: none; }
.nx-table td:first-child { font-weight: 700; white-space: nowrap; }

/* Before / After */
.nx-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.nx-ba > div { border: 1px solid var(--border); background: var(--surface); }
.nx-ba .tag { display: inline-block; margin: 16px 0 0 18px; font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 4px 10px; background: #6e5c48; color: #fff; }
.nx-ba .after .tag { background: var(--accent); }
.nx-ba ul { padding: 16px 20px 22px 38px; list-style: disc; font-size: 14.5px; color: var(--text-dim); line-height: 1.8; }
.nx-ba .nx-ph { margin: 14px 18px 0; }

/* 문제→점검→보수 3열 */
.nx-flow3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 30px; }
.nx-flow3 > div { padding: 26px; border: 1px solid var(--border); background: var(--surface); margin-left: -1px; position: relative; }
.nx-flow3 > div:nth-child(1) { border-top: 4px solid #6e5c48; }
.nx-flow3 > div:nth-child(2) { border-top: 4px solid #d98a1b; }
.nx-flow3 > div:nth-child(3) { border-top: 4px solid var(--accent); }
.nx-flow3 h3 { font-size: 18px; }
.nx-flow3 li { margin-top: 10px; font-size: 14.5px; color: var(--text-dim); line-height: 1.65; padding-left: 14px; position: relative; }
.nx-flow3 li::before { content: '–'; position: absolute; left: 0; }

/* 매뉴얼 챕터 */
.nx-manual { margin-top: 30px; display: grid; gap: 14px; }
.nx-chap { display: grid; grid-template-columns: 120px 1fr; background: var(--surface); border: 1px solid var(--border); }
.nx-chap .no { background: #2b2016; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; letter-spacing: .1em; padding: 16px 8px; text-align: center; }
.nx-chap > div:last-child { padding: 18px 22px; }
.nx-chap h3 { font-size: 17px; }
.nx-chap p { margin-top: 6px; font-size: 14.5px; color: var(--text-dim); line-height: 1.7; }

/* 교육 코스 */
.nx-course { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 30px; }
.nx-course > div { background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.nx-course .body { padding: 18px 20px 22px; }
.nx-course .lv { font-size: 11.5px; letter-spacing: .12em; font-weight: 800; color: var(--accent); }
.nx-course h3 { font-size: 17px; margin-top: 6px; }
.nx-course p { margin-top: 8px; font-size: 14px; color: var(--text-dim); line-height: 1.65; }

/* 주의/노트 */
.nx-note { margin-top: 28px; padding: 18px 22px; border-left: 4px solid var(--accent); background: #fff3ec; font-size: 14.5px; color: #5b3a2a; line-height: 1.7; }
.nx-sec.dark .nx-note { background: rgba(255,75,35,.12); color: #f3dccd; }

/* 도식(SVG) */
.nx-diagram { background: var(--surface); border: 1px solid var(--border); padding: 18px; }
.nx-diagram svg { width: 100%; height: auto; display: block; }
.nx-diagram figcaption { margin-top: 10px; font-size: 12.5px; color: var(--text-dim); }

/* 갤러리 변형 */
.nx-g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px; }
.nx-g22 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 30px; max-width: 760px; }
.nx-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.nx-gbig { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; margin-top: 30px; }
.nx-gbig .side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.nx-gbig .main { aspect-ratio: 4/3; }
.nx-gbig .side .nx-ph { aspect-ratio: 1/1; }
.nx-gbig .rest { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.nx-port { columns: 3; column-gap: 14px; margin-top: 30px; }
.nx-port .nx-ph { break-inside: avoid; margin-bottom: 14px; }
.nx-port .nx-ph:nth-child(3n+1) { aspect-ratio: 3/4; }
.nx-port .nx-ph:nth-child(3n+2) { aspect-ratio: 1/1; }
.nx-port .nx-ph:nth-child(3n) { aspect-ratio: 4/5; }
.nx-case { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
.nx-case .nx-ph { aspect-ratio: 4/3; }
.nx-case .txt { padding: 24px 28px; align-self: center; }
.nx-case .txt h3 { font-size: 19px; }
.nx-case .txt p { margin-top: 10px; font-size: 14.5px; color: var(--text-dim); line-height: 1.7; }
.nx-case:nth-of-type(even) .nx-ph { order: 2; }
.nx-case dl { margin-top: 12px; display: grid; grid-template-columns: 74px 1fr; gap: 6px 10px; font-size: 13.5px; }
.nx-case dt { font-weight: 700; color: var(--accent); }

/* 회사 정보 */
.nx-company { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.nx-company dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; font-size: 14.5px; margin-top: 16px; }
.nx-company dt { font-weight: 700; color: var(--text-dim); }
.nx-company h2 { font-size: 24px; }
.nx-company p { margin-top: 12px; font-size: 14.5px; color: var(--text-dim); max-width: 700px; }

/* 관련 서비스 5개 — PC 한 줄 */
.nx-related { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 28px; }
.nx-rel { display: block; background: var(--surface); border: 1px solid var(--border); }
.nx-rel .nx-ph { aspect-ratio: 4/3; }
.nx-rel .b { padding: 12px 14px 16px; }
.nx-rel h3 { font-size: 14.5px; line-height: 1.4; }
.nx-rel p { margin-top: 6px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.nx-rel:hover { border-color: var(--accent); }

.nx-faq summary h3 { font-size: inherit; font-weight: inherit; display: inline; }
.nx-cta { background: #2b2016; color: #fff; padding: 56px 0; }
.nx-cta .in { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.nx-cta h2 { font-size: clamp(22px, 3vw, 30px); }
.nx-cta p { margin-top: 8px; color: #d9c9b2; }
.nx-cta .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }

@media (max-width: 1000px) {
  .nx-related { grid-template-columns: repeat(3, 1fr); }
  .nx-hero-panel { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nx-sec { padding: 56px 0; }
  .nx-hero { padding: 100px 0 40px; }
  .nx-hero-bg { padding: 120px 0 50px; }
  .nx-hero-split, .nx-two, .nx-ba, .nx-flow3, .nx-case, .nx-gbig, .nx-company { grid-template-columns: 1fr; }
  .nx-two.rev > :first-child { order: 0; }
  .nx-checks { grid-template-columns: 1fr; }
  .nx-g4, .nx-g3 { grid-template-columns: repeat(2, 1fr); }
  .nx-g22 { max-width: none; }
  .nx-gbig .rest { grid-template-columns: repeat(2, 1fr); }
  .nx-hero-row3 { grid-template-columns: repeat(2, 1fr); }
  .nx-hero-row3 .nx-ph:nth-child(3) { display: none; }
  .nx-port { columns: 2; }
  .nx-vstep { grid-template-columns: 44px 1fr; }
  .nx-vstep .nx-ph { grid-column: 1 / -1; aspect-ratio: 4/3; }
  .nx-chap { grid-template-columns: 1fr; }
  .nx-chap .no { justify-content: flex-start; padding: 8px 16px; }
  .nx-flow3 > div { margin-left: 0; margin-top: -1px; }
  .nx-related { grid-template-columns: repeat(2, 1fr); }
  .nx-company { justify-items: start; }
  .nx-company dl { grid-template-columns: 90px 1fr; }
  .nx-company .nx-ph { max-width: 220px; }
}

/* image-first: photo section now follows the hero */
.nx-hero + .nx-sec { padding-top: 48px; }
.nx-g4, .nx-g3, .nx-g22, .nx-gbig { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); }
.nx-g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.nx-g22 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.nx-gbig { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }
@media (max-width: 720px) {
  .nx-g4, .nx-g3, .nx-g22, .nx-gbig { grid-template-columns: minmax(0,1fr); }
  .nx-g4 .nx-ph, .nx-g3 .nx-ph, .nx-g22 .nx-ph { aspect-ratio: 4/3; }
}
