/* 全局变量定义 */

/* 基础样式 */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --white-color: #ffffff;
  --black-color: #000000;
  --gray-color: #6c757d;
  --gray-light-color: #f8f9fa;
  --gray-dark-color: #343a40;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.5;
  --border-radius: 12px;

  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --text-dark: #1f2937;
  --text-gray: #4b5563;
  --bg-light: #fcfcff;
  --bg-white: #ffffff;
  --transition: all 0.3s ease;
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--dark-color);
  background-color: var(--white-color);
}
img {
  max-width: 100%;
}

/* 通用样式 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

.section-title-block {
  margin-bottom: 2.5rem;
}

.section-title {
  text-align: center;
  font-size: 2.4rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}
/*btn */
button {
  cursor: pointer;
}

.primary-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 400;
  transition: all 0.3s ease;
  border: 1px solid var(--primary-color);

  background-color: transparent;
  color: var(--primary-color);
}

.primary-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  z-index: 1000;
  padding: 1rem 0;
  transition: box-shadow 0.3s ease;
}

.navbar.nav-shadow {
  background-color: var(--bg-white);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.navbar {
  transition: all 0.3s ease;
  background: transparent;
}

.navbar-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* 移动端菜单样式 */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: none;
  backdrop-filter: blur(10px);
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-content {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mobile-menu-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
}

.close-menu {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-gray);
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease;
}

.close-menu:hover {
  color: var(--primary-color);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}

.mobile-menu-link {
  display: block;
  padding: 12px 0;
  font-size: 18px;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  text-align: center;
}

.mobile-menu-link:hover {
  color: var(--primary-color);
}

.mobile-menu-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-link:hover::after {
  opacity: 1;
}

/* 汉堡按钮样式 */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 联系我们样式 */
.contact {
  padding: 10rem 0 5rem;
}

.contact-card {
  /* max-width: 28rem; */
  margin: 0 auto;
  text-align: center;
  padding: 2rem 2rem 2rem;
  font-size: 16px;
}
.section-desc {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 16px;
}
.qr-code {
  border: 1px solid #eee;
  width: 15rem;
  height: 15rem;
  padding: 6px;
  background: #fff;
  margin: 0 auto 1.5rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.qr-code:hover {
  cursor: pointer;
  padding: 4px;
  overflow: hidden;
  background: linear-gradient(145deg, #aad6ff, #f3c2ff);
  box-shadow: 0 4px 15px rgba(172, 143, 165, 0.1);
}

.qr-code:hover::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  z-index: 1;
}

.qr-code img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 页脚样式 */
.footer {
  background-color: #111827;
  color: #445a84;
  padding: 6rem 0 2rem;
  font-size: 13px;
}

.footer-links {
  cursor: pointer;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-link {
  color: #445a84;
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: #60a5fa;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 1s ease forwards;
}

/* 路由视图样式 */
.router-view {
  min-height: calc(100vh - 170px);
  padding-top: 4.5rem;
}

/* 状态样式 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 1.2rem;
  color: var(--gray-color);
}

.error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 1.2rem;
  color: var(--danger-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .mobile-menu {
    display: block;
  }

  .logo-img {
    height: 36px;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .router-view {
    padding-top: 4.5rem;
  }
  .primary-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
  }
}
