:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --text-main: #1F2D3D;
  --custom-color-black: #000000;
  --card-bg: #FFFFFF;
  --background-color: #F4F7FB;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}

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

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

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1E4EBF; /* Darker blue for contrast */
  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-left: 20px;
  padding-right: 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  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: 12px;
  align-items: center;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: #FFFFFF;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary blue for menu */
  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;
}

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

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

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

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  position: absolute;
  transition: all 0.3s ease;
}

.hamburger-icon {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Footer Styles */
.site-footer {
  background-color: var(--text-main); /* Dark background for footer */
  color: #E0E0E0;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
}

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

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

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

.footer-description {
  margin-top: 15px;
  color: #B0B0B0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav li a {
  color: #B0B0B0;
  text-decoration: none;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

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

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

/* Ensure slot anchors are visible for content injection */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure it takes up space if empty */
  display: block;
  width: 100%;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* 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%;
  }

  .site-header {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    position: relative;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
    justify-content: space-between; /* Keep space-between for hamburger and logo */
  }

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

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

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: rgba(0, 0, 0, 0.1); /* Slight background for distinction */
    justify-content: center; /* Center buttons horizontally */
  }

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

  .hamburger-menu {
    display: block;
    order: -1; /* Place hamburger first */
    margin-right: auto; /* Push logo to center */
    position: relative; /* Ensure it's above logo for clicking */
    z-index: 1002; /* Higher than logo if using absolute positioning for logo */
  }

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

  .main-nav.active {
    display: flex; /* Show menu 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;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

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

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

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

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

  .footer-nav li a {
    padding: 8px 0;
  }
}

/* Small adjustments for tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-container, .nav-container, .footer-top-grid, .footer-bottom {
    padding-left: 30px;
    padding-right: 30px;
  }
  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
