:root {
  --primary-color: #E53935;
  --accent-color: #FF5A4F;
  --text-main-color: #333333;
  --bg-card-color: #FFFFFF;
  --bg-body-color: #F5F7FA;
  --border-color: #E0E0E0;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--bg-body-color);
  color: var(--text-main-color);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

body.no-scroll {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

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

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

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: var(--bg-card-color); /* Neutral background for the entire fixed header */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* White text for logo on dark red background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is block element for proper sizing */
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
  flex-direction: column;
  justify-content: space-between;
  padding: 5px; /* Add padding to make it easier to click */
  box-sizing: content-box;
}

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

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

/* Mobile nav buttons - hidden on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  height: auto; /* Allow height to adjust for wrapped text */
  background-color: var(--bg-card-color); /* White background for mobile buttons */
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); /* Subtle shadow */
  width: 100%;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default */
  align-items: center;
  overflow: hidden;
  background-color: var(--accent-color); /* Lighter orange-red for main-nav */
  width: 100%;
}

.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; /* Spacing between nav links */
}

.nav-link {
  color: #FFFFFF; /* White text for nav links on orange-red background */
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

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

/* Footer */
.site-footer {
  background-color: var(--primary-color); /* Dark red for footer background */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.site-footer a {
  color: #FFFFFF;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #FFFFFF;
  position: relative;
}

.footer-col h3::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
  margin-top: 5px;
}

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

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

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

.footer-description {
  line-height: 1.8;
  margin-bottom: 15px;
}

.footer-dynamic-col {
  /* This column is intentionally left mostly empty for dynamic content injection */
}

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

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) */
  }

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

  .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative;
    height: 100%; /* Important for vertical centering of logo */
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100%; /* Take full height to vertically center its content (img) */
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right-side elements */
  }

  .logo img {
    max-height: 56px; /* Adjust for mobile header-top height */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    position: relative; /* Ensure it's clickable and on top */
    z-index: 1001;
    order: -1; /* Place it first in flex order */
    padding: 0;
    margin-left: -5px; /* Adjust to align with edge */
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

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

  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    align-items: center;
    justify-content: center;
    padding: 8px 15px; /* Smaller padding for mobile */
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 5px for half of the gap */
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font size */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Sidebar width */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
    background-color: var(--primary-color); /* Same as header-top for consistency */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    z-index: 999; /* Below overlay, above main content */
    overflow-y: auto; /* Enable scrolling for long menus */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: none;
    padding: 0 20px;
    gap: 15px; /* Smaller gap for mobile menu items */
  }

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

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

  .overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .footer-col {
    text-align: center;
  }

  .footer-col h3::after {
    margin: 5px auto 0; /* Center underline */
  }

  /* Mobile content 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
