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

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

body.no-scroll {
  overflow: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-top {
  background-color: var(--primary-color); /* Distinct from main-nav */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.header-container {
  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: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  margin: 5px 0;
  transition: 0.4s;
}

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

/* Mobile-specific buttons, hidden on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden globally, shown on mobile */
  min-height: 48px; /* Placeholder min-height */
  background-color: #F0F0F0; /* A light background for the mobile button bar */
  padding: 10px 20px; /* Default padding */
  width: 100%;
}

.main-nav {
  background-color: var(--secondary-color); /* Distinct from header-top */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

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

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #E0E0E0;
}

.btn {
  background: var(--button-gradient);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px var(--glow-color);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: #FFFFFF;
}

.overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.overlay.active {
  display: block;
}

/* Site Footer */
.site-footer {
  background-color: var(--primary-color);
  color: #FFFFFF;
  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 30px auto;
}

.footer-col h3 {
  color: #FFFFFF;
  font-size: 18px;
  margin-bottom: 15px;
}

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

.footer-description {
  margin-bottom: 15px;
  color: #E0E0E0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a,
.footer-legal-nav a {
  color: #E0E0E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover,
.footer-legal-nav a:hover {
  color: #FFFFFF;
}

.footer-col p {
  margin-bottom: 10px;
  color: #E0E0E0;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-bottom p {
  margin: 0;
  color: #E0E0E0;
}

.footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-legal-nav li {
  margin-bottom: 0;
}

/* Dynamic slot anchor inner container */
.footer-slot-anchor-inner {
  /* This class ensures the slot anchors are present in the DOM */
  min-height: 1px; /* Ensure it takes up minimal space if empty */
}

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

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

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

  .header-container {
    max-width: none;
    padding: 0;
    justify-content: space-between; /* Keep space-between for hamburger and logo */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: block;
    order: 1;
  }

  .logo {
    order: 2;
    flex: 1 !important; /* Method 1 for image logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: static; /* Reset if absolute was used for desktop */
    transform: none; /* Reset if transform was used for desktop */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjusted padding */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #F8F8F8; /* A slightly different light background */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 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 {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%; /* Adjust as needed */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: var(--primary-color);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Off-screen */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1001;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0;
    height: auto; /* Allow content to dictate height */
    max-width: none;
  }

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

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

  .hamburger-menu.active .hamburger-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .hamburger-icon:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .hamburger-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

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

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

  .footer-legal-nav {
    flex-direction: column;
    gap: 5px;
  }

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