:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --btn-register-bg: #C30808;
  --btn-login-bg: #C30808;
  --btn-text-color: #FFFF00;
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) + 2px buffer */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
  background-color: var(--secondary-color); /* General background color */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

body.no-scroll {
  overflow: hidden;
}

/* --- Site Header --- */
.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);
  background-color: transparent; /* Base transparent, specific sections get colors */
  box-sizing: border-box;
}

/* Header Top Area */
.header-top {
  background-color: var(--primary-color); /* Dark green for header top */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  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 20px; /* Padding for logo and buttons */
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--btn-text-color); /* Yellow color for logo text */
  text-decoration: none;
  line-height: 1;
  display: flex; /* For potential image logo centering */
  align-items: center;
  height: 100%;
}
.logo img {
  display: block;
  max-height: 60px; /* Max height for logo image */
  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 {
  display: none; /* Hidden on desktop */
  box-sizing: border-box;
  min-height: 48px; /* Fixed height for mobile buttons */
  background-color: var(--secondary-color); /* White background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Padding for mobile buttons */
  justify-content: center;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle shadow for mobile button bar */
}

/* Main Navigation Area */
.main-nav {
  background-color: var(--secondary-color); /* White for main nav */
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

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

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Space between nav items */
}

.nav-list li a {
  color: var(--primary-color); /* Dark green for nav links */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
}

.nav-list li a:hover,
.nav-list li a.active {
  color: #004d27; /* Darker green on hover/active */
}

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Above logo for interaction */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color); /* White bars */
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* 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: 999; /* Below menu, above header */
  display: none; /* Hidden by default */
}
.overlay.active {
  display: block;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-sizing: border-box;
  border: none;
}

.btn-register {
  background-color: var(--btn-register-bg); /* Red */
  color: var(--btn-text-color); /* Yellow */
  box-shadow: 0 3px 6px rgba(195, 8, 8, 0.3);
}

.btn-login {
  background-color: var(--btn-login-bg); /* Red */
  color: var(--btn-text-color); /* Yellow */
  box-shadow: 0 3px 6px rgba(195, 8, 8, 0.3);
}

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

/* --- Footer --- */
.site-footer {
  background-color: var(--primary-color); /* Dark green for footer */
  color: var(--secondary-color); /* White text */
  padding: 40px 20px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

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

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

.footer-logo {
  font-size: 26px;
  font-weight: bold;
  color: var(--btn-text-color); /* Yellow for footer logo */
  text-decoration: none;
  margin-bottom: 15px;
}

.footer-description {
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 18px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

.footer-nav li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: var(--btn-text-color); /* Yellow on hover */
}

.footer-dynamic-col {
  /* This column is for dynamic content injection only */
}

.footer-slot-anchor-outer,
.footer-slot-anchor-inner {
  /* These are placeholder divs for dynamic content, keep them empty */
  min-height: 1px; /* Ensure they take up minimal space if empty */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Lighter border than above */
}

.footer-bottom p {
  margin: 0;
}

/* --- Responsive Styles (Mobile First approach for overrides) --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* 60px (header-top) + 48px (main-nav) + 2px buffer */
  }

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Header Top Area (Mobile) */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo centered */
    position: relative; /* For absolute logo positioning if needed */
  }
  .header-container {
    padding: 0; /* No padding on container itself, handled by header-top */
    max-width: none; /* No max-width on mobile */
  }

  /* Hamburger Menu (visible on mobile) */
  .hamburger-menu {
    display: block; /* Visible on mobile */
    position: relative;
    z-index: 1002; /* Ensure it's above logo for interaction */
  }
  .hamburger-menu .bar {
    background-color: var(--secondary-color); /* White bars */
  }
  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Logo Centering on Mobile (Image/Text) */
  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important; /* Center content */
    align-items: center !important;
    position: absolute; /* Absolute positioning for logo */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 100px); /* Adjust width to not overlap hamburger/buttons */
    z-index: 1; /* Below hamburger */
    color: var(--btn-text-color); /* Yellow for logo text */
  }
  .logo img {
    max-height: 56px !important; /* Max height for logo image on mobile */
    max-width: 100%;
  }

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

  /* Mobile Nav Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    gap: 10px;
    padding: 8px 15px; /* Adjust padding for button bar */
    min-height: 48px;
    height: auto; /* Allow content to dictate height, but respect min-height */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: var(--secondary-color);
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Ensure two buttons fit with gap */
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font for mobile buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    overflow-wrap: break-word;
  }

  /* Main Navigation Area (Mobile) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed; /* Fixed position for off-canvas menu */
    top: var(--header-offset); /* Position below fixed header + mobile buttons */
    left: 0;
    width: 75%; /* Slide in from left */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color); /* Dark green for mobile menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    flex-direction: column; /* Vertical layout for menu items */
    justify-content: flex-start; /* Align items to top */
    padding-top: 20px;
    box-sizing: border-box;
    z-index: 1001; /* Above overlay */
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    flex-direction: column; /* Vertical list */
    align-items: flex-start; /* Align items to left */
    padding: 0 20px;
    max-width: none; /* No max-width on mobile */
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap for vertical list */
  }

  .nav-list li {
    margin-bottom: 10px; /* Space between vertical items */
    width: 100%;
  }

  .nav-list li a {
    color: var(--secondary-color); /* White for mobile nav links */
    font-size: 18px;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
  }
  .nav-list li:last-child a {
    border-bottom: none;
  }

  .nav-list li a:hover,
  .nav-list li a.active {
    color: var(--btn-text-color); /* Yellow on hover/active */
  }

  /* Overlay for mobile menu */
  .overlay {
    top: 0; /* Full screen overlay */
    height: 100%;
  }
  .overlay.active {
    display: block;
  }

  /* Footer (Mobile) */
  .site-footer {
    padding: 30px 15px 15px; /* Adjust padding for mobile */
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout on mobile */
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .footer-col {
    align-items: center; /* Center content in columns */
    text-align: center;
  }
  .footer-logo {
    margin-bottom: 10px;
  }
  .footer-description {
    font-size: 13px;
  }
  .footer-heading {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .footer-nav li {
    margin-bottom: 5px;
  }
  .footer-nav li a {
    font-size: 14px;
  }
  .footer-bottom {
    padding-top: 15px;
    font-size: 12px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
