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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-background);
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden; /* For mobile overflow-x protection */
}

a {
  text-decoration: none;
  color: var(--color-text-main);
}

.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.3);
  transition: transform 0.3s ease;
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-background); /* Dark background */
  width: 100%;
}

.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 content inside container */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Using Gold for logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; /* For vertical centering of text logo */
  align-items: center;
  height: 100%; /* Occupy full height of header-top */
}

.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  background: var(--color-button-gradient);
  color: var(--color-button-text); /* Changed for WCAG AA contrast */
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap; /* Prevent button text from wrapping on desktop */
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.hamburger-menu {
  display: none; /* Hidden on desktop, shown on mobile */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--color-text-main);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop by default, shown on mobile */
  min-height: 48px; /* Fixed height for mobile */
  background-color: var(--color-deep-red); /* Different color for mobile buttons bar */
  width: 100%;
  padding: 8px 15px; /* Adjust padding for mobile */
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: var(--color-primary); /* Main color for nav bar */
  width: 100%;
}

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

.nav-link {
  padding: 10px 15px;
  color: var(--color-text-main);
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.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: 998; /* Below mobile nav, above content */
  transition: opacity 0.3s ease;
  opacity: 0;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer styles */
.site-footer {
  background-color: var(--color-background);
  color: var(--color-text-main);
  padding: 40px 20px 20px;
  line-height: 1.6;
}

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

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

.footer-col p {
  font-size: 14px;
  margin-bottom: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a {
  color: var(--color-text-main);
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor-inner, .footer-slot-anchor-outer {
  min-height: 1px; /* Ensure these are rendered */
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  padding-top: 20px;
  color: rgba(255, 241, 232, 0.7); /* Slightly lighter text for copyright */
}

.footer-bottom a {
  text-decoration: none;
  color: inherit;
  cursor: default;
}

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    justify-content: space-between;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px; /* Mobile padding for content inside container */
    position: relative;
  }

  .logo {
    flex: 1 !important; /* For centering logo text/image */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100%;
    position: static; /* Reset any absolute positioning */
    transform: none; /* Reset any desktop transforms */
  }
  
  .logo img {
    max-height: 56px !important;
    max-width: 100%;
    height: auto;
  }

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

  .hamburger-menu {
    display: flex; /* Show hamburger on mobile */
    position: relative; /* Keep it in flow, but on the left */
    order: -1; /* Push to start of flex container */
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons bar */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
    background-color: var(--color-deep-red); /* Mobile buttons bar color */
  }

  .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;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    min-height: 48px !important;
    height: 100vh; /* Full viewport height for mobile nav */
    max-height: calc(100vh - var(--header-offset)); /* Subtract header height */
    position: fixed; /* Fixed position for slide-out menu */
    top: var(--header-offset); /* Start below fixed header */
    left: 0;
    width: 280px; /* Width of the slide-out menu */
    transform: translateX(-100%); /* Hidden by default */
    background-color: var(--color-background); /* Dark background for mobile menu */
    flex-direction: column; /* Vertical links */
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    overflow-y: auto; /* Scroll if content is too long */
    transition: transform 0.3s ease;
    display: none; /* Hidden by default, JS will change to flex when active */
    z-index: 999; /* Below hamburger, above overlay */
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    margin-bottom: 20px;
  }

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

  /* Mobile overflow-x 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
