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

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

a {
  text-decoration: none;
  color: var(--primary-color);
}

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

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

.header-top {
  box-sizing: border-box;
  height: var(--header-top-desktop-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1F2D3D; /* Darker color for header-top, contrasting with main-nav */
  color: #FFFFFF;
  padding: 0 20px; /* Default padding for desktop */
}

.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: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap; /* Ensure logo text stays on one line */
  overflow: hidden;
  text-overflow: ellipsis;
  display: block; /* Ensure visibility */
  height: 100%; /* Take full height of parent */
  display: flex;
  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;
}

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

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

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

.btn-secondary {
  background-color: var(--accent-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  transform: rotate(0deg);
  transition: .5s ease-in-out;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #FFFFFF; /* Color for hamburger lines */
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

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

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

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

.hamburger-menu.active span:nth-child(1) {
  top: 10px;
  transform: rotate(135deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.hamburger-menu.active span:nth-child(3) {
  top: 10px;
  transform: rotate(-135deg);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, shown on mobile */
  min-height: var(--mobile-nav-buttons-height);
  background-color: #2D5EDD; /* Slightly different background for mobile buttons */
  width: 100%;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
}

.main-nav {
  box-sizing: border-box;
  height: var(--main-nav-desktop-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Lighter color for main-nav, contrasting with header-top */
  width: 100%;
  color: #FFFFFF;
}

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

.nav-link {
  color: #FFFFFF;
  padding: 10px 15px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  font-size: 15px;
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

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

/* 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: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  margin-top: 0;
  line-height: 1.8;
  color: #B0B0B0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 18px;
  color: #FFFFFF;
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

.footer-nav a {
  color: #B0B0B0;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner { /* For dynamic content injection */
  min-height: 10px; /* Ensure slot is visible if empty */
}

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

.footer-bottom p {
  margin: 0;
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: calc(var(--header-top-mobile-height) + var(--mobile-nav-buttons-height) + 2px); /* 60px + 48px + 2px = 110px */
  }

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

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .header-top {
    height: var(--header-top-mobile-height);
    padding: 0 15px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0; /* Handled by header-top padding */
    justify-content: space-between; /* Hamburger left, logo center, space right */
    position: relative; /* For absolute logo positioning */
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    position: absolute; /* Position relative to header-container */
    left: 15px; /* Aligned with header-top padding */
  }

  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    position: static; /* Reset absolute positioning if any */
    transform: none; /* Reset transform if any */
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right-side elements */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: var(--mobile-nav-buttons-height);
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center; /* Center buttons if less than 2 */
  }

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

  .main-nav {
    height: auto; /* Auto height for expanded menu */
    min-height: var(--main-nav-mobile-height); /* Min height for closed state */
    position: fixed; /* Fixed position for mobile menu */
    top: calc(var(--header-top-mobile-height) + var(--mobile-nav-buttons-height)); /* Below header-top and mobile buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    background-color: var(--primary-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    overflow-y: auto; /* Enable scrolling for long menus */
    height: calc(100vh - (var(--header-top-mobile-height) + var(--mobile-nav-buttons-height))); /* Fill remaining viewport height */
    display: none; /* Hidden by default for JS to toggle */
  }

  .main-nav.active {
    transform: translateX(0);
    display: flex; /* Make it visible when active */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

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

  .overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  .site-footer {
    padding: 30px 15px 15px;
  }

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

  .footer-col {
    align-items: flex-start;
  }

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

  .footer-bottom {
    padding-top: 15px;
    margin-top: 20px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
