: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: header-top (68px) + main-nav (52px) + 2px */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Body padding for fixed header */
  background-color: var(--page-bg-color);
  color: var(--text-main-color);
  overflow-x: hidden; /* Prevent body overflow on mobile */
}

a {
  text-decoration: none;
  color: inherit;
}

/* Prevent body scrolling when menu is open */
body.no-scroll {
  overflow: hidden;
}

/* --- Header Styles --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--card-bg-color); /* Neutral background for the whole header container */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Header Top background */
  width: 100%;
}

.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; /* Padding for logo and buttons */
}

.logo {
  display: block;
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF; /* White text for logo on dark background */
  text-transform: uppercase;
  padding: 0; /* Remove default padding */
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Desktop default: hide mobile buttons */
  min-height: 48px; /* Placeholder min-height for mobile when active */
  background-color: var(--card-bg-color); /* A neutral background for mobile buttons when shown */
  padding: 0 15px; /* Padding for mobile buttons */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%); /* Button gradient */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: show main navigation */
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color); /* Main Nav background */
  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-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between nav items */
}

.nav-list li a {
  display: block;
  padding: 10px 0;
  color: #FFFFFF; /* White text for nav links */
  font-size: 16px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-list li a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above header */
  position: absolute; /* Positioned relative to header-top for mobile */
  left: 15px; /* Align to left edge on mobile */
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFFFFF; /* White icon on dark background */
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  transition: transform 0.3s ease, top 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: rotate(45deg);
  top: 0;
}

.hamburger-menu.active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

.overlay {
  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 */
  display: none; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* --- Footer Styles --- */
.site-footer {
  background-color: #222222; /* Dark background for footer */
  color: #CCCCCC;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

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

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

.footer-description {
  line-height: 1.6;
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav li a {
  color: #CCCCCC;
  transition: color 0.3s ease;
}

.footer-nav li a:hover {
  color: #FFFFFF;
}

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

.footer-bottom p {
  margin: 0;
}

.footer-slot-anchor, .footer-slot-anchor-inner, .footer-slot-anchor-grid {
  /* These are placeholder for dynamic content injection, should not be hidden */
  display: block;
  min-height: 1px; /* Ensure they take up minimal space if empty */
}
.footer-slot-anchor-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

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

  /* Body padding for fixed header */
  body {
    padding-top: var(--header-offset);
  }

  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    position: relative; /* For hamburger positioning */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding-left: 15px;
    padding-right: 15px;
    justify-content: center; /* Center logo by default */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 100px); /* Adjust max-width to not overlap hamburger (15px padding + 25px hamburger + 10px gap = 50px on each side) */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    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;
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons on one line */
    background-color: var(--card-bg-color); /* Neutral background for mobile buttons */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    position: absolute; /* Positioned relative to header-top */
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #333333; /* Dark background for mobile menu */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001; /* Above overlay */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 20px 15px; /* Padding for mobile menu items */
    justify-content: flex-start; /* Align menu items to start */
    align-items: flex-start;
  }

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

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
  }

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

  .nav-list li a {
    padding: 15px 0; /* Larger padding for mobile touch targets */
    font-size: 17px;
    color: #FFFFFF;
  }

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

  .footer-col h3 {
    margin-top: 20px;
  }

  /* Mobile content 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;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
