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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
  padding-top: var(--header-offset); /* Header offset */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
  text-decoration: none;
  color: #FFF6D6; /* Default link color */
}

a:hover {
  color: #F2C14E; /* Primary color on hover */
}

ul {
  list-style: none;
}

/* Header Specific Styles - Desktop First */
:root {
  --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

.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.5);
  background-color: #0A0A0A; /* Matches body background */
}

.header-top {
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #111111; /* Card BG, darker for top bar */
  width: 100%;
  position: relative; /* For absolute positioning of logo on mobile */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #F2C14E; /* Primary color for logo text */
  text-transform: uppercase;
  display: block; /* Ensure logo is visible */
  white-space: nowrap;
}

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

.btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline for buttons */
  color: #111111; /* Dark text for contrast on bright button */
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  border: none;
  box-shadow: 0 2px 8px rgba(242, 193, 78, 0.4); /* Glow effect from Primary color */
}

.btn:hover {
  opacity: 0.9;
  color: #111111; /* Keep dark text on hover */
  box-shadow: 0 4px 12px rgba(242, 193, 78, 0.6); /* Enhanced glow on hover */
}

.btn-secondary {
  background: #3A2A12; /* Border color as secondary button background */
  color: #FFF6D6; /* Text Main for secondary button */
  box-shadow: none;
  border: 1px solid #F2C14E; /* Primary color border */
}

.btn-secondary:hover {
  background: #F2C14E; /* Primary color on hover */
  color: #111111; /* Dark text on hover */
  box-shadow: 0 2px 8px rgba(242, 193, 78, 0.4);
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px; /* Fixed height for mobile button bar */
  background-color: #0A0A0A; /* Background color */
  width: 100%;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.main-nav {
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop: flex for horizontal nav */
  align-items: center;
  overflow: hidden;
  background-color: #0A0A0A; /* Background color */
  width: 100%;
}

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

.nav-link {
  padding: 10px 15px;
  font-size: 16px;
  font-weight: bold;
  color: #FFF6D6; /* Text Main */
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #F2C14E; /* Primary color on hover */
}

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: relative;
  width: 40px; /* Make clickable area larger */
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #F2C14E; /* Primary color */
  position: relative;
  transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 3px;
  background-color: #F2C14E; /* Primary color */
  position: absolute;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

/* Hamburger menu active state */
.hamburger-menu.active .hamburger-icon {
  background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
  transform: translateY(-8px) 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;
}

/* Footer Specific Styles */
.site-footer {
  background-color: #0A0A0A; /* Background color */
  color: #FFF6D6; /* Text Main */
  padding: 40px 20px 20px;
  border-top: 1px solid #3A2A12; /* Border color */
}

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

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #F2C14E; /* Primary color */
  margin-bottom: 15px;
  display: block;
  text-transform: uppercase;
}

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  color: #FFF6D6;
  word-wrap: break-word; /* Ensure full display */
  overflow-wrap: break-word;
}

.footer-title {
  font-size: 18px;
  font-weight: bold;
  color: #F2C14E; /* Primary color */
  margin-bottom: 15px;
}

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

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

.footer-nav a {
  font-size: 14px;
  color: #FFF6D6;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #F2C14E; /* Primary color on hover */
}

.footer-slot-anchor-inner {
  margin-top: 15px; /* Add some spacing for injected content */
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #FFF6D6;
  padding-top: 20px;
  border-top: 1px solid #3A2A12; /* Border color */
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
}

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

  body {
    overflow-x: hidden;
  }

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

  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

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

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: space-between;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger and potential right element */
  }

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

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons */
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 15px; /* Adjust padding for buttons */
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #0A0A0A;
  }

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

  .main-nav {
    display: none; /* Hidden by default on mobile, shown with JS */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below header */
    left: 0;
    width: 280px; /* Sidebar width */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #111111; /* Card BG */
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Same as header, but overlay is 999 */
    overflow-y: auto; /* Enable scrolling for long menus */
    min-height: auto !important; /* Remove fixed height */
    height: auto !important; /* Remove fixed height */
  }

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

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #3A2A12; /* Border color */
  }

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

  .hamburger-menu {
    display: block; /* Show hamburger menu on mobile */
    order: -1; /* Place it at the beginning */
  }

  .overlay.active {
    display: block; /* Show overlay when menu is active */
  }

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

  .footer-col {
    padding-bottom: 20px;
    border-bottom: 1px solid #3A2A12;
  }

  .footer-col:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-bottom {
    padding-left: 15px;
    padding-right: 15px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
