:root {
  --header-offset: 122px;
  --color-primary: #E53935;
  --color-accent: #FF5A4F;
  --color-bg-card: #FFFFFF;
  --color-bg-body: #F5F7FA;
  --color-text-main: #333333;
  --color-border: #E0E0E0;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: var(--color-text-main);
  background-color: var(--color-bg-body);
  line-height: 1.6;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: var(--color-bg-card);
}

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-accent);
  width: 100%;
}

.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;
  padding: 0 20px;
  overflow-x: auto; /* Allow scrolling if too many nav items */
  white-space: nowrap;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.btn {
  padding: 10px 18px;
  text-decoration: none;
  color: var(--color-text-main);
  font-weight: bold;
  border-radius: 25px;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-primary) 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

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

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
  margin-bottom: 0;
}

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

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.site-footer {
  background-color: var(--color-primary);
  color: #FFFFFF;
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #FFFFFF;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-nav a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

/* Dynamic Slot Anchors - ensure they are visible and not hidden */
.footer-slot-anchor-top, .footer-slot-anchor-mid, .footer-slot-anchor-mid-row, .footer-slot-anchor-bottom {
  min-height: 1px; /* Ensure they take up space if needed */
  display: block;
}
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they take up space if needed */
  display: block;
}

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

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

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    background-color: var(--color-primary);
  }

  .header-container {
    padding: 0 15px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    max-width: none; /* Remove max-width for mobile */
    width: 100%;
  }

  .hamburger-menu {
    display: block;
    grid-column: 1;
    justify-self: start;
  }

  .logo {
    grid-column: 2;
    justify-self: center;
    font-size: 20px;
    max-width: calc(100% - 100px); /* Adjust for hamburger width */
  }

  .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: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--color-bg-body); /* Neutral background */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    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 {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--color-bg-card);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: none; /* Hidden by default */
    flex-direction: column; /* Vertical menu */
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: calc(var(--header-offset) + 20px); /* Space for header above */
    z-index: 1000;
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    width: 100%;
    height: auto;
    overflow-x: hidden;
    white-space: normal;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    color: var(--color-text-main);
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
  }

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

  .nav-link:hover, .nav-link.active {
    background-color: var(--color-bg-body);
    border-radius: 0;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

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

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

  .footer-logo {
    font-size: 20px;
  }

  .footer-bottom {
    padding: 15px;
    margin-top: 20px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
