/* =============================================
   블로그 페이지 스타일 (blog.css)
   메인 사이트 디자인 시스템 통일
   ============================================= */

.blog-page {
    min-height: 100vh;
    background-color: #fbfbfb;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.blog-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

/* ---- 페이지 헤더 ---- */

.blog-page-header {
    padding: 48px 0 32px;
    text-align: center;
}

.blog-page-title {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px 0;
    letter-spacing: -0.03em;
}

.blog-page-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* ---- 카테고리 필터 탭 ---- */

.blog-category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.blog-category-tabs::-webkit-scrollbar {
    display: none;
}

.blog-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    background: white;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1;
}

.blog-tab:hover {
    text-decoration: none;
}

/* ---- 결과 카운트 ---- */

.blog-result-info {
    margin-bottom: 20px;
    font-size: 14px;
    color: #94a3b8;
}

.blog-result-info strong {
    color: #475569;
    font-weight: 700;
}

/* ---- 블로그 그리드 ---- */

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---- 블로그 카드 ---- */

.blog-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    text-decoration: none;
    color: inherit;
}

/* 썸네일 */
.blog-card-thumbnail {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f1f5f9;
    flex-shrink: 0;
}

.blog-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.07), transparent 60%);
    pointer-events: none;
}

/* 카드 콘텐츠 */
.blog-card-content {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 카테고리 뱃지 */
.blog-card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    width: fit-content;
    line-height: 1.5;
}

/* 카드 제목 */
.blog-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.015em;
}

/* 요약 */
.blog-card-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.75;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    font-weight: 400;
}

/* 카드 하단 메타 */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.blog-card-date,
.blog-card-author {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.blog-card-date svg,
.blog-card-author svg {
    color: #cbd5e1;
    flex-shrink: 0;
}

/* ---- 빈 상태 ---- */

.blog-no-results {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.blog-no-results svg {
    opacity: 0.5;
}

.blog-no-results p {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    color: #94a3b8;
}

/* ---- 페이지네이션 ---- */

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 52px;
}

.blog-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    background: white;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1;
}

.blog-page-link:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
    text-decoration: none;
}

.blog-page-link.active {
    color: white;
    background: #2563eb;
    border-color: #2563eb;
}

.blog-page-link svg {
    display: block;
}

/* ---- 반응형 ---- */

@media (max-width: 768px) {
    .blog-page-header {
        padding: 32px 0 24px;
    }

    .blog-page-title {
        font-size: 26px;
    }

    .blog-page-subtitle {
        font-size: 13px;
    }

    .blog-category-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-bottom: 20px;
    }

    .blog-tab {
        padding: 7px 16px;
        font-size: 13px;
    }

    .blog-card-content {
        padding: 14px 16px 16px;
    }

    .blog-card-title {
        font-size: 15px;
    }

    .blog-card-excerpt {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        gap: 16px;
    }

    .blog-card-thumbnail {
        aspect-ratio: 16 / 9;
    }

    .blog-pagination {
        gap: 4px;
    }

    .blog-page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}
