: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; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

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

body.no-scroll {
  overflow: hidden;
}

.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(--primary-color); /* Fallback, specific 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); /* Darker blue for top bar */
  width: 100%;
  color: #fff;
  padding: 0 20px;
}

.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: #fff;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  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;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--page-bg); /* Use a neutral background for this row */
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-align: center;
  border: none;
  color: #fff; /* Default button text color */
}

.btn-primary {
  background: var(--button-gradient);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-secondary {
  background-color: var(--secondary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  opacity: 0.9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-icon {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon::before {
  top: -10px;
}

.hamburger-icon::after {
  top: 10px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

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

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-right-placeholder {
  display: none; /* Hidden by default on desktop */
}

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

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

.nav-list li a {
  color: var(--text-custom-black); /* Changed to black for contrast */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

.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: 998; /* Below hamburger, above content */
}

/* Footer styles */
.site-footer {
  background-color: var(--text-main); /* Dark background for footer */
  color: #fff;
  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: #fff;
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.6;
  color: #ccc;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Slot anchors - hidden by default, will be populated by system */
.footer-slot-anchor, .footer-slot-anchor-inner {
  /* No specific visible styles, just structural */
}

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

  /* Header Top */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    justify-content: space-between; /* To push hamburger and logo apart */
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0; /* Container padding handled by header-top */
    justify-content: space-between; /* For hamburger, logo, placeholder */
  }

  .hamburger-menu {
    display: block;
    margin-right: 10px; /* Space between hamburger and logo */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

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

  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-right-placeholder {
    display: block; /* Show placeholder to balance hamburger */
    width: 30px; /* Equal width to hamburger */
    margin-left: 10px;
  }

  /* Mobile Buttons */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--page-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

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

  /* Main Nav - Mobile */
  .main-nav {
    min-height: 48px !important;
    height: auto; /* Adjust height dynamically for menu content */
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: 108px; /* Below fixed header-top (60px) and mobile-nav-buttons (48px) */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - 108px);
    background-color: var(--secondary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    color: var(--text-custom-black); /* Ensure text is black for contrast */
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 20px 15px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: auto;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }

  .nav-list li a {
    font-size: 18px;
    padding: 8px 0;
    display: block;
    width: 100%;
    color: var(--text-custom-black); /* Ensure text is black for contrast */
  }

  .overlay.active {
    display: block;
  }

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

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

  .footer-col h3 {
    margin-top: 0;
  }

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