:root { --header-offset: 122px; --primary-color: #017439; --auxiliary-color: #FFFFFF; --btn-register-bg: #C30808; --btn-login-bg: #C30808; --btn-text-color: #FFFF00; }

html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Arial', sans-serif; line-height: 1.6; color: #333; background-color: var(--auxiliary-color); padding-top: var(--header-offset); }
body.no-scroll { overflow: hidden; }

/* General Container Styling */
.header-container, .nav-container, .footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

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

/* Header Top Section */
.header-top {
  background-color: var(--primary-color); /* Dark Green */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.header-top .header-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--auxiliary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  border: none;
  box-sizing: border-box;
}

.btn-login {
  background-color: var(--btn-login-bg);
  color: var(--btn-text-color);
}
.btn-login:hover { background-color: #e02020; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.3); }

.btn-register {
  background-color: var(--btn-register-bg);
  color: var(--btn-text-color);
}
.btn-register:hover { background-color: #e02020; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.3); }

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: #f0f0f0; /* Light grey, distinct from main nav and header top */
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

/* Main Navigation */
.main-nav {
  background-color: var(--auxiliary-color); /* White, distinct from header top */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.main-nav .nav-container {
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
}

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.2s ease;
  font-size: 15px;
}

.nav-link:hover, .nav-link.active {
  color: #005f2e;
  transform: translateY(-2px);
}

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

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

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

/* Overlay (Hidden on Desktop) */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 999;
}
.overlay.active { display: block; }

/* Site Footer */
.site-footer {
  background-color: var(--primary-color);
  color: var(--auxiliary-color);
  padding: 40px 0 20px 0;
  font-size: 14px;
}

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

.footer-col h3 {
  color: var(--auxiliary-color);
  font-size: 16px;
  margin-bottom: 15px;
  white-space: nowrap;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--auxiliary-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  color: rgba(255,255,255,0.8);
  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: 10px;
}

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

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  color: rgba(255,255,255,0.6);
}

/* Dynamic Slot Anchor Inner */
.footer-slot-anchor-inner { min-height: 10px; }

/* Responsive Styles */
@media (max-width: 768px) {
  :root { --header-offset: 110px; }
  body { padding-top: var(--header-offset); }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }
  .header-top .header-container {
    padding-left: 15px;
    padding-right: 15px;
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  .logo img {
    max-height: 56px !important;
    max-width: 100%;
    height: auto;
  }
  .desktop-nav-buttons {
    display: none !important;
  }
  .hamburger-menu {
    display: block;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #f0f0f0; /* Light grey, distinct from main nav and header top */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default for mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    flex-direction: column;
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    background-color: var(--auxiliary-color);
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    min-height: 48px !important;
    height: auto !important; /* Allow height to adjust based on content */
  }

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

  .main-nav .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    height: auto; /* Adjust height for content */
  }
  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 16px;
  }
  .nav-link:last-child { border-bottom: none; }

  .footer-top-grid {
    grid-template-columns: 1fr;
    padding-left: 15px;
    padding-right: 15px;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child { margin-bottom: 0; }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
}
