:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
  --primary-color: #2F6BFF;
  --accent-color: #6FA3FF;
  --btn-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --page-bg: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--page-bg);
  padding-top: var(--header-offset); /* Account for fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll from body */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Suspended effect */
  background-color: var(--page-bg); /* Default background, can be overridden */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Distinct background for top area */
  width: 100%;
  color: #FFFFFF; /* Text color for header-top */
}

.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; /* Internal padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* Logo text color for header-top */
  text-decoration: none;
  display: block; /* Ensure logo is visible */
  white-space: nowrap; /* Prevent logo text from wrapping */
}

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

.header-right-spacer {
  display: none; /* Hidden on desktop */
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, shown on mobile */
  min-height: 48px; /* Mobile fixed height for buttons */
  background-color: var(--page-bg); /* Background for mobile buttons, distinct from main-nav */
  padding: 0 15px; /* Padding for mobile buttons */
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.btn {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--btn-gradient); /* Custom button gradient */
  color: #FFFFFF;
  font-weight: bold;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px; /* Desktop fixed height */
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--accent-color); /* Distinct background for main nav */
  width: 100%;
}

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

.nav-link {
  color: #FFFFFF; /* Nav link color for main-nav */
  text-decoration: none;
  padding: 0 15px;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #E0E0E0;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

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

.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: var(--text-main); /* Dark background for footer */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-cols-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns desktop */
  gap: 20px;
  margin-bottom: 30px;
}

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

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

.footer-description {
  line-height: 1.6;
  color: #E0E0E0;
  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: #E0E0E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-mid-slots,
.footer-slot-anchor-inner {
  /* These are for dynamic content injection, keep them visible */
  min-height: 1px; /* Ensure they take up space if empty */
  margin-bottom: 10px; /* Spacing for potential injected content */
}

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

.footer-bottom p {
  margin: 0;
}

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

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

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Handled by header-top padding */
    justify-content: space-between; /* Keep space-between for hamburger and logo */
    align-items: center;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    flex-shrink: 0;
  }

  .logo {
    flex-grow: 1; /* Allow logo to take middle space */
    text-align: center; /* Center the text inside the logo element */
    color: #FFFFFF; /* Ensure color is visible */
    padding: 0 5px; /* Small padding */
    position: static !important; /* Ensure no absolute positioning for text logo */
    transform: none !important;
    left: auto !important;
    max-width: none;
  }

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

  .header-right-spacer {
    display: block; /* Show spacer on mobile */
    width: 45px; /* Match hamburger width for balance */
    flex-shrink: 0;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    background-color: var(--page-bg); /* Ensure background is set */
    align-items: center;
    justify-content: center;
    padding: 0 15px; /* Mobile button padding */
  }

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

  .main-nav {
    min-height: 48px !important; /* Mobile fixed height */
    height: calc(100vh - var(--header-offset)); /* Take remaining viewport height */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 100%;
    background-color: var(--card-bg); /* Menu background on mobile */
    flex-direction: column; /* Vertical on mobile */
    justify-content: flex-start; /* Align menu items to top */
    align-items: flex-start; /* Align menu items to left */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001; /* Above overlay, below hamburger */
    display: none; /* Initially hidden, JS will change to flex/block */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 20px 15px; /* Padding for mobile menu items */
    flex-direction: column; /* Vertical links */
    align-items: flex-start;
  }

  .nav-link {
    width: 100%; /* Full width links */
    padding: 10px 0;
    color: var(--text-main); /* Text color for mobile menu links */
    border-bottom: 1px solid #eee; /* Separator for mobile links */
  }

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

  /* Mobile Footer */
  .footer-cols-wrapper {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

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

  /* Mobile content overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
