/* =======================================================
   VAULT-LIST — 목록 화면(홈·카테고리·태그·날짜·검색) 전용 스타일 (포쓰 3.4 D1)
   - 대상: archive.php(inc/vault-list.php)가 출력하는 vault-* 클래스
   - 부모 entries / pagination / page-title .min.css 와 global.css(Customizer 출력)가
     ct-* 선택자에 걸어 두던 값을 실측값으로 옮겼다. 색은 기존 전역 변수만 사용(신규 다크 변수 없음).
   - 화면별 차이(홈 카드 여백 16px·열 간격 32px, 나머지 30px)는 현재 화면 그대로 재현한 것이다. 통일은 3.6 이후 논의.
   - 이름 규칙: doc/plans/4th_css-naming.md / 설계: doc/plans/4th_templates-3-4.md §9~§11
======================================================= */


/* 목록 화면 제목 크기(부모 global.css, 현 body.archive·body.search .entry-header .page-title) */
.vault-wrap--normal .entry-header .page-title {
    --theme-font-size: 30px;
}


/* ---------- 결과 없음 ---------- */
.vault-no-results {
    --alignment: center;
}

.vault-no-results .vault-find-form {
    margin: 0 auto;
    max-width: 400px;
}


/* ---------- 그리드 (vault-grid) ---------- */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(var(--vault-cols, 4), minmax(0, 1fr));
    gap: 30px;
}

.vault-grid[data-cols="3"] {
    --vault-cols: 3;
}

/* 홈: 열 간격 32px (예전 style.css .blog .entries) */
.vault-grid--home {
    gap: 32px;
}

@media (max-width: 999.98px) {
    .vault-grid[data-cols] {
        --vault-cols: 2;
    }
}

@media (max-width: 689.98px) {
    .vault-grid[data-cols] {
        --vault-cols: 1;
    }

}


/* ---------- 카드 (vault-card) ---------- */
.vault-card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    background-color: var(--theme-palette-color-8);
    box-shadow: 0px 12px 18px -6px rgba(34, 56, 101, 0.04);
    border-radius: var(--theme-border-radius);
}

/* 홈은 안쪽 여백 16px (부모 global.css, 현 body.home) */
.vault-grid--home .vault-card {
    padding: 16px;
}

.vault-card > * {
    margin-block: 0 20px;
}

.vault-card > *:last-child {
    margin-bottom: 0;
}

/* 아래 메타는 카드 바닥에 붙인다 (높이가 다른 카드 정렬) */
.vault-card > .entry-meta:last-child:not(:only-child) {
    margin-top: auto;
}

/* 홈만: 위 메타 아래 15px, 이미지 아래 30px (부모 global.css, 현 body.home), 나머지는 기본 20px */
.vault-grid--home .vault-card > .entry-meta:first-child {
    margin-bottom: 15px;
}

.vault-card .entry-title {
    --theme-link-initial-color: initial;
    --theme-font-size: 20px;
    --theme-line-height: 1.3;
}

.vault-card .entry-meta {
    --theme-font-weight: 600;
    --theme-text-transform: uppercase;
    --theme-font-size: 12px;
}

.vault-card .entry-excerpt {
    max-width: 100%;
    color: var(--theme-text-color);
}

/* 이미지: 카드 안쪽 여백을 뚫고 가장자리까지 */
.vault-card .vault-thumb--bleed {
    width: calc(100% + 60px);
    margin-inline: -30px;
    box-shadow: var(--theme-image-shadow);
    border-radius: var(--theme-image-border-radius, var(--theme-border-radius, 0px));
}

.vault-grid--home .vault-thumb--bleed {
    width: calc(100% + 32px);
    margin-inline: -16px;
}

.vault-card .vault-thumb--bleed:first-child {
    margin-top: -30px;
}

.vault-grid--home .vault-thumb--bleed:first-child {
    margin-top: -16px;
}

.vault-grid--home .vault-thumb--bleed {
    margin-bottom: 30px;
}

.vault-card .vault-thumb--bleed img {
    height: 100%;
}


/* ---------- 페이지네이션 (vault-pagination, 단순형) ---------- */
.vault-pagination {
    display: grid;
    justify-content: space-between;
    flex-wrap: wrap;
    grid-template-columns: 1fr auto 1fr;
    margin-top: 60px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-text-color);
    --theme-link-initial-color: var(--theme-text-color);
}

.vault-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    border-radius: var(--theme-border-radius, 4px);
    border: 2px solid rgba(0, 0, 0, 0);
}

.vault-pagination .page-numbers.current {
    color: var(--theme-text-active-color, #fff);
    background: var(--theme-link-hover-color);
}

.vault-pagination .page-numbers:not(.dots):hover {
    border-color: var(--theme-link-hover-color);
}

.vault-pagination .prev,
.vault-pagination .next {
    font-size: 12px;
    text-transform: uppercase;
    padding: 0 17px;
    white-space: nowrap;
    border-color: var(--theme-border-color);
}

.vault-pagination .prev {
    grid-column: 1;
    justify-self: start;
}

.vault-pagination .next {
    grid-column: 3;
    justify-self: end;
}

.vault-pagination > div {
    grid-column: 2;
    text-align: center;
    margin: -5px;
}

.vault-pagination > div .page-numbers {
    flex: 0 0 41px;
    width: 41px;
    margin: 5px;
}


/* 모바일: 카드 제목 18px (카드 기본 규칙보다 뒤에 둔다) */
@media (max-width: 689.98px) {
    .vault-card .entry-title {
        --theme-font-size: 18px;
    }
}
