html { scroll-behavior: smooth; }
:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); margin: 0; font-family: 'Arial', sans-serif; line-height: 1.6; color: #333333; overflow-x: hidden; }

.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: #017439; /* Default background, will be overridden by specific sections */ }

.header-top { background-color: #017439; color: #FFFFFF; height: 68px; display: flex; align-items: center; box-sizing: border-box; overflow: hidden; }
.header-container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 100%; }

.logo { font-size: 28px; font-weight: bold; color: #FFFFFF; text-decoration: none; display: flex; align-items: center; flex-shrink: 0; }
.logo img { display: block; max-height: 60px; height: auto; width: auto; max-width: 280px; object-fit: contain; }

.desktop-nav-buttons { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.mobile-nav-buttons { display: none; box-sizing: border-box; min-height: 48px; background-color: #f0f0f0; /* Neutral background for mobile button bar */ }

.btn { padding: 10px 18px; border-radius: 5px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease, color 0.3s ease; white-space: nowrap; cursor: pointer; border: none; text-align: center; }
.btn-register { background-color: #C30808; color: #FFFF00; }
.btn-register:hover { background-color: #a00606; }
.btn-login { background-color: #C30808; color: #FFFF00; }
.btn-login:hover { background-color: #a00606; }

.main-nav { background-color: #FFFFFF; height: 52px; display: flex; align-items: center; box-sizing: border-box; overflow: hidden; }
.nav-container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; justify-content: center; align-items: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 25px; }
.nav-list a { color: #017439; text-decoration: none; font-weight: 500; font-size: 16px; padding: 5px 0; transition: color 0.3s ease; white-space: nowrap; }
.nav-list a:hover { color: #C30808; }

.hamburger-menu { display: none; /* Hidden on desktop */ background: none; border: none; cursor: pointer; padding: 0; width: 30px; height: 20px; position: relative; z-index: 1001; flex-shrink: 0; }
.hamburger-menu .bar { display: block; width: 100%; height: 3px; background-color: #FFFFFF; margin-bottom: 5px; transition: all 0.3s ease; border-radius: 2px; }
.hamburger-menu .bar:last-child { margin-bottom: 0; }
.hamburger-menu.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1001; opacity: 0; transition: opacity 0.3s ease; }
.mobile-nav-overlay.active { display: block; opacity: 1; }

/* Footer Styles */
.site-footer { background-color: #017439; color: #FFFFFF; padding: 40px 20px 20px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; max-width: 1200px; margin: 0 auto 30px; }
.footer-col h3 { color: #FFFFFF; font-size: 18px; margin-bottom: 15px; }
.footer-col p { margin-bottom: 10px; }
.footer-logo { font-size: 24px; font-weight: bold; color: #FFFFFF; text-decoration: none; display: block; margin-bottom: 15px; }
.footer-description { color: #E0E0E0; 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: #E0E0E0; text-decoration: none; transition: color 0.3s ease; }
.footer-nav a:hover { color: #FFFF00; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 14px; color: #E0E0E0; max-width: 1200px; margin: 0 auto; }
.footer-bottom p { margin: 0; }

.footer-slot-anchor-inner { min-height: 10px; /* Ensures visibility for injection */ }

/* Responsive Styles */
@media (max-width: 768px) {
  :root { --header-offset: 110px; }
  body { overflow-x: hidden; }

  .header-top { height: 60px !important; }
  .header-container { padding: 0 15px; max-width: none; width: 100%; display: flex; justify-content: space-between; align-items: center; }
  
  .logo { flex: 1 !important; display: flex !important; justify-content: center !important; align-items: center !important; }
  .logo img { max-height: 56px !important; }
  .logo.text-logo { text-align: center; }

  .hamburger-menu { display: flex; }
  .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: #f0f0f0;
  }
  .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;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: #FFFFFF;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    padding-top: calc(var(--header-offset) + 20px); /* Adjust for header and mobile buttons */
    box-sizing: border-box;
  }
  .main-nav.active {
    display: block; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }
  .nav-container { flex-direction: column; align-items: flex-start; padding: 0 20px; max-width: none; width: 100%; }
  .nav-list { flex-direction: column; width: 100%; gap: 0; }
  .nav-list li { width: 100%; border-bottom: 1px solid #eee; }
  .nav-list a { display: block; padding: 12px 0; font-size: 15px; color: #333; }

  .mobile-nav-overlay.active { display: block; }

  .site-footer { padding: 30px 15px 15px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-col:last-child { margin-bottom: 0; }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
