:root {
  --primary-color: #26A9E0; /* Light blue */
  --secondary-color: #FFFFFF; /* White */
  --header-top-bg: #1A2C42; /* Dark blue/grey for header top */
  --main-nav-bg: var(--primary-color); /* Primary color for main nav */
  --btn-login-bg: #EA7C07; /* Orange for login button */
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

/* General body padding for fixed header */
body {
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Header Top Section */
.header-top {
  background-color: var(--header-top-bg);
  min-height: 68px;
  height: 68px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  display: flex; /* For potential image logo alignment */
  align-items: center;
  height: 100%; /* Ensure logo takes full height of container */
}

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

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap; /* Prevent buttons from wrapping on desktop */
  text-decoration: none; /* Remove underline for buttons */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color); /* Default button text color */
}

.btn-primary {
  background-color: var(--btn-login-bg);
}

.btn-primary:hover {
  background-color: #D56B06; /* Slightly darker orange */
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: #1E90FF; /* Slightly darker blue */
  transform: translateY(-1px);
}

/* Hamburger Menu (Mobile only) */
.hamburger-menu {
  display: none; /* Hidden on desktop by default */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1002; /* Above logo on mobile */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

.hamburger-menu.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Mobile Nav Buttons (Hidden on desktop by default) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Fixed height for mobile */
  background-color: var(--header-top-bg); /* Same as header top */
  width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Prevent content overflow */
}

/* Main Navigation */
.main-nav {
  background-color: var(--main-nav-bg);
  min-height: 52px;
  height: 52px; /* Fixed height for desktop */
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center; /* Center nav links on desktop */
  align-items: center;
  height: 100%;
  gap: 25px; /* Spacing between nav links */
}

.nav-link {
  color: var(--secondary-color);
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent nav links from wrapping on desktop */
}

.nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

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

.overlay.active {
  display: block;
}

/* Footer */
.site-footer {
  background-color: var(--header-top-bg);
  color: var(--secondary-color);
  padding: 40px 0 20px;
  font-size: 14px;
}

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

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

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

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

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

/* Empty dynamic slot anchors */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure they are rendered */
}

/* Copyright section */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
}

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

  /* Header Top Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    /* Padding moved to .header-container for mobile */
  }

  .header-container {
    padding: 0 15px; /* Apply padding here for mobile */
    width: 100%;
    max-width: none; /* No max-width for mobile container */
    justify-content: space-between;
    position: relative;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: 1;
  }

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

  .logo img {
    max-height: 56px !important; /* Max height for mobile logo */
    max-width: 100%;
  }

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

  /* Mobile Nav Buttons */
  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Nav Mobile Menu */
  .main-nav {
    display: none; /* Hidden by default for mobile */
    position: fixed;
    top: var(--header-offset); /* Below fixed header/buttons */
    left: 0;
    width: 70%;
    max-width: 300px;
    height: calc(100% - var(--header-offset));
    background-color: #FFFFFF;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
  }

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

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

  .nav-link {
    color: #333;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

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

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

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

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

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

  .footer-nav {
    padding-left: 0;
  }

  .footer-nav li {
    text-align: center;
  }

  .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile Overflow Protection */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
