/* Shared CSS */

/* Header Offset */
:root { --header-offset: 124px; } /* header-top: 68px, main-nav: 52px, +4px buffer */
body { padding-top: var(--header-offset); }
@media (max-width: 768px) {
  :root { --header-offset: 112px; } /* header-top: 60px, main-nav: 48px, +4px buffer */
}

/* Mobile Content Overflow Prevention */
@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;
  }
}

/* Base Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  background-color: #0A0A0A; /* Background */
  color: #FFF6D6; /* Text Main */
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: #FFF6D6; /* Text Main */
}

h1, h2, h3, h4, h5, h6 {
  color: #FFF6D6; /* Text Main */
  margin-top: 0;
  margin-bottom: 15px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button */
  color: #111111; /* Text on button for contrast */
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 211, 107, 0.4); /* Glow */
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6); /* Enhanced Glow */
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #111111; /* Card BG for header background */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-height: 68px; /* Approximate min-height for desktop header-top */
  display: flex;
  align-items: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px; /* Desktop padding */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribute items */
  min-height: 52px; /* Approximate min-height for desktop main-nav */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFD36B; /* Auxiliary color for logo */
  text-transform: uppercase;
  flex-shrink: 0;
  margin-right: 20px; /* Space between logo and nav */
  display: block; /* Ensure visibility */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 30px;
  color: #FFF6D6; /* Text Main */
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 1001; /* Above mobile menu */
}

.main-nav {
  flex: 1;
  display: flex; /* Desktop: flex for horizontal nav */
  flex-direction: row; /* Desktop: horizontal */
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0;
  list-style: none;
}

.main-nav .nav-link {
  font-size: 16px;
  font-weight: bold;
  color: #FFF6D6; /* Text Main */
  padding: 10px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav .nav-link:hover {
  color: #FFD36B; /* Auxiliary color on hover */
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 10px;
  margin-left: auto; /* Push buttons to the right */
  flex-shrink: 0;
}

.mobile-nav-buttons {
  display: none !important; /* Hidden on desktop, important to override other rules */
}

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

.site-footer h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #FFD36B; /* Auxiliary color for footer headings */
}

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

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

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFD36B; /* Auxiliary color for footer logo */
  text-transform: uppercase;
  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 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: #FFF6D6; /* Text Main */
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FFD36B; /* Auxiliary color on hover */
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid #3A2A12; /* Border */
  color: #FFF6D6; /* Text Main */
}

/* Mobile styles */
@media (max-width: 768px) {
  .site-header {
    min-height: 60px; /* Adjusted for mobile header-top */
  }

  .header-container {
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    padding: 0 15px; /* Mobile padding */
    justify-content: flex-start; /* Adjust for hamburger */
    min-height: 48px; /* Adjusted for mobile main-nav */
  }

  .hamburger-menu {
    display: block; /* Visible on mobile */
    margin-right: 15px;
  }

  .logo {
    flex: 1; /* Allow logo to take available space for centering */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0; /* Remove desktop margin */
    text-align: center; /* For text logo centering */
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Align below fixed header */
    left: 0;
    width: 280px; /* Mobile menu width */
    height: calc(100% - var(--header-offset));
    background-color: #111111; /* Card BG for mobile menu */
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out from left */
    transition: transform 0.3s ease;
    z-index: 999; /* Below hamburger, above overlay */
    overflow-y: auto;
  }

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

  .main-nav .nav-link {
    padding: 15px 0;
    border-bottom: 1px solid #3A2A12; /* Border */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    gap: 8px;
    margin-left: auto; /* Push to right */
    flex-shrink: 0;
  }

  .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.5);
    z-index: 998; /* Below menu */
  }

  .mobile-menu-overlay.active {
    display: block; /* Show when active */
  }

  body.no-scroll {
    overflow: hidden;
  }

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

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

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
