/* ── 공통 내부 페이지 스타일 ── */

.inner-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 카테고리 히어로 */
.cat-hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); color: #fff; padding: 52px 0 44px; }
.cat-hero-inner { display: flex; align-items: center; gap: 20px; }
.cat-hero-icon { font-size: 3rem; flex-shrink: 0; }
.cat-hero-emoji { font-size: 2.8rem; }
.cat-hero-text h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.cat-hero-text p  { font-size: 0.95rem; opacity: .85; line-height: 1.6; }
.cat-hero-badge { display: inline-block; background: rgba(255,255,255,.2); border-radius: 20px; padding: 4px 12px; font-size: 0.78rem; font-weight: 700; margin-bottom: 10px; }

/* 필터 바 */
.filter-bar { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 0; position: sticky; top: 64px; z-index: 90; }
.filter-bar-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-tag { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--text-muted); background: #fff; transition: all .15s; white-space: nowrap; }
.filter-tag.active, .filter-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-count { margin-left: auto; font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }

/* 아티클 목록 그리드 — 분리된 여러 .articles-main-grid를 한 그리드로 자동 정렬 */
.articles-main { padding: 40px 0 80px; }
.articles-main .inner-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.articles-main-grid { display: contents; }
.articles-main .pagination { grid-column: 1 / -1; }
.art-card-lg { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; transition: all .2s; text-decoration: none; color: inherit; }
.art-card-lg:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(46,117,182,.3); }
.art-card-thumb { height: 160px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.art-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.art-card-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; margin-bottom: 8px; }
.art-card-tag.urgent { background: #FEE2E2; color: #991B1B; }
.art-card-tag.compare { background: #DBEAFE; color: #1E40AF; }
.art-card-tag.new     { background: #D1FAE5; color: #065F46; }
.art-card-tag.guide   { background: #F3F4F6; color: #374151; }
.art-card-tag.hot     { background: #FFF7ED; color: #9A3412; }
.art-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); line-height: 1.45; margin-bottom: auto; padding-bottom: 12px; }
.art-card-meta  { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }
.art-card-views { margin-left: auto; }

/* 페이지네이션 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn { width: 38px; height: 38px; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-muted); font-size: 0.88rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ─ 아티클 상세 페이지 ─ */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding: 40px 0 80px; align-items: start; }
.article-main {}
.article-sidebar { position: sticky; top: 80px; }

.article-header { margin-bottom: 28px; }
.article-header .art-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.article-h1 { font-size: 1.7rem; font-weight: 800; color: var(--primary-dark); line-height: 1.35; margin-bottom: 14px; }
.article-meta-row { display: flex; align-items: center; gap: 16px; font-size: 0.82rem; color: var(--text-muted); padding-bottom: 16px; border-bottom: 2px solid var(--primary-dark); }
.article-meta-row strong { color: var(--text-primary); }

.article-summary { background: var(--bg-soft); border-left: 4px solid var(--primary); padding: 16px 20px; border-radius: 0 8px 8px 0; margin-bottom: 28px; font-size: 0.92rem; line-height: 1.7; color: var(--text-primary); }
.article-summary strong { color: var(--primary-dark); }

.article-body { line-height: 1.85; color: var(--text-primary); font-size: 0.95rem; }
.article-body h2 { font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); margin: 32px 0 14px; padding-left: 12px; border-left: 4px solid var(--primary); }
.article-body h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 24px 0 10px; }
.article-body p  { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 20px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.88rem; }
.article-body th { background: var(--primary-dark); color: #fff; padding: 10px 12px; text-align: left; font-weight: 700; }
.article-body td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--bg-soft); }
.article-body .highlight-box { background: #EBF5FB; border: 1px solid #BFD7ED; border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; }
.article-body .warn-box { background: #FFF8E6; border: 1px solid #FFD966; border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; font-size: 0.9rem; }
.article-body .cta-link { display: inline-block; background: var(--primary); color: #fff; padding: 10px 22px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 0.9rem; margin: 6px 6px 6px 0; transition: background .2s; }
.article-body .cta-link:hover { background: var(--primary-dark); }
.article-body .cta-link.secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }

/* 사이드바 */
.sidebar-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; }
.sidebar-title { font-size: 0.82rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.sidebar-related a { display: block; font-size: 0.875rem; color: var(--text-primary); text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--border); line-height: 1.4; }
.sidebar-related a:last-child { border-bottom: none; }
.sidebar-related a:hover { color: var(--primary); }

/* 브레드크럼 */
.breadcrumb-bar { padding: 14px 0; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb-bar a { color: var(--primary); text-decoration: none; }
.breadcrumb-bar a:hover { text-decoration: underline; }
.breadcrumb-bar .sep { margin: 0 6px; }

/* 다음 글 / 이전 글 */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.article-nav-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; text-decoration: none; color: inherit; transition: all .2s; }
.article-nav-item:hover { background: #fff; box-shadow: var(--shadow-sm); }
.article-nav-dir { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.article-nav-title { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; }

@media (max-width: 768px) {
  .articles-main .inner-wrap { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .cat-hero-text h1 { font-size: 1.4rem; }
  .article-nav { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .articles-main .inner-wrap { grid-template-columns: 1fr; }
}

/* ── v2.0 라인 아이콘 시스템 (이모지 대체, mask-image data-URI) ── */
.cat-hero-icon, .art-card-thumb { color: var(--primary); }
.cat-hero-icon { color: #fff; }
.art-card-thumb { height: 132px; }
.cat-hero-icon::before, .art-card-thumb::before {
  content: ''; display: block; background: currentColor;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: var(--ci); mask-image: var(--ci); }
.cat-hero-icon::before { width: 46px; height: 46px; }
.art-card-thumb::before { width: 54px; height: 54px; opacity: .9; }
.ic-home { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%209.5%2012%203l9%206.5V20a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1z'/%3E%3Cpath%20d='M9%2021v-6h6v6'/%3E%3C/svg%3E"); }
.ic-cap { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%209%2012%205l10%204-10%204z'/%3E%3Cpath%20d='M6%2010.5V15c0%201.2%202.7%202.5%206%202.5s6-1.3%206-2.5v-4.5'/%3E%3Cpath%20d='M22%209v4'/%3E%3C/svg%3E"); }
.ic-book { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%206.5C10.5%205%208%204.5%204%205v13c4-.5%206.5%200%208%201.5%201.5-1.5%204-2%208-1.5V5c-4-.5-6.5%200-8%201.5z'/%3E%3Cpath%20d='M12%206.5V20'/%3E%3C/svg%3E"); }
.ic-chart { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2017%209%2011l4%204%207-7'/%3E%3Cpath%20d='M14%208h6v6'/%3E%3C/svg%3E"); }
.ic-money { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='6'%20width='20'%20height='12'%20rx='2'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='2.5'/%3E%3Cpath%20d='M6%209v6M18%209v6'/%3E%3C/svg%3E"); }
.ic-briefcase { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='7'%20width='18'%20height='13'%20rx='2'/%3E%3Cpath%20d='M8%207V5a2%202%200%200%201%202-2h4a2%202%200%200%201%202%202v2'/%3E%3Cpath%20d='M3%2012h18'/%3E%3C/svg%3E"); }
.ic-receipt { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%203v18l2-1%202%201%202-1%202%201%202-1%202%201V3l-2%201-2-1-2%201-2-1-2%201z'/%3E%3Cpath%20d='M8%208h8M8%2012h8M8%2016h5'/%3E%3C/svg%3E"); }
.ic-user { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='8'%20r='4'/%3E%3Cpath%20d='M4%2020c0-4%204-6%208-6s8%202%208%206'/%3E%3C/svg%3E"); }
.ic-heart { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2020s-7-4.5-9.5-9C1%208%202.5%204.5%206%204.5c2%200%203.2%201%204%202%20.8-1%202-2%204-2%203.5%200%205%203.5%203.5%206.5C19%2015.5%2012%2020%2012%2020z'/%3E%3C/svg%3E"); }
.ic-users { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='9'%20cy='8'%20r='3.5'/%3E%3Cpath%20d='M2%2020c0-3.5%203-5.5%207-5.5'/%3E%3Cpath%20d='M15%206.5a3.5%203.5%200%200%201%200%207'/%3E%3Cpath%20d='M14.5%2014.5c3.5.3%205.5%202.3%205.5%205.5'/%3E%3C/svg%3E"); }
.ic-zap { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M13%202%204%2014h7l-1%208%209-12h-7z'/%3E%3C/svg%3E"); }
.ic-calc { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='5'%20y='3'%20width='14'%20height='18'%20rx='2'/%3E%3Cpath%20d='M8%207h8'/%3E%3Cpath%20d='M8.5%2012h2M13.5%2012h2M8.5%2016h2M13.5%2016h2'/%3E%3C/svg%3E"); }
.ic-file { --ci: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%203H7a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z'/%3E%3Cpath%20d='M14%203v5h5'/%3E%3Cpath%20d='M9%2013h6M9%2017h6'/%3E%3C/svg%3E"); }

/* ── 상단 광고 영역 (카테고리 페이지 공용) ── */
.ad-slot { margin: 24px auto 0; text-align: center; overflow: hidden; }
.ad-slot .adsbygoogle { display: block; }

/* ── 정부지원금 목록 (카테고리 페이지 공용) ── */
.pl-main { padding: 8px 0 80px; }
.pl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.pl-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column; transition: all .2s; }
.pl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(46,117,182,.3); }
.pl-cat { align-self: flex-start; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; background: #EFF6FF; color: #1E40AF; margin-bottom: 8px; }
.pl-title { font-size: 1rem; font-weight: 800; color: var(--text-primary); line-height: 1.4; margin-bottom: 8px; }
.pl-summary { font-size: 0.86rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; flex: 1; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pl-tag { font-size: 0.72rem; color: var(--text-muted); background: var(--bg-soft); border-radius: 4px; padding: 2px 7px; }
.pl-deadline { font-size: 0.76rem; font-weight: 600; color: #C2410C; margin-bottom: 10px; }
.pl-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; font-size: 0.86rem; padding: 9px 14px; border-radius: var(--radius-sm); transition: background .15s; margin-top: auto; }
.pl-link:hover { background: var(--primary-dark); }
.pl-count { font-size: 0.82rem; color: var(--text-muted); margin: 28px 0 14px; }
.pl-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 50px 20px; }
@media (max-width: 900px) { .pl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pl-grid { grid-template-columns: 1fr; } }

/* ── 정책 목록 페이지네이션 ── */
.pl-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 8px; }
.pl-pbtn { min-width: 38px; border: 1.5px solid var(--border); background: #fff; color: var(--text-primary); font-size: 0.88rem; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.pl-pbtn:hover:not([disabled]):not(.active) { border-color: var(--primary); color: var(--primary); }
.pl-pbtn.active { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
.pl-pbtn[disabled] { opacity: .4; cursor: not-allowed; }
