: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-custom-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}

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

body.no-scroll {
  overflow: hidden;
}

/* 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);
  background-color: var(--page-bg); /* Use page background for the overall header container */
}

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

.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 {
  font-size: 24px;
  font-weight: bold;
  color: var(--card-bg); /* White text for logo on primary blue background */
  text-decoration: none;
  display: flex; /* For potential image logo centering */
  align-items: center;
}

.logo img {
  display: block;
  max-height: 60px;
  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;
  background-color: var(--page-bg); /* Neutral background for mobile buttons */
  padding: 0 15px; /* Adjust padding for mobile */
}

.btn {
  background: var(--button-gradient);
  color: var(--card-bg); /* White text on button gradient */
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  white-space: nowrap;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: visible, row layout */
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color); /* Auxiliary blue for main nav */
  width: 100%;
}

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

.nav-link {
  color: var(--text-main); /* Dark text on auxiliary blue background */
  text-decoration: none;
  padding: 8px 0;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--card-bg); /* White on hover */
}

/* Hamburger Menu (Desktop: hidden) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001; /* Above header */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--card-bg); /* White lines on primary blue background */
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

/* Overlay */
.overlay {
  display: none; /* Hidden by default */
  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;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Primary blue for footer background */
  color: var(--card-bg); /* White text for footer */
  padding: 40px 20px 20px;
  font-size: 14px;
}

.site-footer h3 {
  color: var(--card-bg);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

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

.footer-col {
  padding: 0;
}

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

.footer-description {
  margin-bottom: 15px;
  line-height: 1.6;
  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(--card-bg);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--glow-color); /* Lighter blue on hover */
}

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

.footer-bottom p {
  margin: 0;
  color: var(--card-bg);
}

/* Dynamic slot anchor styles (must be visible) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
}


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

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

  /* Header Top */
  .header-top {
    min-height: 60px;
    height: 60px;
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important: remove max-width on mobile */
    justify-content: space-between; /* To push hamburger left and logo center */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Place on the left */
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    order: 2; /* Place logo in center */
    flex: 1 !important; /* Allow logo to take available space for centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 70px); /* Adjust max-width to leave space for hamburger */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    height: 48px; /* Fixed height for consistency */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: var(--page-bg); /* Match site-header background */
  }

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

  /* Main Nav (Mobile Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--secondary-color); /* Match desktop main-nav background */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1000; /* Below hamburger menu, above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 0;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    max-width: none; /* Important: remove max-width on mobile */
    gap: 15px; /* Spacing between menu items */
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
  }

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

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
  
  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Mobile Content Overflow Protection */
  .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;
}
