/* ==========================================================================
   屯留一中817班 · 自定义样式覆盖
   在 Fluid 主题之后加载，用于修正细节与个性化
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 文章页大标题的打字机光标残留
   Fluid 在文章页标题上也套用了打字机效果，导致标题后残留一个闪烁的下划线
   光标。文章标题是静态文本，这里直接隐藏该光标。
   -------------------------------------------------------------------------- */
#banner .banner-text .h1 .typed-cursor,
#banner .banner-text .h2 .typed-cursor,
.banner-text .typed-cursor {
  display: none !important;
}

/* 保证标题在光标隐藏后依然居中 */
#banner .banner-text .h1,
#banner .banner-text .h2 {
  display: inline-block;
}

/* --------------------------------------------------------------------------
   2. 页脚排版优化
   页脚有多行版权与许可说明，改善换行与可读性
   -------------------------------------------------------------------------- */
footer .footer-content .footer-line {
  margin: 0.35em 0;
  line-height: 1.75;
}

/* 版权行略作强调 */
footer .footer-content .footer-copyright {
  font-weight: 500;
}

/* 页脚链接悬停下划线 */
footer .footer-content a {
  text-decoration: none;
  transition: opacity 0.2s ease;
}

footer .footer-content a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   2b. 页脚品牌标志（Cloudflare / SpanNova Studio）
   标志与文字在同一行内垂直居中对齐，悬停时不下划线（避免图标被划线穿过）
   -------------------------------------------------------------------------- */
footer .footer-content .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  vertical-align: middle;
  text-decoration: none !important;
}

footer .footer-content .footer-logo {
  flex: 0 0 auto;
  width: auto;
  color: var(--footer-logo-color, currentColor);
  /* 与相邻文字视觉重量对齐 */
  height: 1.35em;
  vertical-align: middle;
}

/* 位图 logo（SpanNova）需要略高一些才与文字基线协调 */
footer .footer-content .footer-logo-img {
  height: 2.2em;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

footer .footer-content .footer-brand:hover .footer-logo-img {
  opacity: 1;
}

footer .footer-content .footer-brand:hover span {
  text-decoration: underline;
}

footer .footer-content .footer-sep {
  margin: 0 0.4em;
  opacity: 0.5;
}

/* 赞助行（SpanNova Studio）单独一行，稍作强调 */
footer .footer-content .footer-sponsor {
  margin-top: 0.6em;
}

footer .footer-content .footer-sponsor .footer-brand span {
  font-weight: 500;
}

/* 移动端页脚字号与行距 */
@media (max-width: 768px) {
  footer .footer-content .footer-line {
    font-size: 0.85rem;
    line-height: 1.7;
    margin: 0.3em 0;
  }
}

/* --------------------------------------------------------------------------
   3. 长链接与长英文串换行
   页脚的 CC 协议链接与英文全称较长，避免在小屏上撑破容器
   -------------------------------------------------------------------------- */
footer .footer-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   4. 中文排版微调
   正文段落两端对齐在中英混排时容易产生过大字距，这里保持左对齐
   并适度增加行高，提升长文阅读舒适度
   -------------------------------------------------------------------------- */
.markdown-body p {
  line-height: 1.85;
}

/* 表格在窄屏上可横向滚动，避免撑破页面 */
.markdown-body table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   5. 移动端正文与导航微调
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .markdown-body {
    font-size: 15px;
    line-height: 1.8;
  }

  /* 首页文章卡片留白收紧，提升首屏信息量 */
  #board .board-item {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
