/* General Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #F3F8FF; /* Text Main */
  background-color: #08162B; /* Deep Navy */
  padding-top: var(--header-offset);
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

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

ul {
  list-style: none;
}

/* Custom Properties */
:root {
  --header-offset: 122px; /* 68px (header-top) + 52px (main-nav) */
  --color-main: #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 Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  background-color: var(--color-deep-navy); /* Deep Navy as base for header */
}

.header-top {
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  background-color: var(--color-deep-navy); /* Deep Navy */
  border-bottom: 1px solid var(--color-divider);
  overflow: hidden;
}

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

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

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

.mobile-nav-buttons {
  display: none; /* Hidden by default on desktop */
  box-sizing: border-box;
  min-height: 48px;
}

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

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

.main-nav {
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  background-color: var(--color-accent); /* Accent color for main nav */
  overflow: hidden;
}

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

.nav-link {
  padding: 0 15px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-main);
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-gold); /* Gold on hover */
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
}

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

.hamburger-menu span:nth-child(1) {
  top: 0;
}

.hamburger-menu span:nth-child(2) {
  top: 9px;
}

.hamburger-menu span:nth-child(3) {
  top: 18px;
}

.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(-9px) rotate(-45deg);
}

.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-card-bg); /* Card BG for footer */
  padding: 40px 0 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--color-divider);
}

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

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

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

.footer-description {
  line-height: 1.8;
  color: var(--color-text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-divider);
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.footer-bottom p {
  color: var(--color-text-secondary);
  margin-top: 15px;
}

/* Footer Slot Anchors - ensure visibility */
.footer-slot-anchor,
.footer-slot-anchor-inner,
.footer-slot-anchor-grid {
  min-height: 1px; /* Ensure they take up space if empty */
  display: block;
  width: 100%;
  visibility: visible;
  opacity: 1;
}

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

  /* Mobile Header Adjustments */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: flex-start; /* Align hamburger to left */
  }

  .hamburger-menu {
    display: block;
    margin-right: 15px;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    margin-right: 45px; /* Offset for hamburger */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--color-deep-navy); /* Consistent with header-top */
    border-bottom: 1px solid var(--color-divider);
  }

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

  .main-nav {
    position: fixed;
    top: var(--header-offset);
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    background-color: var(--color-main); /* Main color for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    align-items: flex-start;
    display: none; /* Hidden by default, shown with .active */
  }

  .main-nav.active {
    transform: translateX(0);
    display: flex; /* Ensure it's displayed when active */
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    width: 100%;
    max-width: none;
    height: auto; /* Allow height to adjust to content */
  }

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

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

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

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

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

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

  /* Mobile content overflow prevention */
  .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;
  }
}
