/* Shared CSS for Header and Footer */
:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px */
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  color: #F2FFF6;
  background-color: #08160F;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  background-color: #0A4B2C; /* Deep Green for header-top */
}

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

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

.logo {
  color: #F2FFF6; /* Text Main */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.logo img {
  display: block;
  max-height: 60px; /* Desktop logo height */
  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; /* Mobile fixed height for this row */
  background-color: #11A84E; /* Primary color */
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: #F2FFF6; /* Text Main */
  font-weight: bold;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background: #F2FFF6; /* Text Main */
  border-radius: 3px;
  transition: all 0.3s linear;
}

.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-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  width: 100%;
  background-color: #11A84E; /* Primary color for main nav */
}

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

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.main-nav ul li a {
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  font-weight: bold;
  padding: 8px 0;
  display: block;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.main-nav ul li a:hover {
  color: #2AD16F; /* Lighter green for hover */
}

/* Footer Styles */
.site-footer {
  background-color: #08160F; /* Background */
  color: #A7D9B8; /* Text Secondary */
  padding: 40px 20px 20px;
  box-sizing: border-box;
  font-size: 14px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  border-bottom: 1px solid #1E3A2A; /* Divider */
  padding-bottom: 30px;
}

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

.footer-logo {
  color: #F2FFF6; /* Text Main */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav li a {
  color: #A7D9B8; /* Text Secondary */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner {
  /* This is an empty container for dynamic content injection */
  width: 100%;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  color: #A7D9B8; /* Text Secondary */
  border-top: 1px solid #1E3A2A; /* Divider */
  padding-top: 20px;
}

.footer-bottom p {
  margin: 0;
}

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

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

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
    justify-content: space-between; /* Hamburger left, Logo center */
  }

  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2; /* Center the logo */
  }
  
  .logo img {
    max-height: 56px !important; /* Mobile logo height */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    order: 1; /* Place hamburger on the left */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    padding: 0 15px;
    gap: 10px;
    flex-wrap: nowrap;
    height: 48px; /* Fixed height for mobile button row */
    background-color: #11A84E; /* Primary color */
  }

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

  .main-nav {
    display: none; /* Hide main nav by default on mobile */
    flex-direction: column; /* Stack menu items vertically */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: #08160F; /* Background */
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%); /* Hide off-screen */
    z-index: 999; /* Below hamburger, above content */
  }

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

  .nav-container {
    flex-direction: column;
    width: 100%;
    max-width: none;
    padding: 20px 15px;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 15px;
  }

  .main-nav ul li a {
    font-size: 18px;
    padding: 10px 0;
  }

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

  .footer-col {
    text-align: center;
  }

  .footer-nav {
    text-align: center;
  }

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

  /* Overlay for mobile menu */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
  }

  .overlay.visible {
    display: block;
  }

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