:root {
  --primary-color: #C91F17;
  --secondary-color: #E53935;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --card-bg: #D32F2F;
  --background-color: #B71C1C;
  --text-main-color: #FFF5E1;
  --border-color: #F2B544;
  --glow-color: #FFCC66;
  --gold-color: #F4D34D;
  --deep-red-color: #7A0E0E;

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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Only place for header offset */
  line-height: 1.6;
  color: #333; /* Default text color, will be overridden by text-main-color in specific elements */
  background-color: var(--background-color);
  overflow-x: hidden; /* Prevent horizontal scroll */
  min-height: 100vh; /* Ensure body takes full viewport height */
  display: flex;
  flex-direction: column;
}

.site-header + main, .site-header + div:not(.overlay) { /* Adjust for main content below header */
  flex-grow: 1;
}

/* Base styles for links and buttons */
a {
  text-decoration: none;
  color: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 25px;
  background: var(--button-gradient);
  color: #333; /* Dark text for bright button */
  font-weight: bold;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap; /* Prevent text wrapping on desktop */
  text-decoration: none; /* Remove underline for buttons */
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Header Styles */
.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);
  background-color: transparent; /* Container for fixed elements, not directly styled */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-red-color); /* Deep red for top bar */
  width: 100%;
  position: relative; /* For mobile logo absolute positioning */
  z-index: 1002; /* Higher than main-nav when 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;
  padding: 0 20px; /* Padding for logo and buttons */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color); /* Gold for logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

.logo img {
  display: block;
  max-height: 60px; /* Matches 68px header-top height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile nav buttons - hidden by default, shown on mobile */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default for desktop */
  min-height: 48px; /* Placeholder height */
  background-color: var(--primary-color); /* Background for mobile buttons */
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0 15px; /* Add padding to prevent buttons from touching edges */
  gap: 10px; /* Spacing between buttons */
  flex-wrap: nowrap; /* Prevent buttons from wrapping */
  position: absolute; /* Positioned absolutely within site-header on mobile */
  top: 68px; /* Below header-top on desktop */
  left: 0;
  right: 0;
  z-index: 1001; /* Below header-top, above main-nav (when main-nav is fixed) */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex for horizontal menu */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary color for main nav */
  width: 100%;
  z-index: 1001; /* Below header-top */
  position: relative; /* Desktop default: relative */
}

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

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

.nav-links li a {
  display: block;
  padding: 5px 0;
  color: var(--text-main-color); /* Main text color for nav links */
  font-size: 15px;
  font-weight: bold;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links li a:hover {
  color: var(--gold-color); /* Gold on hover */
}

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px;
  z-index: 1003; /* Higher than logo and buttons on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-main-color); /* Text color for hamburger lines */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger menu active state */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--deep-red-color); /* Deep red for footer background */
  color: var(--text-main-color);
  padding: 40px 0 20px;
  font-size: 14px;
  margin-top: auto; /* Push footer to bottom */
}

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

.footer-col h3 {
  color: var(--gold-color); /* Gold for footer headings */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  margin-top: 10px;
  line-height: 1.8;
  color: var(--text-main-color);
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

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

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

.footer-nav li a {
  color: var(--text-main-color);
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Slot anchor inner for dynamic content */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (main-nav) + 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 mobile adjustments */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
    position: relative; /* For logo absolute centering */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute; /* Absolute positioning for centering */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
    height: 100%;
  }
  .logo img {
    max-height: 56px !important;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    order: -1;
    margin-right: auto;
  }

  /* Mobile buttons - always visible, positioned absolutely */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    top: 60px; /* Below header-top */
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1001;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px; padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .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; /* Allow text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main navigation (mobile menu) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position for off-canvas menu */
    top: calc(60px + 48px); /* Below header-top AND mobile-nav-buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--primary-color);
    flex-direction: column; /* Vertical menu */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Off-canvas position */
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: flex-start;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

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

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

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