/* Variables */
:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --header-top-bg: #1A3A8A; /* Darker shade of primary */
  --main-nav-bg: var(--primary-color);
  --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --card-bg: #FFFFFF;
  --site-bg: #F4F7FB;
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  color: var(--text-main);
  background-color: var(--site-bg);
  overflow-x: hidden; /* Prevents horizontal scroll on desktop too */
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.no-scroll {
  overflow: hidden;
}

/* Site 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);
  box-sizing: border-box;
}

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

.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; /* White text for logo on dark background */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  height: 100%;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  color: #FFFFFF;
  background: var(--button-gradient);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none; /* Remove underline for buttons */
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Mobile Nav Buttons (hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
  background-color: var(--site-bg); /* Neutral background for mobile buttons */
  width: 100%;
  padding: 0 15px; /* Adjust padding for mobile */
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
  overflow: hidden;
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--main-nav-bg);
  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;
}

.nav-list {
  display: flex;
  gap: 25px;
}

.nav-list a {
  color: #FFFFFF; /* White text for nav links on blue background */
  font-weight: 500;
  font-size: 16px;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--secondary-color); /* Light blue on hover/active */
}

/* Hamburger Menu (hidden on desktop) */
.hamburger-menu {
  display: none;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001; /* Above header */
  padding: 0;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

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

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Overlay (hidden on desktop) */
.overlay {
  display: none;
  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 {
  opacity: 1;
  display: block;
}

/* Footer */
.site-footer {
  background-color: var(--header-top-bg); /* Using dark blue for footer background */
  color: #FFFFFF;
  padding: 40px 20px 20px;
  box-sizing: border-box;
  font-size: 14px;
}

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

.footer-col h3 {
  color: #FFFFFF;
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 1px;
  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: #E0E0E0; /* Lighter white for links */
  transition: color 0.3s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #E0E0E0;
}

.footer-slot-anchor-inner {
  /* Placeholder for dynamic content, must be visible */
  min-height: 1px;
  visibility: visible;
}

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

  body {
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Ensure body itself doesn't scroll horizontally */
  }

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

  /* Header Mobile */
  .site-header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }

  .header-container {
    padding: 0 15px;
    max-width: none;
    position: relative; /* For absolute positioning of logo if needed */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    height: 100%;
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }

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

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

  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--site-bg);
    border-bottom: 1px solid var(--border-color); /* Add a subtle border */
  }

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

  .main-nav {
    min-height: auto !important; /* Allow height to adjust for content */
    height: auto !important;
    position: fixed;
    top: var(--header-offset); /* Below fixed header and mobile buttons */
    left: 0;
    width: 80%; /* Menu width */
    max-width: 300px;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--main-nav-bg);
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    box-sizing: border-box;
    overflow-y: auto; /* Enable scrolling for long menus */
    bottom: 0; /* Extends to bottom of viewport */
    display: none; /* Crucial for initial hidden state */
  }

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

  .nav-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    height: auto;
  }

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

  .nav-list li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .nav-list a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    width: 100%;
  }

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

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

  .footer-col:first-child .footer-logo {
    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;
}
