:root { --header-offset: 122px; --primary-color: #26A9E0; --secondary-color: #FFFFFF; --login-btn-color: #EA7C07; --dark-text-color: #000000; }

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

/* Header */
.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.1);
  background-color: var(--secondary-color); /* Base background for header */
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Light blue for top bar */
  width: 100%;
  color: var(--secondary-color);
}

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

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  color: var(--secondary-color); /* Ensure bars are visible */
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 5px 0;
  transition: 0.4s;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: var(--secondary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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;
  background-color: #F0F8FF; /* Light blue background for mobile buttons */
}

.btn {
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  color: var(--secondary-color);
  border: none;
  font-size: 15px;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--login-btn-color); /* Orange for primary button */
  color: var(--secondary-color);
}

.btn-secondary {
  background-color: var(--dark-text-color); /* Black for secondary button */
  color: var(--secondary-color);
}

.btn:hover {
  transform: translateY(-2px);
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--dark-text-color); /* Black for navigation bar */
  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;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 0 15px;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}

/* Footer */
.site-footer {
  background-color: #222;
  color: #bbb;
  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;
}

.footer-col h3 {
  color: var(--secondary-color);
  font-size: 16px;
  margin-bottom: 15px;
  white-space: nowrap;
}

.footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
  color: #888;
}

.footer-slot-anchor-inner {
  min-height: 1px;
}

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

  /* Header */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding-left: 15px;
    padding-right: 15px;
    justify-content: space-between;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    position: relative;
    z-index: 1001;
    order: -1; /* Place hamburger on the far left */
  }

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

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

  .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: #F0F8FF; /* Light blue 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 {
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    height: calc(100% - var(--header-offset));
    background-color: #222;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: none; /* Hidden by default */
    overflow-y: auto;
    z-index: 1000;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    height: auto; /* Allow height to adjust */
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #333;
    color: var(--secondary-color);
    text-align: left;
  }

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

  .overlay.active {
    display: block;
  }

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

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

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

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

/* Ensure contrast for text on primary color background */
.header-top .logo,
.header-top .hamburger-menu .bar {
  color: var(--secondary-color);
}
.header-top .desktop-nav-buttons .btn {
  color: var(--secondary-color);
}

/* Contrast for text on dark background */
.main-nav .nav-link {
  color: var(--secondary-color);
}

/* Ensure color contrast for footer */
.site-footer {
  color: #bbb; /* Sufficient contrast with #222 background */
}
.footer-col h3 {
  color: var(--secondary-color); /* White for headings on dark footer */
}
.footer-logo {
  color: var(--primary-color); /* Primary color for logo on dark footer */
}
.footer-nav li a {
  color: #bbb; /* Lighter grey for links on dark footer */
}
.footer-bottom p {
  color: #888; /* Even lighter grey for copyright on dark footer */
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
