:root {
  --header-offset: 122px;
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy-color: #08162B;
}

body {
  padding-top: var(--header-offset);
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: var(--deep-navy-color);
  color: var(--text-secondary);
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  background-color: var(--deep-navy-color); /* Overall header background */
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  background-color: var(--deep-navy-color); /* Different from main-nav */
  color: var(--text-main);
}

.header-top .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 30px; /* Padding for logo and buttons */
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.logo img {
  display: block;
  max-height: 60px; /* Desktop logo height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
}

/* Mobile Nav Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  background-color: var(--primary-color); /* Different from header-top */
  color: var(--text-main);
}

.main-nav .nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 25px;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 16px;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-color);
  border-bottom: 2px solid var(--gold-color);
}

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  backdrop-filter: blur(3px);
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  background: var(--button-gradient);
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-color);
}

/* Site Footer */
.site-footer {
  background-color: var(--card-bg);
  color: var(--text-secondary);
  padding: 40px 0 20px;
  font-size: 14px;
}

.footer-container {
  padding: 0 20px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--divider-color);
}

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

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 15px;
}

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

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

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px; /* Default for col slots */
}

.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--divider-color);
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.footer-dynamic-row-bottom-slot {
  border-bottom: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  color: var(--text-secondary);
}

.footer-bottom p {
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  .header-top {
    height: 60px; /* Mobile fixed height */
  }

  .header-top .header-container {
    padding: 0 15px;
    position: relative; /* For logo centering */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger and potential right element */
  }
  .logo img {
    max-height: 56px !important; /* Mobile logo height */
  }

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

  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1002;
  }

  .mobile-nav-buttons {
    display: flex !important;
    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(--deep-navy-color); /* Match header-top background */
    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);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    height: 100vh; /* Full viewport height */
    width: 280px;
    position: fixed;
    top: 0; /* Aligns to top of viewport */
    left: 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 80px; /* Space for header-top when menu is open */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    z-index: 999;
    background-color: var(--primary-color);
    overflow-y: auto;
  }

  .main-nav.active {
    transform: translateX(0); /* Visible when active */
    display: flex; /* Ensure display is not none */
  }

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

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

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

  .footer-top-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-col:last-of-type {
    margin-bottom: 0;
  }

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