/**
 * ========================================
 * 文章卡片增强样式 — 永信医馆主题
 * ========================================
 * 覆盖：归档页 / 搜索页 / 分类页文章列表
 * 设计：16:9 封面 + 悬停微动效 + 响应式网格
 */

/* ---------- 响应式网格系统 ---------- */
.post-grid--enhanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin: 32px 0 48px;
}

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

@media (max-width: 640px) {
    .post-grid--enhanced {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ---------- 卡片容器 ---------- */
.post-card--enhanced {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.post-card--enhanced:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

/* ---------- 封面图区域 ---------- */
.post-card__cover {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 固定比例容器 */
    background: #f0f4f8;
    overflow: hidden;
}

.post-card__cover-link {
    display: block;
}

.post-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card--enhanced:hover .post-card__image {
    transform: scale(1.04);
}

/* ---------- 默认占位图 ---------- */
.post-card__placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8edf2 0%, #dce4ec 50%, #eef1f5 100%);
    color: #a0aec0;
}

.post-card__placeholder-icon {
    width: 64px;
    height: 64px;
    opacity: 0.45;
}

/* ---------- 分类徽章 ---------- */
.post-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(43, 108, 176, 0.88); /* 品牌蓝 #2B6CB0 */
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* 实体色彩变体 */
.entity-oral .post-card__badge {
    background: rgba(43, 108, 176, 0.88);
}

.entity-tcm .post-card__badge {
    background: rgba(212, 48, 47, 0.88); /* 中医红 #D4302F */
}

.entity-academy .post-card__badge {
    background: rgba(45, 106, 79, 0.88);  /* 书院绿 #2D6A4F */
}

/* ---------- 卡片正文区域 ---------- */
.post-card__body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 标题 */
.post-card__title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.45;
}

.post-card__title a {
    color: #1a202c;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.post-card__title a:hover {
    color: #2B6CB0;
}

/* 元信息行 */
.post-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: #718096;
}

.post-card__date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card__date::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    opacity: 0.6;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* 摘要 */
.post-card__excerpt {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #4a5568;
    margin: 0 0 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__excerpt p {
    margin: 0;
}

/* 阅读更多 */
.post-card__readmore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #2B6CB0;
    text-decoration: none;
    transition: gap 0.2s;
    margin-top: auto;
}

.post-card__readmore:hover {
    gap: 8px;
    color: #1e5490;
}

/* ---------- 分页样式 ---------- */
.navigation.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.navigation.pagination .nav-links {
    display: flex;
    gap: 6px;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #4a5568;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s;
}

.navigation.pagination .page-numbers.current {
    background: #2B6CB0;
    border-color: #2B6CB0;
    color: #fff;
}

.navigation.pagination .page-numbers:hover:not(.current) {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* ---------- 空状态 ---------- */
.no-results {
    text-align: center;
    padding: 64px 24px;
    color: #718096;
    font-size: 1.05rem;
}

/* ---------- 页面头部 ---------- */
.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
}

.archive-description {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.55;
}
