/* site/category.blade.php 의 <style> 에서 옮김 (2026-11-17, 계획 D3) */
/* Category Hero */
.category-hero {
    padding: 56px 0 0;
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.category-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 12px;
}

.category-name {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.category-count {
    font-size: 0.9rem;
    color: var(--stone);
}

/* View Toggle - PC에서는 숨김 */
.view-toggle {
    display: none;
}

/* Post Grid - PC */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1024px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 모바일 스타일 */
@media (max-width: 768px) {
    .category-name { font-size: 2rem; }
    .category-hero { padding: 32px 0 0; margin-bottom: 24px; }

    /* View Toggle 표시 */
    .view-toggle {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-bottom: 20px;
    }

    .view-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border: 1px solid #e0e0e0;
        background: #fff;
        border-radius: 20px;
        font-size: 0.85rem;
        color: #666;
        cursor: pointer;
        transition: all 0.2s;
    }

    .view-btn.active {
        background: var(--charcoal, #333);
        color: #fff;
        border-color: var(--charcoal, #333);
    }

    .view-btn svg {
        width: 16px;
        height: 16px;
    }

    /* 리스트 뷰 (기본) */
    .post-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post-grid .post-card {
        display: flex;
        flex-direction: row;
        gap: 12px;
    }

    .post-grid .post-card-img {
        flex-shrink: 0;
        width: 100px;
        height: 100px;
    }

    .post-grid .post-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }

    /* 글자가 흰 카드 위·오른쪽 끝에 붙지 않게 여백을 두고 세로 가운데로 */
    .post-grid .post-card-body {
        flex: 1;
        min-width: 0;
        padding: 5px 12px 5px 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .post-grid .post-card-title {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 공통 카드의 윗여백 16px·구분선을 지운다. 남아 있으면 날짜 줄이 제목에서
       떨어져 썸네일 아래 끝보다 더 내려갔다 */
    .post-grid .post-card-meta {
        font-size: 0.75rem;
        padding-top: 0;
        border-top: 0;
        margin-top: 2px;
    }

    .post-grid .post-card-category {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }

    /* 그리드 뷰 */
    .post-grid.grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .post-grid.grid-view .post-card {
        flex-direction: column;
        gap: 8px;
    }

    .post-grid.grid-view .post-card-img {
        width: 100%;
        height: 0;
        padding-bottom: 75%;
        position: relative;
    }

    .post-grid.grid-view .post-card-img img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }

    .post-grid.grid-view .post-card-body { padding: 0; }

    .post-grid.grid-view .post-card-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .post-grid.grid-view .post-card-meta {
        display: none;
    }

    .post-grid.grid-view .post-card-category {
        display: none;
    }
}

/* Category Pagination */
.category-pagination {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* 번호 페이지네이션 */
.page-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* "‹ 이전" 은 기호와 글자 사이에 공백이 있어 줄바꿈 지점이 생긴다.
       높이가 고정이라 두 줄이 되면 버튼 밖으로 삐져나온다. */
    white-space: nowrap;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--charcoal, #333);
    text-decoration: none;
    border: 1px solid var(--border, #e0e0e0);
    background: #fff;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.page-btn:hover {
    background: #faf6f4;
    border-color: var(--terracotta, #c97b63);
    color: var(--terracotta, #c97b63);
}

.page-btn.active {
    background: var(--terracotta, #c97b63);
    border-color: var(--terracotta, #c97b63);
    color: #fff;
    font-weight: 700;
    cursor: default;
}

.page-btn.nav {
    font-weight: 400;
    color: var(--stone, #777);
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-ellipsis {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 28px;
    height: 40px;
    color: var(--stone, #aaa);
    padding-bottom: 8px;
    user-select: none;
}

/* 페이지 직접 이동 */
.page-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--stone, #888);
}

.page-jump label {
    margin: 0;
}

.page-jump input {
    width: 64px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    color: var(--charcoal, #333);
    background: #fff;
    -moz-appearance: textfield;
}

.page-jump input::-webkit-outer-spin-button,
.page-jump input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-jump input:focus {
    outline: none;
    border-color: var(--terracotta, #c97b63);
}

.page-jump button {
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--charcoal, #333);
    border-radius: 8px;
    background: var(--charcoal, #333);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.page-jump button:hover {
    opacity: 0.85;
}

.page-jump .page-total {
    white-space: nowrap;
}

/* 모바일 페이지네이션 — PC에서 넓게 보이던 바깥 번호(현재±3,±4)는 숨겨 ±2만 노출 */
@media (max-width: 768px) {
    .category-pagination {
        margin-top: 32px;
        gap: 14px;
    }

    .page-wide {
        display: none;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 9px;
        font-size: 0.86rem;
    }

    .page-ellipsis {
        min-width: 20px;
        height: 36px;
    }
}
