:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); margin: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #B71C1C; color: #FFF5E1; }

/* General styles for containers */
.header-container, .nav-container, .footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: transparent;
}

/* Header Top */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #7A0E0E; /* Deep Red, distinct from main nav */
  width: 100%;
  padding: 0;
}
.header-top .header-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 30px;
  padding-right: 30px;
}

/* Logo */
.logo, .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: #F4D34D; /* Gold color for logo text */
  text-decoration: none;
  display: block;
  line-height: 1;
}
.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;
}
.desktop-nav-buttons .btn {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  color: #FFF5E1; /* Text Main */
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  border: 1px solid #F2B544; /* Border color */
  transition: all 0.3s ease;
  white-space: nowrap;
}
.desktop-nav-buttons .btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 10px #FFCC66; /* Glow effect */
}

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile fixed height */
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: #D32F2F; /* Card BG, distinct from header-top and main-nav */
  padding: 0 15px;
  overflow: hidden;
  gap: 10px;
  flex-wrap: nowrap;
}
.mobile-nav-buttons .btn {
  flex: 1;
  min-width: 0;
  max-width: calc(50% - 5px); /* For 2 buttons with 10px gap */
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  color: #FFF5E1;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  border: 1px solid #F2B544;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
}
.mobile-nav-buttons .btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 8px #FFCC66;
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  background-color: #C91F17; /* Primary color, distinct from header-top */
  width: 100%;
  padding: 0;
}
.main-nav .nav-container {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between nav items */
}
.nav-list li a {
  color: #FFF5E1; /* Text Main */
  text-decoration: none;
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-list li a:hover {
  color: #F4D34D; /* Gold on hover */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}
.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFF5E1;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
}
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Overlay (hidden on desktop) */
.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;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer */
.site-footer {
  background-color: #7A0E0E; /* Deep Red, consistent with header-top */
  color: #FFF5E1; /* Text Main */
  padding: 40px 0 20px;
  font-size: 14px;
}
.site-footer a {
  color: #FFF5E1;
  text-decoration: none;
}
.site-footer a:hover {
  color: #F4D34D; /* Gold on hover */
}
.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h3 {
  font-size: 18px;
  color: #F4D34D; /* Gold for titles */
  margin-bottom: 15px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: #F4D34D;
  margin-bottom: 15px;
  display: block;
}
.footer-description {
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

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

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

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

  /* Header Mobile */
  .site-header {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .header-top {
    height: 60px !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .header-top .header-container {
    padding-left: 0;
    padding-right: 0;
    justify-content: space-between;
    position: relative;
  }

  /* Hamburger Menu (visible on mobile) */
  .hamburger-menu {
    display: block;
    position: relative;
    z-index: 2;
    order: 0;
  }

  /* Mobile Logo Centering (Method 2: Absolute positioning for robustness) */
  .header-top .header-container .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);
    height: 100%;
    z-index: 1;
    margin: 0; /* Reset any margin */
  }
  .logo img {
    max-height: 56px !important;
  }

  /* Desktop buttons hidden, Mobile buttons visible */
  .desktop-nav-buttons {
    display: none !important;
  }
  .mobile-nav-buttons {
    display: flex !important;
    height: 48px;
    padding-left: 15px;
    padding-right: 15px;
    background-color: #D32F2F; /* Card BG */
  }

  /* Main Nav (mobile menu panel) */
  .main-nav {
    display: none; /* Hidden by default, JS toggles */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #C91F17; /* Primary color */
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .main-nav.active {
    display: flex; /* Show menu */
    transform: translateX(0);
  }
  .main-nav .nav-container {
    width: 100%;
    max-width: none;
    height: auto;
    padding: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }
  .nav-list li a {
    display: block;
    padding: 10px 0;
    width: 100%;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col h3 {
    margin-bottom: 10px;
  }
  .footer-col ul li {
    margin-bottom: 5px;
  }
  .footer-logo {
    margin: 0 auto 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;
}
