/* Global Reset & Base */
body { margin: 0; font-family: Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: var(--color-deep-navy); color: var(--color-text-main); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

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

/* Header Offset */
:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); }

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background-color: transparent; /* Managed by children */
  box-sizing: border-box;
}

/* Header Top */
.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  background-color: var(--color-deep-navy); /* Darker background */
  color: var(--color-text-main);
  overflow: hidden;
}

.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 25px; /* Desktop padding */
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-gold); /* Gold color for logo text */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure text logo is block */
}

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

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: none;
  text-decoration: none; /* Remove underline for buttons */
}

.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Mobile Nav Buttons (Hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile button bar height */
  background-color: var(--color-deep-navy); /* Same as header-top */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Main Navigation */
.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Desktop default */
  align-items: center;
  background-color: var(--color-primary); /* Primary color for main nav */
  color: var(--color-text-main);
  overflow: hidden;
  transition: transform 0.3s ease; /* For mobile slide-in */
}

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

.nav-link {
  padding: 0 15px;
  font-size: 16px;
  font-weight: bold;
  height: 100%; /* Fill parent height */
  display: flex;
  align-items: center;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
  color: var(--color-text-main);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-gold); /* Gold highlight on hover/active */
  background-color: rgba(0, 0, 0, 0.1);
}

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

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

.hamburger-menu.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Overlay (Mobile only) */
.overlay {
  display: none; /* Hidden by default */
  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(--color-deep-navy); /* Deep Navy for footer background */
  color: var(--color-text-secondary);
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}

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

.footer-col h3 {
  color: var(--color-text-main);
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 5px;
}

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

.footer-logo {
  font-size: 26px;
  font-weight: bold;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  display: block;
}

.footer-description {
  margin-bottom: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav a {
  color: var(--color-text-secondary);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  padding: 0 20px;
  color: var(--color-text-secondary);
}

.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for injection */
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Header Offset for Mobile */
  :root { --header-offset: 110px; }

  /* Mobile Header Top */
  .header-top {
    height: 60px; /* Mobile fixed height */
    padding: 0 15px; /* Mobile padding */
    justify-content: space-between; /* For hamburger and logo */
  }

  .header-container {
    padding: 0; /* Remove padding from container as header-top has it */
    justify-content: space-between; /* To place hamburger left, logo center */
    position: relative;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger */
    order: 1; /* Place it first */
    margin-right: auto; /* Push logo to center */
  }

  .logo {
    order: 2; /* Place logo second */
    flex: 1 !important; /* Allow logo to take available space for centering */
    display: flex !important; /* Force flex for centering */
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust logo size for mobile */
  }

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

  /* Mobile Nav Buttons (Show on mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Show on mobile */
    min-height: 48px;
    align-items: center;
    justify-content: center; /* Center buttons if only one, or use space-around/between */
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Mobile padding */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay on one line */
  }

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

  /* Main Nav (Mobile Menu) */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical menu */
    position: fixed;
    top: var(--header-offset); /* Position below header and mobile buttons */
    left: 0;
    width: 280px; /* Menu width */
    height: calc(100% - var(--header-offset)); /* Fill remaining height */
    background-color: var(--color-deep-navy); /* Dark background for menu */
    transform: translateX(-100%); /* Slide out of view */
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Below overlay, but above page content */
    overflow-y: auto; /* Enable scrolling for long menus */
    align-items: flex-start; /* Align menu items to the left */
    padding-top: 20px; /* Add some top padding for menu items */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0; /* Remove horizontal padding */
    width: 100%; /* Occupy full width */
    max-width: none; /* No max-width on mobile */
    align-items: flex-start;
  }

  .nav-link {
    width: 100%; /* Full width for menu items */
    padding: 12px 20px; /* Adjust padding for mobile menu items */
    justify-content: flex-start; /* Align text to left */
    font-size: 17px;
    border-bottom: 1px solid var(--color-divider);
  }

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

  /* Mobile Footer */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    padding: 0 15px 25px; /* Adjust padding */
  }

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

  .footer-col:last-of-type {
    margin-bottom: 0;
  }

  .footer-bottom {
    padding: 0 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;
  }
}

/* No-scroll class for body when menu is open */
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;
  }
}
