:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --text-main-color: #333333;
  --card-bg-color: #FFFFFF;
  --page-bg-color: #F5F7FA;
  --border-color: #E0E0E0;
  --button-gradient: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) + 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);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

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

a:hover {
  text-decoration: underline;
}

.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 for transparency, ensure solid */
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #D32F2F; /* Darker variant of primary for contrast */
  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 applied directly to container */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--card-bg-color); /* White for contrast on dark background */
  text-transform: uppercase;
  display: block; /* Ensure it's block for proper alignment */
  flex-shrink: 0;
}

.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;
  flex-shrink: 0;
}

/* Mobile Nav Buttons - Hidden by default on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Fixed height for mobile */
  background-color: #E53935; /* Primary color for mobile buttons section */
  width: 100%;
  padding: 0 15px; /* Add padding for mobile buttons */
}

/* Main Navigation Area */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--secondary-color); /* Auxiliary color for contrast */
  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; /* Padding applied directly to container */
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.main-nav ul li a {
  color: var(--card-bg-color); /* White for contrast on secondary color */
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  display: block;
}

.main-nav ul li a:hover {
  text-decoration: underline;
}

/* Hamburger menu - Hidden by default on desktop */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative; /* Positioned within header-container */
  z-index: 1001; /* Above header */
  flex-shrink: 0;
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--card-bg-color); /* White for visibility */
  margin-bottom: 5px;
  transition: transform 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

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

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

/* 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;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 25px;
  background: var(--button-gradient);
  color: var(--card-bg-color);
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

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

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

.footer-col h4 {
  color: var(--card-bg-color);
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-col p {
  line-height: 1.8;
  color: #ccc;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Auxiliary color for footer logo */
  text-transform: uppercase;
  display: block;
  margin-bottom: 15px;
}

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

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

.footer-nav li a {
  color: #ccc;
  font-weight: normal;
}

.footer-nav li a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.footer-slot-anchor {
  /* For top/mid/bottom slots */
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  min-height: 1px; /* Ensure it takes up space */
}

.footer-slot-anchor-inner {
  /* For col slots */
  min-height: 1px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 15px 20px;
  border-top: 1px solid #333;
  text-align: center;
  color: #999;
}

.footer-bottom p {
  margin: 0;
  color: #999;
}

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

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

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

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

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

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0; /* Reset padding from header-top itself */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial for mobile full width */
    padding: 0 15px; /* Padding applied directly to container */
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 24px;
    order: 2; /* Second item */
    flex-grow: 1; /* Allow logo to grow and push other elements */
    text-align: center; /* Center text logo */
    display: flex !important; /* Force flex for centering image/text */
    justify-content: center !important;
    align-items: center !important;
    height: 100%; /* Fill parent height */
    position: static; /* Reset absolute positioning */
    transform: none; /* Reset transform */
    max-width: none; /* Reset max-width from absolute positioning */
  }

  .logo img {
    max-height: 56px !important; /* Smaller max-height for mobile logo */
    max-width: 100%;
    height: auto;
  }

  /* Empty element to balance hamburger menu on the right */
  .header-container::after {
    content: '';
    display: block;
    width: 45px; /* Approximate width of hamburger menu */
    order: 3; /* Last item */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    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;
  }

  .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;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-radius: 20px;
  }

  .main-nav {
    min-height: 48px;
    height: 48px;
    padding: 0; /* Reset padding from main-nav itself */
    position: fixed; /* Fixed position for mobile menu when open */
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu takes 80% width */
    max-width: 300px; /* Max width for mobile menu */
    height: calc(100% - var(--header-offset)); /* Fill remaining viewport height */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    background-color: #333; /* Dark background for mobile menu */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start; /* Align items to top */
    align-items: stretch; /* Stretch items to fill width */
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1000; /* Below overlay, above body */
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    height: auto;
    padding: 20px 0; /* Add padding inside menu container */
    align-items: flex-start;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .main-nav ul li {
    width: 100%;
  }

  .main-nav ul li a {
    padding: 12px 20px;
    color: var(--card-bg-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav ul li:last-child a {
    border-bottom: none;
  }

  .hamburger-menu {
    order: 1; /* First item in flex */
    margin-right: auto; /* Push logo to center */
  }

  .overlay.active {
    display: block;
  }

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

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

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

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-bottom {
    padding: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
