/* 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); /* Important for fixed header */
  overflow-x: hidden; /* Prevent horizontal scrolling on desktop too */
}

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

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

/* Header Offset - No marquee */
:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

/* Site Header */
.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; /* Actual background will be set by header-top and main-nav */
}

/* Header Top */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0A4B2C; /* Deep Green for header top */
  width: 100%;
}

.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;
  padding: 0 20px; /* Padding for logo and buttons */
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure it's not inline-flex on desktop by default */
}

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

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

/* Mobile Navigation Buttons (hidden by default) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Fixed height mobile, but not active on desktop */
  background-color: #11271B; /* Card BG, a bit different from header-top */
  width: 100%; /* Important for mobile, but not active on desktop */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height desktop */
  display: flex; /* Default for desktop */
  align-items: center;
  overflow: hidden;
  background-color: #11A84E; /* Main Color for main nav */
  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;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  display: block;
  padding: 10px 15px;
  color: #F2FFF6; /* Text Main */
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

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

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #F2FFF6; /* Text Main */
  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); }

/* Overlay (hidden by default) */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  visibility: visible;
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #F2FFF6; /* Text Main */
  text-decoration: none; /* No underline */
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Footer */
.site-footer {
  background-color: #08160F; /* Background */
  padding: 40px 20px 20px;
  border-top: 1px solid #1E3A2A; /* Divider */
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-col {
  padding: 10px 0;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  font-size: 14px;
  color: #A7D9B8; /* Text Secondary */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-title {
  font-size: 18px;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
}

.footer-nav {
  list-style: none;
}

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

.footer-nav a {
  font-size: 14px;
  color: #A7D9B8; /* Text Secondary */
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #2AD16F; /* Lighter shade for hover */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #1E3A2A; /* Divider */
}

.footer-bottom p {
  font-size: 13px;
  color: #A7D9B8; /* Text Secondary */
}

/* Footer slot anchors - must be visible for content injection */
.footer-slot-anchor, .footer-slot-anchor-inner, .footer-slot-anchor-grid {
    min-height: 1px; /* Ensure they take up space if empty, but not too much */
    width: 100%;
}
.footer-slot-anchor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-slot-anchor-grid .footer-slot-anchor-inner {
    min-height: 1px; /* Ensure inner slots are also visible */
}

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

  /* Body overflow prevention */
  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 */
  .header-top {
    min-height: 60px !important;
    height: 60px !important; /* Fixed height mobile */
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Hamburger and logo will manage their own spacing */
    justify-content: space-between; /* To push hamburger left, logo center */
    position: relative; /* For absolute positioning of logo if needed */
  }

  /* Hamburger Menu */
  .hamburger-menu {
    display: block; /* Show on mobile */
    position: relative; /* Keep it in flow, but z-index above others */
    z-index: 1002; /* Above logo and buttons */
    margin-right: auto; /* Push logo to center */
    left: 0;
  }

  /* Logo Centering for Mobile */
  .logo {
    position: absolute; /* Absolute positioning for centering */
    left: 50%;
    transform: translateX(-50%);
    display: flex !important; /* Force flex for image centering */
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%; /* Take full height of header-top */
    z-index: 1001; /* Below hamburger */
  }

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

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

  /* Mobile Nav Buttons (show on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons in one line */
    background-color: #11271B; /* Card BG */
  }

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

  /* Main Navigation (mobile specific) */
  .main-nav {
    display: none; /* Hidden by default for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: #0A4B2C; /* Deep Green for mobile menu */
    flex-direction: column; /* Vertical menu */
    transform: translateX(-100%); /* Off-screen initially */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001; /* Above overlay */
  }

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

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

  .nav-link {
    width: 100%; /* Full width for menu items */
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
      border-bottom: none;
  }

  /* Footer */
  .site-footer {
    padding-left: 15px;
    padding-right: 15px;
  }
  .footer-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 30px;
  }
  .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
  }
  .footer-slot-anchor-grid {
    grid-template-columns: 1fr;
  }
}

/* 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;
}
