:root { --header-offset: 122px; }
body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: #000000; /* Dark background for header */
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #000000; /* Header top background */
  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: 0 20px;
  position: relative; /* For mobile logo absolute positioning */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF;
  text-transform: uppercase;
  display: block;
  flex-shrink: 0;
}

/* If logo is an image */
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

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

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  box-sizing: border-box;
  min-height: 48px;
  height: auto; /* Allow height to adjust if text wraps */
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: #017439; /* Different background for mobile buttons */
  padding: 10px 20px;
  gap: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default */
  align-items: center;
  overflow: hidden;
  background-color: #017439; /* Main nav background, different from header top */
  width: 100%;
  position: static; /* Desktop default */
  transform: translateX(0); /* Desktop default */
  transition: transform 0.3s ease; /* For mobile slide effect */
}

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

.nav-link {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #FFFF00; /* Hover color */
}

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001; /* Above header */
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  margin-bottom: 5px;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

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

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

/* Footer styles */
.site-footer {
  background-color: #222222; /* Dark background for footer */
  color: #CCCCCC;
  padding: 40px 20px 20px;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
}

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

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

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

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

.footer-description {
  margin-bottom: 15px;
  line-height: 1.8;
  color: #BBBBBB;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav a {
  color: #CCCCCC;
  transition: color 0.3s ease;
}

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

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

.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  color: #AAAAAA;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  margin: 0;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  :root { --header-offset: 110px; } /* Mobile offset */

  /* Mobile Header Top */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    background-color: #000000; /* Consistent dark background */
  }

  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: flex-start; /* Align hamburger to left */
  }

  .hamburger-menu {
    display: block;
    margin-right: 15px; /* Space between hamburger and logo area */
  }

  /* Mobile Logo Centering (Method 2: absolute positioning) */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 80px); /* Prevent logo from overlapping hamburger */
  }

  /* If logo is an image */
  .logo img {
    max-height: 56px !important; /* Mobile logo height */
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

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

  /* Mobile Nav Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    height: auto;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Smaller padding */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background-color: #017439; /* Different background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Two 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;
    text-align: center;
  }

  /* Mobile Main Nav (Hamburger Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset));
    background-color: #017439; /* Same as desktop nav, or slightly different */
    flex-direction: column;
    padding: 20px 0;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Below overlay */
    overflow-y: auto;
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    flex-direction: column; /* Vertical links */
    align-items: flex-start;
    gap: 15px;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Footer */
  .site-footer {
    padding: 30px 15px 15px;
  }

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

  .footer-col h3 {
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-bottom {
    padding-top: 15px;
    margin-top: 15px;
  }

  /* Mobile Overflow Protection */
  .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.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;
  }
}
