/* =============================================================
   COMMON.CSS — 共用样式（导航、底部、通用变量）
   适用于 index.html / page.html / list.html
   ============================================================= */

:root {
  --c-teal-700: #0b525b;
  --c-teal-500: #0d7377;
  --c-teal-300: #14a3a8;
  --c-teal-100: #b2dfdb;
  --c-coral: #e85d3a;
  --c-coral-light: #ff7b5a;
  --c-gold: #e8a838;
  --c-ink: #1c1e24;
  --c-ink-80: #2d3039;
  --c-ink-60: #5a5f6e;
  --c-ink-40: #9ea3b0;
  --c-ice: #f4f7fc;
  --c-snow: #ffffff;
  --shadow-s: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-m: 0 8px 28px rgba(0,0,0,0.07);
  --shadow-l: 0 20px 50px rgba(0,0,0,0.10);
  --radius-subtle: 4px;
  --radius-round: 8px;
  --radius-soft: 16px;
  --f-cn: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-cn);
  color: var(--c-ink-60);
  font-size: 15px;
  line-height: 1.7;
  background: var(--c-snow);
}
a { text-decoration: none; transition: 0.25s ease; }

/* ====== Section header ====== */
.sec-h { text-align: center; margin-bottom: 2.5rem; }
.sec-h h2 {
  font-size: 1.75rem; font-weight: 700; color: var(--c-ink);
  display: inline-block; padding: 0 1rem; position: relative;
}
.sec-h h2::before, .sec-h h2::after {
  content: ''; position: absolute; top: 50%;
  width: 24px; height: 2px; background: var(--c-teal-300);
}
.sec-h h2::before { right: 100%; }
.sec-h h2::after { left: 100%; }
.sec-h h2 .hl { color: var(--c-teal-500); }
.sec-h p {
  color: var(--c-ink-40); font-size: 0.85rem;
  letter-spacing: 0.05em; margin-top: 0.5rem;
}

.segment { padding: 4.5rem 0; }
.segment-alt { background: var(--c-ice); }

/* ====== Top ribbon ====== */
.top-ribbon {
  background: var(--c-ink); color: rgba(255,255,255,0.55);
  font-size: 0.8rem; padding: 0.4rem 0;
}
.top-ribbon a { color: rgba(255,255,255,0.55); }
.top-ribbon a:hover { color: #fff; }

/* ====== Navbar ====== */
.navbar.cool-nav { background: var(--c-ink) !important; padding: 0.6rem 0; }
.cool-nav .navbar-brand img { height: 50px; }
.cool-nav .nav-link {
  color: rgba(255,255,255,0.78) !important; font-size: 0.85rem;
  padding: 0.45rem 0.95rem !important; border-radius: var(--radius-round); font-weight: 500;
}
.cool-nav .nav-link:hover, .cool-nav .nav-link.active {
  color: #fff !important; background: rgba(255,255,255,0.10);
}

/* ====== Dropdown (二级菜单) ====== */
.cool-nav .nav-item.dropdown { position: relative; }
.cool-nav .nav-item.dropdown > .nav-link::after {
  content: '\F282'; font-family: "bootstrap-icons"; font-size: 0.65rem;
  margin-left: 0.35rem; opacity: 0.6; transition: transform 0.25s ease; display: inline-block;
}
.cool-nav .nav-item.dropdown:hover > .nav-link::after { transform: rotate(180deg); opacity: 1; }
.cool-nav .dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--c-snow); border: none; border-radius: var(--radius-round);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15); padding: 0.5rem 0; min-width: 180px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  display: block; z-index: 1050;
}
.cool-nav .nav-item.dropdown:hover > .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.cool-nav .dropdown-menu::before {
  content: ''; position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: var(--c-snow);
}
.cool-nav .dropdown-item {
  font-size: 0.82rem; color: var(--c-ink-60); padding: 0.5rem 1.2rem;
  transition: 0.2s; white-space: nowrap; border-radius: 0;
}
.cool-nav .dropdown-item:hover { background: var(--c-ice); color: var(--c-teal-500); padding-left: 1.5rem; }
.cool-nav .dropdown-item i { font-size: 0.75rem; color: var(--c-teal-300); margin-right: 0.4rem; }
.cool-nav .dropdown-divider { margin: 0.25rem 0; border-color: var(--c-ice); }

/* ====== Nav buttons ====== */
.btn-c-solid {
  background: var(--c-coral); color: #fff !important;
  padding: 0.45rem 1.1rem !important; border-radius: var(--radius-round);
  font-size: 0.85rem; font-weight: 600; border: 2px solid var(--c-coral);
}
.btn-c-solid:hover { background: transparent; color: var(--c-coral) !important; }
.btn-c-ghost {
  background: transparent; color: rgba(255,255,255,0.85) !important;
  padding: 0.45rem 1.1rem !important; border-radius: var(--radius-round);
  font-size: 0.85rem; font-weight: 600; border: 2px solid rgba(255,255,255,0.35);
}
.btn-c-ghost:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.6); }
.cool-toggler { border: none; color: #fff; font-size: 1.4rem; background: none; }

/* ====== Footer ====== */
.footer-deep { background: var(--c-ink); color: rgba(255,255,255,0.4); padding: 3rem 0 0; }
.footer-deep h5 { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 0.8rem; }
.footer-deep a { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.4); padding: 0.2rem 0; }
.footer-deep a:hover { color: #fff; }
.footer-deep .fb {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 1.2rem 0;
  margin-top: 2rem; text-align: center; font-size: 0.75rem;
}

/* ====== Back to top ====== */
.go-up {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--c-ink-80); color: #fff; font-size: 1.1rem;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.25s; border: none; z-index: 999;
}
.go-up.show { display: flex; }
.go-up:hover { background: var(--c-teal-500); transform: translateY(-3px); }

/* ====== 内页 Banner（page.html + list.html 共用） ====== */
.page-banner {
  position: relative; height: 38vh; min-height: 280px;
  display: flex; align-items: center; background: var(--c-ink); overflow: hidden;
}
.page-banner .pb-bg {
  position: absolute; inset: 0;
  background: url('../picture/banner.jpg') center 30% / cover no-repeat; opacity: 0.25;
}
.page-banner .pb-mask {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(11,82,91,0.88) 0%, rgba(11,82,91,0.65) 50%, rgba(0,0,0,0.3) 100%);
}
.page-banner .pb-content { position: relative; z-index: 2; width: 100%; }
.page-banner h1 {
  font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 0.4rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.page-banner h1 .hl { color: var(--c-teal-100); }
.page-banner .pb-sub { font-size: 0.9rem; color: rgba(255,255,255,0.65); }

/* ====== 面包屑（page.html + list.html 共用） ====== */
.crumb-bar { background: var(--c-ice); padding: 0.7rem 0; border-bottom: 1px solid #e8ecf0; }
.crumb-bar .breadcrumb { margin: 0; font-size: 0.8rem; }
.crumb-bar .breadcrumb a { color: var(--c-ink-40); }
.crumb-bar .breadcrumb a:hover { color: var(--c-teal-500); }
.crumb-bar .breadcrumb .active { color: var(--c-ink-60); }
.crumb-bar .breadcrumb .sep { color: var(--c-ink-40); margin: 0 0.4rem; }

/* ====== 共用侧边栏组件（list.html / show.html 等） ====== */
.list-sidebar { position: sticky; top: 80px; }
.sb-box {
  background: var(--c-snow); border-radius: var(--radius-round);
  border: 1px solid #e8ecf0; padding: 1.2rem; margin-bottom: 1.2rem;
}
.sb-box .sb-h {
  font-size: 0.9rem; font-weight: 700; color: var(--c-ink);
  margin-bottom: 0.8rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--c-teal-100); position: relative;
}
.sb-box .sb-h::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 40px; height: 2px; background: var(--c-teal-500);
}
.hot-list { list-style: none; padding: 0; margin: 0; }
.hot-list li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0; border-bottom: 1px solid #f0f3f7; }
.hot-list li:last-child { border-bottom: none; }
.hot-list li .hot-num {
  width: 20px; height: 20px; min-width: 20px; border-radius: 4px;
  background: var(--c-ice); color: var(--c-ink-40); font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hot-list li:nth-child(1) .hot-num { background: var(--c-coral); color: #fff; }
.hot-list li:nth-child(2) .hot-num { background: var(--c-gold); color: #fff; }
.hot-list li:nth-child(3) .hot-num { background: var(--c-teal-300); color: #fff; }
.hot-list li a { font-size: 0.8rem; color: var(--c-ink-60); line-height: 1.5; }
.hot-list li a:hover { color: var(--c-teal-500); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-cloud a {
  font-size: 0.75rem; color: var(--c-ink-60); background: var(--c-ice);
  padding: 0.25rem 0.7rem; border-radius: 30px; transition: 0.2s;
}
.tag-cloud a:hover { background: var(--c-teal-500); color: #fff; }
.sb-contact-card {
  background: linear-gradient(135deg, var(--c-teal-700), var(--c-teal-500));
  border-radius: var(--radius-round); padding: 1.2rem; color: #fff;
}
.sb-contact-card h6 { color: #fff; font-size: 0.85rem; margin-bottom: 0.6rem; }
.sb-contact-card p { font-size: 0.78rem; margin-bottom: 0.3rem; opacity: 0.85; }
.sb-contact-card p i { margin-right: 0.4rem; }

/* ====== 共用响应式：移动端二级菜单 ====== */
@media (max-width: 991px) {
  .cool-nav .navbar-nav { width: 100%; }
  .cool-nav .nav-item.dropdown > .nav-link::after { float: right; }
  .cool-nav .dropdown-menu {
    position: static !important; transform: none !important;
    opacity: 1 !important; visibility: visible !important; display: none;
    box-shadow: none !important;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: var(--radius-round) !important;
    margin: 0.25rem 0 0.5rem !important; padding: 0.3rem 0 !important;
    min-width: auto !important;
  }
  .cool-nav .dropdown-menu::before { display: none; }
  .cool-nav .nav-item.dropdown.open > .dropdown-menu { display: block; }
  .cool-nav .nav-item.dropdown > .nav-link { cursor: pointer; }
  .cool-nav .dropdown-item {
    color: rgba(255,255,255,0.75) !important;
    padding: 0.4rem 1.4rem !important;
    background: transparent !important;
  }
  .cool-nav .dropdown-item:hover,
  .cool-nav .dropdown-item:focus {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    padding-left: 1.7rem !important;
  }
  .cool-nav .dropdown-item i { color: var(--c-teal-300) !important; }
  .cool-nav .dropdown-divider { border-color: rgba(255,255,255,0.10) !important; }
  .list-sidebar { position: static; }
}
