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

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

/* Header Styles */
.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(--primary-color); /* Default background for entire header */
}

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

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  flex-shrink: 0; /* Prevent shrinking */
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 25px;
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color); /* Distinct background for main-nav */
  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-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

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

/* Overlay for mobile menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.overlay.active {
  display: block;
}

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

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

.footer-col {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

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

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

.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

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

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent body overflow-x */
  }

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

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px;
    justify-content: space-between; /* Align hamburger left, logo center */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0; /* Remove container padding as header-top has it */
    position: relative; /* For absolute positioning of logo */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    margin-right: auto; /* Push logo to center */
  }
  
  .logo {
    flex: 1 !important; /* Allow logo to take space */
    display: flex !important; /* Use flex for centering */
    justify-content: center !important; /* Center logo horizontally */
    align-items: center !important; /* Center logo vertically */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right element */
  }
  .logo img {
    max-height: 56px !important; /* Mobile max-height */
  }

  .desktop-nav-buttons {
    display: none; /* Hide desktop buttons */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons if only one or for aesthetic */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Added padding for mobile buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--secondary-color); /* Same as main-nav for consistency */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons with 10px gap */
    box-sizing: border-box;
    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 */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max menu width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    background-color: var(--primary-color); /* Menu background */
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000; /* Below overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

  .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;
    width: 100%;
    max-width: none;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    margin-bottom: 20px;
  }
  .footer-col {
    margin-bottom: 20px;
  }
  .footer-col:last-child {
    margin-bottom: 0;
  }
  .footer-dynamic-row {
    margin-bottom: 15px;
  }
  .footer-bottom {
    padding-top: 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
