/*
Theme Name: Sudadot
Theme URI: https://sudadot.com
Author: KNPNet
Description: 수다닷컴 전용 경량 WordPress 테마 (k_semumap 테마 0.5.0 에서 출발, 색만 주황 계열로 변경). 글은 운영 DB sudadotcom 을 읽기 전용으로 직접 조회
Version: 0.1.0
Text Domain: sudadot
*/

:root {
  --ink: #17202a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --soft: #f7f9fc;
  --brand: #c2410c;
  --brand-dark: #9a3412;
  --accent: #fff1e6;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #f4b942; outline-offset: 3px; }
.site-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-row { display: flex; align-items: center; min-height: 70px; gap: 28px; }
.brand { flex: 0 0 auto; font-size: 1.35rem; font-weight: 800; letter-spacing: -.04em; color: var(--brand-dark); }
.primary-nav { margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.primary-nav a { display: block; padding: 9px 11px; border-radius: 9px; color: #334155; font-size: .92rem; font-weight: 650; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--brand-dark); background: var(--accent); }
.hero { padding: 82px 0 54px; background: linear-gradient(145deg, #fff1e6 0%, #fffaf5 55%, #f7f9fc 100%); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 10px; color: var(--brand); font-size: .88rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { max-width: 760px; word-break: keep-all; margin: 0; font-size: clamp(2rem, 5vw, 3.65rem); line-height: 1.16; letter-spacing: -.055em; }
.hero p { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: 1.08rem; }
.content-section { padding: 56px 0 80px; }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 8px; font-size: 1.65rem; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.menu-card { min-height: 150px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(30, 52, 90, .05); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.menu-card:hover { transform: translateY(-3px); border-color: #fdba8c; box-shadow: 0 14px 34px rgba(30, 52, 90, .1); }
.menu-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.menu-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.menu-card.qna { background: var(--brand); color: white; }
.menu-card.qna p { color: #ffe4d1; }
.page-main { min-height: 62vh; padding: 54px 0 80px; }
.page-card { padding: clamp(24px, 5vw, 48px); background: white; border: 1px solid var(--line); border-radius: 18px; }
.page-card h1 { margin-top: 0; letter-spacing: -.04em; }
.page-card .entry-content { color: #475569; }
.site-footer { padding: 28px 0 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; background: white; }
/* 이용약관 · 개인정보처리방침 (왼쪽) / 문의사항 (오른쪽) — 학원랭크 bd_id=79 와 같은 배치 */
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 12px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-contact { margin-inline-start: auto; }
.foot-copy { margin: 0; }
.page-card .entry-content h2 { margin: 1.8em 0 .5em; color: var(--ink); font-size: 1.15rem; }

@media (max-width: 980px) {
  .header-row { display: block; padding: 14px 0 10px; }
  .brand { display: inline-block; margin-bottom: 8px; }
  .primary-nav { margin: 0 -8px; }
  .primary-nav a { padding: 8px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .site-shell { width: min(100% - 24px, 1180px); }
  .hero { padding: 52px 0 38px; }
  .menu-grid { grid-template-columns: 1fr; }
  .menu-card { min-height: 0; }
}

/* 목록·상세 공통(세무맵 QNA 화면 틀) */
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; color: var(--muted); font-size: .9rem; }
.breadcrumb a:hover { color: var(--brand-dark); text-decoration: underline; }
.list-head { margin-bottom: 22px; }
.list-head h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.045em; }
.list-head p { margin: 0; color: var(--muted); }
.list-head strong { color: var(--ink); }
.panel { margin-bottom: 20px; padding: clamp(18px, 3vw, 28px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.panel h2 { margin: 0 0 14px; font-size: 1.15rem; letter-spacing: -.02em; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.pagination a, .pagination span { min-width: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-size: .9rem; }
.pagination a:hover { background: var(--accent); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: white; font-weight: 700; }
.qna-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.qna-tabs a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; font-size: .9rem; font-weight: 600; color: #334155; }
.qna-tabs a:hover { border-color: #fdba8c; background: var(--accent); }
.qna-tabs a.current { background: var(--brand); border-color: var(--brand); color: white; }
.qna-list { margin: 0; padding: 0; list-style: none; }
.qna-list li { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.qna-list li:first-child { border-top: 0; padding-top: 0; }
.qna-title { font-weight: 700; color: var(--brand-dark); }
.qna-title:hover { text-decoration: underline; }
.qna-meta { margin: 0; color: var(--muted); font-size: .86rem; }
.qna-excerpt { color: #475569; font-size: .92rem; }
.qna-detail .qna-h1 { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 10px; font-size: clamp(1.35rem, 3.6vw, 1.9rem); line-height: 1.35; letter-spacing: -.04em; }
.qna-detail .qna-h1 h1 { margin: 0; font-size: inherit; line-height: inherit; letter-spacing: inherit; }
.qna-mark { flex: 0 0 auto; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 8px; background: var(--brand); color: white; font-size: .8em; font-weight: 800; }
.qna-mark.a { background: #c2410c; width: 1.7em; height: 1.7em; margin-right: 8px; font-size: .9rem; }
.qna-question { margin: 0 0 20px; padding: 12px 14px; background: var(--soft); border-radius: 10px; color: #475569; }
.qna-answer p { margin: 0 0 14px; color: #1f2937; word-break: keep-all; }
.qna-answer .qna-pick { padding: 12px 14px; background: #f8fafc; border-left: 3px solid #c2410c; border-radius: 6px; }
.qna-answer .qna-pick strong { color: #111827; }
.qna-answer .qna-mark-row { display: flex; align-items: center; margin-bottom: 10px; font-weight: 700; color: #c2410c; }
.daum-wm-datetime .updated { margin: 0; color: var(--muted); font-size: .85rem; text-align: right; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.area-grid li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
.area-grid em { font-style: normal; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.area-note { margin: 12px 0 0; color: var(--muted); font-size: .85rem; }


/* 수다닷컴 게시판(0.1.0) */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cat-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(30, 52, 90, .05); }
.cat-card h3 { margin: 0 0 10px; font-size: 1.1rem; }
.cat-card h3 a:hover { color: var(--brand-dark); }
.board-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.board-chips a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: .86rem; color: #334155; }
.board-chips a:hover, .board-chips a.current { border-color: #fdba8c; background: var(--accent); color: var(--brand-dark); }
.board-chips a.current { background: var(--brand); border-color: var(--brand); color: white; }
.latest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.latest-grid .panel { margin: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.panel-head a.more { color: var(--muted); font-size: .86rem; }
.panel-head a.more:hover { color: var(--brand-dark); }
.post-list { margin: 0; padding: 0; list-style: none; }
.post-list li { display: flex; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; padding-top: 0; }
.post-list .post-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.post-list .post-title:hover { color: var(--brand-dark); text-decoration: underline; }
.post-list .cmt { color: var(--brand); font-size: .85rem; font-weight: 700; }
.post-list .post-meta { flex: 0 0 auto; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.post-detail h1 { margin: 4px 0 10px; font-size: clamp(1.35rem, 3.6vw, 1.9rem); line-height: 1.35; letter-spacing: -.04em; word-break: keep-all; }
.post-info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.post-body { color: #1f2937; font-size: 1.02rem; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.post-body img { max-width: 100%; height: auto; }
.comments h2 { margin: 0 0 12px; font-size: 1.1rem; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.comment-list li:first-child { border-top: 0; padding-top: 0; }
.comment-who { display: flex; gap: 10px; margin-bottom: 4px; font-size: .9rem; }
.comment-who strong { color: var(--brand-dark); }
.comment-who span { color: var(--muted); font-variant-numeric: tabular-nums; }
.comment-text { margin: 0; color: #334155; word-break: keep-all; overflow-wrap: anywhere; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.post-nav a { display: block; padding: 12px 14px; background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-nav a:hover { border-color: #fdba8c; background: var(--accent); }
.post-nav small { display: block; color: var(--muted); font-size: .8rem; }
.post-nav .next { text-align: right; }
.list-note { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }

/* 네이버 파워링크(애드포스트 V2) — 글 보기 본문 아래. 광고 차단기의 흔한 이름(ad-*)을 피한다(옛 웹도 title_txt 등) */
.sd-pl { margin: 26px 0 4px; padding: 14px 16px; border: 1px solid #fed7aa; border-radius: 12px; background: #fffaf5; }
.sd-pl[hidden] { display: none; }
.sd-pl .pl-head { display: flex; justify-content: space-between; margin: 0 0 8px; color: var(--muted); font-size: .8rem; }
.sd-pl .pl-head strong { color: #03a94d; font-weight: 800; }
.sd-pl ul { margin: 0; padding: 0; list-style: none; }
.sd-pl li { padding: 9px 0; border-top: 1px dashed #fed7aa; }
.sd-pl li:first-child { border-top: 0; padding-top: 0; }
.sd-pl a { display: block; }
.sd-pl .pl-title { color: #1a0dab; font-weight: 700; }
.sd-pl a:hover .pl-title { text-decoration: underline; }
.sd-pl .pl-url { margin-left: 6px; color: #03a94d; font-size: .85rem; }
.sd-pl .pl-desc { display: block; color: #475569; font-size: .92rem; }

@media (max-width: 980px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cat-grid, .latest-grid { grid-template-columns: 1fr; }
  .post-list li { flex-wrap: wrap; gap: 2px 10px; }
  .post-list .post-title { flex-basis: 100%; white-space: normal; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .sd-pl .pl-url { display: block; margin: 0; }
}
