:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --btn-register-bg: #C30808;
  --btn-login-bg: #C30808;
  --btn-text-color: #FFFF00;
  --header-offset: 122px;
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

/* 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);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color);
  color: var(--secondary-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: 0 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  display: block;
  max-height: 60px;
  line-height: 60px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.btn {
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  border: none;
}

.btn-register, .btn-login {
  background-color: var(--btn-register-bg);
  color: var(--btn-text-color);
}
.btn-register:hover, .btn-login:hover {
  background-color: #e00b0b;
}

.mobile-nav-buttons {
  display: none;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #005f2e; /* Darker green for contrast */
  width: 100%;
}

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

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 16px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255,255,255,0.1);
}

.hamburger-menu {
  display: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: var(--secondary-color);
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
  top: 0px;
}

.hamburger-menu span:nth-child(2) {
  top: 10px;
}

.hamburger-menu span:nth-child(3) {
  top: 20px;
}

.hamburger-menu.active span:nth-child(1) {
  top: 10px;
  transform: rotate(135deg);
}

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

.hamburger-menu.active span:nth-child(3) {
  top: 10px;
  transform: rotate(-135deg);
}

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

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

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

.footer-col h3 {
  color: var(--btn-text-color);
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-col .footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

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

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

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

.footer-nav a:hover {
  color: var(--btn-text-color);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #444;
  margin-top: 20px;
  color: #aaa;
}
.footer-bottom p {
  margin: 0;
}

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

  /* Header mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

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

  .hamburger-menu {
    display: block;
    order: -1;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    line-height: 56px;
  }
  .logo img {
    max-height: 56px !important;
  }

  .desktop-nav-buttons {
    display: none;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #005f2e;
  }

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

  .main-nav {
    min-height: 48px !important;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    position: fixed;
    top: 0; /* Align to top of viewport for slide-out */
    left: 0;
    background-color: var(--secondary-color);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    display: none; /* Hidden by default */
    padding-top: var(--header-offset); /* Push menu items below fixed header */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
    color: #333;
    border-bottom: 1px solid #eee;
    font-size: 16px;
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-link:hover, .nav-link.active {
    background-color: #f0f0f0;
    color: var(--primary-color);
  }

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

  /* Footer mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-col {
    margin-bottom: 20px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
