/* ========== CSS Variables 设计系统 ========== */
:root {
  --color-primary: #D20029;
  --color-primary-hover: #b80022;
  --color-primary-light: rgba(210, 0, 41, 0.08);
  --color-primary-ghost: rgba(210, 0, 41, 0.15);
  --color-text-primary: #1a1a2e;
  --color-text-secondary: #4a4a5a;
  --color-text-muted: #8e8e9a;
  --color-bg: #fafbfc;
  --color-bg-white: #ffffff;
  --color-bg-gray: #f0f2f5;
  --color-border: #e5e7eb;
  --color-border-light: #f1f1f1;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --header-height: 70px;
  --header-height-mobile: 64px;
}

/* ========== 全局 Reset（不覆盖 Bootstrap 3 box-sizing）========== */
* {
  margin: 0;
  padding: 0;
}

/* 仅自定义元素使用 border-box，Bootstrap 3 栅格保持 content-box */
.header, .header *,
.footer, .footer *,
.back-to-top,
.menu-overlay,
.menu-close,
.breadcrumb, .breadcrumb * {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  position: relative;
  padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-bg);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  color: var(--color-text-primary);
}

::selection {
  background: rgba(210, 0, 41, 0.18);
  color: var(--color-text-primary);
}

::-moz-selection {
  background: rgba(210, 0, 41, 0.18);
  color: var(--color-text-primary);
}

body em,
body i {
  font-style: normal;
}

body ol,
body ul,
body li {
  list-style: none;
}

body img {
  border: 0;
  vertical-align: middle;
  max-width: 100%;
}

body p {
  margin: 0;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  margin: 0;
  line-height: 1.3;
  color: var(--color-text-primary);
}

body a {
  text-decoration: none !important;
  cursor: pointer;
  color: var(--color-primary);
  transition: color var(--transition-normal);
}

body a:hover {
  color: var(--color-primary-hover) !important;
}

.active {
  color: var(--color-primary) !important;
}

/* ========== 导航栏 Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-normal);
  box-sizing: border-box;
}

.header * {
  box-sizing: border-box;
}

.header.scrolled {
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header .logo {
  float: left;
}

.header .logo a {
  display: flex;
  align-items: center;
  height: var(--header-height);
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color var(--transition-normal);
  outline: none;
}

.header .logo a img {
  width: auto;
  height: 24px;
  padding-right: 10px;
}

.header .menu {
  float: right;
}

.header .menu .list li {
  float: left;
  line-height: var(--header-height);
  margin-right: 48px;
}

.header .menu .list li:last-child {
  margin-right: 0;
}

.header .menu .list li a {
  display: inline-block;
  position: relative;
  font-size: 16px;
  color: var(--color-text-primary);
  font-weight: 500;
  transition: color var(--transition-normal);
  outline: none;
}

.header .menu .list li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--transition-normal);
}

.header .menu .list li a:hover::after,
.header .menu .list li .active::after {
  transform: translateX(-50%) scaleX(1);
}

.header .menu .list li a:hover {
  color: var(--color-primary) !important;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
  padding: 24px 0;
  background: transparent;
  margin-bottom: 0;
  border-radius: 0;
}

.breadcrumb .breadcrumbs {
  font-size: 0;
}

.breadcrumb .breadcrumbs a {
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color var(--transition-normal);
}

.breadcrumb .breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumb .breadcrumbs a:not(:last-of-type)::after {
  content: '>';
  margin: 0 8px;
  color: var(--color-text-muted);
}

/* ========== 页脚 Footer ========== */
.footer {
  padding: 50px 0 40px;
  line-height: 28px;
  text-align: center;
  border-top: 1px solid var(--color-border-light);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-white) 40px);
  box-sizing: border-box;
}

.footer * {
  box-sizing: border-box;
}

.footer .copyright p {
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-muted);
}

.footer .copyright p:first-child {
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.footer .copyright p a {
  color: var(--color-primary);
}

/* ========== 回到顶部按钮 ========== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 999;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  box-shadow: 0 4px 16px rgba(210, 0, 41, 0.35);
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  box-sizing: border-box;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(210, 0, 41, 0.45);
}

.back-to-top::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-left: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: rotate(45deg);
  margin-top: 6px;
}

/* ========== 通用占位/空状态 ========== */
.placeholder {
  padding: 80px 0;
  text-align: center;
}

.placeholder p {
  line-height: 30px;
  font-size: 16px;
  color: var(--color-text-muted);
}

/* ========== wow.js 动画兼容 ========== */
.wow {
  visibility: hidden;
}

/* ========== 移动端关闭按钮（桌面端隐藏）========== */
.menu-close {
  display: none !important;
}

/* ========== 移动端遮罩层 ========== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  box-sizing: border-box;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== 响应式 - 平板 & 手机 (≤992px) ========== */
@media (max-width: 992px) {
  html {
    scroll-padding-top: var(--header-height-mobile);
  }

  body {
    padding-top: var(--header-height-mobile);
  }

  .header {
    height: var(--header-height-mobile);
    padding: 0 15px;
    border-bottom: 1px solid var(--color-border-light);
    background: rgba(255, 255, 255, 0.98);
  }

  .header.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }

  .header .logo a {
    height: var(--header-height-mobile);
    font-size: 13px;
  }

  .header .menu {
    position: relative;
  }

  .header .menu::before {
    content: '';
    position: absolute;
    top: 14px;
    right: 0;
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: #26263d;
    background-image: url(../images/nav.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 20px auto;
    cursor: pointer;
    z-index: 1001;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-normal);
  }

  .header .menu::before:hover {
    background-color: rgba(210, 0, 41, 0.6);
  }

  .header .menu .list {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    padding: 80px 30px 30px;
    background: linear-gradient(180deg, #1a1a2e 0%, #2d2d44 100%);
    z-index: 1000;
    transition: right var(--transition-normal);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
  }

  .header .menu .list.active {
    right: 0;
  }

  .header .menu .list li {
    float: none;
    line-height: normal;
    margin-right: 0;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
    box-sizing: border-box;
  }

  .header .menu .list.active li {
    opacity: 1;
    transform: translateX(0);
  }

  .header .menu .list.active li:nth-child(1) { transition-delay: 0s; }
  .header .menu .list.active li:nth-child(2) { transition-delay: 0.1s; }
  .header .menu .list.active li:nth-child(3) { transition-delay: 0.15s; }
  .header .menu .list.active li:nth-child(4) { transition-delay: 0.2s; }
  .header .menu .list.active li:nth-child(5) { transition-delay: 0.25s; }
  .header .menu .list.active li:nth-child(6) { transition-delay: 0.3s; }

  /* 关闭按钮 */
  .menu-close {
    display: block !important;
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: var(--radius-md);
    background: #26263d;
    transition: all var(--transition-normal);
    margin-bottom: 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .menu-close::before,
  .menu-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1px;
    transition: all var(--transition-normal);
  }

  .menu-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .menu-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .menu-close:hover {
    background: rgba(210, 0, 41, 0.6);
  }

  .menu-close:hover::before,
  .menu-close:hover::after {
    background: #fff;
  }

  .header .menu .list li a {
    display: block;
    height: auto;
    line-height: 44px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    padding: 0 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    outline: none;
  }

  .header .menu .list li a::after {
    display: none;
  }

  .header .menu .list li a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
  }

  .header .menu .list li:last-child {
    margin-bottom: 0;
  }

  .active {
    color: var(--color-primary) !important;
  }

  .header .menu .list li .active {
    background: rgba(210, 0, 41, 0.2) !important;
    color: #fff !important;
  }

  .breadcrumb {
    padding: 20px 15px;
  }

  .footer {
    padding: 30px 15px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
}
