﻿/* detian 首页排版优化 —— 只作用于列表页，不动文章页 */

/* 顶栏（全站）：天空做背景，站名居中（主标题 + 小字副题），搜索在右 */
.home .banner { display: none !important; }

#navbar-main {
  background-color: transparent !important;
  background-image: url("https://detian.xyz/wp-content/uploads/2026/01/PM-banner.jpg") !important;
  background-size: cover !important;
  background-position: center 58% !important;
  background-repeat: no-repeat !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 站名居中 */
#navbar-main .navbar-brand.mr-0 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
#navbar-main .navbar-title {
  color: #ffffff !important;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .5px;
  text-shadow: 0 1px 8px rgba(6, 18, 38, .35);
}
/* 副标题小字 */
#navbar-main .tb-sub {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
  opacity: .88;
  margin-left: 2px;
  text-shadow: 0 1px 6px rgba(6, 18, 38, .35);
}
/* 搜索图标在天空上要白色 */
#navbar-main .fa,
#navbar-main .nav-link,
#navbar-main .navbar-toggler,
#navbar-main .navbar-toggler-icon {
  color: #ffffff !important;
  text-shadow: 0 1px 6px rgba(6, 18, 38, .35);
}
#navbar-main input::placeholder { color: rgba(255, 255, 255, .78) !important; }
/* ===== 卡片 ===== */
.article-list-home .post.card,
.article-list .post.card {
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, .055);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 12px 28px -14px rgba(17, 24, 39, .20);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, border-color .28s ease;
  margin-bottom: 24px;
  overflow: hidden;
}
.article-list-home .post.card:hover,
.article-list .post.card:hover {
  transform: translateY(-3px);
  border-color: rgba(33, 150, 243, .22);
  box-shadow: 0 2px 4px rgba(17, 24, 39, .05), 0 24px 46px -18px rgba(17, 24, 39, .30);
}

/* 标题后的箭头：hover 才出现，暗示“可点进” */
.article-list .post-title::after {
  content: "→";
  display: inline-block;
  margin-left: 8px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .25s ease, transform .25s ease;
}
.article-list .post.card:hover .post-title::after {
  opacity: 1;
  transform: translateX(0);
}

/* 首屏 banner 底部的下滑提示 */
/* 注：Argon 的正文容器会上移压住 banner，底部提示会被卡片盖住，故不启用 */


/* ===== 封面 ===== */
.post-header.post-header-with-thumbnail {
  height: 248px;
  margin: -30px -30px 18px -30px;
  border-radius: 14px 14px 0 0;
  position: relative;
  overflow: hidden;
}
.post-header.post-header-with-thumbnail .post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transform: scale(1.005);
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.article-list-home .post.card:hover .post-thumbnail,
.article-list .post.card:hover .post-thumbnail {
  transform: scale(1.045);
}
/* 底部渐变，保证白字可读 */
.post-header.post-header-with-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0) 34%,
      rgba(0, 0, 0, .35) 68%,
      rgba(0, 0, 0, .62) 100%);
  z-index: 1;
}
.post-header.post-header-with-thumbnail .post-header-text-container {
  padding: 0 28px 20px 28px;
  z-index: 2;
  text-align: left;
}
/* 主题在“字数”前塞了一个 </br>，会强制换行，这里干掉 */
.post-header.post-header-with-thumbnail .post-header-text-container .post-meta br {
  display: none;
}
/* 卡片上只保留：时间 | 浏览 | 评论 | 分类；字数/阅读时长在封面里太挤 */
.post-header.post-header-with-thumbnail .post-meta .post-meta-detail-words {
  display: none;
}
.post-header.post-header-with-thumbnail .post-meta .post-meta-detail-words ~ .post-meta-devide {
  display: none;
}
.post-header.post-header-with-thumbnail .post-header-text-container .post-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: .3px;
}
.post-header.post-header-with-thumbnail .post-header-text-container .post-title {
  font-size: 24px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: .2px;
  display: block;
  margin-bottom: 8px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.post-header.post-header-with-thumbnail .post-header-text-container .post-meta {
  font-size: 12.5px;
  opacity: .94;
  letter-spacing: .2px;
}

/* ===== 摘要 ===== */
.article-list-home .post-content,
.article-list .post-content {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-list-home .post-content p,
.article-list .post-content p { margin-bottom: 0; }

/* ===== 无封面时的标题 ===== */
.article-list-home .post-header:not(.post-header-with-thumbnail) .post-title {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: .2px;
  line-height: 1.5;
}

/* ===== 分页 ===== */
.article-list-home .pagination,
.article-list .pagination { margin-top: 8px; }

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  .post-header.post-header-with-thumbnail {
    height: 172px;
    margin: -20px -20px 18px -20px;
  }
  .post-header.post-header-with-thumbnail .post-header-text-container {
    padding: 0 18px 14px 18px;
  }
  .post-header.post-header-with-thumbnail .post-header-text-container .post-title {
    font-size: 18px;
    margin-bottom: 6px;
  }
  .article-list-home .post-content,
  .article-list .post-content { font-size: 14px; }
}



/* 白底顶栏：图标改成深色，否则白色图标看不见 */
#navbar-main .fa,
#navbar-main .nav-link,
#navbar-main .navbar-toggler,
#navbar-main .navbar-toggler-icon {
  color: #1f2937 !important;
}