:root { --header-offset: 122px; } /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
body { padding-top: var(--header-offset); margin: 0; font-family: Arial, sans-serif; line-height: 1.6; 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: #FFFFFF; /* Ensure solid background */
  box-sizing: border-box;
}

/* Header Top Section (Desktop) */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #017439; /* Primary color for top bar */
  width: 100%;
  padding: 0 20px; /* Padding for the top bar itself */
}

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

.logo {
  color: #FFFFFF;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block; /* Ensure logo is block for proper sizing */
  white-space: nowrap; /* Prevent logo text from wrapping */
}

.logo img {
  display: block;
  max-height: 60px; /* Max height for desktop logo */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Nav Buttons (Hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background-color: #F8F8F8; /* Light background for mobile button bar */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Above header */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Main Navigation Section (Desktop) */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Displayed on desktop */
  align-items: center;
  overflow: hidden;
  background-color: #FFFFFF; /* Secondary color for nav bar, distinct from top bar */
  width: 100%;
  padding: 0 20px; /* Padding for the nav bar itself */
}

.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;
  width: 100%;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100%;
}

.main-nav li {
  height: 100%;
  display: flex;
  align-items: center;
}

.main-nav a {
  color: #333333;
  text-decoration: none;
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  transition: color 0.3s ease, background-color 0.3s ease;
  font-size: 15px; /* Adjust font size to fit */
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: #017439; /* Primary color on hover/active */
}

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

.btn:hover {
  background-color: #E03030;
  transform: translateY(-1px);
}

/* 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;
  display: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.overlay.active {
  display: block;
  opacity: 1;
}

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

.footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-cols-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

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

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

.footer-description {
  margin: 0;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 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: #E0E0E0;
}

.footer-mid-dynamic {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap; /* Allow flexible wrapping of slots */
  gap: 10px; /* Small gap between dynamic slots */
}
.footer-mid-dynamic > div {
    flex: 1 1 auto; /* Allow items to grow and shrink */
    min-width: 100px; /* Ensure a minimum width */
}


.footer-bottom-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 20px;
}

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

.footer-bottom p {
  margin: 0;
  color: #FFFFFF;
}

/* Dynamic slot anchor inner */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up minimal space even if empty */
}

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    justify-content: space-between; /* Hamburger left, logo center, empty right */
    position: relative; /* For logo absolute positioning */
  }

  .logo {
    flex: 1 !important; /* For flex-based logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: static !important; /* Reset position for flex centering */
    transform: none !important; /* Reset transform for flex centering */
    font-size: 24px; /* Smaller font size for mobile logo */
    max-width: calc(100% - 100px); /* Limit width to prevent overlap with hamburger */
  }

  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
    max-width: 100%; /* Ensure image scales down */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1002;
    order: -1; /* Place hamburger on the left */
    padding: 0; /* Adjust padding if needed */
    width: 48px; /* Consistent size for clickable area */
    height: 48px;
  }

  .hamburger-menu span {
    background-color: #FFFFFF;
  }

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

  /* Mobile Nav Buttons Bar */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for the button bar */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    justify-content: center; /* Center buttons if less than 2 */
  }

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

  /* Main Navigation (Mobile - hidden by default, slides in) */
  .main-nav {
    min-height: calc(100vh - var(--header-offset)) !important; /* Adjust height based on viewport and header offset */
    height: calc(100vh - var(--header-offset)) !important;
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Start below the fixed header */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    background-color: #017439; /* Primary color for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay */
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if menu content is long */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px; /* Padding for mobile nav items */
    justify-content: flex-start;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    height: auto;
    padding-top: 20px; /* Add some padding at the top of the menu list */
  }

  .main-nav li {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
  }

  .main-nav a {
    color: #FFFFFF;
    padding: 10px 0;
    width: 100%;
    justify-content: flex-start;
    font-size: 16px;
  }
  .main-nav a:hover,
  .main-nav a.active {
    color: #FFFF00; /* Yellow on hover/active for mobile menu */
    background-color: rgba(255,255,255,0.1);
  }

  /* Footer Mobile */
  .footer-cols-wrapper {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .footer-bottom-wrapper {
    text-align: left;
  }

  /* Prevent content overflow */
  .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;
}
