html { scroll-behavior: smooth; }
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset); /* Important: Body padding for fixed header */
  background-color: #B71C1C; /* Background color */
  color: #FFF5E1; /* Text Main color */
  overflow-x: hidden; /* Prevent horizontal scroll from body */
}
:root {
  --header-offset: 122px; /* Desktop: header-top (68px) + main-nav (52px) */
  --primary-color: #C91F17;
  --secondary-color: #E53935;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --card-bg: #D32F2F;
  --text-main: #FFF5E1;
  --border-color: #F2B544;
  --glow-color: #FFCC66;
  --gold-color: #F4D34D;
  --deep-red: #7A0E0E;
}

/* Fixed Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background-color: transparent; /* Background handled by header-top and main-nav */
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll from header */
}

/* Header Top Area (Desktop) */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--deep-red); /* Deep Red background for header-top */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.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;
}

/* Logo */
.logo {
  color: var(--gold-color); /* Gold color for logo text */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  display: block; /* Ensure logo is visible by default */
}
.logo img {
  display: block;
  max-height: 60px; /* Desktop max-height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Mobile Navigation Buttons (Hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Mobile min-height for this section */
  background-color: var(--primary-color); /* Primary color for mobile buttons section */
  width: 100%;
  padding: 0 15px; /* Mobile padding */
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden; /* Prevent overflow */
}

/* Main Navigation Area (Desktop) */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  background-color: var(--primary-color); /* Primary color background for main-nav */
  width: 100%;
  padding: 0 20px; /* Default padding for desktop */
}

.nav-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Spacing between desktop nav links */
}

.nav-link {
  color: var(--text-main); /* Text Main color for nav links */
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

/* Hamburger Menu (Hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--gold-color); /* Gold color for hamburger bars */
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Buttons */
.btn {
  background: var(--button-gradient); /* Button gradient */
  color: #7A0E0E; /* Deep Red for button text */
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color); /* Border color */
  text-align: center;
  box-sizing: border-box;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-color); /* Glow effect on hover */
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--deep-red); /* Deep Red background for footer */
  color: var(--text-main); /* Text Main color for footer text */
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}

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

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

.footer-col .footer-logo {
  color: var(--gold-color); /* Gold color for footer logo */
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-col .footer-description {
  color: var(--text-main); /* Text Main color for description */
  margin-bottom: 15px;
  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: var(--text-main); /* Text Main color for footer links */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color); /* Border color for footer bottom separator */
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  color: var(--text-main); /* Text Main color for copyright */
}

/* Dynamic Slot Anchors - ensure they don't hide content */
.footer-slot-anchor, .footer-slot-anchor-inner {
  /* No display: none, visibility: hidden, opacity: 0, height: 0, max-height: 0, overflow: hidden */
  min-height: 1px; /* Ensure they take up minimal space if empty */
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: header-top (60px) + mobile-nav-buttons (48px) + 2px buffer */
  }
  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body prevents horizontal scroll */
  }

  /* Header Top Area (Mobile) */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px;
    justify-content: flex-start; /* Align hamburger to start */
  }

  .header-container {
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Handled by header-top padding */
    position: relative; /* For absolute positioning of logo if needed */
    width: 100%;
    height: 100%;
  }

  /* Hamburger Menu (Visible on mobile) */
  .hamburger-menu {
    display: flex;
    margin-right: 0; /* Override desktop auto-margin */
    position: relative; /* For z-index */
    z-index: 1002; /* Above logo and mobile buttons */
  }

  /* Logo (Mobile Centered) */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side element */
    width: auto; /* Allow content to dictate width */
    height: 100%; /* Fill parent height */
  }
  .logo img {
    max-height: 56px !important; /* Mobile max-height */
  }

  /* Desktop Navigation Buttons (Hidden on mobile) */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile Navigation Buttons (Visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    padding: 0 15px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two buttons with 10px gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation Area (Mobile - hidden by default, shown by JS) */
  .main-nav {
    min-height: 48px !important;
    height: auto; /* Auto height for expanded menu */
    position: fixed; /* Fixed position for mobile menu */
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    background-color: var(--primary-color); /* Primary color for mobile menu */
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    display: none; /* Crucial: hidden by default */
    z-index: 1001; /* Above overlay, below hamburger */
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 20px;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Nav Overlay (Visible on mobile when active) */
  .mobile-nav-overlay {
    display: block; /* Shown by JS when menu is active */
    z-index: 999; /* Below menu, above body */
  }

  /* Footer Mobile */
  .site-footer {
    padding-left: 15px;
    padding-right: 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  /* Mobile Content Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
