:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --card-bg: #10233F;
  --border-color: #244D84;
  --divider-color: #1B3357;
  --deep-navy: #08162B;
}

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

/* Base styles for links */
a {
  color: var(--text-main);
  text-decoration: none;
}
a:hover {
  color: var(--secondary-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.btn:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}
.btn-primary {
  background: var(--secondary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover {
  background: var(--primary-color);
}


/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background-color: var(--deep-navy); /* Fallback, specific sections have their own bg */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-navy); /* Dark background for top bar */
  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; /* Desktop padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  display: block; /* Ensures text logo behaves correctly */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  width: 30px;
  height: 30px;
  z-index: 1002; /* Above other header elements on mobile */
}
.hamburger-menu::before,
.hamburger-menu::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu::before {
  top: 8px;
}
.hamburger-menu::after {
  bottom: 8px;
}
.hamburger-menu.active::before {
  transform: rotate(45deg);
  top: 50%;
  margin-top: -1.5px;
}
.hamburger-menu.active::after {
  transform: rotate(-45deg);
  bottom: 50%;
  margin-bottom: -1.5px;
}
.hamburger-menu span {
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}
.hamburger-menu.active span {
  opacity: 0;
  transform: translateX(-30px);
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, will be shown on mobile */
  min-height: 48px; /* Placeholder height */
  background-color: var(--primary-color); /* Background for mobile buttons */
  width: 100%;
}

.mobile-spacer {
  display: none; /* Hidden on desktop */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Blue background for main nav */
  width: 100%;
}

.main-nav .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;
  gap: 25px; /* Spacing between nav links */
}

.main-nav .nav-link {
  color: var(--text-main);
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.main-nav .nav-link:hover {
  color: var(--secondary-color);
}

/* Overlay for mobile menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}
.overlay.active {
  display: block;
}

/* Footer */
.site-footer {
  background-color: var(--card-bg);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid var(--divider-color);
}

.site-footer h3 {
  color: var(--text-main);
  font-size: 18px;
  margin-bottom: 15px;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--secondary-color);
}

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

.footer-col {
  padding: 0;
}

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

.footer-description {
  color: var(--text-secondary);
  margin-bottom: 15px;
  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 li:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--divider-color);
  color: var(--text-secondary);
  font-size: 13px;
}
.footer-bottom a {
  pointer-events: none;
  cursor: default;
  color: var(--text-secondary);
}

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

  body {
    padding-top: var(--header-offset);
  }

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
  }

  .logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    padding: 0 5px;
  }

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

  .mobile-spacer {
    display: block; /* Visible on mobile to push logo to center */
    width: 40px; /* Match hamburger width for centering effect */
    height: 1px; /* Minimal height */
  }

  /* Mobile Nav Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Mobile Main Navigation (Hamburger Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    flex-direction: column;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 70%; /* Adjust width of mobile menu */
    max-width: 300px; /* Optional max-width for menu */
    height: calc(100% - var(--header-offset));
    background-color: var(--deep-navy); /* Dark background for mobile menu */
    z-index: 1001;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    width: 100%;
    max-width: none;
    height: auto;
    gap: 15px;
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--divider-color);
  }
  .main-nav .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Footer */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
    margin-bottom: 20px;
  }

  .footer-col {
    text-align: center;
  }
  .footer-col .footer-logo, .footer-col h3 {
    text-align: center;
  }
  .footer-col .footer-nav {
    text-align: center;
  }
  .footer-col .footer-nav li {
    display: block;
    margin: 0 0 8px;
  }

  .footer-bottom {
    padding-top: 15px;
  }

  /* Mobile overflow prevention */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
