:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333333;
  background-color: #F5F7FA;
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

.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);
  box-sizing: border-box;
}

.header-top {
  background-color: #E53935; /* Main color */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.header-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* White text for logo on red background */
  text-decoration: none;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}

.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 {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  color: #FFFFFF; /* White text for buttons */
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  white-space: nowrap;
  transition: background 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
}

.main-nav {
  background-color: #222222; /* Dark contrast for main nav */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.nav-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

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

.nav-link:hover {
  color: #FF5A4F; /* Auxiliary color on hover */
}

/* Mobile specific elements (hidden on desktop by default) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.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: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop, shown via media query */
  min-height: 48px; /* Fixed height for mobile button row */
  background-color: #F5F7FA; /* Light background for mobile buttons */
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0 15px; /* Added padding for mobile buttons */
}

.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: #333333; /* Dark background for footer */
  color: #E0E0E0; /* Light text for footer */
  padding: 40px 20px;
  box-sizing: border-box;
  font-size: 14px;
}

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

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

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

.footer-description {
  line-height: 1.6;
  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; /* Light text for footer links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FF5A4F; /* Auxiliary color on hover */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #555555; /* Darker border for separation */
  margin-top: 20px;
  color: #E0E0E0;
}

.footer-slot-anchor-inner {
  /* This is an empty container for dynamic content injection */
}


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

  /* Prevent content images from overflowing */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .site-header {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0 15px;
    justify-content: space-between; /* Keep space-between for hamburger and logo */
  }

  .logo {
    flex: 1 !important; /* Take available space to center */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100%;
    font-size: 24px;
  }

  .logo img {
    max-height: 56px !important;
    max-width: 100%;
  }

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place it at the start */
    margin-right: auto; /* Push logo to center */
    position: relative; /* For z-index to work against overlay */
  }

  .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 if only one, or distribute if two */
    background-color: #F5F7FA; /* Light background for mobile buttons */
    padding: 0 15px;
    gap: 10px;
    flex-wrap: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* Subtle shadow for separation */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0; /* Allow buttons to shrink */
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile, controlled by JS */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #222222; /* Same as desktop nav background */
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    box-sizing: border-box;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px; /* Padding for mobile menu items */
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    height: auto; /* Allow content to define height */
  }

  .nav-link {
    width: 100%; /* Full width for mobile menu items */
    padding: 12px 15px;
    border-bottom: 1px solid #333333; /* Separator for menu items */
  }

  .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 layout for mobile footer */
  }

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

  .footer-col:last-child {
    margin-bottom: 0;
  }
}

/* Ensure no double padding on first section */
.page-xxx:first-of-type,
.__hero-section:first-of-type,
.__video-section:first-of-type,
.__title-section:first-of-type {
  padding-top: 10px; /* Small decorative top padding, not header-offset */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
