body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --text-main: #1F2D3D;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
}

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

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #F4F7FB; /* Background color for the whole fixed header */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1A4BCC; /* Darker blue */
  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; /* Added padding to the container */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px; /* Limit logo width to prevent overflow */
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px;
  background-color: #1A4BCC; /* Same as header-top */
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: #E0E9FF; /* Lighter blue */
  width: 100%;
}

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

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

.nav-list a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  color: #FFFFFF;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

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

/* Hamburger Menu (Mobile) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

/* Overlay (Mobile) */
.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: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Footer Styles */
.site-footer {
  background-color: #1F2D3D; /* Text Main as footer background for contrast */
  color: #F4F7FB; /* Background color for footer text */
  padding: 40px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  font-size: 18px;
  color: #FFFFFF;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

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

.footer-description {
  margin-bottom: 20px;
  line-height: 1.8;
  color: #D6E2FF; /* Border color for description text */
}

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

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

.footer-nav a {
  color: #D6E2FF; /* Border color for footer links */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Footer slot anchors */
.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure visibility for debugging/layout */
}

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

  /* Header adjustments */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

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

  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: 1; /* Place it first */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Place it second (center) */
    max-width: calc(100% - 80px); /* Adjust max-width to leave space for hamburger and potential right element if any */
    font-size: 20px;
  }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: 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); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main navigation (mobile off-canvas) */
  .main-nav {
    min-height: auto; /* Allow height to adjust to content */
    height: 100vh; /* Full viewport height when active */
    width: 280px; /* Fixed width for the sidebar */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header + mobile buttons */
    left: 0;
    background-color: #FFFFFF; /* Menu background */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    flex-direction: column; /* Vertical layout for mobile */
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px; /* Padding inside the menu */
    overflow-y: auto; /* Enable scrolling for long menus */
    display: none; /* Important: hidden by default */
  }

  .main-nav.active {
    transform: translateX(0);
    display: flex; /* Important: show when active */
  }

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    height: auto; /* Adjust height based on content */
    padding: 0 15px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap between vertical menu items */
  }

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid #F4F7FB; /* Light separator */
  }

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

  .nav-list a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    color: var(--text-main);
  }

  /* Overlay */
  .overlay.active {
    display: block;
    opacity: 1;
  }

  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
    margin-bottom: 30px;
  }

  .footer-col h3 {
    margin-bottom: 15px;
    padding-bottom: 8px;
  }

  /* Mobile 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;
}
