/*
 * jingdianmovie – GeneratePress 子主题
 * global.css：全站通用样式（清理重复 + 修复：站名菜单不显示、内容不居中、链接发虚看不清、导航色块、首页文案居中、页脚导航换行、相关推荐标题/布局）
 */

:root {
  --jd-bg: #f5f5f5;
  --jd-surface: #ffffff;
  --jd-header-bg: #212d3b;
  --jd-nav-bg: #28354a;
  --jd-brand: #ffd700;
  --jd-text-main: #222222;
  --jd-text-muted: #5b6475;
  --jd-border-soft: #e2e6f0;
  --jd-radius-lg: 18px;
  --jd-shadow-soft: 0 15px 30px rgba(15, 23, 42, 0.08);
}

/* ========= 基础 ========= */

html, body { height: 100%; }

body {
  background: var(--jd-bg);
  color: var(--jd-text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 通用宽度容器（首页模板/全站复用） */
.cv-auto,
.jd-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ========= 头部 & 导航（GeneratePress） ========= */

.site-header {
  background: var(--jd-header-bg);
  border-bottom: 1px solid rgba(15, 23, 42, 0.6);
}

.inside-header {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 站名可见 */
.site-header .site-title,
.site-header .main-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.site-header .site-title a,
.site-header .main-title a {
  color: #ffffff !important;
  text-decoration: none;
}

/* 描述隐藏 */
.site-branding .site-description { display: none; }

/* 主导航链接（颜色/加粗） */
.main-navigation .main-nav > ul > li > a,
.main-navigation .menu-bar-item > a {
  color: var(--jd-brand) !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.main-navigation .main-nav > ul > li > a:hover,
.main-navigation .main-nav > ul > li.current-menu-item > a,
.main-navigation .main-nav > ul > li.current-menu-ancestor > a {
  color: #ffffff !important;
}

/* 移动端菜单按钮 */
.main-navigation .menu-toggle {
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.7);
  color: var(--jd-brand) !important;
}

/* ========= FIX：导航中间“色块/盒子感” ========= */
/* 目标：背景只属于整条 nav；inside-navigation 不当盒子（取消 max-width + 透明） */

.main-navigation { background: var(--jd-nav-bg) !important; }

.main-navigation .inside-navigation,
.main-navigation .inside-navigation.grid-container {
  background: transparent !important;
  box-shadow: none !important;
  max-width: none !important; /* 关键：去掉中间盒子宽度 */
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.main-navigation .main-nav {
  max-width: 1160px !important;
  margin: 0 auto !important;
  padding: 0 18px !important;
}

.main-navigation .inside-navigation::before,
.main-navigation .inside-navigation::after {
  background: transparent !important;
  box-shadow: none !important;
}

/* ========= 首页模板灰色块兜底修复（top-bar 类名撞车） ========= */
body.home header .top-bar { background: var(--jd-header-bg) !important; }

/* ========= 首页：隐藏长标题 + 文案居中 ========= */
body.home .intro-wrap h2 { display: none !important; }

body.home .intro-wrap .intro-text { text-align: center !important; }

body.home .intro-wrap .intro-text p {
  max-width: 980px;
  margin: 0 auto !important;
  line-height: 1.8;
}

/* ========= 文章/栏目/归档：布局居中修复 ========= */
body.single .site-content,
body.page .site-content,
body.category .site-content,
body.archive .site-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 18px;
}

body.single .content-area,
body.page .content-area,
body.category .content-area,
body.archive .content-area {
  float: none !important;
  width: 100% !important;
  margin: 0 auto !important;
}

.single .page-header,
.page .page-header,
.archive .page-header {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
  margin: 1.5rem auto 0;
}

.single .entry-title,
.page .entry-title,
.archive .page-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.4;
  color: #1a1a1a;
  margin: 0 0 16px 0;
}

.separate-containers .inside-article {
  background: var(--jd-surface);
  border-radius: var(--jd-radius-lg);
  box-shadow: var(--jd-shadow-soft);
  padding: 32px 28px 36px;
}

.single .entry-content,
.page .entry-content {
  font-size: 17px;
  line-height: 1.9;
  color: var(--jd-text-main);
}

.single .entry-content p,
.page .entry-content p { margin: 0 0 1.3em; }

.single .entry-content h2,
.page .entry-content h2 {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a1a;
  margin-top: 2em;
  margin-bottom: 0.8em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #f0f0f0;
  position: relative;
}

.single .entry-content h2::before,
.page .entry-content h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #ffd700, #ff9f1a);
}

.single .entry-content h3,
.page .entry-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

/* 正文链接：用更稳的蓝，hover 再变金（避免黄色发虚） */
.separate-containers .inside-article a,
.jd-copyright a,
.jd-related-block a {
  color: #1a4d9b;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.separate-containers .inside-article a:hover,
.jd-copyright a:hover,
.jd-related-block a:hover {
  color: var(--jd-brand);
}

.single .entry-content img,
.page .entry-content img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 1.5em auto;
}

/* ========= 面包屑 ========= */
.jd-breadcrumb {
  max-width: 860px;
  margin: 1.1rem auto 0.5rem;
  padding: 0 18px;
  font-size: 13px;
  color: var(--jd-text-muted);
}

.jd-breadcrumb a {
  color: #1a4d9b;
  text-decoration: none;
}
.jd-breadcrumb a:hover {
  color: var(--jd-brand);
  text-decoration: underline;
}

/* ========= 版权声明 ========= */
.jd-copyright {
  margin: 32px 0 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fffbf0 0%, #fff9e6 100%);
  border: 1px solid #ffe8a3;
  border-left: 4px solid var(--jd-brand);
  border-radius: 10px;
  color: #555;
  line-height: 1.8;
  font-size: 14px;
}

.jd-copyright strong {
  color: #1a1a1a;
  font-weight: 800;
}

/* ========= 通用区块标题（首页/专题/排行等） ========= */
.section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 28px 0 20px;
  color: #1a1a1a;
  position: relative;
  padding-left: 12px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #ffd700, #ff9f1a);
  border-radius: 2px;
}

.section-title a {
  color: inherit;
  text-decoration: none;
}
.section-title a:hover { color: var(--jd-brand); }

/* ========= 相关推荐 ========= */
.jd-related-block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #f0f0f0;
}

/* ✅相关推荐标题缩小，和首页卡片区更协调 */
.jd-related-block .section-title {
  font-size: 20px !important;
  margin: 20px 0 16px !important;
}
.jd-related-block .section-title::before { height: 18px !important; }

/* 默认：电脑端 3 列（配合 functions.php 的 3 篇） */
.jd-related-block .film-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ========= 页脚 ========= */
.footer-wrap {
  border-top: 1px solid var(--jd-border-soft);
  background: #ffffff;
  padding: 32px 0 24px;
}

.footer-wrap-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

.footer-links {
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.footer-links strong {
  color: #1a1a1a;
  margin-right: 12px;
}

.footer-links a {
  margin: 0 10px;
  color: #1a4d9b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--jd-brand);
  text-decoration: underline;
}

.footer-copy {
  font-size: 13px;
  color: var(--jd-text-muted);
  text-align: center;
  line-height: 1.6;
}

/* ========= 响应式 ========= */
@media (max-width: 768px) {
  .inside-header { flex-wrap: wrap; }

  .separate-containers .inside-article { padding: 24px 20px 28px; }

  .single .entry-title,
  .page .entry-title,
  .archive .page-title { font-size: 26px; }

  /* ✅手机端相关推荐：2列（配合 4 篇=2x2） */
  .jd-related-block .film-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* ✅手机端页脚快速导航：两行换行，不要一行一个 */
  .footer-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px 14px !important;
    text-align: center !important;
  }
  .footer-links strong {
    width: 100% !important;
    margin: 0 0 6px 0 !important;
  }
  .footer-links a {
    margin: 0 !important;
    white-space: nowrap;
  }
}
