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

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

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

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold for logo */
  text-decoration: none;
  display: block;
  line-height: 1; /* Ensure text logo aligns well */
}
/* .logo img { display: block; max-height: 60px; height: auto; width: auto; max-width: 280px; object-fit: contain; } */

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

.btn {
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

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

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

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-gold); /* Gold on hover */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

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

.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-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Fixed height for mobile button bar */
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: var(--color-card-bg); /* Card BG for mobile buttons */
  padding: 0 15px;
  gap: 10px;
}

/* Footer Styles */
.site-footer {
  background-color: var(--color-deep-navy); /* Deep Navy */
  padding: 40px 20px 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

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

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

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

.footer-col .footer-description {
  line-height: 1.6;
  color: var(--color-text-secondary);
  word-wrap: break-word; /* Ensure full text display */
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a:hover {
  color: var(--color-gold); /* Gold on hover */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* Dynamic slot anchor visibility constraint */
.footer-slot-anchor-inner {
  min-height: 1px;
  visibility: visible;
  opacity: 1;
  overflow: visible;
}


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

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

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    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;
  }
  /* .logo img { display: block !important; max-width: 100%; height: auto; max-height: 56px; } */

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

  .hamburger-menu {
    display: block;
    position: absolute; /* Position relative to header-container */
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden; /* Prevent buttons from overflowing */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0; /* Allow shrinking */
    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;
  }

  .main-nav {
    min-height: auto; /* Allow height to adjust for content */
    height: auto;
    position: fixed;
    top: var(--header-offset); /* Position below header & mobile buttons */
    left: 0;
    width: 280px; /* Fixed width for mobile menu */
    max-width: 80%; /* Max width relative to viewport */
    background-color: var(--color-primary); /* Same as desktop main-nav */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-out;
    display: none; /* Hidden by default, will be block/flex when active */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below hamburger, above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    align-items: flex-start; /* Align menu items to the left */
  }

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

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

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Below menu, above body */
    display: none; /* Hidden by default */
  }

  .overlay.active {
    display: block;
  }

  body.no-scroll {
    overflow: hidden;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    text-align: center;
  }

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

  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }

  /* Mobile overflow protection for content images */
  .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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
