:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
}
body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: #F3F8FF; /* Text Main */
  background-color: #08162B; /* Deep Navy as general background */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

/* Base styles for the entire 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.2);
  background-color: transparent; /* Handled by child elements */
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #08162B; /* Deep Navy */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

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

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

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex; /* Always visible on desktop */
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Fixed height for mobile */
  background-color: #10233F; /* Card BG */
  padding: 0 20px; /* Default padding for desktop, will be overridden for mobile */
}

/* Main Navigation Area */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: #1D5FD1; /* Auxiliary Color */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Horizontal on desktop */
  justify-content: center; /* Centered on desktop */
  align-items: center;
}

.nav-link {
  color: #F3F8FF; /* Text Main */
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.nav-link:hover {
  color: #F2C14E; /* Gold */
  background-color: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001; /* Above header */
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #F3F8FF; /* Text Main */
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Buttons */
.btn {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button gradient */
  color: #F3F8FF; /* Text Main */
  text-decoration: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}
.btn:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), 0 0 10px #4FA8FF; /* Glow */
  transform: translateY(-1px);
}

/* Overlay for mobile menu */
.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; /* Below menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}
.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer styles */
.site-footer {
  background-color: #08162B; /* Deep Navy */
  color: #AFC4E8; /* Text Secondary */
  padding: 40px 20px 20px; /* Adjusted padding-bottom for copyright */
  font-size: 15px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 30px; /* Space above mid slots */
}

.footer-col h3 {
  color: #F3F8FF; /* Text Main */
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 8px;
}
.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: #F2C14E; /* Gold */
}

.footer-logo {
  color: #F3F8FF; /* Text Main */
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  color: #AFC4E8; /* Text Secondary */
  line-height: 1.6;
  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: 10px;
}
.footer-nav a {
  color: #AFC4E8; /* Text Secondary */
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: #F2C14E; /* Gold */
}

/* Dynamic slot anchor inner (must be empty and visible) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space if empty */
}

/* Footer Bottom (Copyright) */
.footer-bottom {
  border-top: 1px solid #1B3357; /* Divider */
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
  color: #AFC4E8; /* Text Secondary */
}
.footer-bottom a {
  text-decoration: none;
  color: inherit;
}

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    padding: 0; /* Handled by header-top padding */
    justify-content: space-between; /* Keep space-between for hamburger and buttons */
    position: relative; /* For absolute logo centering if needed */
  }

  /* Hamburger menu visible on mobile */
  .hamburger-menu {
    display: flex;
    order: 0; /* Place to the far left */
  }

  /* Logo Centering on Mobile */
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center the logo text/image */
    align-items: center !important;
    position: absolute; /* Absolute positioning for better centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side elements */
    height: 100%; /* Ensure logo takes full height of header-top */
  }
  .logo img {
    max-height: 56px !important; /* Smaller max-height for mobile logo */
  }

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

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px; /* Fixed height for mobile */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for mobile buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: #10233F; /* Card BG */
  }
  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font size for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main navigation hidden by default, slides in from left */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below header */
    left: 0;
    width: 280px; /* Fixed width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #08162B; /* Deep Navy */
    flex-direction: column; /* Vertical on mobile */
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease; /* Smooth slide transition */
    overflow-y: auto; /* Scroll if menu content is long */
    z-index: 1001; /* Above overlay */
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column; /* Stack links vertically */
    align-items: flex-start; /* Align links to the left */
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Handled by main-nav padding */
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #1B3357; /* Divider */
    text-align: left;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* 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;
  }

  /* Footer mobile adjustments */
  .site-footer {
    padding: 30px 15px 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
  }
  .footer-col h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .footer-logo {
    font-size: 20px;
  }
  .footer-nav li {
    margin-bottom: 8px;
  }
  .footer-bottom {
    margin-top: 20px;
    padding-top: 15px;
    font-size: 13px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
