:root {
  --header-offset: 122px;
  --primary-color: #C61F1F;
  --secondary-color: #E53030;
  --button-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  --card-bg: #2A1212;
  --site-bg: #140C0C;
  --text-main: #FFF1E8;
  --border-color: #6A1E1E;
  --gold-color: #F3C54D;
  --deep-red: #7E0D0D;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--site-bg);
  color: var(--text-main);
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

/* Base styles for links */
a {
  text-decoration: none;
  color: var(--text-main);
}
a:hover {
  color: var(--gold-color);
}

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  background-color: var(--site-bg); /* Base background, specific sections will override */
  box-sizing: border-box;
}

/* Header Top Section */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  justify-content: space-between; /* For hamburger, logo, buttons/spacer */
  overflow: hidden;
  background-color: var(--deep-red); /* Deep Red for header top */
  width: 100%;
  padding: 0 20px; /* Padding for 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 */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  padding: 0;
}
.logo:hover {
  color: var(--text-main);
}
.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 fixed height */
  width: 100%;
  background-color: var(--card-bg); /* Use card-bg for mobile buttons */
  padding: 0 15px; /* Mobile padding */
}

/* Spacer for mobile logo centering (hidden on desktop) */
.header-spacer {
  width: 0;
  flex-shrink: 0;
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Card BG 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; /* Center align nav items */
  align-items: center;
  padding: 0 20px;
}

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

.main-nav ul li a {
  color: var(--text-main);
  font-weight: bold;
  font-size: 15px;
  padding: 5px 0;
  white-space: nowrap;
}
.main-nav ul li a:hover {
  color: var(--gold-color);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 20px;
  position: relative;
  z-index: 1002; /* Above logo on mobile */
  flex-shrink: 0;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  background-color: var(--text-main);
  height: 3px;
  width: 100%;
  position: absolute;
  transition: all 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
}

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

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

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

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: var(--button-gradient);
  color: var(--text-main);
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  color: var(--text-main); /* Keep text color consistent on hover */
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer Styles */
.site-footer {
  background-color: var(--card-bg);
  color: var(--text-main);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
  width: 100%;
}

.site-footer a {
  color: var(--text-main);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--gold-color);
}

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

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

.footer-col p {
  margin: 0 0 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}
.footer-logo:hover {
  color: var(--text-main);
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 8px;
}
.footer-nav li:last-child {
  margin-bottom: 0;
}

/* Dynamic slot anchors */
.footer-slot-anchor-inner {
  min-height: 1px;
}

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

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

  /* Body overflow for mobile content */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

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

  .header-container {
    max-width: none; /* No max-width on mobile */
    padding: 0; /* Remove container padding as header-top has it */
    justify-content: space-between; /* Hamburger, Logo, Spacer */
  }

  /* Hamburger Menu visible on mobile */
  .hamburger-menu {
    display: block;
    width: 24px;
    height: 20px;
    align-self: center;
  }
  .hamburger-icon::before { top: -7px; }
  .hamburger-icon::after { top: 7px; }

  /* Logo Centering on Mobile (Method 1: Flexbox) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust logo size */
    height: 100%; /* Take full height of header-top */
    padding: 0;
  }
  .logo img {
    max-height: 56px !important; /* Mobile max height */
    max-width: 100%; /* Ensure image fits */
    height: auto;
  }

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

  /* Mobile Navigation Buttons - Always visible below header-top */
  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Adjust padding for mobile */
    overflow: hidden; /* Prevent overflow */
    gap: 10px;
    flex-wrap: nowrap; /* Keep buttons in one line */
    background-color: var(--card-bg); /* Use card-bg for mobile buttons */
  }

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

  /* Spacer for mobile logo centering */
  .header-spacer {
    width: 24px; /* Same width as hamburger for balance */
    flex-shrink: 0;
  }

  /* Main Navigation (Mobile off-canvas menu) */
  .main-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 70%; /* Adjust width of off-canvas menu */\    max-width: 280px; /* Limit max width for larger screens */
    height: calc(100% - var(--header-offset));
    background-color: var(--card-bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    max-width: none; /* No max-width on mobile */
    width: 100%;
    padding: 0 15px;
    height: auto;
  }

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

  .main-nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav ul li:last-child {
    border-bottom: none;
  }

  .main-nav ul li a {
    padding: 12px 15px;
    display: block;
    width: 100%;
    font-size: 16px;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    text-align: center;
  }
  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Additional mobile styles for the `body.no-scroll` class */
body.no-scroll {
  overflow: hidden;
}

/* Ensure no double padding on first content section */
.page-xxx:first-of-type,
.hero-section:first-of-type,
.video-section:first-of-type,
.title-section:first-of-type {
  padding-top: 10px; /* Small decorative top padding, not var(--header-offset) */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
