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

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

a {
  text-decoration: none;
  color: var(--text-main);
}

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  background-color: var(--background-color); /* Base background, individual bars will have their own */
  box-sizing: border-box;
}

/* Header Top Bar */
.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(--card-bg); /* Custom color: Card BG */
  width: 100%;
  padding: 0 20px; /* Padding for edges */
}

.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 */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  gap: 5px;
}

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

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

/* Buttons general style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-size: 15px;
}

.btn-primary {
  background: var(--button-gradient); /* Custom color: Button gradient */
  box-shadow: 0 4px 10px rgba(42, 209, 111, 0.4); /* Glow from button gradient start color */
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 15px rgba(42, 209, 111, 0.6);
}

.btn-secondary {
  background-color: var(--deep-green); /* Custom color: Deep Green */
  border: 1px solid var(--border-color); /* Custom color: Border */
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

/* Hamburger Menu (Desktop - hidden) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above header-top content */
}

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

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

/* Main Navigation Bar */
.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(--deep-green); /* Custom color: Deep Green */
  width: 100%;
}

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

.nav-link {
  display: block;
  padding: 10px 15px;
  color: var(--text-main);
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-color); /* Custom color: Gold */
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  width: 100%;
  background-color: var(--card-bg); /* Same as header-top for consistency */
  padding: 8px 15px; /* Smaller padding for mobile */
  border-bottom: 1px solid var(--divider-color); /* Custom color: Divider */
}

/* Mobile Menu Overlay (hidden on desktop) */
.mobile-menu-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;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--background-color); /* Custom color: Background */
  padding: 40px 20px 20px;
  color: var(--text-secondary); /* Custom color: Text Secondary */
  border-top: 1px solid var(--divider-color); /* Custom color: Divider */
}

.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(--divider-color); /* Custom color: Divider */
}

.footer-col h3 {
  color: var(--text-main); /* Custom color: Text Main */
  font-size: 18px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-main);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-bottom p {
  margin: 0;
}

/* Footer Slot Anchors (must be present and visible) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
  display: block; /* Ensure it takes up space */
}


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

  /* Body overflow-x for mobile content protection */
  body {
    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 Bar Mobile */
  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height for mobile */
    padding: 0 15px;
  }

  .header-container {
    padding: 0; /* No horizontal padding here, handled by header-top */
    justify-content: space-between; /* Hamburger left, Logo center (visually), buttons hidden */
    position: relative; /* For absolute positioning of logo if needed */
  }

  /* Hamburger Menu Mobile */
  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: -1; /* Place at the beginning */
    margin-right: auto; /* Push logo to center */
    align-self: center;
  }

  /* Logo Mobile Centering (Absolute positioning method) */
  .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 and potential right element */
    pointer-events: auto; /* Ensure it's clickable */
  }

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

  /* Desktop Nav Buttons Mobile (Hidden) */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile Nav Buttons (Visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for each button, considering gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation Bar Mobile (Hidden by default) */
  .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; /* Sidebar width */
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg); /* Custom color: Card BG */
    flex-direction: column; /* Vertical menu */
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
    z-index: 1001; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical menu items */
    justify-content: flex-start; /* Align items to the top */
    align-items: flex-start; /* Align items to the left */
    padding: 20px 0;
    max-width: none; /* No max-width for mobile container */
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid var(--divider-color); /* Custom color: Divider */
  }

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

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

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

  .footer-col {
    text-align: center; /* Center align footer columns */
  }

  .footer-nav {
    text-align: center; /* Center align footer nav links */
  }

  .footer-logo {
    font-size: 20px;
  }

  .footer-col h3 {
    font-size: 16px;
  }

  .footer-description {
    font-size: 13px;
  }
}

.body.no-scroll {
  overflow: 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;
  }
}
