:root {
  --header-offset: 122px; /* Desktop: header-top (68) + main-nav (52) = 120 + 2 */
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --btn-register-color: #C30808;
  --btn-login-color: #C30808;
  --btn-font-color: #FFFF00;
  --background-color: #FFFFFF;
  --footer-bg-color: #004d2b; /* Darker shade of primary */
  --header-top-bg-color: var(--primary-color);
  --main-nav-bg-color: #02a050; /* Lighter shade of primary */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--background-color);
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

/* Base styles for anchors and buttons */
a {
  text-decoration: none;
  color: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
  box-sizing: border-box;
  border: none;
}

.btn-login {
  background-color: var(--btn-login-color);
  color: var(--btn-font-color);
  box-shadow: 0 4px 10px rgba(195, 8, 8, 0.4);
}

.btn-register {
  background-color: var(--btn-register-color);
  color: var(--btn-font-color);
  box-shadow: 0 4px 10px rgba(195, 8, 8, 0.4);
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  background-color: var(--header-top-bg-color); /* Fallback, should be set by header-top */
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--header-top-bg-color);
  width: 100%;
}

.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: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; /* For potential image logo centering */
  align-items: center;
  height: 100%; /* Make logo fill height of header-top */
}

.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 {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Fixed height for mobile buttons */
  background-color: var(--header-top-bg-color); /* Same as header-top */
  padding: 0 15px; /* Add padding for mobile buttons */
  justify-content: center; /* Center buttons horizontally */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop nav */
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--main-nav-bg-color);
  width: 100%;
  transition: transform 0.3s ease; /* For mobile menu animation */
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--secondary-color);
  font-weight: bold;
  padding: 8px 0;
  transition: color 0.3s ease;
  text-transform: uppercase;
  font-size: 15px;
}

.nav-link:hover {
  color: #FFD700; /* Gold color for hover */
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

/* Site Footer */
.site-footer {
  background-color: var(--footer-bg-color);
  color: var(--secondary-color);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}

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

.footer-col h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-col p {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-logo {
  font-size: 26px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

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

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

.footer-nav a {
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FFD700; /* Gold color for hover */
}

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

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

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

  body {
    overflow-x: hidden;
  }

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

  .site-header {
    background-color: var(--header-top-bg-color); /* Ensure header has background */
  }

  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height for mobile header-top */
    padding-left: 15px; /* Smaller padding for mobile */
    padding-right: 15px;
    justify-content: space-between; /* Space out hamburger and logo */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding-left: 0; /* Handled by header-top */
    padding-right: 0; /* Handled by header-top */
    position: relative; /* For absolute logo centering */
  }
  
  /* Hamburger menu position */
  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    position: relative;
    z-index: 1001;
  }

  /* Mobile Logo Centering (Method 2: Absolute Positioning for robustness) */
  .logo {
    position: absolute !important; /* Override flex properties from desktop */
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important; /* Ensure flex for vertical centering of text/img */
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger (30px) + right padding (15px) + margin */
    height: 100%; /* Fill height for vertical alignment */
  }

  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
  }

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

  .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-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--header-top-bg-color); /* Same as header-top */
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 250px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--main-nav-bg-color); /* Menu background */
    flex-direction: column; /* Vertical layout for menu items */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Allow scrolling for long menus */
    z-index: 1000; /* Below hamburger menu */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical menu items */
    padding: 0;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    gap: 0; /* Remove gap for vertical links */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    position: relative; /* For z-index */
    z-index: 1001;
    margin-left: 0; /* Align to left edge */
  }

  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for footer */
    gap: 20px;
  }

  .footer-col {
    text-align: center; /* Center footer content */
  }

  .footer-col h3 {
    text-align: center;
  }

  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: 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;
}
