:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); margin: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333333; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }

/* Site 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);
  background-color: #E53935; /* Primary Red for header top */
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #E53935; /* Primary Red */
  width: 100%;
  color: #FFFFFF;
}

.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; /* Desktop padding */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: block; /* For text logo */
  white-space: nowrap;
}

.logo img { /* If logo is an image */
  display: block;
  max-height: 60px; /* Desktop max-height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile height */
  background-color: #E53935; /* Same as header-top */
  width: 100%;
  justify-content: center; /* Center buttons */
  align-items: center;
  padding: 0 15px; /* Mobile padding */
  gap: 10px;
  flex-wrap: nowrap; /* Prevent wrapping */
  overflow: hidden; /* Prevent overflow */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #FF5A4F; /* Secondary Red/Orange */
  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-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between desktop nav items */
}

.nav-links li {
  margin: 0;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0;
  display: block;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
}

.nav-link:hover {
  color: #333333; /* Darker text on hover */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  width: 30px; /* Width of the hamburger icon area */
  height: 30px; /* Height of the hamburger icon area */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.hamburger-icon {
  position: relative;
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  transition: background-color 0.3s ease-in-out;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease-in-out;
}

.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 (hidden on desktop) */
.overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999; /* Below menu, above content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  color: #FFFFFF;
  font-weight: bold;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-align: center;
}

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

/* Footer */
.site-footer {
  background-color: #333333; /* Dark background for footer */
  color: #E0E0E0;
  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: #FFFFFF;
  font-size: 16px;
  margin-bottom: 15px;
}

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

.footer-description {
  line-height: 1.8;
  color: #E0E0E0;
  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: #FF5A4F; /* Secondary color on hover */
}

.footer-slot-anchor-inner { /* For dynamic slots */
  min-height: 10px; /* Ensure visibility for injection */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #555555;
  color: #E0E0E0;
}

.footer-bottom p {
  margin: 0;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  :root { --header-offset: 110px; } /* Mobile offset */

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

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

  .header-container {
    padding: 0 15px; /* Mobile padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* For absolute positioning of logo */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    z-index: 1002;
    padding: 0;
  }

  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 80px); /* Ensure space for hamburger and potential right-side element */
    width: auto; /* Reset width for absolute positioning */
  }

  .logo img { /* For image logo */
    max-height: 56px !important; /* Mobile max-height */
    max-width: 100%; /* Ensure image scales */
    height: auto;
    object-fit: contain;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Reduced padding for mobile buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #E53935; /* Match header-top */
  }

  .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; /* Reduced padding */
    font-size: 13px; /* Reduced 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: 0; /* Menu starts from top of viewport */
    left: 0;
    width: 280px; /* Sidebar width */
    height: 100%;
    background-color: #FF5A4F; /* Secondary Red/Orange */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay, below hamburger button */
    flex-direction: column; /* Vertical menu */
    padding-top: 108px; /* Space for fixed header content (60px header-top + 48px mobile-nav-buttons) */
    box-sizing: border-box;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width for mobile container */
    padding: 0; /* No horizontal padding for slide-out menu */
    justify-content: flex-start; /* Align menu items to start */
    height: auto;
  }

  .nav-links {
    flex-direction: column; /* Vertical links */
    gap: 0; /* No gap for vertical links */
    width: 100%;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link {
    padding: 15px 20px; /* Larger padding for mobile links */
    color: #FFFFFF;
  }

  .overlay {
    z-index: 1000; /* Below menu, above content */
  }

  /* Footer mobile layout */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
  }

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-col:last-child {
    margin-bottom: 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
