:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --text-color: #333333;
  --dark-blue: #1a8cc7; /* A darker shade for main-nav for contrast */
}

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

/* Site Header - Fixed Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--secondary-color); /* Overall header background */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Header Top - Logo and Desktop Buttons */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Fixed desktop height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Primary color for header top */
  width: 100%;
  padding: 0 20px; /* Padding for the top bar itself */
}

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

.logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
  height: 100%;
}

.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Nav Buttons - Hidden on desktop */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Fixed mobile height */
  background-color: var(--secondary-color); /* White background for mobile button row */
  border-bottom: 1px solid #eee; /* Subtle separator */
  padding: 0 20px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  justify-content: center;
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Fixed desktop height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--dark-blue); /* Darker blue for main nav for contrast */
  width: 100%;
}

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop horizontal layout */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 10px 15px;
  font-size: 15px;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

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

/* Buttons */
.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;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 1px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: #1e87b7;
  transform: translateY(-1px);
}

.btn-login {
  background-color: var(--login-button-color);
  color: var(--secondary-color);
  border: 1px solid var(--login-button-color);
}

.btn-login:hover {
  background-color: #c96706;
  transform: translateY(-1px);
}

/* Hamburger Menu - Hidden on desktop */
.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-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

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

/* Hamburger menu active state (X icon) */
.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);
}

/* Overlay for mobile menu */
.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;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer styles */
.site-footer {
  background-color: #333333;
  color: #cccccc;
  padding: 40px 20px 20px;
  font-size: 14px;
}

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

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

.footer-description {
  line-height: 1.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: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  margin: 0;
}

/* Dynamic slot anchors - ensure they don't hide content */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they take up at least some space if empty */
}

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

  /* Header Top Mobile */
  .header-top {
    height: 60px; /* Fixed mobile height */
    padding: 0 15px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    position: relative;
  }

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

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

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

  /* Mobile Nav Buttons - Displayed on mobile */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--secondary-color);
  }

  .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 Navigation Mobile */
  .main-nav {
    height: auto;
    min-height: 48px;
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 280px;
    max-width: 80%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    background-color: var(--dark-blue);
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    display: none;
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  /* Hamburger Menu - Displayed on mobile */
  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Overlay for mobile menu */
  .overlay.active {
    display: block;
    opacity: 1;
  }

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

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

  .footer-col h3 {
    margin-top: 20px;
  }

  .footer-nav li {
    display: inline-block;
    margin: 0 8px 8px;
  }

  .footer-nav a {
    white-space: nowrap;
  }
}

/* No-scroll class for body when menu is open */
body.no-scroll {
  overflow: 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;
  }
}
