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

/* General Container */
.header-container, .nav-container, .footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: #FFFFFF; /* Fallback for transparency, specific sections override */
}

/* Header Top */
.header-top {
  background-color: #E53935; /* Main color */
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.header-top .header-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: flex; /* For vertical centering of text */
  align-items: center;
  height: 100%;
}
.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Nav Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile min-height */
  background-color: #F5F7FA; /* General BG for this bar */
  width: 100%;
  overflow: hidden;
  padding: 0 20px; /* Consistent padding */
}

/* Main Navigation */
.main-nav {
  background-color: #FF5A4F; /* Auxiliary color */
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.main-nav .nav-container {
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.main-nav .nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  height: 100%;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above header-top */
  margin-left: 0; /* Align left */
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

/* Hamburger Menu Active State */
.hamburger-menu.active span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* Overlay (hidden by default) */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998; /* Below mobile menu, above content */
  display: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}
.overlay.active {
  display: block;
  opacity: 1;
}

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

/* Footer */
.site-footer {
  background-color: #333333; /* Dark background for footer */
  color: #E0E0E0; /* Light text for contrast */
  padding: 40px 0 20px;
  font-size: 14px;
}
.site-footer a {
  color: #FF5A4F; /* Auxiliary color for links */
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

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

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

.footer-col p {
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav li:last-child {
  margin-bottom: 0;
}

.footer-legal-nav {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}
.footer-legal-nav .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
.footer-legal-nav .footer-nav li {
  margin-bottom: 0;
}

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

/* Dynamic slot anchors */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
}

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

  /* Content area protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .header-top {
    height: 60px !important; /* Mobile fixed height */
    padding-left: 15px; /* Adjust padding for mobile */
    padding-right: 15px;
  }
  .header-top .header-container {
    padding-left: 0; /* Handled by header-top */
    padding-right: 0; /* Handled by header-top */
    width: 100%;
    max-width: none; /* No max-width on mobile */
    justify-content: space-between;
  }

  /* Mobile Logo Centering (Method 1: Flexbox) */
  .header-top .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  .logo img {
    max-height: 56px !important; /* Mobile max height */
    max-width: 100%; /* Ensure image scales */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place hamburger first */
    margin-right: auto; /* Push logo to center */
  }
  .header-top .desktop-nav-buttons {
    display: none !important; /* Hide desktop buttons on mobile */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px; padding-right: 15px; /* Mobile padding */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
    background-color: #F5F7FA; /* Match general background */
  }
  .mobile-nav-buttons .btn {
    flex: 1; min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding for mobile buttons */
    font-size: 13px; /* Smaller font for mobile buttons */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    height: auto; /* Auto height for expanded menu */
    min-height: 48px !important; /* Mobile fixed height */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    background-color: #FF5A4F; /* Auxiliary color */
    z-index: 999;
    display: none; /* Hidden by default, activated by JS */
  }
  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Show menu */
  }
  .main-nav .nav-container {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    height: auto;
  }
  .main-nav .nav-link {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    justify-content: flex-start;
    height: auto;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 30px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-logo {
    text-align: center;
  }
  .footer-nav {
    text-align: center;
  }
  .footer-legal-nav .footer-nav {
    flex-direction: column;
    gap: 8px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
