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

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

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

/* Header Top */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-background); /* Very dark red-brown */
  width: 100%;
  padding: 0 20px; /* Base padding for smaller desktop screens */
}

.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 {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold for logo text */
  text-decoration: none;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 100%;
}

/* If logo is an image, set max-height */
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Nav Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  width: 100%;
  background-color: var(--color-card-bg); /* Dark red-brown */
  padding: 0 20px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex (visible) */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-card-bg); /* Dark red-brown, contrasting with header-top */
  width: 100%;
  padding: 0 20px; /* Base padding for smaller desktop screens */
}

.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;
  width: 100%;
}

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

.nav-list a {
  color: var(--color-text-main);
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
  padding: 8px 0;
  transition: color 0.2s ease;
  white-space: nowrap; /* Prevent wrapping on desktop */
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  color: var(--color-text-main);
  text-decoration: none;
  background: var(--button-gradient); /* Gold/Orange gradient */
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  line-height: 1.2; /* Ensure text fits */
}

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below mobile menu, above main content */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* --- Site Footer --- */
.site-footer {
  background-color: var(--color-card-bg); /* Dark red-brown */
  padding: 40px 20px 20px;
  color: var(--color-text-main);
  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 {
  display: flex;
  flex-direction: column;
}

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

.footer-description {
  margin: 0;
  color: rgba(255, 241, 232, 0.8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 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;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-border); /* Deep red border */
  color: rgba(255, 241, 232, 0.7);
}

/* Dynamic Slot Anchors - ensure they are visible */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
}


/* --- Mobile Styles --- */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px */
  }

  /* Header Top */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Smaller padding for mobile */
  }

  .header-container {
    padding: 0; /* Handled by header-top padding */
    justify-content: space-between; /* Hamburger left, Logo center, space right */
    position: relative; /* For absolute positioning of logo if needed */
  }

  /* Hamburger Menu (visible on mobile) */
  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 1001; /* Ensure it's clickable above logo if needed */
  }

  /* Logo Centering (Mobile) */
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right-side element */
    height: 100%;
  }

  .logo img {
    max-height: 56px !important; /* Smaller max-height for mobile */
  }

  /* 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;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: var(--color-background); /* Match header-top background for a unified look */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation (Mobile Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed; /* Fixed position for slide-out menu */
    top: var(--header-offset); /* Starts below the fixed header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    flex-direction: column; /* Vertical layout */
    background-color: var(--color-card-bg); /* Dark red-brown */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    z-index: 1001; /* Above overlay and main content */
    overflow-y: auto; /* Scrollable if menu content is too long */
    padding: 20px 0; /* Padding for menu items */
  }

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

  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0;
    flex-direction: column; /* Ensure vertical layout */
    align-items: flex-start; /* Align menu items to the left */
    justify-content: flex-start;
  }

  .nav-list {
    flex-direction: column; /* Vertical list */
    width: 100%;
    gap: 0; /* No gap between vertical items */
  }

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

  .nav-list a {
    padding: 12px 20px; /* Padding for mobile menu items */
    display: block;
    width: 100%;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 241, 232, 0.1); /* Separator */
  }

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

  /* Prevent background scroll when menu is open */
  body.no-scroll {
    overflow: hidden;
  }

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

  /* Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
  }

  .footer-col:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 25px;
  }

  .footer-bottom {
    padding-top: 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;
}
