:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --card-bg: #FFFFFF;
  --page-bg: #F4F7FB;
  --text-main: #1F2D3D;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --header-offset: 122px;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--page-bg);
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--primary-color); /* Primary color for header-top */
  color: #fff;
  padding: 0 20px;
  overflow: hidden;
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: block;
  max-height: 60px; /* Desktop logo max height */
  display: flex;
  align-items: center;
  text-align: center;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  color: #fff;
  text-align: center;
  transition: background-color 0.3s ease;
  background: var(--button-gradient);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.9;
}

.main-nav {
  box-sizing: border-box;
  height: 52px;
  display: flex;
  align-items: center;
  background-color: var(--secondary-color); /* Secondary color for main-nav */
  color: var(--text-main);
  padding: 0 20px;
  overflow: hidden;
}

.nav-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.nav-list li a {
  color: #fff;
  text-decoration: none;
  padding: 5px 0;
  font-weight: bold;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-list li a:hover {
  color: var(--primary-color);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

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

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

.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.site-footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
}

.footer-grid-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h3 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
  color: #fff;
}

.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav li a {
  color: #fff;
  text-decoration: none;
  margin-bottom: 8px;
  display: block;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: var(--secondary-color);
}

.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row {
  margin-bottom: 20px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  body {
    overflow-x: hidden;
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .header-top {
    height: 60px;
    padding: 0 15px;
    justify-content: space-between; 
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
    position: relative; 
  }

  .hamburger-menu {
    display: block;
    order: 0; 
    margin-right: 15px; 
  }

  .logo {
    order: 1;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    max-height: 56px; 
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); 
  }

  .logo img {
    max-height: 56px !important;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--page-bg); /* Neutral background for mobile buttons */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 20px 0;
    box-sizing: border-box;
  }

  .main-nav.active {
    display: flex; /* Must set display to show */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0;
    height: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .nav-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list li a {
    padding: 15px 20px;
    display: block;
    color: #fff;
  }

  .mobile-menu-overlay {
    top: 0; 
    height: 100vh;
  }

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

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

  .footer-col h3 {
    text-align: center;
  }

  .footer-nav li a {
    text-align: center;
  }

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

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

  .footer-dynamic-col .footer-slot-anchor-inner,
  .footer-dynamic-row .footer-slot-anchor-inner {
    justify-content: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
