/* 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); /* MUST for fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

ul {
  list-style: none;
}

:root {
  --primary-color: #11A84E;
  --secondary-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;

  /* Header offset for no marquee version */
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) = 120px, +2px for safety */
}

/* Site Header - Fixed & Suspended */
.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: transparent; /* Combined background handled by child elements */
}

/* Header Top Area */
.header-top {
  background-color: var(--deep-green); /* Deep Green */
  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; /* Adjusted padding */
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color); /* Gold */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; /* For potential image logo centering in mobile */
  align-items: center;
  height: 100%;
}

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

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

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Mobile height for this section */
  background-color: var(--primary-color); /* Primary color for mobile buttons section */
  width: 100%;
  max-width: 100%;
  padding: 0 15px; /* Mobile padding */
  justify-content: center; /* Centered for mobile */
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap; /* Prevent wrapping */
  overflow: hidden; /* Prevent horizontal overflow */
}

/* Main Navigation Area */
.main-nav {
  background-color: var(--primary-color); /* Primary Color */
  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;
}

.main-nav ul {
  display: flex;
  gap: 25px;
}

.main-nav ul li a {
  color: var(--text-main); /* Text Main */
  font-weight: bold;
  font-size: 15px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--gold-color); /* Gold */
}

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

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

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

/* Buttons */
.btn {
  background: var(--button-gradient);
  color: var(--text-main); /* Text Main */
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color); /* Border */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-color); /* Glow */
}

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

.overlay.active {
  display: block;
  opacity: 1;
}

/* Site Footer */
.site-footer {
  background-color: var(--background-color); /* Background */
  padding: 50px 0 20px;
  color: var(--text-secondary); /* Text Secondary */
  font-size: 14px;
}

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

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

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

.footer-description {
  margin-bottom: 20px;
  line-height: 1.8;
  color: var(--text-secondary); /* Text Secondary */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-col h3 {
  color: var(--text-main); /* Text Main */
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: bold;
}

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

.footer-nav li a {
  color: var(--text-secondary); /* Text Secondary */
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: var(--gold-color); /* Gold */
}

.footer-slot-anchor-inner {
  margin-top: 15px; /* Spacing for injected content */
}

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  padding: 0 30px;
  color: var(--text-secondary); /* Text Secondary */
  box-sizing: border-box;
}

.footer-bottom p {
  line-height: 1.8;
}

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

  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 Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    padding: 0 15px;
    max-width: none; /* No max-width on mobile */
    width: 100%;
    justify-content: space-between; /* Hamburger left, Logo center (handled by flex:1 on logo), empty space right */
    position: relative; /* For absolute positioning of logo if needed */
  }

  .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 */
  }
  .logo img {
    max-height: 56px !important; /* Matches mobile header-top height */
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger at the very left */
    margin-left: 0; /* Ensure it's flush left */
    position: relative; /* Ensure z-index works */
    z-index: 1001; /* Ensure it's above logo if absolutely positioned */
  }

  /* Mobile Navigation Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    padding: 0 15px;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent horizontal overflow */
    max-width: 100%; /* Ensure it doesn't exceed screen width */
    width: 100%;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Main Navigation Mobile */
  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--card-bg); /* Card BG for menu */
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Same as header or slightly above */
    overflow-y: auto; /* Scroll for long menus */
    padding-bottom: 20px; /* Padding at bottom of menu */
  }

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

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

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

  .main-nav ul li {
    width: 100%;
    border-bottom: 1px solid var(--divider-color); /* Divider for menu items */
  }

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

  .main-nav ul li a {
    padding: 12px 0;
    display: block;
    width: 100%;
    font-size: 16px;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
    padding: 0 15px 30px;
  }

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

  .footer-bottom {
    padding: 0 15px;
  }
}

/* Body no-scroll class for mobile menu */
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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
