:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

/* Base styles for 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.1);
  background-color: #ffffff; /* Default background, individual sections will override */
  box-sizing: border-box;
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #017439; /* Main color for header top */
  width: 100%;
  padding: 0;
}

.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: 0 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFF00; /* Yellow for logo text */
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 0;
  display: block; /* Ensure it's block for proper alignment */
}

.logo img {
  /* This is for image logos, currently using text logo */
  display: block;
  max-height: 60px;
  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 {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px; /* For mobile */
  background-color: #016030; /* A darker green for mobile buttons area */
  padding: 0 15px; /* Add padding here for mobile buttons */
}

/* Main Navigation Area */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: #FFFFFF; /* Accent color for main nav */
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtle shadow for separation */
}

.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;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: #333; /* Dark text for light background */
  text-decoration: none;
  padding: 10px 0;
  font-weight: 600;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
  font-size: 15px;
}

.nav-link:hover, .nav-link.active {
  color: #017439; /* Hover color */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001; /* Above logo and buttons on mobile */
  width: 48px; /* Make it easier to tap */
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px; /* Space between hamburger and logo */
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #FFFFFF; /* White for hamburger icon */
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: #FFFFFF; /* White for hamburger icon */
  position: absolute;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

/* Hamburger menu active state */
.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* Overlay for mobile menu */
.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: 998; /* Below menu, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

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

.btn-register {
  background-color: #C30808; /* Red */
  color: #FFFF00; /* Yellow */
  border: 1px solid #C30808;
}

.btn-register:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.btn-login {
  background-color: #C30808; /* Red */
  color: #FFFF00; /* Yellow */
  border: 1px solid #C30808;
}

.btn-login:hover {
  background-color: #a00606;
  border-color: #a00606;
}

/* Footer styles */
.site-footer {
  background-color: #017439; /* Main color for footer background */
  color: #FFFFFF;
  padding: 40px 20px 10px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
}

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

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

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

.footer-description {
  margin-bottom: 15px;
  color: #e0e0e0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

.footer-nav a:hover {
  color: #FFFF00; /* Yellow hover */
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-top: 15px;
  text-align: center;
  color: #e0e0e0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchor styles */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
  flex-grow: 1; /* Allow it to take up space in flex columns */
}
/* Ensure dynamic column is empty */
.footer-dynamic-col > *:not(.footer-slot-anchor-inner) {
    display: none; /* Hide any accidental content in dynamic slot column */
}


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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body overflow is hidden for mobile */
  }

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

  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0;
  }

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

  .hamburger-menu {
    display: flex;
    margin-right: 0; /* Adjust margin for mobile */
  }
  
  /* Mobile Logo Centering (text logo) */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 24px; /* Adjust size for mobile */
    color: #FFFF00; /* Yellow */
    z-index: 1; /* Below hamburger */
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right element */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0; /* Remove vertical padding */
  }
  /* For image logo, if used (as per prompt instructions) */
  .logo img {
    max-height: 56px !important; /* Adjust for mobile header height */
  }

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

  /* Mobile buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
  }

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

  /* Main Navigation (mobile menu) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 75%; /* Slide in from left */\    max-width: 300px; /* Max width for side menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    background-color: #017439; /* Main color for mobile menu */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 999; /* Below overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    padding: 20px 0;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    gap: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    color: #FFFFFF; /* White text for dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link:hover, .nav-link.active {
    background-color: #016030; /* Darker green on hover */
    color: #FFFF00; /* Yellow on hover */
  }

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

  /* Footer mobile adjustments */
  .footer-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-of-type {
    margin-bottom: 0;
  }

  .footer-description {
    padding-right: 0;
  }
}

/* Ensure no-scroll on body when menu is open */
body.no-scroll {
  overflow: 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;
}
