/* Shared CSS */
:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --card-bg: #111111;
  --bg-color: #0A0A0A;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --header-offset: 122px; /* Desktop: header-top (68) + main-nav (52) = 120 + 2 */
}

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

/* Base styles for links and buttons */
a {
  text-decoration: none;
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--button-gradient);
  color: #111; /* Contrast with gold gradient */
  font-weight: bold;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Site Header */
.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.2);
}

.header-top {
  box-sizing: border-box;
  height: 68px; /* Desktop fixed height */
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--card-bg); /* Darker color for header-top */
  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; /* Padding for logo and buttons from container edges */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold color for logo text */
  text-transform: uppercase;
  white-space: nowrap;
  display: flex; /* For potential image centering */
  align-items: center;
  height: 100%;
}

/* Image logo sizing within the text logo link */
.logo img {
  display: block;
  max-height: 60px; /* Desktop max height */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Visible on desktop */
  gap: 12px;
  align-items: center;
}

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px; /* Mobile fixed height for this bar */
  align-items: center;
  background-color: var(--card-bg); /* Same as header-top for consistency */
  width: 100%;
  padding: 0 15px;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: center; /* Center buttons if less than 2, or space-between if stretched */
}

.main-nav {
  box-sizing: border-box;
  height: 52px; /* Desktop fixed height */
  display: flex; /* Visible on desktop */
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color); /* Lighter color for main-nav */
  width: 100%;
  position: static; /* Default desktop position */
  transition: transform 0.3s ease; /* For mobile slide-in */
}

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

.nav-link {
  display: block;
  padding: 10px 15px;
  color: #333; /* Dark text for contrast on primary color background */
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: #fff;
}

.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above header */
  flex-direction: column;
  justify-content: space-between;
}

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

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

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

  body {
    overflow-x: hidden;
  }

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

  .header-top {
    height: 60px; /* Mobile fixed height */
  }

  .header-container {
    padding: 0 15px;
    width: 100%;
    max-width: none; /* Important for mobile container width */
    position: relative; /* For absolute logo centering if needed */
  }

  .logo {
    flex: 1 !important; /* Method 1 for image logo centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: static; /* Reset from potential absolute for text logo */
    transform: none; /* Reset from potential absolute for text logo */
    font-size: 20px; /* Adjust logo size for mobile */
  }

  .logo img {
    max-height: 56px !important; /* Mobile max height */
    max-width: 100%; /* Ensure image fits */
  }

  .hamburger-menu {
    display: flex; /* Visible on mobile */
    margin-right: auto; /* Push logo to center, buttons to right if present (not in header-top) */
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Visible on mobile */
    min-height: 48px; /* Mobile fixed height */
    padding: 0 15px;
    justify-content: center; /* Center buttons */
  }

  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* For two 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;
    text-align: center;
  }

  .main-nav {
    height: auto; /* Auto height for full menu */
    min-height: 100vh; /* Full viewport height */
    width: 280px; /* Fixed width for slide-in menu */
    background-color: var(--card-bg); /* Darker background for mobile menu */
    position: fixed;
    top: var(--header-offset); /* Below fixed header + mobile buttons */
    left: 0;
    flex-direction: column; /* Vertical on mobile */
    justify-content: flex-start;
    padding-top: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%); /* Hidden by default */
    display: none; /* Hidden by default, will be block/flex by JS */
    z-index: 999; /* Below hamburger, above overlay */
    overflow-y: auto; /* Allow scrolling for long menus */
  }

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

  .nav-container {
    flex-direction: column; /* Vertical links */
    padding: 0;
    width: 100%;
    max-width: none;
    align-items: flex-start; /* Align links to left */
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    color: var(--text-main); /* Lighter text for dark menu background */
    border-bottom: 1px solid var(--border-color); /* Separator */
  }

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

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Below menu, above body */
    display: none; /* Hidden by default */
  }

  .overlay.active {
    display: block;
  }

}

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

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

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

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

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-heading {
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-transform: uppercase;
}

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

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

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

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

.footer-slot-anchor-inner, .footer-slot-anchor-outer {
  min-height: 1px; /* Ensure they take up space if empty */
  margin-top: 10px; /* Some spacing */
}

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

.footer-bottom p {
  margin: 0;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 30px 15px 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr 1fr; /* Two columns on mobile */
    gap: 15px;
    margin: 0 auto 20px;
  }
  .footer-col:first-child { /* First column takes full width on smaller mobile */
    grid-column: span 2;
  }
  .footer-col:nth-child(2), .footer-col:nth-child(3) {
      grid-column: span 1;
  }
  .footer-col:nth-child(4) { /* Dynamic slot column */
      grid-column: span 2; /* Take full width */
  }
  .footer-heading {
    font-size: 15px;
  }
  .footer-logo {
    font-size: 18px;
  }
  .footer-description, .footer-nav a, .footer-bottom p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
    .footer-col:first-child, .footer-col:nth-child(2), .footer-col:nth-child(3), .footer-col:nth-child(4) {
        grid-column: span 1;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
