:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --button-color: #EA7C07;
  --dark-background: #000000;
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
}

body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll for body */
}

/* Site Header - Fixed position and shadow */
.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: var(--primary-color); /* Primary color for overall header */
  box-sizing: border-box;
}

/* Header Top - Contains logo, desktop buttons, hamburger */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Using primary color */
  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; /* Padding for content inside container */
  position: relative; /* For absolute logo centering on mobile */
}

/* Logo */
.logo {
  display: flex; /* Use flex for potential image logo centering or text alignment */
  align-items: center;
  text-decoration: none;
  color: var(--secondary-color);
  font-size: 24px;
  font-weight: bold;
  height: 100%; /* Ensure logo takes full height of header-top */
}

.logo img {
  display: block;
  max-height: 60px; /* Max height for logo image on desktop */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Mobile Navigation Buttons (hidden on desktop) */
.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  background-color: var(--button-color); /* Distinct color for mobile button bar */
  box-sizing: border-box;
  min-height: 48px; /* Fixed height for mobile buttons bar */
  align-items: center;
  width: 100%;
  padding: 0 15px;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: center;
}

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

.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Horizontal by default for desktop */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  gap: 20px; /* Space between nav links */
}

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

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

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  width: 30px;
  height: 24px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1001; /* Above other header elements */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Hamburger menu active state (X icon) */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobile Menu Overlay (hidden on desktop) */
.mobile-menu-overlay {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 999; /* Below mobile menu, above content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Buttons (general style) */
.btn {
  display: inline-block;
  padding: 10px 18px;
  background-color: var(--button-color);
  color: var(--dark-background); /* Changed for WCAG AA contrast (6.54:1) */
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 15px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  text-align: center;
}

.btn:hover {
  background-color: #d16b06; /* Slightly darker hover */
}

/* Footer Styles */
.site-footer {
  background-color: var(--dark-background);
  color: var(--secondary-color);
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
}

.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;
  align-items: flex-start;
}

.footer-logo {
  text-decoration: none;
  color: var(--secondary-color);
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
}

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

.site-footer h3 {
  color: var(--secondary-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

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

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  text-decoration: none;
  color: #cccccc;
  transition: color 0.3s ease;
}

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

/* Footer Dynamic Column (Col 4) */
.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
}

/* Footer Dynamic Rows (Mid slots) */
.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px; /* Space between dynamic rows */
}

.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  color: #cccccc;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile Content Overflow Protection */
@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;
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) */
  }

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

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

  .header-container {
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
    padding: 0; /* Remove container padding, handled by header-top */
    justify-content: space-between; /* Space between hamburger and logo */
  }

  /* Hamburger Menu visible on mobile */
  .hamburger-menu {
    display: flex;
    position: relative; /* Ensure it's above other elements */
    z-index: 1002;
  }

  /* Logo Centering on Mobile (Method 2: Absolute positioning) */
  .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); /* Leave space for hamburger */
    height: 100%;
  }

  .logo img {
    max-height: 56px !important; /* Max height for logo image on mobile */
  }

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

  /* Mobile Navigation Buttons visible on mobile */
  .mobile-nav-buttons {
    display: flex !important; /* Override desktop display: none */
    justify-content: center;
    padding: 0 15px;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Two 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;
  }

  /* Main Navigation - Mobile specific styles */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px; /* Max width for menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: var(--dark-background); /* Menu background */
    transform: translateX(-100%); /* Slide out to the left */
    transition: transform 0.3s ease;
    overflow-y: auto; /* Enable scrolling for long menus */
    z-index: 1001; /* Above overlay, below hamburger */
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  }

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

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    gap: 10px;
    width: 100%;
    max-width: none; /* Remove max-width on mobile */
  }

  .nav-link {
    width: 100%;
    padding: 12px 15px;
    text-align: left;
    font-size: 16px;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay.active {
    display: block; /* Show overlay when menu is active */
  }

  /* Footer responsive */
  .site-footer {
    padding: 30px 15px 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    margin-bottom: 20px;
  }

  .footer-col {
    align-items: center; /* Center content in columns */
    text-align: center;
  }

  .footer-col h3 {
    width: 100%; /* Ensure heading takes full width for centering */
  }

  .footer-nav {
    width: 100%; /* Ensure nav list takes full width for centering */
  }

  .footer-nav li {
    text-align: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
