:root {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy: #08162B;
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: var(--header-offset);
  background-color: var(--deep-navy);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Shared Container Styles */
.header-container, .nav-container, .footer-top-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: var(--primary-color);
}

.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--deep-navy); /* Different from main-nav */
  width: 100%;
}

.header-top .header-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Adjust as needed */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color);
  text-decoration: none;
  display: block; /* Ensure it's not hidden */
  padding: 5px 0;
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.7);
}

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

.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-main);
  border: none;
}

.btn-primary {
  background: var(--button-gradient);
  box-shadow: 0 2px 8px rgba(43, 115, 246, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(43, 115, 246, 0.6);
}

.btn-secondary {
  background-color: var(--secondary-color);
  box-shadow: 0 2px 8px rgba(29, 95, 209, 0.4);
}

.btn-secondary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(29, 95, 209, 0.6);
}

.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
  box-sizing: border-box;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: var(--primary-color); /* Matches main-nav background */
  padding: 0 20px;
}

.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Different from header-top */
  width: 100%;
}

.main-nav .nav-container {
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 0 20px;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: var(--gold-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-color);
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

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

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

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

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

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

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

/* Footer Styles */
.site-footer {
  background-color: var(--card-bg);
  color: var(--text-secondary);
  padding: 40px 0 20px;
  border-top: 1px solid var(--divider-color);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.footer-col {
  padding: 10px 0;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold-color);
  text-decoration: none;
  margin-bottom: 15px;
  display: inline-block;
  text-shadow: 0 0 3px rgba(242, 193, 78, 0.5);
}

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

.footer-title {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 20px;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 2px;
  background-color: var(--gold-color);
}

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

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

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

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

.footer-dynamic-col .footer-slot-anchor-inner {
  gap: 5px;
}

.footer-dynamic-row {
  margin-bottom: 20px;
  padding: 0 20px; /* Match container padding */
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.footer-dynamic-row-bottom-slot {
  margin-bottom: 20px;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  padding-top: 20px;
  border-top: 1px solid var(--divider-color);
  color: var(--text-secondary);
  padding-left: 20px;
  padding-right: 20px;
}

.footer-bottom p {
  margin: 0;
}

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

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

  .header-top .header-container {
    padding: 0 15px;
    justify-content: space-between;
    position: relative;
  }

  .hamburger-menu {
    display: flex;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side elements */
  }

  .logo img {
    max-height: 56px !important;
    max-width: 100%;
    height: auto;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Always visible on mobile */
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary-color);
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For 2 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-nav {
    min-height: 48px !important;
    height: 100vh; /* Full viewport height for off-canvas */
    position: fixed;
    top: var(--header-offset); /* Below the fixed header */
    left: 0;
    width: 280px; /* Width of the off-canvas menu */
    background-color: var(--primary-color);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px 0;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    display: none; /* Ensure it's hidden when not active */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider-color);
  }

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

  .site-footer {
    padding: 30px 0 15px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 15px;
  }

  .footer-col {
    padding: 10px 0;
  }

  .footer-dynamic-row {
    padding: 0 15px;
  }

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

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