/* ========================================
   SKINGX 全局共享样式
   所有页面共用：重置、导航、页脚
   ======================================== */

/* ----- 重置 & 基础 ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:  system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
  background: #f6f9fc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ========================================
   顶部导航
   ======================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  width: 100%;
}

.navbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 32px;
  height: 100%;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
  max-height: 48px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  transition: all 0.2s;
}

.nav-item {
  position: relative;
  padding: 0 2px;
}

.nav-item > a,
.nav-item > .nav-link {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: 0.3px;
  color: #1e293b;
  background: transparent;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  white-space: nowrap;
  gap: 4px;
  line-height: 1.2;
}

.nav-item > a:hover,
.nav-item > .nav-link:hover {
  background: #eef2f6;
  color: #0b1e33;
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0px);
  left: 50%;
  transform: translateX(-50%) scale(0.96);
  background: white;
  min-width: 170px;
  padding: 10px 0;
  border-radius: 20px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.02);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  backdrop-filter: blur(2px);
  background: rgba(255, 255, 255, 0.98);
  z-index: 999;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 480;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-radius: 12px;
  margin: 0 6px;
  white-space: nowrap;
  cursor: pointer;
}

.dropdown-menu li a:hover {
  background: #eef2f6;
  color: #0f172a;
}

/* 桌面 hover 展开 */
@media (min-width: 769px) {
  .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
  }
  .nav-item:hover > a,
  .nav-item:hover > .nav-link {
    background: #eef2f6;
  }
}

.nav-item.cta .nav-link {
  background: #0b1e33;
  color: white;
  padding: 8px 22px;
  border-radius: 40px;
  font-weight: 580;
  transition: background 0.2s;
}

.nav-item.cta .nav-link:hover {
  background: #1a3857;
  color: white;
}

/* 汉堡菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
  margin-left: 8px;
  gap: 5px;
}

.menu-toggle:hover {
  background: #eef2f6;
}

.menu-toggle .bar {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #1e293b;
  border-radius: 4px;
  transition: all 0.25s ease;
  transform-origin: center;
}

.menu-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 移动端导航 */
@media (max-width: 768px) {
  .navbar-inner {
    height: 68px;
    padding: 0 16px;
  }
  .logo img {
    height: 34px;
  }
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 12px 20px;
    border-radius: 28px;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.02);
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(4px);
    max-height: 75vh;
    overflow-y: auto;
    z-index: 998;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-item {
    width: 100%;
    padding: 0;
  }
  .nav-item > a,
  .nav-item > .nav-link {
    padding: 12px 16px;
    width: 100%;
    border-radius: 16px;
    font-size: 1.05rem;
    justify-content: space-between;
    white-space: normal;
    cursor: pointer;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 6px 0;
    margin: 4px 0 0 0;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: none;
    background: transparent;
    display: none;
    width: 100%;
    min-width: unset;
    transition: none;
  }

  .dropdown-menu.show {
    display: flex;
  }
  .dropdown-menu li a {
    padding: 10px 20px 10px 32px;
    font-size: 0.98rem;
    border-radius: 14px;
    margin: 0 4px;
    background: #f8fafc;
    white-space: normal;
  }
  .dropdown-menu li a:hover {
    background: #e2e8f0;
  }

  .nav-item.cta {
    margin-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-top: 12px;
  }
  .nav-item.cta .nav-link {
    background: #0b1e33;
    color: white;
    justify-content: center;
    text-align: center;
  }

  .nav-item.has-dropdown > .nav-link::after {
    content: " ▾";
    font-size: 0.9rem;
    opacity: 0.6;
    margin-left: 4px;
    transition: transform 0.2s;
  }
  .nav-item.has-dropdown.open > .nav-link::after {
    content: " ▴";
  }
}

@media (min-width: 769px) {
  .dropdown-menu {
    display: flex !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* ========================================
   页脚（白色背景版）
   ======================================== */
.site-footer {
  position: relative;
  background: #ffffff;
  color: #1e293b;
  padding: 50px 30px 30px;
  width: 100%;
  margin-top: auto;
  border-top: 1px solid #eef2f6;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px 30px;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-links .col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #0b1e33;
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-links .col ul li {
  margin-bottom: 8px;
}

.footer-links .col ul li a {
  color: #4a5a6e;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 350;
  transition: color 0.2s;
  line-height: 1.5;
}

.footer-links .col ul li a:hover {
  color: #0b1e33;
}

.footer-qr {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-shrink: 0;
}

.footer-qr .qr-item {
  text-align: center;
}

.footer-qr .qr-item .qr-placeholder {
  width: 112px;
  height: 112px;
  background: #f0f4f8;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-size: 0.6rem;
  color: #8a9aa8;
  transition: border-color 0.2s;
  overflow: hidden;
  cursor: pointer;
}

.footer-qr .qr-item .qr-placeholder:hover {
  border-color: #0b1e33;
}

.footer-qr .qr-item .qr-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-qr .qr-item .qr-label {
  font-size: 0.7rem;
  color: #4a5a6e;
  letter-spacing: 1px;
}

/* ========================================
   返回顶部按钮（增强特效版）
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 30px;
  width: 52px;
  height: 52px;
  background: #0b1e33;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 999;
  /* 过渡由 JS 控制，这里只保留基础样式 */
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0.5s,
              box-shadow 0.3s ease,
              background 0.3s ease;
  /* 默认透明不可见，由 JS 控制显示 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  /* 去掉定位的绝对，改为 fixed */
  position: fixed;
}

/* 显示状态（由 JS 添加） */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: #1a3857;
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(11, 30, 51, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

.back-to-top:active {
  transform: scale(0.85);
  transition: transform 0.15s ease;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: white;
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 24px;
    right: 16px;
    width: 46px;
    height: 46px;
  }

  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 16px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .back-to-top svg {
    width: 16px;
    height: 16px;
  }
}

.footer-copy {
  max-width: 1400px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid #e9edf2;
  text-align: center;
  font-size: 0.75rem;
  color: #8a9aa8;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
  }
  .footer-links {
    gap: 30px;
    justify-content: space-between;
  }
  .footer-links .col h4 {
    font-size: 0.8rem;
  }
  .footer-links .col ul li a {
    font-size: 0.85rem;
  }
  .footer-qr {
    justify-content: flex-start;
    gap: 24px;
  }
  .footer-qr .qr-item .qr-placeholder {
    width: 100px;
    height: 100px;
  }
  .back-to-top {
    right: 16px;
    top: -20px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 40px 16px 20px;
  }
  .footer-links {
    flex-direction: column;
    gap: 20px;
  }
  .footer-qr {
    gap: 16px;
  }
  .footer-qr .qr-item .qr-placeholder {
    width: 100px;
    height: 100px;
  }
}