:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
  --color-primary: #C91F17;
  --color-secondary: #E53935;
  --color-button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --color-card-bg: #D32F2F;
  --color-background: #B71C1C;
  --color-text-main: #FFF5E1;
  --color-border: #F2B544;
  --color-glow: #FFCC66;
  --color-gold: #F4D34D;
  --color-deep-red: #7A0E0E;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-background);
  padding-top: var(--header-offset);
  overflow-x: hidden;
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: var(--color-primary); /* Default background, sections override */
}

.header-top {
  box-sizing: border-box;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Main color for header top */
  width: 100%;
  padding: 0 20px; /* Padding for hamburger menu on mobile */
}

.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;
  /* Desktop padding for elements within container */
  padding-left: 0;
  padding-right: 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-gold);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  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; /* Placeholder height */
  background-color: var(--color-deep-red); /* Distinct background for mobile buttons */
}

.main-nav {
  box-sizing: border-box;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-secondary); /* Auxiliary color for main nav */
  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;
}

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  padding: 15px 15px;
  font-size: 16px;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-radius: 5px;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-gold);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
  margin-right: 15px; /* Space between hamburger and logo */
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-gold);
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--color-gold);
  position: absolute;
  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);
}

.btn {
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), 0 0 10px var(--color-glow);
}

/* Footer */
.site-footer {
  background-color: var(--color-deep-red);
  padding: 40px 20px 20px;
  color: var(--color-text-main);
  font-size: 14px;
  line-height: 1.6;
}

.footer-slot-anchor {
  display: block;
  width: 100%;
  height: 0;
  overflow: hidden;
}

.footer-slot-anchor-inner {
  display: block;
  width: 100%;
  height: 0;
  overflow: hidden;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--color-gold);
  text-decoration: none;
  margin-bottom: 15px;
  display: inline-block;
}

.footer-description {
  margin-bottom: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-title {
  font-size: 18px;
  color: var(--color-gold);
  margin-bottom: 15px;
  white-space: nowrap;
}

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

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

.footer-nav a {
  color: var(--color-text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 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%;
  }

  .header-top {
    height: 60px;
    padding: 0 15px; /* Adjust padding for mobile */
    justify-content: space-between; /* To push hamburger and logo apart */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place hamburger first */
    margin-right: 0; /* No extra margin, padding handles spacing */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 20px;
    margin: 0;
    padding: 0 10px; /* Ensure some space for text logo */
  }

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

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

  .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: 5px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--color-deep-red); /* Ensure background is set */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for 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; /* Slightly smaller radius for mobile */
  }

  .main-nav {
    display: none; /* Hidden by default for mobile menu */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Align below the fixed header + mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset));
    background-color: rgba(var(--color-deep-red), 0.95); /* Semi-transparent overlay for menu */
    overflow-y: auto;
    transition: transform 0.3s ease;
    transform: translateX(-100%); /* Start off-screen */
    z-index: 999;
    padding: 20px 0;
    align-items: flex-start;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

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

  .nav-container {
    flex-direction: column;
    width: 100%;
    max-width: none;
    padding: 0;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    justify-content: flex-start;
    font-size: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
  }

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

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col:not(:first-child) {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-logo {
    text-align: center;
    width: 100%;
  }

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

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

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

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