/* 文章卡片 - 优化版 */
.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #e6f7ff;
}

/* 图片区域 */
.post-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__image img {
    transform: scale(1.05);
}

/* 内容区域 */
.post-card__content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 元信息 */
.post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: #666;
}

/* 在 post-card.css 中修改 */
.post-card__category {
    background: #0052A3 !important; /* 深蓝色背景 */
    color: white !important; /* 白色文字 */
    padding: 6px 12px !important;
    border-radius: 4px;
    font-weight: 600;
    border: 2px solid #003D82 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* 修复后 */
.post-card__date {
    color: #666666 !important; /* 对比度 5.74:1 ✓ */
    font-weight: 500;
}
.post-card__date {
    color: #666;
    font-size: 0.75rem;
}
/* 新增：卡片浏览量样式 */
.post-card__views {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #666;
    font-size: 0.75rem;
    margin-left: 8px;
}

.post-card__views .views-icon {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 标题 - 固定两行 */
.post-card__title {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1a1a1a;
    
    /* 新增：固定两行样式 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制为2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em; /* 根据 line-height 1.4 × font-size 1.125rem × 2行 计算 */
}

/* 确保链接也继承这些属性 */
.post-card__title a {
    color: inherit;
    text-decoration: none;
    background: linear-gradient(135deg, #000000 0%, #0066CC 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    
    /* 确保链接显示正确 */
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-card__title a:hover {
    background: linear-gradient(135deg, #1890ff 0%, #52c41a 100%);
    background-clip: text;
    -webkit-background-clip: text;
}

/* 摘要 */
.post-card__excerpt {
    color: #555555; /* 对比度 7.43:1 ✓ */
    line-height: 1.7;
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 操作区域 */
.post-card__actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* 或者方案B：使用按钮样式 */
.post-card__read-more {
    display: inline-block;
    background-color: #0066CC !important;
    color: white !important;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.post-card__read-more:hover {
    background-color: #0052A3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.post-card__read-more::after {
    content: "→";
    transition: transform 0.2s ease;
}

.post-card__read-more:hover::after {
    transform: translateX(2px);
}

.post-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 默认图片样式 */
.post-card__image img:not([src*="http"]) {
    opacity: 0.7;
}