/* 保持导航栏背景/线宽为 100% */
#nav {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

/* 鼠标向上滚动时，显示网站主标题/Logo，隐藏文章标题 */
#page-header.nav-fixed #nav #blog-info > a:first-child {
  display: inline-block !important;
}

#page-header.nav-fixed #nav #blog-info > a:last-child {
  display: none !important;
}

/* 博客标题和 logo 对齐正文左侧边界 */
#nav #blog-info {
  flex: none !important;
  margin-left: max(15px, calc((100% - 1200px) / 2)) !important;
  margin-right: 30px !important;
}

/* 让菜单容器占满剩下的空间，并对齐正文右侧边界 */
#nav #menus {
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;
  justify-content: flex-start !important;
  margin-right: max(15px, calc((100% - 1200px) / 2)) !important;
}

/* 适配大屏幕（>2000px）时的正文 60% 宽度对齐 */
@media screen and (min-width: 2000px) {
  #nav #blog-info {
    margin-left: max(15px, calc((100% - 60%) / 2)) !important;
  }

  #nav #menus {
    margin-right: max(15px, calc((100% - 60%) / 2)) !important;
  }
}

/* 将菜单选项移动到最左侧（紧跟标题/logo） */
#nav #menus .menus_items {
  order: 1 !important;
}

/* 将搜索按钮推到最右侧 */
#nav #menus #search-button {
  order: 2 !important;
  margin-left: auto !important;
}

/* 将移动端折叠菜单按钮也推到最右侧 */
#nav #menus #toggle-menu {
  order: 3 !important;
}

/* 标签页：参考 mingnify 的紧凑标签卡片 */
.page.type-tags #page .tag-cloud-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
}

.page.type-tags #page .tag-cloud-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  background: #f8fafc !important;
  color: #3b4351 !important;
  font-size: 15px !important;
  font-weight: 500;
  line-height: 1;
  box-shadow: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease;
}

.page.type-tags #page .tag-cloud-list a:hover {
  background: #f1f5f9 !important;
  border-color: var(--default-bg-color) !important;
  color: var(--default-bg-color) !important;
  transform: translateY(-1px);
}

.page.type-tags #page .tag-cloud-list .tag-chip__name,
.page.type-tags #page .tag-cloud-list .tag-chip__count {
  display: inline-block;
  white-space: nowrap;
}

.page.type-tags #page .tag-cloud-list .tag-chip__count {
  color: #5f6b7a;
  font-size: 0.95em;
  font-weight: 500;
}

.page.type-tags #page .tag-cloud-list a .tag-chip__name {
  color: #3b4351 !important;
}

.page.type-tags #page .tag-cloud-list a:hover .tag-chip__name {
  color: var(--default-bg-color) !important;
}

.page.type-tags #page .tag-cloud-list a:hover .tag-chip__count {
  color: var(--default-bg-color) !important;
  opacity: 0.8;
}



@media screen and (max-width: 768px) {
  .page.type-tags #page .tag-cloud-list {
    gap: 10px;
  }

  .page.type-tags #page .tag-cloud-list a {
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px !important;
  }
}

/* 首页文章列表：参考 Mingnify 的紧凑横向缩略图 */
.recent-posts .recent-post-items > .recent-post-item {
  min-height: 170px !important; /* 最小高度 170px，内容多时自动向下撑开 */
  height: auto !important;
  align-items: center !important;
  border-radius: 16px !important; /* 卡片整体圆角 */
  border: 1px solid #e5e9f0 !important; /* 精致浅色边框，清晰分界 */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important; /* 柔和投影 */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  padding: 0 !important;
}

.recent-posts .recent-post-items > .recent-post-item:hover {
  border-color: #cbd5e1 !important; /* 悬浮时边框稍微加深 */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important; /* 悬浮时投影加重 */
  transform: translateY(-2px) !important;
}

/* 缩略图容器：四周加 15px 留白，产生悬浮内嵌效果 */
.recent-posts .recent-post-items > .recent-post-item .post_cover {
  width: 250px !important;
  min-width: 250px !important;
  height: 140px !important;
  margin: 15px !important; /* 增加四周留白 */
  border-radius: 12px !important; /* 强制所有角为圆角 */
  border-top-left-radius: 12px !important;
  border-bottom-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
  border-bottom-right-radius: 12px !important;
  overflow: hidden !important;
}

/* 缩略图图片 */
.recent-posts .recent-post-items > .recent-post-item .post_cover img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 12px !important;
  object-fit: cover !important;
}

/* 右侧文本信息容器：对称填充 */
.recent-posts .recent-post-items > .recent-post-item .recent-post-info {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  height: auto !important; /* 自适应高度 */
  padding: 15px 20px !important;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .recent-posts .recent-post-items > .recent-post-item {
    height: auto !important;
    padding: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .recent-posts .recent-post-items > .recent-post-item .post_cover {
    width: calc(100% - 30px) !important;
    min-width: 0 !important;
    height: 160px !important;
    margin: 15px 15px 0 !important;
  }

  .recent-posts .recent-post-items > .recent-post-item .recent-post-info {
    height: auto !important;
    padding: 15px !important;
  }
}

/* =================================================================
   页脚样式弱化 (全部文字、子元素与链接统一为黑色)
   ================================================================= */
#footer,
#footer * {
  color: #1c1c1c !important; /* 强制页脚内所有标签和文字为黑色 */
}

#footer {
  background: transparent !important;
  font-size: 13px !important;
}

#footer a {
  text-decoration: none !important;
  border-bottom: none !important;
  transition: all 0.2s ease !important;
  opacity: 0.8 !important;
}

#footer a:hover {
  color: #000000 !important;
  opacity: 1 !important;
}

#footer .footer-separator {
  margin: 0 8px !important;
  opacity: 0.5 !important;
}
