:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --text-main-color: #1F2D3D;
  --text-black-color: #000000;
  --bg-card-color: #FFFFFF;
  --bg-body-color: #F4F7FB;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);

  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) + buffer */
}

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

body.no-scroll {
  overflow: hidden;
}

/* Site Header (Fixed) */
.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(--bg-card-color); /* Neutral background for the whole header */
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop height */
  min-height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--text-main-color); /* Darker background for contrast */
  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 */
.logo, .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block; /* Ensure it's visible */
}
.header-top .logo {
  color: #FFFFFF; /* White for dark background */
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons (Hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile height */
  background-color: var(--bg-body-color); /* Lighter background */
  width: 100%;
  padding: 0 15px; /* Default padding for desktop, will be overridden for mobile */
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop height */
  min-height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color); /* Lighter background for contrast */
  color: #FFFFFF;
}

.main-nav .nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  width: 100%;
}

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

.main-nav ul li a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 0;
  transition: color 0.3s ease;
}

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

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

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Hamburger Menu (Hidden by default on desktop) */
.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;
  width: 100%;
  height: 3px;
  background-color: #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); }

/* Mobile Overlay (Hidden by default) */
.mobile-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer Styles */
.site-footer {
  background-color: var(--text-main-color); /* Dark background */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

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

.footer-logo {
  font-size: 24px;
  margin-bottom: 15px;
  display: block;
  color: var(--primary-color);
}

.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(--primary-color);
}

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic Slot Anchor Styles (ensure visibility) */
.footer-slot-anchor, .footer-slot-anchor-inner {
  /* These containers must not hide injected content */
  display: block;
  min-height: 1px; /* Ensure it takes up space even if empty */
  width: 100%;
}

/* MEDIA QUERIES (MOBILE) */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-nav-buttons (48px) + buffer */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body also prevents horizontal scroll */
  }

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

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

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    max-width: none; /* No max-width on mobile */
    position: relative; /* For logo centering */
  }

  /* Logo Centering for Mobile */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: calc(100% - 100px); /* Adjust width to not overlap hamburger/buttons */
  }
  .header-top .logo {
    font-size: 24px;
  }

  /* Hamburger Menu (Visible on mobile) */
  .hamburger-menu {
    display: block;
    position: relative; /* Keep it in the flow for left alignment */
    z-index: 1001; /* Ensure it's above the logo if they overlap */
  }

  /* Desktop Navigation Buttons (Hidden on mobile) */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile Navigation Buttons (Visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    padding: 0 15px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Prevent content overflow */
    background-color: var(--bg-body-color);
  }

  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation Bar (Mobile specific) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 75%; /* Slide-out menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--bg-card-color); /* White background for menu */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease, display 0.3s ease; /* Transition for slide-in */
    overflow-y: auto; /* Scrollable if content is long */
    z-index: 1001; /* Above header */
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start; /* Align menu items to start */
    padding: 20px 0;
    min-height: unset !important; /* Remove fixed height */
    height: unset !important; /* Remove fixed height */
  }

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

  .main-nav .nav-container {
    flex-direction: column; /* Vertical menu items */
    align-items: flex-start; /* Align to left */
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap for vertical list */
  }

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

  .main-nav ul li a {
    color: var(--text-main-color); /* Dark text for white background */
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav ul li a:hover {
    background-color: var(--bg-body-color);
    color: var(--primary-color);
  }
  
  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
  }

  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
