html { scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, sans-serif; line-height: 1.6; color: #333333; background-color: #F5F7FA; padding-top: var(--header-offset); overflow-x: hidden; }
:root { --header-offset: 122px; --primary-color: #E53935; --accent-color: #FF5A4F; --text-color: #333333; --card-bg: #FFFFFF; --border-color: #E0E0E0; }

.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.2);
  background-color: var(--primary-color); /* Fallback for main nav background */
}

.header-top {
  box-sizing: border-box; min-height: 68px; height: 68px; display: flex; align-items: center; overflow: hidden;
  background-color: var(--primary-color); /* Primary Red for header top */
  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 {
  color: #FFFFFF; font-size: 28px; font-weight: bold; text-decoration: none;
  display: block; /* Ensure it's visible */
}

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

.btn {
  padding: 10px 20px; border-radius: 5px; text-decoration: none; color: #FFFFFF; font-weight: bold;
  background: linear-gradient(180deg, var(--accent-color) 0%, var(--primary-color) 100%);
  white-space: nowrap; cursor: pointer; border: none; text-align: center;
}

.btn:hover { opacity: 0.9; }

.mobile-nav-buttons {
  box-sizing: border-box; display: none; min-height: 48px; /* Hidden on desktop */
}

.main-nav {
  box-sizing: border-box; min-height: 52px; height: 52px; display: flex; align-items: center; overflow: hidden;
  background-color: #B71C1C; /* Darker red for main nav, contrasting with header top */
  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: #FFFFFF; text-decoration: none; padding: 0 15px; font-size: 16px; white-space: nowrap;
  height: 100%; display: flex; align-items: center;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px; height: 24px; position: relative; cursor: pointer; flex-direction: column; justify-content: space-between;
  z-index: 1001; /* Above header */
}

.hamburger-menu span {
  display: block; width: 100%; height: 3px; background-color: #FFFFFF; transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below menu, above content */
}

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

.footer-top-grid {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}

.footer-cols-wrapper {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 30px;
}

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

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

.footer-description {
  line-height: 1.8; color: #CCCCCC; 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; text-decoration: none;
}

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

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

.footer-bottom p { margin: 0; }

.footer-slot-anchor-inner {
  /* Ensures anchor slots are visible for injection */
  min-height: 1px;
  width: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root { --header-offset: 110px; }
  body { padding-top: var(--header-offset); overflow-x: hidden; }
  .page-content img { max-width: 100% !important; height: auto !important; display: block; }
  .page-content { overflow-x: hidden; max-width: 100%; }

  .header-top { min-height: 60px !important; height: 60px !important; }
  .header-container {
    width: 100%; max-width: none; padding-left: 15px; padding-right: 15px;
    justify-content: space-between; /* Hamburger left, Logo center, empty right */
    position: relative; /* For logo absolute positioning */
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu */
    order: -1; /* Place it at the beginning */
    position: relative; z-index: 2;
  }

  .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-left: 15px; padding-right: 15px;
    overflow: hidden; gap: 10px; flex-wrap: nowrap;
    background-color: var(--primary-color); /* Same as header top for continuity */
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Account for 10px gap */
    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: auto !important; /* height: auto for content */
    flex-direction: column; position: fixed; top: var(--header-offset); left: 0; width: 80%; max-width: 300px;
    background-color: #B71C1C; /* Same as desktop main nav */
    transform: translateX(-100%); transition: transform 0.3s ease; /* Slide out of view */
    z-index: 1000; display: none; /* Hidden by default, JS will toggle display and transform */
    padding: 20px 0;
  }
  .main-nav.active {
    transform: translateX(0); display: flex; /* Show when active */
  }

  .nav-container {
    width: 100%; max-width: none; padding-left: 15px; padding-right: 15px;
    flex-direction: column; align-items: flex-start;
    height: auto; /* Allow content to dictate height */
  }
  .nav-link {
    width: 100%; padding: 10px 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-start;
  }
  .nav-link:last-child { border-bottom: none; }

  .overlay.active { display: block; }

  .footer-cols-wrapper {
    grid-template-columns: 1fr; /* Single column layout for mobile */
  }
  .footer-col {
    text-align: center; margin-bottom: 20px;
  }
  .footer-logo { text-align: center; }
  .footer-nav {
    display: flex; flex-direction: column; align-items: center;
  }
  .footer-nav li { margin-bottom: 5px; }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
