/* 公共样式：页头 / 页脚（依赖页面中先于本文件定义的 :root 变量） */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --white: #fff;
  --shadow: 0 10px 40px rgba(30, 64, 175, 0.12);
  --radius: 12px;
  --page-max: 1400px;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* —— 页头 —— */
.header {
  position: relative;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(30, 64, 175, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-inner {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

@keyframes fadeSlideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.logo:hover {
  transform: scale(1.02);
  opacity: 0.92;
}

.logo img {
  height: auto;
  max-height: 60px;
  width: auto;
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px 30px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a:not(.btn-reg) {
  font-size: 0.92rem;
  color: var(--text);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav a:not(.btn-reg)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.35s ease;
}

.nav a:not(.btn-reg):hover {
  color: var(--primary);
}

.nav a:not(.btn-reg):hover::after {
  width: 100%;
}

.nav > a.is-active,
.nav-dropdown-trigger.is-active {
  color: var(--primary);
}

.nav > a.is-active::after,
.nav-dropdown.is-active > .nav-dropdown-trigger::after,
.nav-dropdown-trigger.is-active::after {
  width: 100%;
}

/* 导航下拉（有子栏目的项，如「项目对接」） */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-dropdown-caret {
  font-size: 0.62rem;
  opacity: 0.75;
  transition: transform 0.25s ease;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 148px;
  margin-top: 0;
  padding: 8px 0 6px;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid rgba(30, 64, 175, 0.1);
  box-shadow: 0 12px 32px rgba(30, 64, 175, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 透明桥接层：填补触发器与菜单之间的空隙，避免移入子项时 hover 断开 */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  top: -12px;
  height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%);
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 18px;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease;border-bottom: solid 1px #ececec;
}
.nav-dropdown-item:last-of-type {
  border-bottom: none;
}
.nav-dropdown-item::after {
  display: none !important;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.is-active {
  background: rgba(30, 64, 175, 0.06);
  color: var(--primary);
}

.btn-reg {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease,
    background 0.25s ease;
}

.btn-reg-expert {
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.26), rgba(59, 130, 246, 0.2));
  color: var(--primary-dark);
  border: 2px solid rgba(30, 64, 175, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 12px rgba(30, 64, 175, 0.18);
}

.btn-reg-expert:hover {
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.34), rgba(59, 130, 246, 0.26));
  border-color: var(--primary);
}

.btn-reg-unit {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.35);
}

.btn-reg-unit:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.nav-auth .nav-dropdown-trigger::after {
  display: none !important;
}

.nav-auth .nav-dropdown-menu {
  min-width: 132px;
}

.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--primary);
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-user-trigger::after {
  display: none !important;
}

.nav-user-trigger:hover,
.nav-user:focus-within .nav-user-trigger {
  color: var(--primary-dark);
  background: transparent;
  border: none;
  box-shadow: none;
}

.nav-user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
  overflow: visible;
}

.nav-user-avatar-wrap::before,
.nav-user-avatar-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.55);
  pointer-events: none;
  z-index: 0;
  animation: nav-user-pulse 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.nav-user-avatar-wrap::after {
  animation-delay: 1.3s;
}

.nav-user-trigger:hover .nav-user-avatar-wrap::before,
.nav-user-trigger:hover .nav-user-avatar-wrap::after,
.nav-user:focus-within .nav-user-avatar-wrap::before,
.nav-user:focus-within .nav-user-avatar-wrap::after,
.nav-user.is-open .nav-user-avatar-wrap::before,
.nav-user.is-open .nav-user-avatar-wrap::after {
  border-color: rgba(30, 64, 175, 0.72);
  animation-duration: 2s;
}

@keyframes nav-user-pulse {
  0% {
    transform: scale(1);
    opacity: 0.72;
  }

  70% {
    opacity: 0.18;
  }

  100% {
    transform: scale(1.95);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-user-avatar-wrap::before,
  .nav-user-avatar-wrap::after {
    animation: none;
    opacity: 0;
  }
}

.nav-user-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.28), 0 4px 14px rgba(30, 64, 175, 0.22);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.nav-user-trigger:hover .nav-user-avatar,
.nav-user:focus-within .nav-user-avatar,
.nav-user.is-open .nav-user-avatar {
  box-shadow: 0 0 0 2px var(--primary), 0 6px 18px rgba(30, 64, 175, 0.3);
  transform: scale(1.05);
}

.nav-user-status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.nav-user-caret {
  color: var(--primary);
  font-size: 0.68rem;
  opacity: 0.82;
  transition: transform 0.25s ease, opacity 0.25s ease, color 0.25s ease;
}

.nav-user-trigger:hover .nav-user-caret,
.nav-user:focus-within .nav-user-caret,
.nav-user.is-open .nav-user-caret {
  opacity: 1;
  color: var(--primary-dark);
  transform: rotate(180deg);
}

.nav-user .nav-dropdown-menu {
  min-width: 168px;
  align-items: stretch;
  text-align: left;
  padding-top: 0;
}

.nav-user-menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 10px;
  line-height: 1.3;
}

.nav-user-name {
  max-width: 160px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-role {
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(30, 64, 175, 0.68);
}

.nav-user-divider {
  height: 1px;
  margin: 0 0 4px;
  background: rgba(30, 64, 175, 0.1);
}


.nav-user-logout {
  color: #dc2626;
}

.nav-user-logout:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}

.btn-reg:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.35);
}

/* —— 页脚 —— */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1.06fr) minmax(0, 1.42fr) minmax(132px, 0.96fr);
  gap: 28px 36px;
  align-items: start;
  margin: 0 auto 40px;
  max-width: var(--page-max);
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-col--contact,
  .footer-col--follow {
    grid-column: 1 / -1;
  }
}

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

  .footer-col--contact,
  .footer-col--follow {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .footer-col--narrow {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-col--contact,
  .footer-col--follow {
    grid-column: 1 / -1;
  }

  .footer-col--follow {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-col--follow h4 {
    align-self: stretch;
    text-align: left;
  }

  .footer-col--follow .qr-box {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-col--follow .footer-qr-hint {
    margin-left: auto;
    margin-right: auto;
  }
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--white);
}

.footer-col ul {
  list-style: none;
}

.footer-col--narrow ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-link-ico {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.55);
  opacity: 0.95;
}

.footer-col--narrow ul li a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  transition: color 0.25s ease, transform 0.25s ease;
  display: inline-block;
  text-decoration: none;
}

.footer-col--narrow ul li a:hover {
  color: var(--white);
  transform: translateX(4px);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 3px;
}

.footer-contact-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
}

.footer-contact-icon.ci-loc {
  background: rgba(59, 130, 246, 0.28);
  color: #93c5fd;
}

.footer-contact-icon.ci-phone {
  background: rgba(34, 197, 94, 0.26);
  color: #86efac;
}

.footer-contact-icon.ci-mail {
  background: rgba(249, 115, 22, 0.24);
  color: #fdba74;
}

.footer-contact-icon.ci-time {
  background: rgba(167, 139, 250, 0.26);
  color: #c4b5fd;
}

.footer-contact-val {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  flex: 1;
  min-width: 0;
}

.qr-box {
  width: 158px;
  height: 158px;
  max-width: 100%;
  margin-top: 12px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.35s ease;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.qr-box:hover {
  transform: scale(1.05);
}

.footer-qr-hint {
  margin-top: 10px;
  width: 150px;
  max-width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.footer-copy {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.footer-copy-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 6px;
  line-height: 1.65;
}

.footer-copy-sep {
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
  font-weight: 300;
}

.footer-copy a {
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-copy a:hover {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .footer-col--narrow ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .footer-col--narrow ul li a {
    font-size: 0.8rem;
  }

  footer {
    padding: 24px 0;
  }

  .footer-copy {
    padding: 12px 0;
  }

  .footer-copy-line {
    font-size: 0.8rem;
  }

  .footer-copy-sep {
    font-size: 0.8rem;
  }

  .footer-copy a {
    font-size: 0.8rem;
  }

  .footer-copy a:hover {
    font-size: 0.8rem;
  }
}

/* —— 页头 · 移动端菜单 —— */
.mobile-toggle {
  display: none;
}

@media (max-width: 1100px) {
  .header {
    height: auto;
    min-height: 72px;
  }

  .header-inner {
    position: relative;
    min-height: 72px;
  }

  .nav {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    border-bottom: 1px solid rgba(30, 64, 175, 0.1);
    box-shadow: var(--shadow);
    z-index: 200;
  }

  .nav.open > a:not(.btn-reg) {
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-auth {
    width: 100%;
  }

  .nav-auth .btn-reg {
    width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }

  .nav-user {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-user-trigger {
    width: auto;
    justify-content: center;
    box-sizing: border-box;
    padding: 10px 0;
  }

  .nav-user-menu-head {
    padding: 10px 14px 8px;
  }

  .nav-user-name {
    max-width: none;
  }

  .nav-dropdown-trigger {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 10px 28px;
    box-sizing: border-box;
    position: relative;
  }

  .nav-dropdown-trigger .nav-dropdown-caret {
    position: absolute;
    right: 0;
    top: 50%;
    margin-left: 0;
    transform: translateY(-50%);
    flex-shrink: 0;
  }

  .nav-dropdown-menu {
    position: static;
    left: auto;
    right: auto;
    transform: none !important;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transition: max-height 0.28s ease, visibility 0.2s ease;
    box-sizing: border-box;
  }

  .nav-dropdown-menu::before {
    display: none;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu,
  .nav-dropdown-menu:hover {
    transform: none !important;
    left: auto;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    visibility: visible;
    pointer-events: auto;
    max-height: 280px;
    margin-top: 6px;
    padding: 8px 0;
    background: rgba(30, 64, 175, 0.06);
    border-radius: 8px;
    transform: none !important;
  }

  .nav-dropdown.is-open .nav-dropdown-caret {
    transform: translateY(-50%) rotate(180deg);
  }

  .nav-dropdown-item {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    padding: 10px 16px;
    box-sizing: border-box;
    overflow-wrap: break-word;
  }
}

.hamburger {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(30, 64, 175, 0.1);
  border-radius: 8px;
  cursor: pointer;
  color: var(--primary);
  font-size: 1.2rem;
}

/* 内页 · 顶栏横幅与面包屑 */
.page-hero {
  margin-top: 0;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 62px 24px 54px;
  box-sizing: border-box;
}

.page-hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.35;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.page-hero > p {
  max-width: 920px;
  font-size: 1rem;
  opacity: 0.95;
  line-height: 1.65;
  margin: 0 0 22px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

.breadcrumb .current {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 500;
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 180px;
    padding: 40px 16px 32px;
  }

  .page-hero > p {
    font-size: 0.88rem;
    margin-bottom: 18px;
  }
}
