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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: var(--text-main-color);
  background-color: var(--page-bg-color);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

/* 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: var(--card-bg-color); /* Fallback, specific colors for header-top/main-nav */
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Using primary color for header top */
  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 30px; /* Desktop padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: block;
}

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

/* Mobile specific buttons - hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--page-bg-color); /* Different background */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 0 15px; /* Mobile padding */
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Desktop default: visible, horizontal */
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color); /* Using secondary color for main nav */
  color: #FFFFFF;
}

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

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  transition: background-color 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
}

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

/* Hamburger Menu - hidden by default on desktop */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
}

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

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

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

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998; /* Below menu, above content */
  display: none;
}

.overlay.active {
  display: block;
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: #FFFFFF;
  padding: 40px 0 20px;
  font-size: 14px;
  box-sizing: border-box;
}

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

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

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

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  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: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--secondary-color);
}

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

.footer-bottom p {
  margin: 0;
}

/* Anchor slots must be visible */
.footer-slot-anchor-inner {
  display: block;
  min-height: 1px; /* Ensure it takes up space even if empty */
}

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

  /* Header */
  .header-top {
    height: 60px; /* Mobile fixed height */
    padding: 0 15px; /* Mobile padding for header-top */
    position: relative; /* For logo absolute positioning if needed */
  }

  .header-container {
    padding: 0; /* Container padding handled by header-top */
    justify-content: flex-start; /* Adjust for hamburger menu */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    max-width: calc(100% - 100px); /* Adjust max-width to not overlap hamburger */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    margin-right: auto; /* Push logo to center, buttons to right if any */
  }

  /* Mobile buttons strip */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    align-items: center;
    justify-content: center;
    min-height: 48px; /* Mobile fixed height */
    gap: 10px;
    flex-wrap: nowrap; /* Prevent buttons from wrapping */
  }

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

  /* Main Nav (mobile menu) */
  .main-nav {
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 280px; /* Mobile menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--primary-color); /* Same as header-top */
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Scrollable if many items */
    display: none; /* Hidden by default for JS to toggle */
    z-index: 1002; /* Above overlay */
  }

  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Ensure it's displayed when active */
  }

  .main-nav .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    height: auto;
  }

  .main-nav .nav-link {
    width: 100%;
    padding: 12px 0;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

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

  .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
