/*
 * 받을지도 사이트 머리·너비·사이드바·첫 화면·카테고리 화면 (subsidy-hub v2.3.0, 2026-11-20)
 * 설계: 13. wordpress (benefitmap)/site-redesign/인포팁-벤치마킹.md 3-1~3-3절
 */
.hub-site { --r-text: #14171c; --r-sub: #4b5563; --r-muted: #6b7280; --r-line: #d6dbe3; --r-brand: #1d4ed8; --r-soft: #eef3ff; --r-bg: #f3f5f8; --r-font: 'Wanted Sans Variable', 'Wanted Sans', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; }
body.hub-site { background: var(--r-bg) !important; }

/* 테마 머리·메뉴 숨김 (새 머리 .rh가 대신한다) */
.hub-site #masthead, .hub-site #site-navigation, .hub-site #mobile-header, .hub-site #mobile-menu-control-wrapper { display: none !important; }

/* ---- 머리 ---- */
.rh { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--r-line); font-family: var(--r-font); }
.admin-bar .rh { top: 32px; }
.rh__in { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 24px; }
.rh__logo { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; color: var(--r-text) !important; text-decoration: none !important; white-space: nowrap; letter-spacing: -0.02em; }
.rh__logo img { width: 26px; height: 26px; border-radius: 6px; }
.rh__nav { flex: 1; min-width: 0; }
.rh ul { list-style: none; margin: 0; padding: 0; }
.rh__nav > ul { display: flex; align-items: center; gap: 2px; }
.rh__nav li { position: relative; }
.rh__nav a { display: block; padding: 8px 11px; border-radius: 10px; font-size: 15.5px; font-weight: 700; color: #374151 !important; text-decoration: none !important; white-space: nowrap; }
.rh__nav a:hover, .rh__nav .current-menu-item > a, .rh__nav .current-menu-ancestor > a, .rh__nav .current-category-ancestor > a { background: var(--r-soft); color: var(--r-brand) !important; }
.rh__nav .menu-item-has-children > a::after { content: ' ▾'; font-size: 11px; color: var(--r-muted); }
.rh__nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; padding: 6px; background: #fff; border: 1px solid var(--r-line); border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.rh__nav li:hover > .sub-menu, .rh__nav li:focus-within > .sub-menu { display: block; }
.rh__nav .sub-menu a { font-size: 15px; font-weight: 600; }
.rh__search { display: flex; align-items: center; gap: 8px; width: 240px; height: 40px; margin: 0 0 0 auto; padding: 0 14px; border: 1.5px solid var(--r-line); border-radius: 999px; background: #fff; color: var(--r-muted); }
.rh__search:focus-within { border-color: var(--r-brand); }
.rh__search svg, .rh__icon svg { flex: none; width: 17px; height: 17px; }
.rh .rh__search input { flex: 1; min-width: 0; height: 36px; margin: 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; font: inherit; font-size: 14.5px; color: var(--r-text); }
.rh__icon { width: 40px; height: 40px; display: none; place-items: center; padding: 0; border: 1.5px solid var(--r-line); border-radius: 50%; background: #fff; color: #374151; cursor: pointer; }
.rh__sub { display: none; }

/* ---- 너비와 사이드바 ---- */
.hub-site .grid-container { max-width: 1280px !important; }
.hub-site .site.grid-container, .hub-site.one-container .container { background: transparent !important; }
.hub-site.one-container .site-content { padding: 28px 24px 40px !important; gap: 32px; align-items: flex-start; }
.hub-site .site-content { display: flex; }
.hub-site #primary { flex: 1 1 auto; min-width: 0; width: auto; }
.hub-site.one-container .inside-article { background: #fff; border: 1px solid var(--r-line); border-radius: 18px; padding: 36px 40px; }
.r-side { flex: 0 0 320px; width: 320px; display: grid; gap: 16px; align-self: stretch; align-content: start; font-family: var(--r-font); }
.r-box { background: #fff; border: 1px solid var(--r-line); border-radius: 18px; padding: 18px 18px 14px; }
.r-side .r-box__t { margin: 0 0 10px !important; padding: 0 !important; border: 0 !important; font-size: 17px !important; font-weight: 800 !important; line-height: 1.4 !important; color: var(--r-text) !important; }
.r-pop, .r-feed { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: 12px; }
.r-pop li, .r-feed li { margin: 0 !important; }
.r-pop a { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; text-decoration: none !important; }
.r-pop i { font-style: normal; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--r-soft); color: var(--r-brand); font-size: 13.5px; font-weight: 800; }
.r-pop li:first-child i { background: var(--r-brand); color: #fff; }
.r-pop b, .r-feed b { font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--r-text); }
.r-feed a { display: grid; gap: 3px; text-decoration: none !important; }
.r-feed small { font-size: 13px; color: var(--r-muted); }
/* 사이드바 광고: 인기 있는 글·오늘의 피드를 지난 뒤에만 따라 내려온다 (2026-11-20 선배 결정 (나)) */
.r-ad-side { position: sticky; top: 84px; }
.admin-bar .r-ad-side { top: 116px; }
.r-ad-side__label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--r-muted); }
.r-ad-side .subsidy-hub-ad { margin: 0 !important; }

/* ---- 첫 화면 ---- */
.r-home__top, .r-sec, .r-grid2, .r-calcs, .r-chips { font-family: var(--r-font); }
.r-home__top { display: grid; gap: 16px; margin-bottom: 18px; }
.r-hero { padding: 26px 28px; border-radius: 20px; background: #14171c; color: #fff; }
.r-hero .r-hero__t { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; font-size: 26px !important; font-weight: 800 !important; line-height: 1.35 !important; color: #fff !important; letter-spacing: -0.02em; }
.r-hero p { margin: 0 0 14px !important; font-size: 15.5px; color: #cdd3dc; text-align: left !important; }
.r-hero__search { display: flex; align-items: center; gap: 10px; height: 54px; margin: 0; padding: 0 18px; border-radius: 14px; background: #fff; color: var(--r-muted); }
.r-hero__search svg { flex: none; width: 19px; height: 19px; }
.r-hero .r-hero__search input { flex: 1; min-width: 0; height: 50px; margin: 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; font: inherit; font-size: 16px; color: var(--r-text); }
.r-hero__stat { margin-top: 12px; font-size: 14px; color: #cdd3dc; }
.r-hero__stat b { color: #fff; }
.r-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.r-chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border: 1.5px solid var(--r-line); border-radius: 999px; background: #fff; color: #374151 !important; font-size: 15px; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.r-chip span { font-size: 13px; color: var(--r-muted); }
.r-chip.is-new span { color: #0f9f8f; }
.r-sec { background: #fff; border: 1px solid var(--r-line); border-radius: 18px; padding: 22px 24px; margin: 0 0 18px; }
.r-sec__h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.r-sec .r-sec__h h2 { margin: 0 !important; padding: 0 !important; border: 0 !important; font-size: 20px !important; font-weight: 800 !important; line-height: 1.4 !important; color: var(--r-text) !important; }
.r-sec__h a { flex: none; font-size: 14.5px; font-weight: 700; color: var(--r-brand) !important; text-decoration: none !important; }
.r-sec .subsidy-hub-list { margin: 0 !important; }
.r-calcs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.r-calc { display: grid; gap: 4px; align-content: start; padding: 14px; border: 1.5px solid #c9d8ff; border-radius: 14px; background: var(--r-soft); text-decoration: none !important; }
.r-calc b { font-size: 16px; font-weight: 800; color: var(--r-brand); line-height: 1.35; word-break: keep-all; }
.r-calc small { font-size: 13.5px; color: var(--r-sub); line-height: 1.45; word-break: keep-all; }
.r-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.r-list { list-style: none; margin: 0 !important; padding: 0 !important; }
.r-list li { margin: 0 !important; }
.r-list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-top: 1px solid #eef0f3; text-decoration: none !important; }
.r-list li:first-child a { border-top: 0; }
.r-list b { font-size: 15.5px; font-weight: 600; color: var(--r-text); line-height: 1.45; }
.r-list small { flex: none; font-size: 13px; color: var(--r-muted); padding-top: 2px; }

/* ---- 카테고리 화면 ---- */
.r-cat { font-family: var(--r-font); color: var(--r-text); display: grid; gap: 16px; }
.r-cat__head h1 { margin: 0 0 4px !important; font-size: 28px !important; font-weight: 800 !important; letter-spacing: -0.02em; line-height: 1.35; color: var(--r-text); }
.r-cat__desc, .r-cat__desc p { margin: 0 !important; font-size: 16px; color: var(--r-sub); }
.r-cat .subsidy-hub-ad { margin: 0 !important; }
.r-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.r-tile { display: grid; gap: 4px; justify-items: center; padding: 16px 8px; border: 1.5px solid var(--r-line); border-radius: 16px; background: #fff; text-decoration: none !important; text-align: center; }
.r-tile i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--g) 12%, #fff); color: var(--g); }
.r-tile i svg { width: 24px; height: 24px; }
.r-tile b { font-size: 15px; font-weight: 700; color: var(--r-text); word-break: keep-all; }
.r-tile small { font-size: 13px; color: var(--r-muted); }
.r-tile.is-on { border: 2px solid var(--r-brand); background: var(--r-soft); }
.r-tile.is-on b { color: var(--r-brand); }
.r-countbar { padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--r-line); font-size: 15px; color: var(--r-sub); }
.r-countbar b { color: var(--r-text); }
.r-csearch { display: flex; align-items: center; gap: 10px; height: 50px; margin: 0; padding: 0 16px; border: 1.5px solid var(--r-line); border-radius: 14px; background: #fff; color: var(--r-muted); }
.r-csearch:focus-within { border-color: var(--r-brand); }
.r-csearch svg { flex: none; width: 18px; height: 18px; }
.r-cat .r-csearch input[type="search"] { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; font: inherit; font-size: 15.5px; color: var(--r-text); }
.r-rows { background: #fff; border: 1px solid var(--r-line); border-radius: 18px; overflow: hidden; }
.r-rows__h { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px 10px; }
.r-rows .r-rows__h h2 { margin: 0 !important; padding: 0 !important; border: 0 !important; font-size: 19px !important; font-weight: 800 !important; color: var(--r-text) !important; }
.r-rows__h span { font-size: 14px; color: var(--r-muted); }
.r-rows__empty { margin: 0 !important; padding: 20px; color: var(--r-sub); }
.r-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid #eef0f3; text-decoration: none !important; }
.r-row:hover { background: #f8fafc; }
.r-row b { font-size: 16px; font-weight: 600; color: var(--r-text); line-height: 1.45; }
.r-row__m { display: flex; align-items: center; gap: 10px; }
.r-row em { font-style: normal; padding: 3px 9px; border-radius: 999px; background: #f1f3f6; font-size: 13px; font-weight: 700; color: var(--r-sub); white-space: nowrap; }
.r-row small { font-size: 13.5px; color: var(--r-muted); white-space: nowrap; }
.r-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 18px; }
.r-pager .page-numbers { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border: 1.5px solid var(--r-line); border-radius: 10px; background: #fff; font-size: 15px; font-weight: 700; color: #374151 !important; text-decoration: none !important; }
.r-pager .page-numbers.current { background: var(--r-text); border-color: var(--r-text); color: #fff !important; }
.r-pager .page-numbers.dots { border: 0; background: transparent; }

/* ---- 화면 폭별 ---- */
@media (max-width: 1099px) {
	.hub-site .site-content { flex-direction: column; align-items: stretch; }
	.r-side { width: auto; flex: none; }
	.r-ad-side { display: none; }
	.r-calcs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rh__nav a { padding: 8px 8px; font-size: 15px; }
	.rh__search { width: 190px; }
}
@media (max-width: 900px) {
	.rh__nav, .rh__search { display: none; }
	.rh__icon { display: grid; margin-left: auto; }
	.rh.is-search-open .rh__search { display: flex; position: absolute; left: 16px; right: 16px; top: 100%; width: auto; margin: 0; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
	.rh__sub { display: block; padding: 0 16px 10px; }
	.rh__sub ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
	.rh__sub ul::-webkit-scrollbar { display: none; }
	.rh__sub li { flex: none; }
	.rh__sub a { display: block; padding: 7px 12px; border: 1.5px solid var(--r-line); border-radius: 999px; font-size: 14.5px; font-weight: 700; color: #374151 !important; text-decoration: none !important; white-space: nowrap; }
	.rh__sub .current-menu-item > a, .rh__sub .current-menu-ancestor > a { background: var(--r-text); border-color: var(--r-text); color: #fff !important; }
}
@media (max-width: 760px) {
	.rh__in { height: 56px; padding: 0 16px; gap: 10px; }
	.hub-site.one-container .site-content { padding: 16px 14px 30px !important; }
	.hub-site.one-container .inside-article { padding: 22px 18px; }
	.r-hero { padding: 20px 18px; }
	.r-hero .r-hero__t { font-size: 21px !important; }
	.r-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.r-calcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.r-grid2 { grid-template-columns: 1fr; }
	.r-sec { padding: 18px 16px; }
	.r-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.r-tile { padding: 12px 4px; }
	.r-tile b { font-size: 14px; }
	.r-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
	.r-cat__head h1 { font-size: 24px !important; }
}

/* 본문 h2에 붙는 연파랑 바탕(subsidy-hub.css)이 새 제목들을 덮지 않게 */
.r-hero .r-hero__t, .r-sec .r-sec__h h2, .r-rows .r-rows__h h2, .r-side .r-box__t, .r-cat__head h1 { background: none !important; box-shadow: none !important; }
.r-sec .r-sec__h h2::before, .r-sec .r-sec__h h2::after, .r-hero .r-hero__t::before, .r-hero .r-hero__t::after { display: none !important; }
/* 첫 화면은 흰 상자 안에 또 상자가 들어가지 않게 바깥 상자를 없앤다 */
.hub-site.home.one-container .inside-article { background: transparent; border: 0; padding: 0; }
.hub-site.home .entry-header { display: none; }
