/* ========================================
   记住历史 - 全站共享样式表
   域名: jizhulishi.com
   ======================================== */

/* ===== CSS 变量 ===== */
:root {
  --primary: #8B1A1A;
  --primary-light: #C0392B;
  --primary-dark: #5C1010;
  --accent: #C9A961;
  --accent-light: #E8D5A0;
  --accent-dark: #A08440;
  --bg-dark: #1a1410;
  --bg-light: #FAF7F2;
  --bg-paper: #FFFCF7;
  --text-dark: #2C1810;
  --text-body: #3D2B1F;
  --text-light: #F5F0E8;
  --text-muted: #8B7E6E;
  --text-secondary: #6B5D4F;
  --border: #E0D5C5;
  --border-light: #EDE5D8;
  --card-bg: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-height: 64px;
}

/* ===== 重置 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-light);
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ===== 通用工具类 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* ===== 首页 (index.html) ===== */
.homepage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.homepage::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(139, 26, 26, 0.25), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(201, 169, 97, 0.18), transparent 55%),
    linear-gradient(135deg, #1a1410 0%, #2C1810 40%, #1a1410 100%);
  z-index: -2;
}

.homepage::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0 0.30 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: -1;
  opacity: 0.5;
}

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Logo */
.home-logo {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeInDown 0.8s ease;
}

.home-logo .logo-text {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #F0E0B0 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 30px rgba(201, 169, 97, 0.3);
  margin-bottom: 12px;
}

.home-logo .logo-subtitle {
  font-size: 16px;
  color: rgba(245, 240, 232, 0.55);
  letter-spacing: 6px;
  font-weight: 300;
}

/* 搜索框 */
.search-wrapper {
  width: 100%;
  max-width: 640px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(201, 169, 97, 0.2);
  transition: box-shadow var(--transition), transform var(--transition);
}

.search-box:focus-within {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 0 2px var(--accent);
  transform: translateY(-2px);
}

.search-box .search-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 17px;
  color: var(--text-dark);
  padding: 12px 16px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box .search-btn {
  flex-shrink: 0;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  font-family: inherit;
  letter-spacing: 2px;
}

.search-box .search-btn:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.search-box .search-btn:active {
  transform: scale(0.98);
}

/* 热门搜索 */
.hot-search {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.hot-search .hot-label {
  font-size: 14px;
  color: rgba(245, 240, 232, 0.4);
  letter-spacing: 1px;
}

.hot-search a {
  font-size: 14px;
  color: rgba(245, 240, 232, 0.7);
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(201, 169, 97, 0.15);
  transition: all var(--transition);
}

.hot-search a:hover {
  color: var(--accent-light);
  background: rgba(201, 169, 97, 0.15);
  border-color: var(--accent);
}

/* 首页快捷按钮 */
.home-buttons {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.home-btn {
  font-size: 15px;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  letter-spacing: 1px;
  font-family: inherit;
}

.home-btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: 1px solid rgba(201, 169, 97, 0.3);
  font-weight: 500;
}

.home-btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 26, 26, 0.4);
}

.home-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 240, 232, 0.7);
  border: 1px solid rgba(201, 169, 97, 0.2);
}

.home-btn-secondary:hover {
  color: var(--accent-light);
  background: rgba(201, 169, 97, 0.12);
  border-color: var(--accent);
}

/* 首页底部入口 */
.home-nav-links {
  margin-top: 60px;
  display: flex;
  gap: 24px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.home-nav-links a {
  color: rgba(245, 240, 232, 0.6);
  font-size: 15px;
  padding: 8px 24px;
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  letter-spacing: 1px;
}

.home-nav-links a:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: rgba(201, 169, 97, 0.1);
}

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
  color: rgba(245, 240, 232, 0.4);
  line-height: 1.8;
}

.footer a {
  color: rgba(245, 240, 232, 0.55);
}

.footer a:hover {
  color: var(--accent-light);
}

.footer .footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 8px;
}

/* 内页footer */
.footer-inner {
  background: var(--bg-dark);
  text-align: center;
  padding: 28px 20px;
  font-size: 13px;
  color: rgba(245, 240, 232, 0.4);
  line-height: 1.8;
  margin-top: 60px;
}

.footer-inner a {
  color: rgba(245, 240, 232, 0.55);
}

.footer-inner .footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 8px;
}

/* 首页footer：背景透明，与页面中部一致 */
.homepage .footer-inner {
  background: transparent;
  margin-top: 0;
}

/* ===== 导航栏 (内页) ===== */
.navbar {
  background: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  white-space: nowrap;
}

.navbar-brand .brand-accent {
  color: var(--accent-dark);
}

.nav-menu {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-menu a {
  color: var(--text-body);
  font-size: 15px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: rgba(139, 26, 26, 0.06);
}

/* 导航栏搜索 (内页) */
.nav-search {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 16px;
  transition: border-color var(--transition);
}

.nav-search:focus-within {
  border-color: var(--accent);
}

.nav-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  width: 200px;
  padding: 6px 8px;
  font-family: inherit;
  color: var(--text-dark);
}

.nav-search button {
  border: none;
  background: var(--primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.nav-search button:hover {
  background: var(--primary-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== 搜索结果页 (search.html) ===== */
.search-page {
  min-height: 100vh;
  background: var(--bg-light);
}

.search-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #6B1818 100%);
  padding: 40px 0;
  border-bottom: none;
}

.search-form-box {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}

.search-form-box input {
  flex: 1;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-size: 16px;
  color: var(--text-dark);
  font-family: inherit;
}

.search-form-box input::placeholder {
  color: var(--text-muted);
}

.search-submit-btn {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
  letter-spacing: 2px;
  border: 1px solid rgba(201, 169, 97, 0.3);
}

.search-submit-btn:hover {
  background: rgba(201, 169, 97, 0.25);
}

.search-results {
  padding: 30px 0;
}

.search-info {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.search-info strong {
  color: var(--primary);
}

.result-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border-light);
}

.result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.result-card .result-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.result-card .result-title a {
  color: var(--primary);
}

.result-card .result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.result-card .result-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.result-card .result-snippet {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.result-card .result-snippet mark {
  background: rgba(201, 169, 97, 0.3);
  color: var(--primary-dark);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.result-card .result-tags {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text-body);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== 历史列表页 (newslist.html) ===== */
.list-page {
  min-height: 100vh;
  background: var(--bg-light);
}

.list-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #6B1818 100%);
  padding: 50px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.list-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.9 0 0 0 0 0.7 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.list-banner h1 {
  font-size: 36px;
  color: #fff;
  letter-spacing: 6px;
  position: relative;
  margin-bottom: 10px;
}

.list-banner p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  letter-spacing: 2px;
  position: relative;
}

/* 筛选栏 */
.filter-bar {
  background: #fff;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-height);
  z-index: 50;
}

.filter-bar .container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  font-size: 14px;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-light);
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  font-family: inherit;
}

.filter-tag:hover {
  background: rgba(139, 26, 26, 0.06);
  color: var(--primary);
}

.filter-tag.active {
  background: var(--primary);
  color: #fff;
}

/* 列表网格 */
.news-grid {
  padding: 30px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.news-card .card-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 24px 24px 20px;
  position: relative;
}

.news-card .card-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.news-card .card-date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.news-card .card-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.news-card .card-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card .card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-card .card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.news-card .card-link {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  transition: gap var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-card .card-link:hover {
  gap: 8px;
}

/* 标签 */
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.tag-era {
  background: rgba(139, 26, 26, 0.08);
  color: var(--primary);
}

.tag-location {
  background: rgba(201, 169, 97, 0.12);
  color: var(--accent-dark);
}

.tag-category {
  background: rgba(60, 100, 60, 0.08);
  color: #4A7C4A;
}

.tag-people {
  background: rgba(70, 80, 160, 0.08);
  color: #4A549E;
}

/* ===== 详情页 (news.html) ===== */
.detail-page {
  min-height: 100vh;
  background: var(--bg-paper);
}

.detail-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #6B1818 100%);
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.9 0 0 0 0 0.7 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.detail-hero .container {
  position: relative;
}

.detail-hero .breadcrumb {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}

.detail-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.detail-hero .breadcrumb a:hover {
  color: #fff;
}

.detail-hero h1 {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: 2px;
}

.detail-hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-hero .hero-meta .tag {
  font-size: 13px;
  padding: 5px 14px;
}

.detail-hero .hero-meta .tag-era {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.detail-hero .hero-meta .tag-location {
  background: rgba(201, 169, 97, 0.25);
  color: var(--accent-light);
}

.detail-hero .hero-meta .tag-category {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

/* 详情内容 */
.detail-content {
  padding: 40px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.detail-main {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.detail-section {
  margin-bottom: 36px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
}

.detail-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 20px 0 10px;
}

.detail-section p {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.9;
  margin-bottom: 14px;
  text-align: justify;
}

.detail-section blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-light);
  padding: 16px 24px;
  margin: 16px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
}

/* 信息卡片网格 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.info-item {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  border: 1px solid var(--border-light);
}

.info-item .info-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-item .info-value {
  font-size: 16px;
  color: var(--text-dark);
  font-weight: 500;
}

/* 相关人物 */
.people-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.person-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  min-width: 180px;
  flex: 1;
  max-width: 280px;
  transition: box-shadow var(--transition);
}

.person-card:hover {
  box-shadow: var(--shadow-sm);
}

.person-card .person-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.person-card .person-role {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.person-card .person-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 相关报道 */
.report-list {
  margin-top: 16px;
}

.report-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  transition: padding-left var(--transition);
}

.report-item:last-child {
  border-bottom: none;
}

.report-item:hover {
  padding-left: 8px;
}

.report-item .report-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-item .report-content {
  flex: 1;
}

.report-item .report-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.report-item .report-title a {
  color: inherit;
}

.report-item .report-title a:hover {
  color: var(--primary);
}

.report-item .report-source {
  font-size: 13px;
  color: var(--text-muted);
}

/* 侧边栏 */
.detail-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.sidebar-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.sidebar-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.sidebar-card .related-item {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  transition: padding-left var(--transition);
}

.sidebar-card .related-item:last-child {
  border-bottom: none;
}

.sidebar-card .related-item:hover {
  padding-left: 6px;
}

.sidebar-card .related-title {
  font-size: 15px;
  color: var(--text-body);
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.4;
}

.sidebar-card .related-item:hover .related-title {
  color: var(--primary);
}

.sidebar-card .related-date {
  font-size: 13px;
  color: var(--text-muted);
}

/* 上下篇导航 */
.prev-next-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.prev-next-nav a {
  flex: 1;
  padding: 16px 20px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  max-width: 48%;
}

.prev-next-nav a:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
}

.prev-next-nav .nav-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.prev-next-nav .nav-title {
  font-size: 15px;
  color: var(--text-dark);
  font-weight: 500;
}

.prev-next-nav .nav-next {
  text-align: right;
}

/* ===== 分页样式（匹配 PbootCMS {page:bar} 输出） ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 30px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 14px;
  text-decoration: none;
  transition: all var(--transition);
  background: #fff;
}

.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* PbootCMS 分页：当前页 */
.pagination .page-num-current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

/* PbootCMS 分页：状态信息（第X页/共Y页 共Z条） */
.pagination .page-status {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 6px;
}

/* PbootCMS 分页：首页/上一页/下一页/尾页 */
.pagination .page-index,
.pagination .page-pre,
.pagination .page-next,
.pagination .page-last {
  color: var(--primary);
  font-weight: 500;
}

/* ===== 内容正文样式 ===== */
.content-text {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-body);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.content-text p {
  margin-bottom: 16px;
  text-align: justify;
}

.content-text h1,
.content-text h2,
.content-text h3,
.content-text h4 {
  margin: 24px 0 12px;
  color: var(--text-dark);
  font-weight: 600;
}

.content-text h1 { font-size: 24px; }
.content-text h2 { font-size: 20px; }
.content-text h3 { font-size: 18px; }
.content-text h4 { font-size: 16px; }

.content-text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.content-text ul,
.content-text ol {
  margin: 12px 0 16px 24px;
}

.content-text ul { list-style: disc; }
.content-text ol { list-style: decimal; }

.content-text li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.content-text blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-light);
  padding: 12px 20px;
  margin: 16px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.content-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.content-text table th,
.content-text table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.content-text table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
}

.content-text a {
  color: var(--primary);
  text-decoration: underline;
}

.content-text a:hover {
  color: var(--primary-light);
}

.content-text strong,
.content-text b {
  font-weight: 600;
  color: var(--text-dark);
}

/* 标签列表 */
.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 上下篇占位 */
.prev-next-placeholder {
  flex: 1;
  max-width: 48%;
}

/* 搜索结果列表 */
.search-result-list {
  margin-bottom: 20px;
}

/* ===== 动画 ===== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== 响应式设计 ===== */

/* 平板 (<=1024px) */
@media (max-width: 1024px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .sidebar-card {
    margin-bottom: 0;
  }

  .home-logo .logo-text {
    font-size: 52px;
  }
}

/* 手机 (<=768px) */
@media (max-width: 768px) {
  /* 导航栏 */
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    width: 100%;
    padding: 12px 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-search input {
    width: 140px;
  }

  /* 首页 */
  .home-logo .logo-text {
    font-size: 42px;
    letter-spacing: 4px;
  }

  .home-logo .logo-subtitle {
    font-size: 14px;
    letter-spacing: 4px;
  }

  .search-box {
    flex-direction: row;
    padding: 4px 4px 4px 16px;
  }

  .search-box input {
    font-size: 15px;
    padding: 10px 8px;
  }

  .search-box .search-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .hot-search {
    gap: 8px;
  }

  .hot-search a {
    font-size: 13px;
    padding: 4px 12px;
  }

  .home-nav-links {
    gap: 12px;
  }

  .home-nav-links a {
    font-size: 14px;
    padding: 6px 16px;
  }

  .home-buttons {
    gap: 10px;
  }

  .home-btn {
    font-size: 14px;
    padding: 8px 20px;
  }

  /* 搜索结果页 */
  .search-header {
    padding: 30px 0;
  }

  .search-form-box {
    flex-direction: column;
    gap: 10px;
  }

  .search-form-box input {
    text-align: center;
    padding: 12px 20px;
  }

  .search-submit-btn {
    width: 100%;
    padding: 12px;
  }

  .search-header .nav-search input {
    width: 100%;
  }

  .result-card {
    padding: 18px 20px;
  }

  .result-card .result-title {
    font-size: 18px;
  }

  /* 列表页 */
  .list-banner {
    padding: 35px 0;
  }

  .list-banner h1 {
    font-size: 28px;
    letter-spacing: 4px;
  }

  .list-banner p {
    font-size: 14px;
  }

  .filter-bar {
    top: var(--header-height);
  }

  .filter-bar .container {
    gap: 8px;
  }

  .filter-tag {
    font-size: 13px;
    padding: 5px 14px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0;
  }

  /* 详情页 */
  .detail-hero {
    padding: 35px 0 30px;
  }

  .detail-hero h1 {
    font-size: 26px;
    letter-spacing: 1px;
  }

  .detail-main {
    padding: 24px 20px;
  }

  .detail-section h2 {
    font-size: 19px;
  }

  .detail-section p {
    font-size: 15px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .prev-next-nav {
    flex-direction: column;
  }

  .prev-next-nav a {
    max-width: 100%;
  }

  .prev-next-nav .nav-next {
    text-align: left;
  }
}

/* 小手机 (<=480px) */
@media (max-width: 480px) {
  .home-logo .logo-text {
    font-size: 34px;
    letter-spacing: 2px;
  }

  .home-logo .logo-subtitle {
    font-size: 12px;
    letter-spacing: 3px;
  }

  .search-box {
    flex-direction: column;
    border-radius: var(--radius-md);
    padding: 12px;
    gap: 10px;
  }

  .search-box .search-icon {
    display: none;
  }

  .search-box input {
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 12px 20px;
  }

  .search-box .search-btn {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-pill);
  }

  .footer .footer-links {
    flex-direction: column;
    gap: 6px;
  }

  .footer-inner .footer-links {
    flex-direction: column;
    gap: 6px;
  }

  .navbar-brand {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .nav-search input {
    width: 100px;
    font-size: 13px;
  }

  .detail-hero h1 {
    font-size: 22px;
  }

  .list-banner h1 {
    font-size: 24px;
  }
}

/* ===== 剪报列表页 (photolist.html) ===== */
.photo-list-page {
  min-height: 100vh;
  background: var(--bg-light);
}

.photo-grid {
  padding: 30px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.photo-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border-light);
  display: block;
  color: inherit;
}

.photo-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  color: inherit;
}

.photo-card .photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-light);
  position: relative;
}

.photo-card .photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-card:hover .photo-thumb img {
  transform: scale(1.05);
}

.photo-card .photo-thumb::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  z-index: 1;
}

.photo-card .photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--text-muted);
  opacity: 0.3;
  background: linear-gradient(135deg, var(--bg-light), var(--border-light));
}

.photo-card .photo-info {
  padding: 16px 20px;
}

.photo-card .photo-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-card:hover .photo-card-title {
  color: var(--primary);
}

.photo-card .photo-card-date {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ===== 剪报详情页 (photo.html) ===== */
.photo-detail-page {
  min-height: 100vh;
  background: var(--bg-paper);
}

.photo-detail-main {
  padding: 40px 0;
}

.photo-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.photo-detail-content {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

/* 大图展示 */
.photo-large {
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.photo-large img {
  width: 100%;
  height: auto;
  display: block;
}

/* 正文内图片可点击放大标识 */
.content-text img {
  cursor: zoom-in;
}

/* ===== 灯箱（photo.html 图片放大） ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  animation: fadeIn 0.25s ease;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
  filter: none !important;
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10000;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .lightbox-overlay {
    padding: 20px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
}

/* ===== 剪报页响应式 ===== */
@media (max-width: 1024px) {
  .photo-detail-layout {
    grid-template-columns: 1fr;
  }

  .photo-detail-content {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 20px 0;
  }

  .photo-card .photo-info {
    padding: 12px 14px;
  }

  .photo-card .photo-card-title {
    font-size: 14px;
  }

  .photo-card .photo-card-date {
    font-size: 12px;
  }

  .photo-detail-content {
    padding: 20px;
  }

  .photo-large {
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}
