:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); }

/* General styles for the site-header */
.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); /* Suspended effect */
  background-color: #0A0A0A; /* Base background for the whole header */
  box-sizing: border-box;
}

/* Header Top Area */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #111111; /* Card BG, distinct from 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; /* Padding for logo and buttons */
}

.logo {
  font-family: 'Arial', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E; /* Main color */
  text-decoration: none;
  display: flex; /* For text logo, to center if needed on mobile */
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px; /* Prevent logo from taking too much space */
}
.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;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  color: #FFF6D6; /* Text Main */
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: #1A1A1A; /* Slightly different dark background */
  width: 100%;
  padding: 0 15px; /* Adjust padding for mobile */
  overflow: hidden;
}

/* Main Navigation Area */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Desktop default: visible and horizontal */
  align-items: center;
  overflow: hidden;
  background-color: #0A0A0A; /* Background, distinct from header-top */
  width: 100%;
}

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

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between nav items */
}

.nav-list li a {
  text-decoration: none;
  color: #FFF6D6; /* Text Main */
  font-weight: 500;
  font-size: 16px;
  padding: 10px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-list li a:hover,
.nav-list li a.active {
  color: #FFD36B; /* Auxiliary color for hover/active */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}
.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFF6D6; /* Text Main */
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-menu span:last-child {
  margin-bottom: 0;
}

/* Overlay for mobile menu */
.overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.overlay.active {
  display: block;
  opacity: 1;
}

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

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

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

.footer-logo {
  font-family: 'Arial', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E; /* Main color */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  line-height: 1.6;
  color: #FFF6D6; /* Text Main */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

.footer-nav li a {
  color: #FFF6D6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-nav li a:hover {
  color: #FFD36B; /* Auxiliary color */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #3A2A12; /* Border color */
  max-width: 1200px;
  margin: 0 auto;
  color: #FFF6D6; /* Text Main */
}
.footer-bottom p {
  margin: 0;
}

/* Ensure footer slots are not hidden */
.footer-slot-anchor-outer, .footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they take up at least some space if empty */
}

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

  .header-top {
    min-height: 60px;
    height: 60px;
  }
  .header-container {
    padding: 0 15px; /* Reduced padding for mobile */
  }
  .logo {
    flex: 1 !important; /* Take remaining space */
    display: flex !important;
    justify-content: center !important; /* Center the logo */
    align-items: center !important;
    font-size: 20px; /* Adjust font size for mobile */
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }
  .logo img {
    max-height: 56px !important;
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place it to the left */
  }
  /* Hamburger menu animation */
  .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);
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    align-items: center;
    justify-content: center;
    min-height: 48px;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    width: 100%;
    max-width: 100%; /* Important for overflow */
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden; /* Prevent overflow */
  }
  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    min-height: 48px;
    height: 100vh; /* Full viewport height */
    position: fixed; /* Fixed position for mobile menu */
    top: 0; /* Will be adjusted by JS, or positioned relative to top of viewport */
    left: 0;
    width: 70%; /* Side menu width */
    background-color: #111111; /* Card BG for mobile menu */
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    flex-direction: column; /* Stack menu items vertically */
    justify-content: flex-start; /* Align items to top */
    padding-top: calc(var(--header-offset) + 20px); /* Space for fixed header content */
    z-index: 1000; /* Below overlay, above fixed header */
    display: none; /* Hidden by default, will be flex on active */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  }
  .main-nav.active {
    transform: translateX(0); /* Slide in */
    display: flex; /* Show the menu */
  }

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    flex-direction: column;
    align-items: flex-start; /* Align menu items to the left */
  }
  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0; /* No gap for stacked list */
  }
  .nav-list li {
    width: 100%;
    border-bottom: 1px solid #3A2A12; /* Border between items */
  }
  .nav-list li:last-child {
    border-bottom: none;
  }
  .nav-list li a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr; /* Stack columns on mobile */
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    margin-top: 20px;
  }
  .footer-logo {
    margin-bottom: 10px;
  }
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .footer-nav li {
    margin-bottom: 0;
  }
  .footer-nav li a {
    padding: 5px 10px;
    border: 1px solid #3A2A12;
    border-radius: 5px;
  }
}

/* No-scroll class for body when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
