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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #1F2D3D;
  background-color: #F4F7FB;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

ul {
  list-style: none;
}

/* Variables */
:root {
  --primary-color: #2F6BFF;
  --accent-color: #6FA3FF;
  --dark-blue-bg: #2257CC; /* Darker shade for header-top */
  --light-blue-bg: #6FA3FF; /* Accent color for main-nav */
  --text-main-color: #1F2D3D;
  --card-bg-color: #FFFFFF;
  --border-color: #D6E2FF;
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px */
}

/* Site Header - Fixed & Suspended */
.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(--card-bg-color); /* Neutral background for the whole header container */
  overflow-x: hidden; /* Prevent header content from overflowing */
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  height: 68px;
  min-height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--dark-blue-bg);
  width: 100%;
  overflow: hidden;
  position: relative; /* For hamburger positioning */
}

.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 {
  color: var(--card-bg-color);
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  display: block;
  height: 100%; /* Ensure logo text aligns vertically */
  display: flex;
  align-items: center;
  white-space: nowrap; /* Prevent logo text from wrapping */
}

.logo:hover {
  color: #ffffff;
}

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

/* Mobile Nav Buttons - Hidden by default */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default, shown on mobile */
  min-height: 48px;
  background-color: var(--card-bg-color); /* Neutral background */
  width: 100%;
  padding: 0 15px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px;
  min-height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  background-color: var(--light-blue-bg);
  width: 100%;
  overflow: hidden;
}

.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-list {
  display: flex;
  gap: 25px;
}

.nav-list a {
  color: #ffffff;
  font-weight: 500;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
  color: #D6E2FF; /* Lighter accent on hover */
}

/* Hamburger menu - Hidden by default on desktop */
.hamburger-menu {
  display: none; /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  left: 15px; /* Align with mobile padding */
  z-index: 1001; /* Above logo */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

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

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  color: #FFFFFF;
  background: var(--button-gradient);
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  cursor: pointer;
}

.mobile-nav-overlay.active {
  display: block;
}

/* Footer */
.site-footer {
  background-color: #1F2D3D; /* Dark background for footer */
  color: #D6E2FF;
  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 40px auto;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(214, 226, 255, 0.1);
}

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

.footer-col h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  margin-top: 8px;
}

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

.footer-logo:hover {
  color: var(--primary-color);
}

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

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

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

.footer-nav a {
  color: #D6E2FF;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  color: #D6E2FF;
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic Slot Anchor Inner */
.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure visibility for injection */
}

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

  /* Body overflow for mobile content protection */
  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 */
  .header-top {
    height: 60px;
    min-height: 60px;
    padding-left: 50px; /* Make space for hamburger */
    padding-right: 15px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    position: relative; /* For absolute positioning of logo */
  }

  /* Logo Centering (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: static; /* Reset absolute if it was set */
    transform: none; /* Reset transform if it was set */
    max-width: calc(100% - 100px); /* Adjust max-width to not overlap hamburger/buttons */
    font-size: 20px;
  }

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

  /* Mobile Nav Buttons - Always visible */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    height: 48px; /* Fixed height for consistency */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--card-bg-color);
  }

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

  /* Hamburger menu - Visible on mobile */
  .hamburger-menu {
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    padding: 10px 15px;
  }

  /* Main Navigation - Mobile */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    background-color: #1F2D3D; /* Dark background for mobile menu */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

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

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

  .nav-list {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .nav-list a {
    color: #ffffff;
    padding: 10px 0;
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-list li:last-child a {
    border-bottom: none;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-col h3::after {
    margin-left: 0;
  }

  .footer-logo {
    text-align: center;
    margin-bottom: 15px;
  }

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

  .footer-col p {
    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;
}
