/* General Reset & Base Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  padding-top: var(--header-offset); /* Critical for fixed header */
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: #2F6BFF; /* Primary */
}

a:hover {
  text-decoration: underline;
}

/* Header Offset Variables */
:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

/* Site Header - Fixed & Elevated */
.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: #FFFFFF; /* White background for the whole header */
}

/* Header Top Section (Desktop: Logo + Buttons, Mobile: Hamburger + Logo) */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #2F6BFF; /* Primary color for header-top, distinct from main-nav */
}

.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: 24px;
  font-weight: bold;
  color: #FFFFFF; /* White for logo text on primary background */
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 0;
  display: block;
}

/* 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; /* Fixed height for mobile button bar */
  background-color: #6FA3FF; /* Secondary color for mobile buttons bar */
  padding: 0 15px;
  justify-content: center;
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: #6FA3FF; /* Secondary color for main-nav, distinct from header-top */
}

.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-link {
  color: #FFFFFF; /* White for nav links on secondary background */
  padding: 10px 15px;
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

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

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 28px;
  color: #FFFFFF; /* White hamburger icon */
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

/* Buttons (General Style) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 15px;
}

.btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
  color: #FFFFFF;
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
  text-decoration: none;
}

.btn-secondary {
  background-color: #FFFFFF;
  color: #2F6BFF; /* Primary color for text */
  border: 1px solid #2F6BFF;
}

.btn-secondary:hover {
  background-color: #F4F7FB;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

/* Overlay for Mobile Menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.overlay.active {
  display: block;
}

/* Footer Styles */
.site-footer {
  background-color: #1F2D3D; /* Dark background for footer */
  color: #F4F7FB; /* Light text color */
  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: #FFFFFF;
  font-size: 16px;
  margin-bottom: 15px;
}

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

.footer-description {
  line-height: 1.6;
  color: #D6E2FF; /* Border color for description text */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Dynamic slot anchors - must be visible */
.footer-slot-anchor-inner {
  min-height: 1px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #6FA3FF; /* Secondary color for border */
  color: #D6E2FF; /* Border color for copyright text */
}

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

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

  /* Header Top Mobile */
  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height for mobile */
  }

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative;
  }

  /* Mobile Logo Centering */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Max-width to prevent overlap with hamburger */
  }

  /* Hamburger Menu Mobile */
  .hamburger-menu {
    display: block;
    order: -1;
  }

  /* Desktop Buttons Mobile */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* 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; /* Prevent buttons from wrapping */
    background-color: #6FA3FF; /* Secondary color for mobile buttons bar */
  }

  .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 Navigation Mobile (Hamburger Menu Content) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: #1F2D3D; /* Dark background for mobile menu */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    text-align: left;
    color: #FFFFFF;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    margin-bottom: 20px;
  }

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