/* General Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

a {
  text-decoration: none;
  color: #F2FFF6; /* Text Main */
}

a:hover {
  color: #2AD16F; /* Lighter green for hover */
}

ul {
  list-style: none;
}

/* Header Variables & Fixed Positioning */
:root {
  --header-offset: 122px; /* Desktop: header-top (68) + main-nav (52) + 2px buffer */
  --color-main: #11A84E;
  --color-aux: #22C768;
  --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: transparent; /* Background for entire fixed header is handled by sub-sections */
}

/* Header Top Section - Desktop */
.header-top {
  background-color: var(--color-deep-green); /* Deep Green */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  padding: 0 20px; /* Padding for the header-top itself */
}

.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold for brand logo */
  text-transform: uppercase;
  display: block; /* Ensure it's not inline for proper spacing */
  height: 100%;
  display: flex; /* For vertical centering if text */
  align-items: center;
}

.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: 5px;
  font-weight: bold;
  transition: transform 0.2s ease-in-out;
  text-decoration: none;
  white-space: nowrap; /* Prevent buttons from wrapping on desktop */
}

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

/* Main Navigation Section - Desktop */
.main-nav {
  background-color: var(--color-card-bg); /* Card BG */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  padding: 0 20px; /* Padding for the main-nav itself */
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  font-size: 16px;
  font-weight: bold;
  color: var(--color-text-main);
  padding: 5px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-glow);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger Menu - Hidden on Desktop */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above header */
}

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

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Mobile Nav Buttons - Hidden on Desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* For mobile, will be flexed */
  background-color: var(--color-card-bg); /* Consistent with main-nav for mobile */
  padding: 0 15px; /* Mobile padding */
}

/* Overlay for Mobile Menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none; /* Hidden by default */
}

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

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

.footer-col {
  padding: 0;
}

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

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

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

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

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

.footer-nav a:hover {
  color: var(--color-glow); /* Glow for hover */
}

.footer-bottom {
  text-align: center;
  max-width: 1200px;
  margin: 20px auto 0;
  padding-top: 20px; /* Ensure space above copyright */
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-divider); /* Divider */
}

.footer-bottom a {
  display: none; /* IMPORTANT: No links allowed in footer-bottom */
}

/* Dynamic Slot Anchor Styles */
.footer-slot-anchor-inner {
  /* This container must remain empty and visible for content injection */
  min-height: 1px; /* Ensure it takes up minimal space if empty */
}

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

  /* Header Top Section - Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* To push hamburger left, logo center, space right */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Handled by header-top */
    justify-content: space-between;
    position: relative; /* For absolute logo centering */
  }

  .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%; /* Ensure logo text/img vertically centers within header-top */
  }

  .logo img {
    max-height: 56px !important; /* Match mobile header-top height */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place to the far left */
    position: relative;
    z-index: 1002; /* Ensure it's above logo for clickability */
    padding-left: 0; /* Adjust padding */
  }

  .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 Section */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    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; /* Ensure buttons stay in one line */
    background-color: var(--color-card-bg); /* Consistent with main nav */
  }

  .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; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation Section - Mobile */
  .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset));
    background-color: var(--color-card-bg); /* Card BG */
    overflow-y: auto;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay, below hamburger */
    min-height: auto !important; /* Override fixed height for scrollable menu */
    height: auto !important; /* Override fixed height for scrollable menu */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0 15px;
    gap: 15px; /* Spacing between mobile nav links */
    justify-content: flex-start; /* Align links to top */
    align-items: flex-start; /* Align links to left */
    width: 100%;
    max-width: none; /* No max-width on mobile */
  }

  .nav-link {
    width: 100%; /* Full width links */
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider);
  }

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

  .overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  body.no-scroll {
    overflow: hidden; /* Prevent background scroll */
  }

  /* Footer Styles - Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

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

  .footer-col:last-child {
    margin-bottom: 0;
  }

  .footer-title {
    margin-bottom: 15px;
  }
  
  /* Ensure page content images are responsive */
  .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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
