:root {
  --primary-color: #C91F17;
  --accent-color: #E53935;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --card-bg: #D32F2F;
  --background-color: #B71C1C;
  --text-main-color: #FFF5E1;
  --border-color: #F2B544;
  --glow-color: #FFCC66;
  --gold-color: #F4D34D;
  --deep-red-color: #7A0E0E;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-red-color); /* Darker red for top bar */
  width: 100%;
  padding: 0 20px; /* Add padding to header-top itself */
}

.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-left and padding-right moved to header-top for full background */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main-color);
  text-decoration: none;
  white-space: nowrap;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%;
}

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

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  background: var(--button-gradient);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-main-color);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 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) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

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

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

.mobile-nav-buttons {
  display: none; /* Hidden on desktop, shown on mobile */
}

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

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

.nav-link {
  color: var(--text-main-color);
  text-decoration: none;
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

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

.overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

/* Footer Styles */
.site-footer {
  background-color: var(--deep-red-color); /* Consistent with header-top */
  padding: 40px 20px 20px;
  color: var(--text-main-color);
  font-size: 14px;
  line-height: 1.6;
}

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

.footer-col {
  padding: 10px 0;
}

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

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

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

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

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

.footer-nav a {
  color: rgba(255, 245, 225, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}

.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px;
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 245, 225, 0.1);
  text-align: center;
  color: rgba(255, 245, 225, 0.6);
}

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

  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px;
    justify-content: space-between;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger menu width */
  }

  .logo img {
    max-height: 56px !important;
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger on the left */
    margin-right: auto; /* Push logo to center */
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color); /* Can be same as main-nav or a distinct color */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 250px;
    height: calc(100vh - var(--header-offset));
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--primary-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 10px 0;
    z-index: 1001;
  }

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

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

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

  .overlay.active {
    display: block;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    padding: 20px 0;
    text-align: center;
  }

  .footer-logo {
    margin-bottom: 10px;
  }

  .footer-heading {
    margin-bottom: 10px;
  }

  .footer-nav {
    text-align: center;
  }

  .footer-dynamic-col .footer-slot-anchor-inner,
  .footer-dynamic-row .footer-slot-anchor-inner {
    justify-content: center;
  }

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

/* Ensure no double padding-top on page content */
.page-xxx__hero-section, .page-xxx__video-section, .page-xxx__title-section {
  padding-top: 10px; /* Decorative top spacing, not for 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;
  }
}
