/* 站点公共布局样式 — 使用 tokens.css 设计令牌 */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: PingFangSC-Regular, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

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

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

.container {
  width: 100%;
  max-width: var(--container-max);
  padding-right: 20px;
  padding-left: 20px;
  margin-right: auto;
  margin-left: auto;
}

.clearfix::after {
  display: block;
  content: "";
  clear: both;
}

.pull-left { float: left; }
.pull-right { float: right; }

.pv48 { padding-top: 48px; padding-bottom: 48px; }
.pv16 { padding-top: 16px; padding-bottom: 16px; }
.mb8 { margin-bottom: 8px; }
.mb4 { margin-bottom: 4px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }

.text-primary { color: var(--color-primary); }

/* Header */
.header {
  width: 100%;
  height: 80px;
  background-color: var(--color-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header .container,
.header-inner {
  display: flex;
  align-items: center;
  height: 80px;
  gap: 8px;
}

.header-logo {
  flex-shrink: 0;
  margin-right: 16px;
}

.logo {
  height: 40px;
}

.logo img {
  height: 100%;
  width: auto;
}

.nav {
  display: flex;
  flex: 1;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-item {
  position: relative;
  padding: 0 10px;
  margin-right: 4px;
  flex-shrink: 0;
}

.nav-item__title {
  position: relative;
  display: inline-block;
  height: 80px;
  line-height: 80px;
  font-size: 15px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-item.active .nav-item__title,
.nav-item:hover .nav-item__title {
  color: var(--color-primary);
}

.nav-item.active .nav-item__title::after,
.nav-item:hover .nav-item__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-tel {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  color: var(--color-primary);
  font-size: 14px;
  white-space: nowrap;
}

.header_icon_img {
  width: 28px;
  height: 28px;
}

.header-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
}

.header-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.header-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.header-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.e-btn {
  display: inline-block;
  padding: 0 16px;
  height: 36px;
  line-height: 34px;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-light);
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.e-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.e-btn-primary {
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
  background-color: var(--color-primary);
}

.e-btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-text-inverse);
}

.e-btn-secondary {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
  background-color: var(--color-bg);
}

.e-btn-secondary:hover {
  background-color: var(--color-secondary-light);
  color: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
}

.e-btn-large {
  height: 40px;
  line-height: 38px;
  padding: 0 20px;
  font-size: 16px;
}

/* Footer */
.footer {
  background: url(../img/map.png) center center no-repeat var(--color-footer-bg);
  color: var(--color-text-inverse);
}

.footer .footer-link__title {
  font-size: 16px;
  font-weight: 500;
  color: #97979d;
  line-height: 24px;
}

.footer .footer-link__item {
  color: var(--color-text-inverse);
  transition: color 0.2s;
}

.footer .footer-link__item:hover {
  color: var(--color-footer-link-hover);
}

.footer .record {
  background-color: #000;
}

.footer .record p {
  color: #97979d;
  margin: 0;
  font-size: 13px;
}

.footer .record a {
  color: #97979d;
}

.footer .record a:hover {
  color: var(--color-footer-link-hover);
}

.footer-logo {
  height: 36px;
}

.beian img {
  vertical-align: middle;
  margin-right: 4px;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 100;
}

.sidebar-list {
  padding: 8px;
  margin: 0;
  list-style: none;
  background-color: var(--color-bg);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
}

.sidebar-list__item {
  position: relative;
  width: 64px;
  height: 64px;
  text-align: center;
  color: var(--color-primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.sidebar-list__item:hover {
  background: var(--color-primary-light);
}

.sidebar-list__item > p {
  margin: 4px 0 0;
  font-size: 12px;
}

.sidebar_icon_img {
  width: 36px;
  height: 36px;
  margin-top: 4px;
}

.sidebar-list__item .popover {
  display: none;
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
}

.sidebar-list__item:hover .popover {
  display: block;
}

.sidebar-list__item .popover-container {
  padding: 12px;
  background: var(--color-bg);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  text-align: center;
}

.sidebar-list__divider {
  height: 1px;
  margin: 4px 8px;
  background: var(--color-border-light);
  list-style: none;
}

/* Footer 网格 */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto 1.2fr;
  gap: 24px 20px;
  align-items: start;
}

.footer-col .footer-link {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-qrcode {
  margin-top: 10px;
  display: block;
}

.footer-col--brand p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr) auto;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .footer-col--brand .logo {
    margin-right: 8px;
  }
}
