:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px, +2px buffer */
  --color-primary: #11A84E;
  --color-accent: #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;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-background); /* Darker background */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.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); /* Using gold for logo */
  text-transform: uppercase;
  display: flex; /* Ensure flex for potential image logo */
  align-items: center;
  height: 100%;
}

.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Desktop default: show */
  gap: 12px;
  align-items: center;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Mobile buttons hidden by default on desktop */
  min-height: 48px; /* Mobile fixed height */
  background-color: var(--color-card-bg); /* Use a different background for mobile button row */
  padding: 0 15px; /* Mobile padding */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  flex-direction: column;
  justify-content: space-between;
}

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

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px;
  display: flex; /* Desktop default: show */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-card-bg); /* Lighter background, different from header-top */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.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;
  gap: 25px;
}

.nav-link {
  color: var(--color-text-main);
  font-weight: 600;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  cursor: pointer;
}
.mobile-nav-overlay.active {
  display: block;
}

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

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

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  margin-top: 0;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-dynamic-col {
  /* This column is specifically for dynamic content injection, keep it minimal */
}

.footer-slot-anchor-inner {
  min-height: 1px; /* Small height to ensure it's rendered */
  width: 100%;
}

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

.footer-bottom p {
  margin: 0;
}

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

  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 !important; /* Mobile fixed height */
    height: 60px !important;
    padding: 0 15px; /* Reduced padding for mobile */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Mobile: container fills width */
    padding: 0; /* No padding on container itself, handled by header-top */
  }

  .logo {
    flex: 1 !important; /* Allow logo to take available space for centering */
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    font-size: 24px;
  }

  .logo img {
    max-height: 56px !important; /* Mobile max height */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    min-height: 48px; /* Mobile fixed height */
    align-items: center;
    justify-content: center; /* Center buttons if only one */
    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 background */
  }

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

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position 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-background); /* Darker background for menu */
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: none; /* Mobile: container fills width */
    padding: 0;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-divider);
    font-size: 16px;
  }
  .nav-link:last-child {
    border-bottom: none;
  }

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

  .footer-col h3 {
    margin-top: 20px;
  }
  .footer-col:first-child h3 {
    margin-top: 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
