html, body { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Arial', sans-serif; color: #333; line-height: 1.6; background-color: #FFFFFF; font-size: 16px; }

:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); }

.site-header { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.2); background-color: #1A7BB5; /* Ensures a solid background for fixed header */ }

.header-top { box-sizing: border-box; height: 68px; display: flex; align-items: center; overflow: hidden; background-color: #1A7BB5; 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: 28px; font-weight: bold; color: #FFFFFF; text-decoration: none; display: flex; align-items: center; justify-content: center; /* For text logo centering in flex */ }
.logo img { display: block; max-height: 60px; height: auto; width: auto; max-width: 280px; object-fit: contain; }

.desktop-nav-buttons { display: flex; gap: 10px; }

.btn { display: inline-block; padding: 10px 18px; border-radius: 5px; text-decoration: none; font-weight: bold; text-align: center; transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease; white-space: nowrap; cursor: pointer; border: none; }
.btn-register { background-color: #26A9E0; color: #FFFFFF; }
.btn-login { background-color: #EA7C07; color: #FFFFFF; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.3); }

.hamburger-menu { display: none; /* Hidden on desktop */ width: 30px; height: 24px; position: relative; cursor: pointer; flex-direction: column; justify-content: space-between; align-items: center; padding: 0; background: none; border: none; z-index: 1001; }
.hamburger-menu .bar { display: block; width: 100%; height: 3px; background-color: #FFFFFF; border-radius: 3px; transition: all 0.3s ease; }
.hamburger-menu.active .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.mobile-nav-buttons { display: none; /* Hidden on desktop */ }

.main-nav { box-sizing: border-box; height: 52px; display: flex; align-items: center; overflow: hidden; background-color: #26A9E0; /* Primary color for main nav */ 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: 10px 15px; font-weight: bold; transition: background-color 0.3s ease; white-space: nowrap; font-size: 15px; }
.nav-link:hover { background-color: rgba(255,255,255,0.2); border-radius: 3px; }

.overlay { display: none; /* Hidden by default */ position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 999; }
.overlay.active { display: block; }

/* Footer Styles */
.site-footer { background-color: #1A7BB5; color: #FFFFFF; padding: 40px 20px 20px; font-size: 14px; line-height: 1.8; }
.footer-top-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1200px; margin: 0 auto 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; }

.footer-col h3 { color: #FFFFFF; font-size: 18px; margin-bottom: 15px; font-weight: bold; }
.footer-logo { font-size: 24px; font-weight: bold; color: #FFFFFF; text-decoration: none; display: block; margin-bottom: 15px; }
.footer-description { font-size: 14px; line-height: 1.8; word-wrap: break-word; overflow-wrap: break-word; margin-bottom: 15px; }

.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 5px; }
.footer-nav li a { color: #FFFFFF; text-decoration: none; display: block; padding: 5px 0; font-size: 14px; transition: color 0.3s ease; }
.footer-nav li a:hover { color: #E0F2F7; }

.footer-slot-anchor-inner { margin-top: 15px; }
.footer-dynamic-col .footer-slot-anchor-inner { display: flex; flex-wrap: wrap; flex-direction: row; align-items: flex-start; gap: 5px; }
.footer-dynamic-row { margin-bottom: 15px; }
.footer-dynamic-row .footer-slot-anchor-inner { display: flex; flex-wrap: wrap; flex-direction: row; align-items: flex-start; gap: 8px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 10px 0; }
.footer-dynamic-row-bottom-slot { margin-bottom: 0; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }

.footer-bottom { text-align: center; font-size: 13px; color: #E0F2F7; padding-top: 20px; max-width: 1200px; margin: 0 auto; }

/* Scroll to top button */
.scroll-to-top { position: fixed; bottom: 20px; right: 20px; background-color: #26A9E0; color: #FFFFFF; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; line-height: 40px; text-align: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.3); display: none; z-index: 999; transition: background-color 0.3s ease; }
.scroll-to-top:hover { background-color: #1A7BB5; }

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

  .site-header { box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
  .header-top { height: 60px; padding: 0 15px; }
  .header-container { padding: 0; /* Handled by header-top, ensures content stretches */ justify-content: space-between; }

  .hamburger-menu { display: flex; order: 1; margin-right: 15px; /* Space between hamburger and logo */ }
  .logo { font-size: 24px; flex: 1; text-align: center; order: 2; /* Centering for text logo */ }
  .logo img { max-height: 56px !important; /* Image logo max-height for mobile */ }
  .desktop-nav-buttons { display: none; }

  .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: #1A7BB5; }
  .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; flex-direction: column; position: fixed; top: var(--header-offset); left: 0; width: 70%; max-width: 300px; height: calc(100% - var(--header-offset)); background-color: #26A9E0; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 1001; overflow-y: auto; box-shadow: 2px 0 5px rgba(0,0,0,0.2); }
  .main-nav.active { display: flex; transform: translateX(0); }

  .nav-container { flex-direction: column; align-items: flex-start; padding: 20px 0; width: 100%; max-width: none; }
  .nav-link { width: 100%; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav-link:last-child { border-bottom: none; }

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

  /* Footer Mobile */
  .footer-top-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-col h3 { margin-top: 20px; }
  .footer-nav li a { display: inline-block; padding: 5px 10px; }
  .footer-logo { margin: 0 auto 15px; }
  .footer-description { padding: 0 15px; }
  .footer-dynamic-row .footer-slot-anchor-inner { padding: 10px 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;
  }
}
