/* ===== Shared Site Header ===== */

:root {
  --header-h: 100px;
  --header-red: #DA291C;
}
* {
  /* 透明，完全关闭点击蓝色高亮 */
  -webkit-tap-highlight-color: transparent;
  /* 兼容旧安卓机型，rgba透明写法兜底 */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.sz-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid #dbdbdb;
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.sz-header.is-hidden {
  transform: translate3d(0, -100%, 0);
  pointer-events: none;
}

.sz-header .header-inner {
  position: relative;
  width: 93.5%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 0;
  height: 100%;
}

.header-left {
  position: static;
  flex-shrink: 0;
}

.sz-logo {
  position: absolute;
  top: 20px;
  left: 0;
  width: 65px;
  height: 60px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sz-logo img {
  width: 65px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.sz-nav {
  position: absolute;
  top: 37px;
  left: 139px;
  display: flex;
  align-items: flex-start;
  gap: 70px;
  height: auto;
}

.sz-nav a {
  width: 43px;
  height: 27px;
  font-family: var(--font-55s);
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0;
  color: #000;
  padding: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: visible;
}

.sz-nav a::after {
  content: '';
  position: absolute;
  top: auto;
  bottom: -4px;
  left: -6px;
  width: 56px;
  height: 2px;
  background: #000;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.sz-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.sz-nav a.active {
  font-family: var(--font-80s);
}

.sz-nav a.active::after {
  transform: none;
}

.sz-nav a.active:hover::after {
  transform: none;
}

.header-tools {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.header-tools > * {
  pointer-events: auto;
}

.search-box {
  position: absolute;
  top: 32px;
  right: 87px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 19px;
  width: 145px;
  height: 37px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 20px;
  text-decoration: none;
  color: #000;
  cursor: pointer;
}

.search-box-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}

.search-box-label {
  flex: 0 1 auto;
  font-family: var(--font-55s);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  color: #000;
  white-space: nowrap;
  pointer-events: none;
}

.wechat-btn {
  position: absolute;
  top: 23px;
  right: 0;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.3s;
}

.wechat-btn img {
  display: block;
  width: 54px;
  height: 54px;
}

.wechat-btn:hover {
  opacity: 0.85;
}

.js-wechat-modal-trigger {
  cursor: pointer;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: right;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #000;
  background: transparent;
  flex-shrink: 0;
}

.menu-toggle-icon {
  display: block;
  width: 25px;
  height: 22px;
}

.menu-toggle-close-icon {
  display: none;
  width: 21px;
  height: 21px;
}

.menu-toggle.is-open .menu-toggle-icon {
  display: none;
}

.menu-toggle.is-open .menu-toggle-close-icon {
  display: block;
}

body.nav-open {
  overflow: hidden;
}

.m-nav {
  display: none;
}

@media (max-width: 1023px) {
  :root {
    --header-h: 64px;
  }

  .sz-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
  }

  .sz-logo {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
  }

  .sz-nav {
    display: none;
  }

  .m-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0 24px 48px;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    z-index: 999;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .m-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .m-nav-list {
    width: 100%;
    max-width: 360px;
    margin-top: 64px;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
  }

  .m-nav-item {
    position: relative;
    width: 100%;
  }

  .m-nav-item::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 280px;
    height: 1px;
    background: #D9D9D9;
  }

  .m-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    padding: 20px 16px;
    text-align: center;
    color: #000;
  }

  .m-nav-cn {
    font-family: var(--font-55s);
    font-size: 20px;
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .m-nav-en {
    font-family: var(--font-55s);
    font-size: 14px;
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .m-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 120px;
    height: 40px;
    min-height: 40px;
    margin-top: auto;
    padding: 0 40px;
    border-radius: 999px;
    background: var(--header-red);
    color: #fff;
    font-family: var(--font-80s);
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    transition: background 0.3s ease;
  }

  .m-nav-btn:hover {
    background: #b8141a;
  }

  .header-tools {
    position: static;
    inset: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
  }

  .header-tools > * {
    pointer-events: auto;
  }

  .search-box {
    position: static;
    top: auto;
    right: auto;
    display: inline-flex;
    width: auto;
    height: 32px;
    padding: 0 14px 0 12px;
    gap: 8px;
    border-radius: 16px;
  }

  .search-box-label {
    font-size: 14px;
  }

  .wechat-btn {
    position: static;
    top: auto;
    right: auto;
    display: none;
  }

  .sz-logo img {
    width: 48px;
  }

  .menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 1001;
  }
}

/* ===== WeChat QR Modal ===== */
.wechat-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wechat-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wechat-modal-inner {
  max-width: min(360px, 100%);
  line-height: 0;
}

.wechat-modal-inner img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
}

body.wechat-modal-open {
  /*overflow: hidden;*/
}

/* ===== Shared Site Bottom (all pages) ===== */
.contact-bar + .footer {
  margin-top: -1px;
}

@media (max-width: 768px) {
  .contact-title,
  .school-page .contact-title,
  .sz-page .contact-title {
    padding: 64px 0 27px;
  }

  .contact-title h2 {
    font-size: 28px;
  }

  .contact-bar .container,
  .footer-bottom .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .contact-text {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .footer-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
  }

  .footer-copy a,
  .footer-legal {
    display: block;
    margin-right: 0;
    white-space: nowrap;
    font-size: 14px!important;
  }
  .footer-copy a {
      margin-right: 0!important;
  }
  .wechat-modal {
    background: rgb(0 0 0 / 88%);
  }
}
