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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--color-background);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Base styles for anchors and buttons */
a {
  text-decoration: none;
  color: var(--color-text-main);
}

a:hover {
  color: var(--color-secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none; /* Ensure no underline */
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Header styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: var(--color-background); /* Fallback or base for overall header */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-deep-green); /* Header top background */
  width: 100%;
  padding: 0 20px; /* Add padding to header-top itself, container will then manage max-width */
}

.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 {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold for logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}

.logo img {
  display: block;
  max-height: 60px; /* Max height for image logo on desktop */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  width: 100%;
  background-color: var(--color-deep-green); /* Same as header-top */
  padding: 10px 20px; /* Match header-top padding */
  justify-content: center; /* Center buttons */
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Default display for desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Main nav background */
  width: 100%;
  padding: 0 20px; /* Add padding to main-nav itself */
}

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

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between nav items */
}

.nav-list a {
  color: var(--color-text-main);
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

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

/* Hamburger menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1002; /* Above header */
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Mobile overlay */
.mobile-nav-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below mobile menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

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

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

.footer-col {
  word-wrap: break-word; /* Ensure text wraps */
  overflow-wrap: break-word;
}

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

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

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

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

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

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

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

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-secondary);
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
}

/* Dynamic slot anchors */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space if empty for layout */
}


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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent body overflow on mobile */
  }

  /* Header adjustments */
  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height for mobile */
    padding: 0 15px;
    justify-content: space-between; /* Space between hamburger, logo, empty space */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Remove container padding as header-top has it */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: -1; /* Place it to the left */
    margin-right: auto; /* Push logo to center if possible */
  }

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

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

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

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

  .logo img {
    max-height: 56px !important; /* Max height for image logo on mobile */
    max-width: 100%; /* Ensure image scales down */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    padding: 8px 15px; /* Adjusted padding for mobile */
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons with 10px 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;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0; /* Will be adjusted by JS, but starts at top */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: 100vh; /* Full viewport height */
    background-color: var(--color-card-bg); /* Mobile menu background */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay, below hamburger */
    flex-direction: column; /* Vertical menu */
    padding-top: var(--header-offset); /* Push content down from fixed header */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    overflow-y: auto; /* Allow scrolling for long menus */
    min-height: unset; /* Remove fixed height */
    height: 100vh; /* Ensure full height */
  }

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

  .nav-container {
    flex-direction: column; /* Stack nav items vertically */
    align-items: flex-start; /* Align to left */
    padding: 20px 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    height: auto; /* Allow content to dictate height */
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap between list items */
  }

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--color-divider);
  }

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

  .nav-list a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    color: var(--color-text-main);
    width: 100%;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 30px;
    margin-bottom: 20px;
    border-bottom: none; /* Remove border for single column layout */
  }

  .footer-col {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-divider); /* Add border between sections */
  }

  .footer-col:last-of-type {
    border-bottom: none;
  }

  .footer-logo {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .footer-heading {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer-description,
  .footer-nav a,
  .footer-bottom p {
    font-size: 13px;
  }

  /* Mobile content overflow prevention */
  .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;
}
