:root {
  --main-color: #113B7A;
  --aux-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: #08162B;
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--deep-navy);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop height */
  min-height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  background-color: var(--deep-navy);
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color);
  text-decoration: none;
  display: block;
  padding: 0;
  line-height: 1;
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--button-gradient);
  box-shadow: 0 4px 15px rgba(43, 115, 246, 0.4);
}

.btn-secondary {
  background-color: var(--aux-color);
  box-shadow: 0 4px 15px rgba(29, 95, 209, 0.4);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop height */
  min-height: 52px;
  display: flex;
  flex-direction: row; /* Desktop layout */
  align-items: center;
  overflow: hidden;
  width: 100%;
  background-color: var(--main-color); /* Different from header-top */
}

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

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  margin-left: auto; /* Push to right on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

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

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

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  backdrop-filter: blur(5px);
}

.site-footer {
  background-color: var(--card-bg);
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}

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

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

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

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-secondary);
}

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

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

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

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

.footer-slot-anchor-inner {
  width: 100%;
  min-height: 10px; /* Ensure visibility for debugging */
}

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

.footer-dynamic-row {
  max-width: 1200px;
  margin: 20px auto;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0 auto;
  text-align: center;
  border-top: 1px solid var(--divider-color);
  padding-top: 20px;
  color: var(--text-secondary);
}

.footer-bottom a { /* Ensure no links in footer-bottom */
  text-decoration: none;
  color: inherit;
  pointer-events: none;
}

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

  .header-top {
    height: 60px !important;
    min-height: 60px !important;
  }

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

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute; /* For robust centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger menu */
  }

  .logo img {
    max-height: 56px !important;
    max-width: 100%;
  }

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

  .hamburger-menu {
    display: flex;
    position: relative;
    z-index: 1001;
    margin-left: 0; /* Align left */
  }

  .main-nav {
    height: 100vh; /* Full viewport height for mobile menu */
    min-height: auto;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    flex-direction: column; /* Vertical layout */
    justify-content: flex-start;
    padding-top: 20px;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    background-color: var(--main-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    box-sizing: border-box;
    display: none; /* Hide by default, shown with .active */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--divider-color);
    justify-content: flex-start;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--divider-color);
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0 auto 20px auto;
  }

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

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