:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-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;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--card-bg); /* Default background, actual sections will override */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Different from main-nav */
  width: 100%;
  padding: 0 20px; /* Padding for the top bar itself */
}

.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;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* White text on primary blue background */
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%; /* To center vertically */
}

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

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Mobile min height */
  background-color: var(--page-bg); /* A light background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Mobile padding */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Different from header-top */
  width: 100%;
  position: static; /* Desktop default: static position */
}

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

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

.main-nav ul li a {
  color: var(--text-main); /* Text main on white background */
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0;
  display: block;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  background: var(--button-gradient);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

.hamburger-menu::before,
.hamburger-menu::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF; /* White on primary blue */
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu::before {
  top: 0;
}

.hamburger-menu::after {
  bottom: 0;
}

.hamburger-menu.active::before {
  transform: rotate(45deg);
  top: 10px;
}

.hamburger-menu.active::after {
  transform: rotate(-45deg);
  bottom: 10px;
}

.hamburger-menu.active::before,
.hamburger-menu.active::after {
  background-color: var(--primary-color); /* Change color when active, e.g., to primary blue */
}

/* Overlay for mobile menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999; /* Below menu, above content */
}

.overlay.active {
  display: block;
}

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

.site-footer a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--secondary-color); /* Secondary color for titles */
}

.footer-col p {
  line-height: 1.8;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  display: block;
}

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

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin: 0 auto;
}

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

/* Footer slot anchor inner containers */
.footer-slot-anchor-inner {
  min-height: 10px; /* To ensure visibility for layout purposes if empty */
  margin-top: 10px;
}

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

  body {
    padding-top: var(--header-offset);
  }

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

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    position: relative; /* For absolute positioning of logo if needed */
    justify-content: space-between; /* Keep space-between for hamburger and empty space */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1; /* Place hamburger first */
    padding-left: 0; /* Align to edge */
  }

  .logo {
    order: 2; /* Place logo second */
    font-size: 24px; /* Adjust logo size for mobile */
    position: absolute !important; /* Absolute position for centering */
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important; /* Ensure logo container is flex for vertical centering of text */
    align-items: center !important;
    justify-content: center !important;
    height: 100%;
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right element */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    height: auto; /* Allow height to adjust based on content */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjust padding for mobile buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: var(--page-bg); /* Match mobile header top or page bg */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Subtle shadow below mobile buttons */
  }

  .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 for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    overflow-wrap: break-word;
    border-radius: 20px; /* Slightly smaller border-radius for mobile */
  }

  /* Mobile Main Nav (Hamburger Menu) */
  .main-nav {
    min-height: 48px; /* Height for mobile main nav */
    height: auto;
    position: fixed; /* Fixed position for off-canvas menu */
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Width of the off-canvas menu */
    max-width: 80%; /* Max width to not cover whole screen */
    background-color: var(--card-bg); /* White background for menu */
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Hidden off-screen by default */
    transition: transform 0.3s ease;
    display: none; /* Hidden by default for mobile */
    overflow-y: auto; /* Enable scrolling for long menus */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0 15px;
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0; /* Remove gap for vertical menu */
  }

  .main-nav ul li {
    width: 100%;
  }

  .main-nav ul li a {
    padding: 12px 15px;
    color: var(--text-main);
    border-bottom: 1px solid var(--page-bg); /* Subtle separator */
  }

  .main-nav ul li:last-child a {
    border-bottom: none;
  }

  /* Footer Responsive */
  .footer-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 30px;
    margin-bottom: 20px;
  }

  .footer-col {
    text-align: center; /* Center content in footer columns */
  }

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

  .footer-nav {
    text-align: center; /* Center list items */
  }
  
  /* Ensure mobile images within content are responsive */
  .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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
