:root {
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
  --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 {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--color-deep-navy);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Header Styles --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

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

.header-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px; /* Padding for logo and buttons */
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold for logo text */
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  line-height: 1;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
}

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

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

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

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

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.2s ease;
  height: 100%;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
}

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

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

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text-main);
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
}

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

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

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

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998;
}

/* --- Footer Styles --- */
.site-footer {
  background-color: var(--color-deep-navy);
  color: var(--color-text-secondary);
  padding: 40px 20px 20px;
  box-sizing: border-box;
  border-top: 1px solid var(--color-divider);
}

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

.footer-col {
  box-sizing: border-box;
}

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

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-divider);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.footer-bottom p {
  margin: 0;
}

/* Ensure dynamic slot anchors are present and not hidden by default */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up minimal space but is renderable */
  display: block; /* Ensure it's not inline */
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

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

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

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

  .logo {
    flex: 1;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger width */
    font-size: 24px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    min-height: 48px;
    height: auto; /* Allow content to dictate height */
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 15px; /* Adjust padding */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--color-card-bg); /* Use card BG for mobile button bar */
    border-bottom: 1px solid var(--color-divider);
  }

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

  .main-nav {
    min-height: auto; /* Allow height to adjust */
    height: 100vh; /* Full viewport height for menu */
    width: 280px; /* Fixed width for slide-in menu */
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease-in-out;
    background-color: var(--color-primary); /* Use primary for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--header-offset); /* Push content below fixed header elements */
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none; /* Hidden by default */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: none;
    justify-content: flex-start;
    font-size: 16px;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--color-gold);
    border-bottom-color: transparent;
    background-color: rgba(255, 255, 255, 0.1);
  }

  .hamburger-menu {
    display: block;
    order: -1; /* Place to the left of logo */
    color: var(--color-text-main);
    margin-right: auto; /* Push logo to center */
  }

  .overlay.active {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col:first-child {
    text-align: center;
  }
  .footer-logo {
    display: inline-block;
  }
  .footer-heading {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
  .footer-nav li {
    display: inline-block;
    margin: 0 8px 10px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
