:root {
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}
body {
  padding-top: var(--header-offset);
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}
body.no-scroll {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: #FFFFFF; /* Overall header background, though sections have their own */
}

/* Header Top Bar - Desktop */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #1A7BB8; /* Darker shade of primary blue */
  width: 100%;
  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: block; /* Ensure it's block for proper alignment */
  line-height: 1;
  letter-spacing: -0.5px;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  transform: rotate(0deg);
  transition: .5s ease-in-out;
  z-index: 1002;
  padding: 5px;
}
.hamburger-menu span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #FFFFFF;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}
.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 10px; }
.hamburger-menu span:nth-child(3) { top: 20px; }

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

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Placeholder height */
  background-color: #F5F5F5; /* Light gray for contrast */
}

/* Main Navigation Bar - Desktop */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex; /* Displayed on desktop */
  align-items: center;
  overflow: hidden;
  background-color: #26A9E0; /* Primary light blue */
  width: 100%;
  color: #FFFFFF;
}

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

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px; /* Spacing between nav items */
}

.main-nav li a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 0; /* Vertical padding to align text in center */
  display: block;
  white-space: nowrap;
  transition: color 0.3s ease;
  font-size: 15px;
}

.main-nav li a:hover,
.main-nav li a.active {
  color: #FFD700; /* Gold-like hover effect */
}

/* Buttons Styling */
.btn {
  background-color: #EA7C07; /* Login/Register color */
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #FF8C00; /* Darker orange on hover */
  transform: translateY(-1px);
}

/* 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;
}
.overlay.active {
  display: block;
}

/* Footer Styling */
.site-footer {
  background-color: #333333; /* Dark gray */
  color: #CCCCCC;
  padding: 40px 0 0;
  font-size: 14px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 30px;
}

.footer-col h3 {
  color: #FFFFFF;
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
}
.footer-col h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: #26A9E0; /* Primary color underline */
  margin-top: 5px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}

.footer-description {
  margin-bottom: 20px;
  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: 10px;
}

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

.footer-nav a:hover {
  color: #26A9E0; /* Primary color on hover */
}

.footer-slot-anchor-inner {
  min-height: 10px; /* Ensure anchor is visible for layout purposes */
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  background-color: #222222; /* Even darker gray */
  color: #AAAAAA;
  margin-top: 20px;
}

.footer-bottom p {
  margin: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }
  body {
    overflow-x: hidden;
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .header-top {
    min-height: 60px;
    height: 60px; /* Fixed height for mobile */
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    position: relative; /* For absolute logo centering */
    justify-content: flex-start; /* Align hamburger to left */
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    z-index: 1002;
  }

  .hamburger-menu.active span:nth-child(1) { top: 10px; transform: rotate(135deg); }
  .hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
  .hamburger-menu.active span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

  .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 and potential right-side elements */
    height: 100%; /* Take full height of header-top */
    font-size: 24px;
  }
  /* If the logo is an image, its max-height should be controlled */
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 56px; /* For mobile, matches 60px header-top */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden; /* Prevent buttons from overflowing */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one row */
    background-color: #F5F5F5; /* Light gray */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .main-nav {
    display: none; /* Hidden by default for mobile menu */
    position: fixed;
    top: 0;
    left: 0;
    width: 80%; /* Menu takes 80% of screen width */
    height: 100vh; /* Full viewport height */
    background-color: #FFFFFF;
    z-index: 1001;
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.3s ease;
    flex-direction: column;
    padding-top: 60px; /* Space for fixed header-top */
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling for long menus */
  }

  .main-nav.active {
    display: flex; /* Must set display to show */
    transform: translateX(0); /* Slide into view */
  }

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

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid #EEEEEE;
  }

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

  .main-nav li a {
    padding: 15px 20px;
    color: #333333;
    font-weight: normal;
  }

  .main-nav li a:hover,
  .main-nav li a.active {
    background-color: #F0F0F0;
    color: #26A9E0;
  }

  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column for footer on mobile */
    padding: 0 15px 30px;
  }

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

  .footer-bottom {
    margin-top: 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
