:root {
  --primary-color: #C91F17; /* Main Red */
  --secondary-color: #E53935; /* Lighter Red */
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Gold Button */
  --card-bg: #D32F2F; /* Darker Red for Cards */
  --background-color: #B71C1C; /* Deep Red Background */
  --text-main-color: #FFF5E1; /* Off-White Text */
  --border-color: #F2B544; /* Gold Border */
  --glow-color: #FFCC66; /* Gold Glow */
  --gold-color: #F4D34D; /* Pure Gold */
  --deep-red-color: #7A0E0E; /* Very Deep Red */

  /* Header offset calculation (No marquee/neon) */
  /* Desktop: header-top (68px) + main-nav (52px) = 120px. Add 2px for safety. */
  --header-offset: 122px;
}

/* Body padding to prevent content from being hidden by fixed header */
body {
  padding-top: var(--header-offset);
  font-family: 'Arial', sans-serif;
  color: var(--text-main-color);
  background-color: var(--background-color);
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

/* Site Header (Fixed/Floating) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Suspended effect */
  background-color: var(--deep-red-color); /* Fallback, specific sections will override */
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  min-height: 68px; /* Desktop fixed height */
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-red-color); /* Darker red for top bar */
  width: 100%;
  padding: 0 20px; /* Ensure padding on edges */
}

.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 Styling */
.logo, .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color); /* Gold color for logo text */
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  height: 100%; /* Occupy full height of parent */
}

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

/* Mobile Navigation Buttons (hidden on desktop by default) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop by default */
  min-height: 48px; /* Mobile fixed height when visible */
  background-color: var(--secondary-color); /* Different color for mobile buttons bar */
  width: 100%;
  padding: 0 20px;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.2); /* Subtle separator */
}

/* Main Navigation Bar */
.main-nav {
  box-sizing: border-box;
  min-height: 52px; /* Desktop fixed height */
  height: 52px; /* Desktop fixed height */
  display: flex; /* Visible on desktop */
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary red for main nav */
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); /* Subtle separator */
}

.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(--text-main-color);
  text-decoration: none;
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: bold;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-color);
  background-color: rgba(0, 0, 0, 0.2);
}

/* Button Styling */
.btn {
  background-image: var(--button-gradient);
  color: #333; /* Darker text for gold button */
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color); /* Gold border for buttons */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--text-main-color);
  border-radius: 5px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

.hamburger-menu.active span:nth-child(1) { top: 10px; transform: rotate(135deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

/* 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; /* Below mobile menu, above content */
}

.overlay.active {
  display: block;
}

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

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

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

.footer-col h3 {
  font-size: 18px;
  color: var(--gold-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-logo {
  font-size: 24px;
  margin-bottom: 15px;
  display: inline-block;
}

.footer-description {
  margin-bottom: 15px;
  line-height: 1.8;
  word-wrap: break-word; /* Ensure description wraps */
  overflow-wrap: break-word;
}

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

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

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  /* CRITICAL: No <a> tags allowed in footer-bottom */
}

/* Dynamic slot anchor visibility */
.footer-slot-anchor, .footer-slot-anchor-inner {
  /* Ensure these containers are always visible for content injection */
  display: block;
  min-height: 1px; /* Ensure they take up at least some space if empty */
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Header offset for mobile */
  /* Mobile: header-top (60px) + mobile-nav-buttons (48px) = 108px. Add 2px for safety. */
  :root { --header-offset: 110px; }

  body {
    overflow-x: hidden;
  }

  /* Prevent content images from overflowing */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Header Top Bar Mobile */
  .header-top {
    min-height: 60px !important; /* Mobile fixed height */
    height: 60px !important; /* Mobile fixed height */
    padding: 0 15px;
  }

  .header-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    padding: 0; /* Handled by header-top padding */
    display: flex; /* Use flex for alignment */
    justify-content: space-between; /* Space out hamburger, logo, and potential right-empty-div */
    align-items: center;
    position: relative; /* For hamburger z-index */
  }

  /* Mobile Logo Centering (Method 1 for text logo) */
  .logo {
    flex: 1; /* Allow logo to take up space */
    text-align: center; /* Center text logo */
    min-width: 0;
    max-width: calc(100% - 60px); /* Leave space for hamburger (approx 30px + padding) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hamburger Menu Mobile */
  .hamburger-menu {
    display: block; /* Visible on mobile */
    position: relative; /* Ensure it stays on left */
    z-index: 1001;
  }

  /* Desktop Nav Buttons hidden on Mobile */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Mobile Nav Buttons (visible on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px; /* Mobile fixed height */
    align-items: center;
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden; /* Prevent buttons from overflowing */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons on one line */
    justify-content: center; /* Center buttons if less than 2, or distribute */
    background-color: var(--secondary-color);
  }
  .mobile-nav-buttons .btn {
    flex: 1; /* Distribute space evenly */
    min-width: 0; /* Allow shrinking */
    max-width: calc(50% - 5px); /* Max width for two buttons with gap */
    box-sizing: border-box;
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation Mobile (Hidden by default, slides in) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    bottom: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    background-color: var(--primary-color); /* Same as desktop nav */
    flex-direction: column; /* Vertical menu items */
    justify-content: flex-start; /* Align items to top */
    align-items: flex-start;
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Below hamburger menu, above overlay */
    overflow-y: auto; /* Enable scrolling for long menus */
    padding-top: 20px; /* Padding inside the menu */
  }

  .main-nav.active {
    display: flex; /* CRUCIAL: Must set display to flex to make it visible */
    transform: translateX(0); /* Slide in */
  }

  .nav-container {
    width: 100%;
    max-width: none; /* Crucial: no max-width on mobile */
    flex-direction: column; /* Vertical links */
    align-items: flex-start;
    padding: 0 15px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    align-items: center;
    text-align: center;
  }
  .footer-nav li {
    margin-bottom: 8px;
  }
  .footer-description {
    padding: 0 15px; /* Add some padding to description */
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
