:root {
  --header-offset: 122px;
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #FFF3E6;
  background-color: #0D0E12;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background-color: #0D0E12; /* Fallback for transparency issues */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0D0E12;
  width: 100%;
  color: #FFF3E6;
}

.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 30px; /* Adjusted padding for better spacing */
}

.logo {
  color: #FFF3E6;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  line-height: 1;
  display: block; /* Ensure it's treated as a block for flex alignment */
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: #17191F;
  width: 100%;
  padding: 8px 15px;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #17191F;
  width: 100%;
  color: #FFF3E6;
}

.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;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: #FFF3E6;
  text-decoration: none;
  font-size: 16px;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #FFA53A;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  color: #FFF3E6;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
}

.btn-secondary {
  background-color: #A84F0C; /* Using border color as a secondary button background */
}

.btn:hover {
  transform: translateY(-1px);
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger-icon {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFF3E6;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: #FFF3E6;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

.mobile-overlay.active {
  display: block;
}

.site-footer {
  background-color: #0D0E12;
  color: #FFF3E6;
  padding: 40px 20px 20px;
  border-top: 1px solid #A84F0C;
}

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

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

.footer-col .footer-logo {
  color: #FFF3E6;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-col .footer-description {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  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-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FFA53A;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(168, 79, 12, 0.3);
  font-size: 13px;
  color: #FFF3E6;
}

/* Footer dynamic slot anchors - must be visible */
.footer-slot-anchor,
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they take up space if needed */
  visibility: visible;
  opacity: 1;
  height: auto;
  max-height: none;
  overflow: visible;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  .body {
    overflow-x: hidden;
  }

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

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

  .header-container {
    padding: 0 15px;
    max-width: none;
    width: 100%;
    position: relative;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Adjust for hamburger */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-height: 48px;
    height: auto; /* Allow height to adjust if text wraps */
    padding: 8px 15px;
    background-color: #17191F;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* 5px for half of gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hamburger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Ensure it's above other elements */
    left: 0;
  }

  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below header-top and mobile-nav-buttons */
    left: 0;
    width: 280px; /* Adjust as needed */
    height: calc(100vh - var(--header-offset));
    background-color: #17191F;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    max-width: none;
    height: auto; /* Allow height to expand */
    gap: 15px;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(168, 79, 12, 0.3);
  }

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

  .footer-top-grid {
    grid-template-columns: 1fr;
  }

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

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

  .footer-nav li {
    display: inline-block;
    margin: 0 8px 8px 8px;
  }
  .footer-nav li a {
    white-space: nowrap;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
