:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px tolerance */
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #FFF3E6; /* Text Main */
  background-color: #0D0E12; /* Background */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

.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.2);
  box-sizing: border-box;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #D96800; /* Deep Orange, contrasting with main nav */
  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 {
  color: #FFF3E6; /* Text Main */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  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;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px;
}

.btn {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button gradient */
  color: #FFF3E6; /* Text Main */
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-block; /* Ensure padding works */
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Displayed by default for desktop */
  align-items: center;
  overflow: hidden;
  background-color: #FFA53A; /* Auxiliary color, lighter than header-top */
  width: 100%;
}

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

.nav-link {
  color: #FFF3E6; /* Text Main */
  text-decoration: none;
  padding: 0 15px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #A84F0C; /* Border color for hover */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  margin-right: 15px; /* Space between hamburger and logo on mobile */
}

.hamburger-menu::before, .hamburger-menu::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #FFF3E6; /* Text Main */
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu::before {
  top: 0;
}

.hamburger-menu::after {
  bottom: 0;
}

.hamburger-menu.active::before {
  transform: rotate(45deg);
  top: 10.5px;
}

.hamburger-menu.active::after {
  transform: rotate(-45deg);
  bottom: 10.5px;
}

.hamburger-menu.active::before, .hamburger-menu.active::after {
  background-color: #FFF3E6;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: #0D0E12; /* Background */
  color: #FFF3E6; /* Text Main */
  padding: 40px 0 20px;
  font-size: 14px;
  box-sizing: border-box;
}

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

.footer-col h3 {
  color: #FFA53A; /* Auxiliary color */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  color: #FFF3E6; /* Text Main */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

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

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

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

.footer-nav a {
  color: #FFF3E6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FFA53A; /* Auxiliary color for hover */
}

.footer-slot-anchor-inner {
  min-height: 1px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  border-top: 1px solid #17191F; /* Card BG for border */
  color: #FFF3E6; /* Text Main */
}

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

  .header-top {
    min-height: 60px;
    height: 60px;
  }

  .header-container {
    padding: 0 15px;
    justify-content: flex-start; /* Adjust for hamburger + centered logo */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-right: auto; /* Push logo to center, allowing hamburger to be left */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #17191F; /* Card BG for mobile buttons bar */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 990; /* Below main-nav */
  }

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

  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1002; /* Above logo and buttons */
    /* margin-right: auto; removed as logo is flex:1 and pushes itself */
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Starts below header-top and mobile-nav-buttons */
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-offset));
    background-color: #0D0E12; /* Background color */
    flex-direction: column; /* Vertical for mobile */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay, below hamburger */
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px;
    align-items: flex-start;
    height: auto; /* Allow content to dictate height */
    max-width: none; /* Remove max-width for mobile */
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

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

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  body.no-scroll {
    overflow: hidden;
  }

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

  .footer-col {
    margin-bottom: 20px;
  }

  .footer-bottom {
    padding: 15px;
  }

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