/*
Theme Name: Runi Blog
Theme URI: https://runi-blog.com
Author: Runicar
Author URI: https://runi-blog.com
Description: Runicar 멀티테넌트 자동차 정비 블로그 테마. 블록 테마(FSE) 기반, theme.json 주도 디자인. "정비 명세서" 디자인 방향 — 종이/잉크/스틸/번트 앰버. 네이버·티스토리식 카테고리 사이드바. GEO·AEO 친화 시맨틱 마크업.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Version: 0.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: runi-blog
Tags: blog, full-site-editing, block-styles, custom-colors, custom-logo, editor-style, featured-images, wide-blocks
*/

/* ============================================================
   사이드바 위젯 — 네이버/티스토리 스타일 카테고리 메뉴
   (대부분의 스타일은 theme.json. 리스트 트리처럼 theme.json으로
    표현 불가능한 것만 여기서.)
   ============================================================ */

.runi-sidebar { font-size: 0.95rem; }

@media (min-width: 782px) {
  .runi-sidebar { position: sticky; top: 1.5rem; align-self: start; }
}

.runi-widget {
  border: 1px solid var(--wp--preset--color--steel-light);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.runi-widget__title {
  margin: 0;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--wp--preset--color--steel-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.runi-widget__title::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--wp--preset--color--signal);
  border-radius: 2px;
}

/* ---- 카테고리 트리 ---- */
.runi-cat-list,
.runi-cat-list ul { list-style: none; margin: 0; padding: 0; }
.runi-cat-list { padding: 0.35rem 0; font-variant-numeric: tabular-nums; }

.runi-cat-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-left: 2px solid transparent;
  color: var(--wp--preset--color--steel);   /* (글 수) 카운트 색 */
  font-size: 0.82rem;
}
.runi-cat-list li > a {
  flex: 1;
  padding: 0.55rem 1rem;
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.12s;
}
.runi-cat-list li:hover { background: var(--wp--preset--color--signal-soft); border-left-color: var(--wp--preset--color--signal); }
.runi-cat-list li:hover > a { color: var(--wp--preset--color--signal); }

.runi-cat-list li.current-cat { background: var(--wp--preset--color--signal-soft); border-left-color: var(--wp--preset--color--signal); }
.runi-cat-list li.current-cat > a { color: var(--wp--preset--color--signal); font-weight: 700; }

/* 하위 카테고리(트리 들여쓰기) */
.runi-cat-list ul { flex-basis: 100%; }
.runi-cat-list ul li > a { padding-left: 1.9rem; font-size: 0.9rem; color: var(--wp--preset--color--steel); }

/* ---- 최근 글 ---- */
.runi-recent-list { list-style: none; margin: 0; padding: 0.2rem 0; }
.runi-recent-list li { padding: 0.55rem 1rem; border-top: 1px solid var(--wp--preset--color--base-2); }
.runi-recent-list li:first-child { border-top: 0; }
.runi-recent-list a { display: block; line-height: 1.45; color: var(--wp--preset--color--contrast); text-decoration: none; }
.runi-recent-list a:hover { color: var(--wp--preset--color--signal); }
.runi-recent-list .wp-block-latest-posts__post-date {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--wp--preset--color--steel);
  font-family: var(--wp--preset--font-family--mono);
}
