/* ============================================================
   CMS 前台全局样式  style.css
   ============================================================ */

/* ── CSS 变量 ─────────────────────────────────────────────── */
:root {
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --secondary:    #7c3aed;
  --success:      #16a34a;
  --warning:      #d97706;
  --danger:       #dc2626;
  --text-base:    #1e293b;
  --text-muted:   #64748b;
  --bg-light:     #f8fafc;
  --border:       #e2e8f0;
  --radius:       12px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.14);
  --transition:   .2s ease;
}

/* ── 基础 ──────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
  padding-top: 72px;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-base);
  background: #fff;
  line-height: 1.7;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* 导航栏样式以 includes/header.php 内联为准，此处不写避免覆盖毛玻璃与高度 */

/* ── 区块标题 ──────────────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-base);
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

/* ── 轮播图（旧版简易轮播；首页 JDCloud 轮播以 header 内联为准）──────── */
.hero-carousel { position: relative; }
/* 仅旧版 caption（无 .hero-caption）使用半透明底，避免盖住首页左下角透明文案 */
.hero-carousel .carousel-caption:not(.hero-caption) {
  bottom: 60px;
  background: rgba(0,0,0,.35);
  border-radius: 12px;
  padding: 20px 28px;
  backdrop-filter: blur(4px);
  max-width: 600px;
  margin: 0 auto;
  left: 0; right: 0;
}
.hero-carousel .carousel-caption:not(.hero-caption) h5 { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
.hero-carousel .carousel-caption:not(.hero-caption) p  { margin: 0; font-size: 1rem; opacity: .9; }
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon { filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
/* 占位背景（无图时） */
.carousel-no-img {
  height: 480px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem; font-weight: 700;
}

/* ── 新闻卡片 ──────────────────────────────────────────────── */
.news-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  background: #fff;
  overflow: hidden;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.news-card .card-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 12px 18px;
  font-size: .95rem;
}
.news-card .card-header i { margin-right: 8px; opacity: .9; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition);
}
.news-list li:last-child { border: none; }
.news-list li:hover { background: #f8fafc; }
.news-list li a {
  color: var(--text-base);
  font-size: .9rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}
.news-list li a:hover { color: var(--primary); }
.news-list .date { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

/* ── 人物卡片 ──────────────────────────────────────────────── */
.people-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
  padding: 28px 20px 20px;
  background: #fff;
}
.people-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.people-card .avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e0e7ff;
  box-shadow: 0 4px 12px rgba(37,99,235,.15);
  margin-bottom: 14px;
}
.people-card .avatar-placeholder {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 2.2rem; color: #fff; font-weight: 700;
}
.people-card h6 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.people-card .role { font-size: .82rem; color: var(--primary); margin-bottom: 6px; font-weight: 500; }
.people-card .brief { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }
.people-filter-tabs .nav-link {
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}
.people-filter-tabs .nav-link.active {
  color: #111111;
  background: rgba(148, 163, 184, .22);
  border-color: rgba(148, 163, 184, .55);
}
.people-filter-tabs.nav-pills .nav-link.active,
.people-filter-tabs.nav-pills .show > .nav-link {
  color: #111111 !important;
  background: rgba(148, 163, 184, .22) !important;
  border-color: rgba(148, 163, 184, .55) !important;
  text-shadow: none;
}

/* ── 综合模块 ──────────────────────────────────────────────── */
.composite-module-head {
  padding-bottom: 6px;
  border-bottom: 1px solid #eef2f7;
}
.composite-row {
 display: grid;
 grid-template-columns: repeat(5, minmax(0, 1fr));
 gap: 12px;
}
.composite-col {
 min-width: 0;
}
.composite-card {
 border-radius: 14px;
 border: 1px solid #dbe3ef;
 box-shadow: 0 2px 10px rgba(15, 23, 42, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  background: #fff;
  overflow: hidden;
  position: relative;
}
.composite-card:hover {
 transform: translateY(-2px);
  border-color: #d1d5db;
 box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.composite-thumb {
  width: 100%;
 height: 136px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #e5e7eb;
  background: #e5e7eb;
}
.composite-thumb-empty {
  background: #dfe3e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b6168;
  font-size: 2rem;
}
.composite-corner-text {
  position: absolute;
 top: 10px;
 right: 10px;
  z-index: 2;
 font-size: .68rem;
  line-height: 1;
 padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: none;
}
.composite-card .card-body {
 padding: 10px 10px 9px;
}
.composite-item-title {
 font-size: .9rem;
  font-weight: 700;
 line-height: 1.35;
  color: #111827;
 margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.composite-item-desc {
 font-size: .76rem;
 color: #6b7280;
 line-height: 1.45;
 margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.composite-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.composite-item-date {
  display: inline-flex;
  align-items: center;
 gap: 4px;
 color: #6b7280;
 font-size: .68rem;
  letter-spacing: .2px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: none;
}
.composite-item-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
 height: 22px;
 padding: 0 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
 font-size: .66rem;
 font-weight: 600;
}
.composite-view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d4dbe7;
  color: #475569;
  background: #fff;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}
.composite-view-all:hover {
  color: #1d4ed8;
  border-color: #bfd7ff;
  background: #f4f8ff;
}
@media (max-width: 768px) {
 .composite-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
 .composite-thumb { height: 120px; }
 .composite-card .card-body { padding: 9px 9px 8px; }
}
@media (max-width: 576px) {
 .composite-row { grid-template-columns: 1fr; }
}
.composite-card .card-top {
  padding: 20px 20px 14px;
  display: flex; align-items: center; gap: 14px;
}
.composite-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  flex-shrink: 0;
}
.composite-card h6 { font-weight: 700; margin-bottom: 2px; font-size: .95rem; }
.composite-card .type-badge {
  font-size: .72rem; padding: 2px 8px;
  border-radius: 20px; font-weight: 500;
}
.composite-items { border-top: 1px solid #f1f5f9; }
.composite-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid #f8fafc;
  font-size: .87rem;
  transition: background var(--transition);
}
.composite-item:last-child { border: none; }
.composite-item:hover { background: #f8fafc; }
.composite-item i { width: 16px; text-align: center; color: var(--text-muted); }
.composite-item a { color: var(--text-base); flex: 1; }
.composite-item a:hover { color: var(--primary); }

/* ── 时间轴（大事记）──────────────────────────────────────── */
.timeline-year-anchor { padding-top: 20px; }
.year-nav { position: sticky; top: 80px; }
.year-nav a {
  display: block; padding: 6px 12px;
  border-radius: 8px; font-size: .88rem;
  color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: 4px;
}
.year-nav a:hover,
.year-nav a.active {
  background: #eff6ff; color: var(--primary); font-weight: 600;
}
.timeline {
  position: relative;
  padding-left: 36px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--border));
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot {
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px #dbeafe;
}
.timeline-dot.important {
  background: var(--warning);
  box-shadow: 0 0 0 3px #fef3c7;
}
.timeline-dot.milestone {
  width: 20px; height: 20px;
  left: -31px; top: 4px;
  background: var(--danger);
  box-shadow: 0 0 0 4px #fee2e2;
}
.timeline-date {
  font-size: .8rem; color: var(--text-muted);
  margin-bottom: 4px; font-weight: 500;
}
.timeline-title {
  font-size: 1rem; font-weight: 600; margin-bottom: 6px;
}
.timeline-title .badge { font-size: .72rem; vertical-align: middle; margin-left: 6px; }
.timeline-desc { font-size: .87rem; color: var(--text-muted); line-height: 1.6; }
.timeline-img {
  margin-top: 10px;
  border-radius: 8px;
  max-height: 200px;
  object-fit: cover;
}


/* ── 文件下载 ──────────────────────────────────────────────── */
.file-cat-tree { list-style: none; padding: 0; margin: 0; }
.file-cat-tree li a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-base);
  font-size: .9rem;
  transition: all var(--transition);
}
.file-cat-tree li a:hover,
.file-cat-tree li a.active {
  background: #eff6ff; color: var(--primary); font-weight: 600;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--bg-light);
  margin-bottom: 8px;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.file-item:hover { background: #eff6ff; border-color: #bfdbfe; }
.file-icon { font-size: 1.6rem; width: 36px; text-align: center; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-info .file-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info .file-meta { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.file-dl-btn { white-space: nowrap; }

/* ── 关于页面 ──────────────────────────────────────────────── */
.about-tabs .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  border-radius: 8px 8px 0 0;
  padding: 10px 20px;
}
.about-tabs .nav-link.active {
  color: var(--primary);
  background: #fff;
  border-bottom-color: #fff;
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 52px 0 24px;
  margin-top: 60px;
}
footer .footer-logo {
  font-size: 1.1rem; font-weight: 700;
  color: #fff; margin-bottom: 10px;
}
footer .footer-desc { font-size: .85rem; color: #94a3b8; line-height: 1.7; }
footer .footer-title { font-size: .9rem; font-weight: 600; color: #e2e8f0; margin-bottom: 14px; }
footer .qr-item { text-align: center; }
footer .qr-item img {
  width: 88px; height: 88px;
  border-radius: 8px; background: #fff; padding: 4px;
  object-fit: contain;
}
footer .qr-item p { font-size: .78rem; margin-top: 6px; color: #94a3b8; margin-bottom: 0; }
footer hr { border-color: #334155; margin: 28px 0 18px; }
footer .footer-bottom { font-size: .82rem; color: #64748b; }
footer .footer-bottom a { color: #94a3b8; }
footer .footer-bottom a:hover { color: #e2e8f0; }
.icp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; color: #94a3b8;
}
.icp-badge img { height: 16px; }

/* ── 返回顶部 ──────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  right: 28px; bottom: 32px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(37,99,235,.4);
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
#back-to-top.show { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: translateY(-3px); }

/* ── 用户反馈 Modal ────────────────────────────────────────── */
#feedbackModal .modal-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 12px 12px 0 0;
}
#feedbackModal .modal-header .btn-close { filter: brightness(0) invert(1); }
.captcha-img { cursor: pointer; border-radius: 6px; height: 38px; border: 1px solid var(--border); }

/* ── 新闻详情 ──────────────────────────────────────────────── */
.news-detail-content img { max-width: 100%; border-radius: 8px; margin: 10px 0; }
.news-detail-content p  { line-height: 1.9; margin-bottom: 1.2em; }
.news-detail-content h2,.news-detail-content h3 { margin-top: 1.8em; }

/* ── 响应式 ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-carousel .carousel-item,
  .hero-carousel .carousel-item img,
  .carousel-no-img { height: 240px; }
  .hero-carousel .carousel-caption:not(.hero-caption) { bottom: 20px; padding: 12px 16px; }
  .hero-carousel .carousel-caption:not(.hero-caption) h5 { font-size: 1.1rem; }
  .section-title { font-size: 1.2rem; }
  .year-nav { display: none; }
  footer { padding: 36px 0 18px; }
}
@media (max-width: 576px) {
  body { padding-top: 60px; }
  .file-item { flex-wrap: wrap; }
  .file-dl-btn { width: 100%; }
}

/* 综合 / 模块详情：覆盖 Bootstrap .card 与历史内联样式，保证布局与缩略图高度必生效 */
body.composite-page .composite-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
body.composite-page .composite-col {
  min-width: 0;
}
body.composite-page .composite-card.card {
  border: 1px solid #c5d0e0 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.09) !important;
  background: #fff !important;
}
body.composite-page .composite-thumb,
body.composite-page .composite-thumb.composite-thumb-empty {
  height: 118px !important;
  min-height: 118px;
  max-height: 118px;
}
body.composite-page .composite-card .card-body {
  padding: 8px 10px 8px !important;
}
@media (max-width: 768px) {
  body.composite-page .composite-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
@media (max-width: 576px) {
  body.composite-page .composite-row {
    grid-template-columns: 1fr;
  }
}
