html { scroll-behavior: smooth; }
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  background-color: #08162B; /* Deep Navy for body background */
  color: #F3F8FF; /* Text Main */
  padding-top: var(--header-offset); /* Must be here */
  overflow-x: hidden; /* Global overflow for body */
}

:root { --header-offset: 122px; }
@media (max-width: 768px) {
  :root { --header-offset: 110px; }
}

/* 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: #08162B; /* Deep Navy */
}

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

.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; /* Padding for desktop logo/buttons */
}

.logo {
  color: #F2C14E; /* Gold */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block; /* Ensure visibility */
  line-height: 1; /* Adjust line height for text logo */
}

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

/* Mobile Nav Buttons - Hidden by default globally */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Crucial: hidden globally */
  min-height: 48px;
  background-color: #10233F; /* Card BG */
  width: 100%;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Default to flex for desktop */
  align-items: center;
  overflow: hidden;
  background-color: #113B7A; /* Primary color */
  width: 100%;
}

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

.nav-link {
  color: #F3F8FF; /* Text Main */
  text-decoration: none;
  padding: 10px 15px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: #F2C14E; /* Gold */
}

/* Hamburger Menu - Hidden by default globally */
.hamburger-menu {
  display: none; /* Hidden globally */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1002; /* Above header-top content */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #F3F8FF; /* 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);
}

/* Buttons */
.btn {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #F3F8FF; /* Text Main */
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background 0.3s ease, transform 0.3s ease;
  white-space: nowrap; /* Prevent breaking on desktop */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Overlay - Hidden by default globally */
.overlay {
  display: none; /* Hidden globally */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.7);
  z-index: 999;
}

.overlay.active {
  display: block;
}

/* Footer */
.site-footer {
  background-color: #08162B; /* Deep Navy */
  color: #AFC4E8; /* Text Secondary */
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
}

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

.footer-col h3 {
  color: #F3F8FF; /* Text Main */
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-logo {
  color: #F2C14E; /* Gold */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
  line-height: 1;
}

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word; /* Ensure full display */
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: #AFC4E8; /* Text Secondary */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #F2C14E; /* Gold */
}

.footer-bottom {
  border-top: 1px solid #1B3357; /* Divider */
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  color: #AFC4E8; /* Text Secondary */
}

/* Footer Dynamic Slots - Ensure visibility */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure element exists and can be rendered */
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px;
    justify-content: space-between;
    position: relative; /* For absolute logo centering */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%;
  }

  /* Hamburger menu visible on mobile */
  .hamburger-menu {
    display: block;
    order: -1; /* Place it first */
    z-index: 1002;
  }
  
  /* Desktop buttons hidden on mobile */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile nav buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Crucial: flex on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons if less than 2 */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #10233F; /* Card BG */
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Ensure two buttons fit with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Reduced padding */
    font-size: 13px; /* Reduced font size */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  .main-nav {
    min-height: 48px !important;
    height: calc(100% - var(--header-offset)) !important; /* Take remaining height */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset);
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max menu width */
    background-color: #08162B; /* Deep Navy */
    flex-direction: column; /* Vertical menu */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay */
    overflow-y: auto; /* Scrollable if content is long */
    display: none; /* Crucial: hidden by default, toggled by JS */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #1B3357; /* Divider */
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column for mobile footer */
  }

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

  /* Mobile Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* Body no-scroll for mobile menu */
body.no-scroll {
  overflow: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
