/**
 * "더보기" 버튼 — 무한스크롤 폐기 → 인트라식 (2026-08-10)
 *  - 데스크톱: 번호 페이지네이션(#simple-pagination) 사용, 버튼 숨김
 *  - 모바일(<=768px): 번호 페이지네이션 숫자 숨김 + "더보기" 버튼 노출
 *  공통 방법: custom-parts/css/ 에 위치, filemtime 버전으로 enqueue.
 */
.load-more-wrap {
    text-align: center;
    margin: 24px 0 8px;
}

.load-more-btn {
    display: none; /* 기본 숨김 — 데스크톱은 번호 페이지네이션 */
    width: 100%;
    max-width: 420px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1f2b;
    background: #ffffff;
    border: 1px solid #d8dde5;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.load-more-btn:hover {
    background: #f5f7fa;
    border-color: #c3ccd8;
}

.load-more-btn:disabled {
    opacity: .6;
    cursor: default;
}

@media (max-width: 768px) {
    .load-more-btn {
        display: inline-block;
    }
    /* 모바일: 번호 페이지네이션 전체 숨김 — "더보기"로 대체(중복 방지) */
    #simple-pagination {
        display: none !important;
    }
}

/* ── 카테고리 빵부스러기 화면 표시 (복구 2026-08-10) ──
   .infinite-cat-container 스코프로 단일글 .entry-crumbs(post.min.css) 불간섭.
   tagdiv 아이콘폰트 비의존(구분자 CSS 대체). */
.infinite-cat-container .entry-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 4px 0 14px;
}
.infinite-cat-container .entry-crumbs > .td-bread-sep {
    display: none;
}
.infinite-cat-container .entry-crumbs > span:not(:first-child)::before {
    content: "\203A";
    margin: 0 6px;
    color: #bbb;
}
.infinite-cat-container .entry-crumbs a.entry-crumb {
    color: #2f7d32;
    text-decoration: none;
}
.infinite-cat-container .entry-crumbs a.entry-crumb:hover {
    text-decoration: underline;
}
.infinite-cat-container .entry-crumbs .td-bred-no-url-last {
    color: #333;
    font-weight: 600;
}

/* ── 하위 카테고리 subnav (허브 강화, 2026-08-10) ── */
.cat-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 18px;
}
.cat-subnav__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    font-size: 13px;
    line-height: 1.2;
    border-radius: 999px;
    border: 1px solid #e0e4ea;
    background: #fff;
    color: #444;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
}
.cat-subnav__chip:hover {
    border-color: #4CAF50;
    color: #2f7d32;
}
.cat-subnav__chip.is-current {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}
.cat-subnav__count {
    font-size: 11px;
    opacity: .7;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 768px) {
    .cat-subnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-inline: -4px;
        padding-inline: 4px;
    }
    .cat-subnav::-webkit-scrollbar { display: none; }
}

/* ── Font Awesome 아이콘 지연로드 팝인 CLS 방지 — 공간 예약 (2026-08-10) ──
   FA CSS(cdnjs, async)가 늦게 적용돼도 아이콘 폭이 미리 잡혀 메타행이 안 밀림. */
.infinite-tag-item .meta-info i[class*="fa-"] {
    display: inline-block;
    width: 1em;
    text-align: center;
    font-style: normal;
}

/* ── 카테고리 히어로(대표기사) — 인트라 기준 이식, 토큰-프리 (2026-08-10) ──
   대표 1(좌) + 작은 4(우 2×2). 이슈데이 액센트=녹색. */
.cat-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    margin: 4px 0 32px;
}
.cat-hero__main {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #eef0f2;
    aspect-ratio: 16 / 9;
    color: #fff;
    text-decoration: none;
}
.cat-hero__main-thumb,
.cat-hero__main-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.cat-hero__main-thumb img { object-fit: cover; transition: transform .5s ease; }
.cat-hero__main:hover .cat-hero__main-thumb img { transform: scale(1.04); }
.cat-hero__main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 55%);
    pointer-events: none;
}
.cat-hero__main-body {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1;
}
.cat-hero__badge {
    align-self: flex-start;
    padding: 4px 10px;
    background: #2f7d32;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: .02em;
}
.cat-hero__main-title {
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cat-hero__main-date { font-size: 13px; opacity: .85; }

.cat-hero__subs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    width: 100%;
    height: 100%;
    align-content: stretch;
}
.cat-hero__sub {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #eef0f2;
    min-height: 0;
    margin: 0;
    padding: 0;
}
.cat-hero__sub a {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    color: #fff;
}
.cat-hero__sub-thumb,
.cat-hero__sub-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.cat-hero__sub-thumb img { object-fit: cover; transition: transform .4s ease; }
.cat-hero__sub a:hover .cat-hero__sub-thumb img { transform: scale(1.06); }
.cat-hero__sub::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
}
.cat-hero__sub-title {
    position: relative;
    z-index: 1;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 1024px) {
    .cat-hero { grid-template-columns: minmax(0, 1fr); }
    .cat-hero__subs { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; height: auto; }
    .cat-hero__sub { aspect-ratio: 16 / 9; }
}
@media (max-width: 768px) {
    .cat-hero__main-title { font-size: 1.4rem; }
    .cat-hero__subs { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr 1fr; }
}
@media (max-width: 480px) {
    .cat-hero__main-title { font-size: 1.2rem; }
    .cat-hero__main-body { left: 14px; right: 14px; bottom: 14px; }
    /* 서브는 2열 유지(768 규칙 상속) — 메인을 명확한 최대요소로 두어 LCP 안정화 */
    .cat-hero__sub { aspect-ratio: 16 / 9; }
}

/* =============================================================
 * 카테고리 허브 헤더 메타 + 정렬/기간 필터 (인트라 이식 2026-08-11)
 * ============================================================= */
.infinite-cat-container .infinite-cat-title-bar{align-items:center}
.infinite-cat-container .cat-count-chip{display:inline-flex;align-items:baseline;gap:2px;margin-left:10px;padding:3px 12px;border-radius:999px;background:#eef6ee;color:#2f7d32;font-size:13px;font-weight:700;white-space:nowrap}
.infinite-cat-container .cat-count-chip strong{font-size:14px;font-weight:800}
.infinite-cat-container .cat-desc{margin:6px 0 0;color:#666;font-size:14px;line-height:1.55;max-width:70ch}
.infinite-cat-container .cat-updated{margin:4px 0 0;color:#999;font-size:12.5px}
.infinite-cat-container .cat-filters{display:flex;flex-wrap:wrap;gap:8px 22px;margin:18px 0 6px;padding:12px 14px;border:1px solid #e6e6e6;border-radius:10px;background:#fafafa}
.infinite-cat-container .cat-filters__group{display:flex;align-items:center;gap:10px}
.infinite-cat-container .cat-filters__label{font-size:12.5px;color:#888;font-weight:700;white-space:nowrap}
.infinite-cat-container .cat-filters__chips{display:flex;flex-wrap:wrap;gap:6px}
.infinite-cat-container .cat-filters__chip{display:inline-block;padding:7px 13px;border-radius:999px;border:1px solid #ddd;background:#fff;color:#555;font-size:13px;line-height:1;text-decoration:none;transition:border-color .15s ease,color .15s ease,background .15s ease}
.infinite-cat-container .cat-filters__chip:hover{border-color:#2f7d32;color:#2f7d32}
.infinite-cat-container .cat-filters__chip.is-active{background:#2f7d32;border-color:#2f7d32;color:#fff;font-weight:700}
@media (max-width:480px){
  .infinite-cat-container .cat-filters{gap:8px 14px;padding:10px 12px}
  .infinite-cat-container .cat-filters__chip{padding:7px 11px;font-size:12.5px}
  .infinite-cat-container .cat-count-chip{margin-left:8px;padding:3px 10px;font-size:12px}
}
