/* Global Reset & Base */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  line-height: 1.6;
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: #1F2D3D; /* Text Main */
  margin-top: 0;
  margin-bottom: 15px;
}

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

/* 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);
  background-color: #FFFFFF; /* Base for fixed header */
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1F2D3D; /* Text Main for header top */
  width: 100%;
}

.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; /* Internal padding for container content */
}

.logo {
  color: #FFFFFF;
  font-size: 28px;
  font-weight: bold;
  text-transform: uppercase;
  display: block; /* Ensure visibility */
  text-decoration: none;
}

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

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

/* Mobile Navigation Buttons (hidden by default) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px; /* Fixed height for mobile */
  background-color: #F4F7FB; /* Background */
  width: 100%;
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: visible and horizontal */
  align-items: center;
  overflow: hidden;
  background-color: #6FA3FF; /* Auxiliary 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; /* Internal padding for container content */
}

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

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

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

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

.btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background-color: #6FA3FF; /* Auxiliary color for secondary button */
}

.btn-secondary:hover {
  background-color: #2F6BFF; /* Primary color on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu */
.hamburger-menu {
  display: none; /* Hidden by default for desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer */
.site-footer {
  background-color: #1F2D3D; /* Text Main for footer background */
  color: #D6E2FF; /* Border color for light text */
  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: 18px;
  margin-bottom: 15px;
}

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

.footer-description {
  margin-bottom: 15px;
  color: #D6E2FF; /* Border color for light 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 light text */
  text-decoration: none;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #2F6BFF; /* Primary for border */
  max-width: 1200px;
  margin: 0 auto;
  color: #D6E2FF; /* Border color for light text */
}

.footer-bottom p {
  margin: 0;
}

/* Footer slot anchors (must be visible) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Smallest possible height to ensure visibility */
}

/* Utility for no-scroll */
body.no-scroll {
  overflow: hidden;
}

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

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

  /* Header adjustments for mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px; /* Smaller padding for mobile */
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    flex: 1 !important; /* Allow logo to take available space */
    display: flex !important;
    justify-content: center !important; /* Center the logo text/image within its flex space */
    align-items: center !important;
    position: static !important; /* Override any global absolute positioning */
    transform: none !important; /* Override any global transform */
    max-width: calc(100% - 60px); /* Adjust based on hamburger width (30px) + padding */
  }
  
  .logo img {
    max-height: 56px !important;
    max-width: 100%; /* Ensure image fits within logo container */
  }

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

  .hamburger-menu {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons if only one */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .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 Navigation (Mobile - hidden by default, shown on active) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below the fixed header + mobile buttons */
    left: 0;
    width: 80%; /* Sidebar width */
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    z-index: 1000; /* Below overlay */
    background-color: #2F6BFF; /* Primary for mobile nav background */
  }

  .main-nav.active {
    display: flex; /* Must be flex to show */
    transform: translateX(0); /* Slide into view */
  }

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

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

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

  /* Overlay for mobile menu */
  .overlay.active {
    top: 0; /* Full screen overlay */
    height: 100vh;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 30px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
