:root { --header-offset: 122px; --color-primary: #2F6BFF; --color-secondary: #6FA3FF; --color-text-main: #1F2D3D; --color-background: #F4F7FB; --color-card-bg: #FFFFFF; --color-border: #D6E2FF; --color-glow: #A5C4FF; }
body { padding-top: var(--header-offset); margin: 0; font-family: 'Arial', sans-serif; line-height: 1.6; color: var(--color-text-main); background-color: var(--color-background); overflow-x: hidden; }

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

.header-top { box-sizing: border-box; height: 68px; display: flex; align-items: center; overflow: hidden; background-color: var(--color-primary); 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 20px; }
.logo { font-size: 24px; font-weight: bold; color: #FFFFFF; text-decoration: none; white-space: nowrap; display: block; /* Ensure logo is visible */ }
.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; min-height: 48px; background-color: var(--color-background); padding: 0 15px; }

.main-nav { box-sizing: border-box; height: 52px; display: flex; align-items: center; overflow: hidden; background-color: var(--color-secondary); }
.nav-container { box-sizing: border-box; height: 100%; width: 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: 16px; white-space: nowrap; transition: background-color 0.3s ease; }
.nav-link:hover { background-color: rgba(255, 255, 255, 0.2); border-radius: 4px; }

.hamburger-menu { display: none; width: 30px; height: 24px; position: relative; cursor: pointer; z-index: 1001; background: none; border: none; padding: 0; }
.hamburger-icon { display: block; position: absolute; left: 0; top: 50%; width: 100%; height: 3px; background-color: #FFFFFF; transition: transform 0.3s ease, opacity 0.3s ease; transform-origin: center; }
.hamburger-icon::before, .hamburger-icon::after { content: ''; display: block; position: absolute; width: 100%; height: 3px; background-color: #FFFFFF; transition: transform 0.3s ease, top 0.3s ease; }
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

/* Hamburger menu active state */
.hamburger-menu.active .hamburger-icon { transform: rotate(45deg); }
.hamburger-menu.active .hamburger-icon::before { top: 0; transform: rotate(0deg); opacity: 0; }
.hamburger-menu.active .hamburger-icon::after { top: 0; transform: rotate(90deg); }

/* Overlay for 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: 998; }

/* Buttons */
.btn { display: inline-flex; justify-content: center; align-items: center; padding: 10px 20px; border-radius: 25px; text-decoration: none; font-weight: bold; font-size: 15px; color: #FFFFFF; white-space: nowrap; cursor: pointer; transition: all 0.3s ease; background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); border: none; box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4); }

/* Site Footer */
.site-footer { background-color: var(--color-background); color: var(--color-text-main); padding: 40px 20px 20px; font-size: 14px; }
.footer-top-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto 30px; }
.footer-col { display: flex; flex-direction: column; }
.footer-logo { font-size: 22px; font-weight: bold; color: var(--color-primary); text-decoration: none; margin-bottom: 15px; display: block; }
.footer-description { color: var(--color-text-main); line-height: 1.8; word-wrap: break-word; overflow-wrap: break-word; margin-bottom: 15px; }
.footer-title { font-size: 18px; font-weight: bold; margin-bottom: 20px; color: var(--color-primary); }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: var(--color-text-main); text-decoration: none; transition: color 0.3s ease; }
.footer-nav a:hover { color: var(--color-primary); }
.footer-bottom { border-top: 1px solid var(--color-border); padding-top: 20px; text-align: center; color: var(--color-text-main); max-width: 1200px; margin: 0 auto; }
.footer-slot-anchor-inner { min-height: 1px; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
  :root { --header-offset: 110px; }
  body { padding-top: var(--header-offset); overflow-x: hidden; }

  .site-header { box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
  .header-top { height: 60px !important; }
  .header-container { padding: 0 15px; max-width: none; position: relative; justify-content: space-between; }

  /* Logo Centering for Mobile (Method 2: Absolute Positioning for robust centering) */
  .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); /* Adjust width to prevent overlap with hamburger */
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 56px;
  }

  .hamburger-menu { display: block; position: relative; z-index: 1001; margin-left: -5px; /* Adjust as needed */ }
  .hamburger-menu.active { margin-left: 0; }
  .hamburger-menu .hamburger-icon { background-color: #FFFFFF; }
  .hamburger-menu .hamburger-icon::before, .hamburger-menu .hamburger-icon::after { background-color: #FFFFFF; }

  .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-background); /* Distinct background for mobile buttons */
  }
  .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;
  }

  .main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px; /* Adjust sidebar width as needed */
    height: calc(100% - var(--header-offset));
    background-color: var(--color-primary); /* Use primary color for mobile menu background */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    align-items: flex-start; /* Align menu items to the left */
    height: auto !important; /* Allow content to dictate height, but make sure it fits */
    min-height: calc(100vh - var(--header-offset)); /* Ensure it takes full height */
    z-index: 999;
  }
  .main-nav.active { display: flex; transform: translateX(0); }
  .nav-container { flex-direction: column; align-items: flex-start; padding: 0; width: 100%; max-width: none; }
  .nav-link { width: 100%; padding: 12px 20px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 16px; }
  .nav-link:last-child { border-bottom: none; }

  .overlay.active { display: block; }

  .footer-top-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-col:first-child { margin-bottom: 20px; }

  /* Mobile content overflow protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
