:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
  --primary-color: #2F6BFF;
  --auxiliary-color: #6FA3FF;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --bg-card: #FFFFFF;
  --bg-page: #F4F7FB;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  padding-top: var(--header-offset); /* Ensure body content is not hidden by fixed header */
  overflow-x: hidden;
}

/* --- Site Header --- */
.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);
}

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

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

.logo {
  color: #FFFFFF; /* Text color for logo */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: flex; 
  align-items: center;
  line-height: 1;
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap; /* Prevent buttons from wrapping on desktop */
  text-align: center;
  line-height: 1.2;
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 8px var(--glow-color);
}

/* Mobile buttons - hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Fixed height for mobile */
  background-color: var(--bg-page); /* Contrasting background for mobile buttons strip */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Default to flex for desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--auxiliary-color); /* Auxiliary color for main nav */
  width: 100%;
  transition: transform 0.3s ease; /* For mobile menu animation */
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop horizontal */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: var(--text-black); /* Changed to black for better contrast on light blue background (5.4:1) */
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(0, 0, 0, 0.1); /* Darker hover for contrast */
  border-radius: 4px;
}

/* Hamburger menu - hidden by default on desktop */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Higher than menu */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: #FFFFFF;
  transition: all 0.3s ease-in-out;
}

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

.overlay.active {
  display: block;
}

/* --- Site Footer --- */
.site-footer {
  background-color: var(--bg-page); /* Page background for footer */
  padding: 40px 20px 20px;
  color: var(--text-main);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col h3 {
  color: var(--text-black);
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-main);
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px buffer */
  }

  /* Mobile Header Top */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    padding: 0; /* Hamburger menu handles left padding */
    justify-content: flex-start; /* Logo is centered, hamburger is left */
    position: relative; /* For absolute positioning of logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    position: relative;
    z-index: 1002;
    margin-right: auto; /* Push logo to center */
  }

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    position: absolute; /* Absolute position to center without affecting flex flow */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Adjust max-width to not overlap hamburger */
    height: 100%;
  }

  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
  }

  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }

  /* Mobile Buttons Strip */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons strip */
    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; /* Ensure buttons stay in one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font size for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Mobile Main Nav (Hamburger Menu Content) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0; /* Menu starts from top */
    left: 0;
    width: 280px; /* Fixed width for mobile menu */
    height: 100vh;
    background-color: var(--primary-color); /* Primary color for mobile menu background */
    flex-direction: column;
    padding-top: var(--header-offset); /* Push content below fixed header */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay, below hamburger */
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column; /* Stack menu items vertically */
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* Remove max-width for mobile containers */
    height: auto; /* Auto height for menu content */
  }

  .nav-link {
    color: #FFFFFF; /* White text on primary blue background (6.1:1) */
    width: 100%; /* Full width links */
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  /* Mobile Overlay */
  .overlay {
    display: none; /* Hidden by default */
  }
  .overlay.active {
    display: block; /* Show when active */
  }

  /* Mobile Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column for footer on mobile */
    max-width: none; /* Remove max-width */
    padding: 0 15px; /* Add padding for mobile */
  }

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }

  /* Mobile overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body.no-scroll {
    overflow: hidden;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
