:root {
  --header-offset: 122px;
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  color: #FFF5E1;
  background-color: #B71C1C;
}

/* Common Styles */
.container, .header-container, .nav-container, .footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: #B71C1C; /* Default background, will be covered by header-top and main-nav */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-top {
  background-color: #C91F17; /* Main Color */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.header-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Desktop padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFF5E1; /* Text Main */
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

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

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

.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  color: #7A0E0E; /* Deep Red for contrast */
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button Gradient */
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.main-nav {
  background-color: #E53935; /* Accent Color */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.nav-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: #FFF5E1; /* Text Main */
  text-decoration: none;
  padding: 5px 15px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #FFD86A; /* Button Gold for hover */
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; /* Above header */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background: #FFF5E1; /* Text Main */
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below main-nav when active */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Footer Styles */
.site-footer {
  background-color: #7A0E0E; /* Deep Red */
  color: #FFF5E1; /* Text Main */
  padding: 40px 20px 20px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 1px solid #E53935; /* Accent Color for border */
}

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

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

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

.footer-col a {
  color: #FFF5E1; /* Text Main */
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: #FFD86A; /* Button Gold for hover */
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFD86A; /* Button Gold */
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #FFF5E1; /* Text Main */
  padding-top: 20px;
  margin-top: 20px;
}

.footer-slot-anchor-inner { /* Ensures anchors are visible if content is injected */
  min-height: 10px; /* Small height to ensure visibility */
}

/* 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-top {
    min-height: 60px !important;
    height: 60px !important;
    position: relative; /* For logo absolute positioning if needed */
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none;
  }

  .hamburger-menu {
    display: flex;
  }

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

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #E53935; /* Accent Color, matching main-nav */
  }

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

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-offset));
    overflow-y: auto;
    background-color: #B71C1C; /* Background */
    transform: translateX(-100%); /* Off-screen to the left */
    transition: transform 0.3s ease;
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    padding: 20px 15px;
    gap: 10px;
    width: 100%;
    max-width: none;
  }

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

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

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

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

  .footer-col ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
