/* --- Common Styles --- */
:root {
  --bg: #ffffff;
  --text: #0b1220;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #172554;
  --accent: #4f46e5;
  --accent2: #a855f7;
  --accentSoft: #eef2ff;
  --container: 1280px;
  --font-main: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

button { font-family: inherit; cursor: pointer; border: none; background: transparent; }

/* Accessibility Utility (Screen Reader Only) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Layout */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); border-bottom: 1px solid #eef2f7; backdrop-filter: blur(10px); }
.topbar .inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { font-weight: 800; font-size: 1.25rem; color: var(--brand); letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.logo-img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }

.nav { display: flex; gap: 24px; font-weight: 600; font-size: 0.95rem; }
.nav a { color: var(--brand); padding: 8px 12px; border-radius: 8px; transition: 0.2s; }
.nav a:hover { background: #f3f7ff; }
.nav a.active { background: var(--brand); color: #fff; }

/* --- Hero & Breadcrumb --- */
.hero { padding: 50px 0 30px; text-align: left; }
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; color: var(--brand); letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 1.05rem; }

/* Main Section */
.section { padding: 40px 0 80px; }
.layout { display: flex; gap: 40px; align-items: flex-start; }
.main-col { flex: 1; min-width: 0; }
.support { width: 280px; flex-shrink: 0; position: sticky; top: 90px; }

/* Card */
.card { background: #fff; border-radius: 24px; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid rgba(79,70,229,.1); }
.head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

/* News Specific */
.search { display: flex; justify-content: space-between; margin-bottom: 24px; }
.search input { width: 80%; padding: 14px 18px; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 15px; outline: none; transition: 0.2s; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,70,229,0.1); }
.search button { width: 18%; background: var(--brand); color: #fff; border-radius: 12px; font-weight: 700; font-size: 15px; transition: 0.2s; }
.search button:hover { background: #1e3a8a; }
@media only screen and (max-width: 640px) {
    .search input::placeholder { font-size: 2.8vw; }
}
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pill { padding: 9px 18px; border-radius: 99px; border: 1px solid #e2e8f0; font-size: 14px; color: var(--muted); transition: all 0.2s ease; background: #fff; font-weight: 500; text-decoration: none; display: inline-block; }
.pill:hover { background: #f8fafc; color: var(--text); border-color: #cbd5e1; }
.pill.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; box-shadow: 0 2px 6px rgba(23, 37, 84, 0.2); }

.list { display: flex; flex-direction: column; }
.item { border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: none; }
.item button { width: 100%; text-align: left; padding: 24px 10px; display: flex; align-items: flex-start; gap: 16px; transition: 0.2s; border-radius: 8px; }
.item button:hover { background: #f8fafc; }
.item button[aria-expanded="true"] .title { color: var(--accent); }

.badge { font-size: 12px; color: var(--accent); background: var(--accentSoft); padding: 4px 8px; border-radius: 6px; font-weight: 700; display: inline-block; margin-bottom: 8px; white-space: nowrap; }
.title { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.45; transition: color 0.2s; margin: 0; }
.sub { font-size: 13px; color: #94a3b8; margin-top: 6px; font-variant-numeric: tabular-nums; display: block; }

/* Content Area */
.item .content { display: none; padding: 0 16px 32px 16px; color: #334155; line-height: 1.75; font-size: 15px; background-color: #fcfcfc; border-radius: 0 0 12px 12px; margin-top: -10px; margin-bottom: 10px; overflow: hidden; word-break: break-word; }
.item .content img { max-width: 100%; height: auto; }
.item.open .content { display: block; animation: slideDown 0.3s ease-out; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pager { min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 600; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.pager:hover:not(:disabled) { background: #f1f5f9; color: var(--text); border-color: #cbd5e1; }
.pager.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager:disabled, .pager.disabled { opacity: 0.4; cursor: not-allowed; }
a.pager { text-decoration: none; }
.pager.info { border: none; background: transparent; cursor: default; width: auto; padding: 0 12px; font-size: 14px; font-feature-settings: "tnum"; }

/* Sidebar & Footer */
.support-card { background: #f8fafc; border-radius: 20px; padding: 24px; border: 1px solid #e2e8f0; }
.subnav { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.subnav a { display: flex; justify-content: center; align-items: center; padding: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; font-weight: 600; text-align: center; color: var(--brand); transition: 0.2s; font-size: 0.95rem; }
.subnav a:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1); }
.subnav a.current { border-color:var(--brand); color:var(--brand); background:#f3f7ff; }
.info-txt { font-size: 14px; color: var(--muted); line-height: 1.6; padding-top: 20px; border-top: 1px solid #e2e8f0; }

/* Responsive */
@media (max-width: 640px) {
  .layout { display: block; margin: 0 5vw; }
  .support { width: 100%; position: static; margin-top: 50px; }
  .subnav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero { text-align: center; }
  .hero h1 { font-size: 28px; }
  .card { padding: 24px 20px; }
  .pills { gap: 6px; }
  .pill { padding: 8px 14px; font-size: 13px; }
}
