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

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: var(--text-main-color);
  background-color: var(--site-bg-color);
  line-height: 1.6;
}

/* Header styles */
.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: var(--card-bg-color); /* White background for the entire 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%;
  padding: 0 20px; /* Padding for container edges */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* White text for logo on dark background */
  text-decoration: none;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
  padding: 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;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  color: #000000; /* Black text for buttons for WCAG AA contrast */
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%); /* Red gradient */
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default, shown on mobile */
  min-height: 48px;
  background-color: var(--site-bg-color); /* Light background for mobile buttons */
  width: 100%;
  padding: 8px 15px;
  gap: 10px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--text-main-color); /* Dark background for main nav */
  width: 100%;
  padding: 0 20px; /* Padding for container edges */
}

.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;
  width: 100%;
}

.nav-link {
  color: #FFFFFF; /* White text for nav links */
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  color: #FFFFFF;
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #FFFFFF;
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: #FFFFFF;
  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);
}

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

/* Footer styles */
.site-footer {
  background-color: var(--text-main-color); /* Dark background for footer */
  color: #E0E0E0; /* Light grey text for footer */
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  color: #FFFFFF; /* White headings for footer columns */
  font-size: 16px;
  margin-bottom: 15px;
}

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

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: #E0E0E0;
}

.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: var(--secondary-color); /* Highlight with secondary color on hover */
}

.footer-bottom-nav {
  max-width: 1200px;
  margin: 20px auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}

.footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px 30px;
}

.footer-legal-nav li {
  margin-bottom: 0;
}

.footer-bottom {
  text-align: center;
  max-width: 1200px;
  margin: 20px auto 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  color: #AAAAAA; /* Slightly darker grey for copyright */
}

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - ensure they are not hidden */
.footer-slot-anchor-inner,
.footer-slot-anchor-top,
.footer-slot-anchor-mid,
.footer-slot-anchor-mid-row,
.footer-slot-anchor-bottom {
  min-height: 1px; /* Ensure visibility */
  width: 100%;
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px buffer */
  }
  
  body {
    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;
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Ensure space between hamburger and logo */
  }

  .header-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Handled by header-top */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important; /* Center logo */
    align-items: center !important;
    padding: 0;
  }

  .logo img {
    max-height: 56px !important; /* Smaller logo for mobile */
    max-width: 100%;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Move to the left */
    margin-right: auto; /* Push logo to center */
    padding: 10px 0;
  }
  
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    background-color: var(--site-bg-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons with 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: auto; /* Height adapts to content */
    height: auto;
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--text-main-color); /* Dark background for mobile menu */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    overflow-y: auto; /* Enable scrolling for long menus */
    display: none; /* Hide by default, JS will change to flex */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

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

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

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

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

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

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 15px;
  }

  .footer-nav li {
    margin-bottom: 0;
  }

  .footer-legal-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
