/* 首页相关样式 */

/* 首页博文列表样式 */
.post-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* 博文卡片样式：简洁方框 */
.post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-card {
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
  padding: var(--spacing-md);
  border: var(--border-width) solid var(--light-color);
  border-radius: var(--border-radius);
  transition: box-shadow 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .post-card {
    flex-direction: row;
    align-items: flex-start;
    height: auto;
    overflow: visible;
  }
  
  .post-left {
    flex: 3;
    margin-right: 0.5rem;
    margin-bottom: 0;
  }
  
  .post-right {
    flex: 1;
    width: auto;
    text-align: right;
    white-space: nowrap;
  }
  
  .post-title {
    font-size: 20px !important;
  }
  
  .post-excerpt {
    font-size: 14px;
  }
  
  .post-date {
    font-size: 6px;
  }
  
  .post-meta {
    font-size: 6px;
  }
}

.post-left {
  flex: 1;
  margin-right: 2rem;
}

.post-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: right;
  margin-top: auto;
  color: #999;
}

/* 博文卡片 hover 效果：轻微阴影，提升交互感 */
.post-card-link:hover .post-card {
  box-shadow: var(--box-shadow);
  transform: scale(1.01);
}

/* 博文卡片 hover 时标题动效 */
.post-card-link:hover .post-title {
  color: var(--secondary-color);
  transform: translateX(15px);
}

.post-card-link:hover .post-title::after {
  opacity: 1;
  transform: translateX(0);
}

/* 博文标题样式 */
.post-title {
  font-size: 22px;
  transition: all 0.3s ease;
  display: inline-block;
  transform: translateX(10px);
}

.post-title::after {
  content: '>';
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--secondary-color);
  font-family: "Microsoft YaHei", "Heiti SC", "SimHei", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-left: 5px;
  display: inline-block;
}

/* 博文标题链接样式 */
.post-link {
  color: var(--text-color);
  text-decoration: none;
  cursor: var(--cursor-click);
}

/* 博文标题链接 hover 效果 */
.post-link:hover {
  transform: translateX(5px);
  color: var(--secondary-color);
  cursor: var(--cursor-click);
}

/* 博文元信息（时间）样式 */
.post-meta {
  font-size: var(--font-size-sm);
  color: #999999;
}

.post-date {
  font-size: var(--font-size-sm);
  color: #999999;
}

/* 博文摘要样式 */
.post-excerpt {
  font-size: 15px;
  color: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(10px);
  max-height: 6em; /* 限制摘要最长长度为卡片的 2/3 */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 博文卡片 hover 时摘要动效 */
.post-card-link:hover .post-excerpt {
  transform: translateX(15px);
}

/* 无博文提示样式 */
.empty-tip {
  text-align: center;
  color: #999999;
  padding: 60px 0;
}