:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --text-main-color: #333333;
  --bg-color: #F5F7FA;
  --card-bg-color: #FFFFFF;
  --border-color: #E0E0E0;
  --header-offset: 122px; /* 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(--bg-color);
  line-height: 1.6;
  overflow-x: hidden; /* Ensure body does not scroll horizontally */
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.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: 24px;
  font-weight: bold;
  color: var(--card-bg-color); /* White text for logo */
  text-decoration: none;
  display: flex; 
  align-items: center;
  height: 100%; 
  white-space: nowrap; 
}

.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-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  color: var(--card-bg-color); /* White text for buttons */
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

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

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-menu .bar {
  width: 25px;
  height: 3px;
  background-color: var(--card-bg-color); /* White bars */
  margin: 4px 0;
  transition: 0.4s;
}

/* Mobile Nav Buttons (Hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop, shown on mobile */
  min-height: 48px; /* Fixed height for mobile */
  background-color: var(--primary-color); /* Same as header-top for consistency */
  padding: 0 15px; /* Mobile padding */
  width: 100%;
}

/* Main Navigation */
.main-nav {
  background-color: var(--secondary-color); /* Secondary Lighter Red */
  height: 52px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
}

.main-nav .nav-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--card-bg-color); /* White text for nav links */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color); /* Primary red on hover/active */
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color); /* Primary red underline */
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.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;
  cursor: pointer;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color); /* Primary Red */
  color: var(--card-bg-color); /* White text for footer */
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer a {
  color: var(--card-bg-color); /* White links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--secondary-color); /* Secondary Lighter Red on hover */
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Light white border */
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--secondary-color); /* Secondary Lighter Red for headings */
}

.footer-logo {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  display: block;
  color: var(--card-bg-color); /* White text for logo */
}

.footer-description {
  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-slot-anchor-inner {
  min-height: 1px;
}

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

.footer-bottom p {
  margin: 0;
  color: var(--card-bg-color); /* White text */
}

/* No-scroll class for body */
body.no-scroll {
  overflow: hidden;
}

/* Mobile 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 horizontal scroll */
  }

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

  /* Header Top Mobile */
  .header-top {
    height: 60px;
  }

  .header-container {
    padding: 0 15px;
    position: relative; /* For logo absolute positioning if needed */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001; /* Above logo and buttons */
  }

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important; /* Center logo text */
    align-items: center !important;
    height: 100%;
    margin: 0; /* Remove any default margins */
    padding: 0; /* Remove any default paddings */
    max-width: calc(100% - 70px); /* Adjust for hamburger + potential right side element */
  }

  .logo img {
    max-height: 56px !important; /* Mobile logo max height */
  }

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

  /* Mobile Nav Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color); /* Same as header-top */
  }

  .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;
    text-align: center;
  }

  /* Main Navigation Mobile */
  .main-nav {
    display: none; /* Hidden by default, shown by JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 250px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color); /* Primary Red for mobile 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: 1001; /* Above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    padding: 20px 0;
  }

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

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

  .main-nav .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 17px;
    color: var(--card-bg-color);
  }

  .main-nav .nav-link::after {
    background-color: var(--secondary-color); /* Secondary Red for mobile underline */
  }

  .overlay.active {
    display: block;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .footer-col {
    text-align: center; /* Center footer content on mobile */
  }

  .footer-col h3 {
    margin-bottom: 10px;
  }

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

  .footer-bottom {
    margin-top: 15px;
    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;
  }
}
