html, body { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #333333; }
:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); }

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

.header-top {
  box-sizing: border-box;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #017439;
  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;
}

.logo {
  color: #FFFF00;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.btn {
  background-color: #C30808;
  color: #FFFF00;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
}

.btn:hover {
  background-color: #a30707;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: #017439; /* Example background for mobile buttons */
}

.main-nav {
  box-sizing: border-box;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #FFFFFF;
  width: 100%;
  position: static;
  transition: transform 0.3s ease;
}

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

.nav-link {
  color: #017439;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #004d2b;
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFF00;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  transition: background-color 0.3s ease;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFF00;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease;
}

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

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

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

.hamburger-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 998;
}

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

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

.footer-col h3 {
  color: #FFFF00;
  font-size: 16px;
  margin-bottom: 15px;
}

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

.footer-description {
  color: #FFFFFF;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

/* Dynamic Slot Anchor Styling (ensure visibility) */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space */
  width: 100%;
}

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

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    position: relative;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger menu width */
  }

  .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: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #017439; /* Consistent background */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of 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;
  }

  .main-nav {
    height: calc(100vh - var(--header-offset)); /* Full height minus header */
    width: 250px;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    background-color: rgba(0,0,0,0.9);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    display: none; /* Default hidden */
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
  }

  .nav-link {
    width: 100%;
    color: #FFFFFF;
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

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

  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
  }

  .hamburger-overlay.active {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-col:last-child {
    margin-bottom: 0;
  }

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