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

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

/* --- 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); /* Use a neutral background for the whole header wrapper */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1A4C80; /* Darker shade for header-top */
  width: 100%;
  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 {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* White text for dark background */
  text-decoration: none;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}

.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: #F0F5FF; /* A lighter background for mobile buttons section */
  width: 100%;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
}

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

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #FFFFFF; /* White for dark header-top */
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Default display for desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary color 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;
}

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

.main-nav ul li a {
  color: #FFFFFF; /* White text for primary color background */
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--accent-color); /* Highlight color */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: #FFFFFF; /* Default text color for buttons */
  border: none;
}

.btn-primary {
  background: var(--button-gradient);
}

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

.btn-secondary {
  background-color: #6FA3FF; /* Accent color for secondary button */
  border: 1px solid #6FA3FF;
  color: #FFFFFF;
}

.btn-secondary:hover {
  background-color: #5A92E0;
  border-color: #5A92E0;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* --- Footer Styles --- */
.site-footer {
  background-color: #1F2D3D; /* Dark background for footer */
  color: #E0E0E0;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  color: #FFFFFF;
  font-size: 16px;
  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;
  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 li a {
  color: #E0E0E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - ensure they are visible */
.footer-slot-anchor-inner, .footer-slot-anchor-outer {
  min-height: 1px; /* Ensure it takes up space, even if empty */
  width: 100%;
  display: block; /* Ensure it's not inline-block or similar that might hide content */
}

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

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

  .site-header {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0; /* Handled by header-top padding */
    position: relative; /* For absolute logo centering */
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%;
  }

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

  .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 if text wraps */
    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; /* Ensure buttons stay in one row */
    background-color: #F0F5FF; /* Same as desktop for consistency */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    position: relative;
    left: 0; /* Align to the very left of header-top */
    margin-left: 0; /* No extra margin, rely on header-top padding */
  }

  /* Hamburger active state color for mobile */
  .hamburger-menu.active span {
    background-color: var(--primary-color); /* Change color when active */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below the combined header */
    left: 0;
    width: 70%; /* Adjust width of mobile menu */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg); /* White background for mobile menu */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    box-sizing: border-box;
  }

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

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
    gap: 0; /* Remove gap for vertical list */
    width: 100%;
  }

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

  .main-nav ul li a {
    color: var(--text-main-color); /* Dark text for light menu background */
    padding: 12px 20px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
  }

  .main-nav ul li a:hover,
  .main-nav ul li a.active {
    background-color: #F4F7FB;
    color: var(--primary-color);
  }

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

  /* Ensure body content doesn't scroll when menu is open */
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer mobile adjustments */
  .site-footer {
    padding: 30px 15px 15px;
  }

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

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

  .footer-col h3 {
    margin-bottom: 10px;
  }

  .footer-nav {
    padding-top: 10px;
  }

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

  .footer-nav li a {
    display: inline-block;
  }

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

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

  /* Mobile content area protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
