:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); margin: 0; font-family: Arial, sans-serif; color: #333; background-color: #FFFFFF; }

.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.1);
  box-sizing: border-box;
  overflow-x: hidden;
}

.header-top {
  background-color: #017439; /* Primary 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 20px;
  box-sizing: border-box;
}

.logo {
  color: #FFFFFF;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
}
.logo img {
  display: block;
  max-height: 60px;
  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 by default on desktop */
  min-height: 48px;
  background-color: #f5f5f5; /* Light grey for distinction */
  width: 100%;
  padding: 8px 20px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.btn-register {
  background-color: #C30808;
  color: #FFFF00;
}
.btn-register:hover { background-color: #a00606; transform: translateY(-1px); }

.btn-login {
  background-color: #C30808;
  color: #FFFF00;
}
.btn-login:hover { background-color: #a00606; transform: translateY(-1px); }

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}
.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 2px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}
.hamburger-menu .bar:last-child { margin-bottom: 0; }

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

.main-nav {
  background-color: #FFFFFF; /* Auxiliary white */
  min-height: 52px;
  height: 52px;
  display: flex; /* Displayed by default on desktop */
  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;
}

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

.nav-list a {
  color: #333333;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-list a:hover, .nav-list a.active { color: #017439; /* Primary green on hover */ }

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  transition: opacity 0.3s ease;
  opacity: 0;
}
.overlay.active { display: block; opacity: 1; }

/* Footer Styles */
.site-footer {
  background-color: #222222;
  color: #cccccc;
  padding: 40px 20px;
  font-size: 14px;
  line-height: 1.6;
}

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

.footer-col h3 {
  color: #FFFFFF;
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  color: #FFFFFF;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  margin-top: 0;
  color: #bbbbbb;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: #bbbbbb;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover { color: #017439; }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333333;
  margin-top: 20px;
  color: #bbbbbb;
}

/* Dynamic slot anchors - must be present and visible for content injection */
.footer-slot-anchor-inner { min-height: 1px; }

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

  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 {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    position: relative;
  }

  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: static !important;
    left: auto !important;
    transform: none !important;
    height: auto;
  }
  .logo img {
    max-height: 56px !important;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #f5f5f5; /* Light grey for distinction */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* For 2 buttons with 10px gap */
    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 on mobile */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 999;
    overflow-y: auto;
  }
  .main-nav.active {
    display: flex; /* Show menu when active */
    transform: translateX(0); /* Slide into view */
  }

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 20px 15px;
    height: auto;
    justify-content: flex-start;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  .nav-list li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }
  .nav-list li:last-child { border-bottom: none; }
  .nav-list a {
    display: block;
    padding: 12px 10px;
    width: 100%;
    color: #333333;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-col {
    text-align: center;
  }
  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-nav li {
    display: inline-block;
    margin: 0 8px 8px 0;
  }
  .footer-nav ul {
    text-align: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
