/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main */
  background-color: #B71C1C; /* Background */
  padding-top: var(--header-offset); /* Fixed header offset */
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #FFF5E1; /* Text Main */
}

ul {
  list-style: none;
}

/* Header Styles */
:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

.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.2);
  background-color: #C91F17; /* Primary color for header overall background */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #C91F17; /* Primary color */
  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 logo and buttons */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #F4D34D; /* Gold */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure it's not inline for flex alignment */
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Above header */
  position: relative; /* For z-index to work against logo absolute position */
}

.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFF5E1; /* Text Main */
  margin: 5px 0;
  transition: 0.4s;
}

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

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
}

.btn {
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
  color: #7A0E0E; /* Deep Red for button text */
  border: 1px solid #F2B544; /* Border color */
  box-shadow: 0 0 8px #FFCC66; /* Glow */
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 12px #FFCC66; /* Enhanced glow */
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: flex */
  align-items: center;
  overflow: hidden;
  background-color: #7A0E0E; /* Deep Red, contrasting with header-top */
  width: 100%;
}

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

.nav-link {
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  color: #FFF5E1; /* Text Main */
}

.nav-link:hover {
  color: #F4D34D; /* Gold */
}

/* Overlay for mobile menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998; /* Below mobile menu, above content */
  display: none; /* Hidden by default */
}

/* Footer Styles */
.site-footer {
  background-color: #B71C1C; /* Background */
  color: #FFF5E1; /* Text Main */
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #F4D34D; /* Gold */
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #F4D34D; /* Gold */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav {
  padding: 0;
}

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

.footer-nav a {
  color: #FFF5E1; /* Text Main */
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #F4D34D; /* Gold */
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #D32F2F; /* Card BG as divider */
  max-width: 1200px;
  margin: 0 auto;
  color: #FFF5E1; /* Text Main */
}

/* Dynamic slot anchor visibility - must not hide injected content */
.footer-slot-anchor-inner {
  /* Ensure visibility for injected content */
  display: block;
  width: 100%;
  height: auto; /* Allow content to define height */
  min-height: 1px; /* Ensure it takes up space even if empty */
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden;
  }

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

  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Keep shadow for fixed header */
  }

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Smaller padding for mobile */
    justify-content: space-between; /* Hamburger left, Logo center, blank right */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it first */
    position: relative;
    z-index: 1001; /* Above logo and buttons */
  }

  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .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); /* Adjust width to not overlap hamburger/buttons */
    height: 100%;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons horizontally */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Padding for buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #E53935; /* Secondary color for mobile buttons bar */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two buttons with 10px gap */
    padding: 8px 12px; /* Smaller padding */
    font-size: 13px; /* Smaller font size */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    position: fixed; /* Fixed position for off-canvas menu */
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 70%; /* Adjust width as needed */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #7A0E0E; /* Deep Red */
    flex-direction: column; /* Vertical menu items */
    justify-content: flex-start;
    padding-top: 20px;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    display: none; /* Hidden by default, activated by JS */
    z-index: 1000; /* Below overlay, above content */
    overflow-y: auto; /* Allow scrolling if menu is long */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    gap: 15px;
    align-items: flex-start; /* Align menu items to left */
  }

  .nav-link {
    width: 100%;
    padding: 10px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .overlay.active {
    display: block; /* Show overlay when active */
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    text-align: center;
  }

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

  .footer-col h3 {
    text-align: center;
  }

  .footer-nav {
    padding: 0;
  }

  .footer-nav li {
    display: block; /* Block links for mobile footer */
    margin: 0 0 8px; /* Stack vertically */
  }

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