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

.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);
  background-color: #017439; /* Primary color */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  background-color: #017439;
}

.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-left: 20px;
  padding-right: 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFF00; /* Contrasting yellow for logo text */
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFF;
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-menu.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.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;
  width: 100%;
  background-color: #005f2e; /* A slightly different green */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  background-color: #005f2e; /* A slightly different green */
}

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

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 15px;
  font-size: 16px;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}
.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
}
.btn-register, .btn-login {
  background-color: #C30808; /* Red for action buttons */
  color: #FFFF00; /* Yellow for text */
}
.btn-register:hover, .btn-login:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 999;
}
.overlay.active {
  display: block;
}

/* Footer Styles */
.site-footer {
  background-color: #017439; /* Primary color for footer */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

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

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

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

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav a:hover {
  color: #FFFF00;
}

.footer-slot-anchor-inner {
  margin-top: 15px; /* Provides some spacing for injected content */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 20px;
  color: #ccc;
}
.footer-bottom p {
  margin: 0;
}

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

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

  .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: #005f2e;
  }
  .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 {
    min-height: 48px !important;
    height: calc(100vh - var(--header-offset)); /* Full height minus header */
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 80%;
    max-width: 300px;
    background-color: #017439;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: none; /* Hidden by default */
    z-index: 1001;
  }
  .main-nav.active {
    transform: translateX(0);
    display: flex; /* Show when active */
  }
  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-col {
    align-items: center;
  }
  .footer-nav li {
    text-align: center;
  }

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }
  .footer-logo {
    font-size: 20px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
