/* Base & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  padding-top: var(--header-offset); /* Must be here */
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* Site Header - Fixed Navigation */
.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; /* Default background, overridden by sections */
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1F2D3D; /* Dark background for header-top, Text Main */
  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;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* White text for logo on dark background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  order: 2; /* Default order for desktop logo */
}

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

/* Mobile Navigation Buttons (hidden by default) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background-color: #F4F7FB; /* Background color for mobile buttons */
  width: 100%;
  padding: 0 15px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

/* Main Navigation Section */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: #2F6BFF; /* Primary color for main-nav */
  width: 100%;
}

.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 text for nav links */
  padding: 10px 15px;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

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

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  order: 1; /* Default order for desktop, will be overridden */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF; /* White for dark header-top */
  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); }

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline */
}

.btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button color */
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3); /* Glow */
}

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

.btn-secondary {
  background-color: #6FA3FF; /* Secondary color for second button */
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 10px rgba(111, 163, 255, 0.3);
}

.btn-secondary:hover {
  opacity: 0.9;
  box-shadow: 0 6px 15px rgba(111, 163, 255, 0.4);
}

/* Footer Styles */
.site-footer {
  background-color: #1F2D3D; /* Dark background for footer, Text Main */
  color: rgba(255, 255, 255, 0.8);
  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 {
  color: #FFFFFF;
  font-size: 18px;
  margin-bottom: 15px;
}

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

.footer-description {
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #6FA3FF; /* Secondary color for hover */
}

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

/* Dynamic Slot Anchor - must not hide content */
.footer-slot-anchor-inner {
  min-height: 1px;
}

/* Overlay for mobile menu (CSS part) */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
}

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

  /* Header Top Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    position: relative; /* For absolute positioning of logo/hamburger */
  }

  .header-container {
    padding: 0 15px;
    max-width: none;
    width: 100%;
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .logo {
    font-size: 24px;
    flex: 1 !important; /* Method 1 for text logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Logo in the middle */
  }

  .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }

  .hamburger-menu {
    display: block;
    position: static; /* Let flexbox handle positioning */
    order: 1; /* Hamburger on the left */
    margin-right: auto; /* Push logo to center */
  }

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    height: auto;
    padding: 8px 15px;
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

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

  /* Main Navigation Mobile */
  .main-nav {
    display: none; /* Hidden by default for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Start below the header */
    left: 0;
    width: 80%;\    max-width: 300px;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background-color: #2F6BFF;
    transform: translateX(-100%);
    transition: transform 0.3s ease, display 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 20px 0;
    z-index: 999;
  }

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

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

  .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;
  }

  /* Body no scroll when menu is open */
  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-col {
    text-align: center;
  }

  .footer-col h3, .footer-logo {
    text-align: center;
  }

  .footer-nav {
    padding-left: 0;
  }

  .footer-nav li {
    text-align: center;
  }

  /* 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
