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

html {
  scroll-behavior: smooth;
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Arial', sans-serif; /* Placeholder font */
  line-height: 1.6;
  color: var(--text-main-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

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

.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); /* Neutral background for the whole header container */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary red for top bar */
  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; /* Desktop padding */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF; /* White text for logo on red background */
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  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 {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--accent-color) 0%, var(--primary-color) 100%);
  color: #FFFFFF;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-color) 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Placeholder for mobile */
  background-color: var(--card-bg-color); /* White background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Default padding */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--accent-color); /* Accent red for main nav */
  width: 100%;
}

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

.nav-link {
  color: #FFFFFF;
  padding: 0 15px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  height: 100%;
}

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

/* Hamburger menu for mobile */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001; /* Above header */
  margin-right: auto; /* Pushes logo to center */
}

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

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

.overlay.active {
  display: block;
}

/* Footer Styling */
.site-footer {
  background-color: var(--text-main-color); /* Dark background for footer */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.site-footer h3 {
  color: var(--accent-color); /* Accent color for footer headings */
  font-size: 16px;
  margin-bottom: 15px;
}

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

.footer-col {
  padding: 0 10px;
}

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

.footer-description {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  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: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

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

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

  /* Mobile Header */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px; /* Mobile padding */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px; /* Adjust logo font size for mobile */
  }

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

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

  .hamburger-menu {
    display: block;
  }
  
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--card-bg-color); /* White background for mobile buttons */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 50% minus half of the gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    min-height: auto !important;
    height: auto !important;
    display: none; /* Hidden by default, shown via JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 70%; /* Adjust menu width */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
    background-color: var(--primary-color); /* Primary red for mobile menu */
    transform: translateX(-100%); /* Initially off-screen */
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow-y: auto;
    justify-content: flex-start;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: none;
    align-items: flex-start;
  }

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

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

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

  .footer-col {
    padding: 15px 0;
  }

  .footer-col h3 {
    text-align: center;
  }

  .footer-nav {
    text-align: center;
  }

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