/* Common Styles */
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

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

a {
  text-decoration: none;
  color: #FFF6D6; /* Text Main */
  transition: color 0.3s ease;
}

a:hover {
  color: #FFD36B; /* Secondary / Glow */
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: #FFF6D6; /* Text Main */
  margin-top: 0;
  margin-bottom: 15px;
}

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

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #111111; /* Card BG, a darker background for contrast */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  min-height: 60px; /* Ensure content adaptation, not fixed height */
  display: flex; /* For overall header content alignment */
  align-items: center;
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #F2C14E; /* Primary */
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
  padding: 5px 0;
}

.logo:hover {
  color: #FFD36B; /* Secondary */
}

/* Main Navigation (Desktop) */
.main-nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex: 1; /* Takes available space */
  gap: 30px;
  padding: 0 20px; /* Padding for menu items */
}

.main-nav .nav-link {
  font-size: 16px;
  font-weight: bold;
  color: #FFF6D6; /* Text Main */
  padding: 10px 0;
  position: relative;
  transition: color 0.3s ease;
}

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

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #F2C14E; /* Primary */
  transition: width 0.3s ease;
}

.main-nav .nav-link:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  color: #111111; /* Dark text for contrast on bright button */
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap; /* Prevent text wrapping */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 211, 107, 0.4); /* Glow effect */
  color: #111111; /* Ensure text remains dark on hover */
}

.desktop-nav-buttons {
  display: flex;
  gap: 12px; /* Spacing between buttons */
  flex-shrink: 0;
  margin-left: 20px; /* Space from nav menu */
}

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

/* Hamburger Menu (Hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  width: 40px;
  height: 40px;
  z-index: 1001; /* Higher than other header elements */
  flex-shrink: 0;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #F2C14E; /* Primary */
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
}

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-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; /* Below hamburger, above main-nav */
}

.mobile-menu-overlay.active {
  display: block;
}

/* Footer Styles */
.site-footer {
  background-color: #111111; /* Card BG */
  color: #FFF6D6; /* Text Main */
  padding: 40px 0 20px;
  font-size: 14px;
}

.site-footer h3 {
  color: #F2C14E; /* Primary */
  font-size: 18px;
  margin-bottom: 20px;
  margin-top: 0; /* Ensure no default margin-top from browser */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

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

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

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

.footer-logo:hover {
  color: #FFD36B; /* Secondary */
}

.footer-description {
  color: #FFF6D6; /* Text Main */
  font-size: 14px;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 15px;
}

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

.footer-nav ul li a {
  color: #FFF6D6; /* Text Main */
  font-size: 15px;
  transition: color 0.3s ease;
}

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

.footer-slot-anchor {
  min-height: 1px;
  margin-bottom: 10px;
}

.footer-slot-anchor-inner {
  min-height: 1px;
  margin-top: 10px;
}

.footer-bottom {
  border-top: 1px solid #3A2A12; /* Border */
  padding-top: 20px;
  text-align: center;
  color: #FFF6D6; /* Text Main */
  font-size: 13px;
}

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

  /* Prevent content overflow on mobile */
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  .site-header {
    min-height: 55px; /* Adjust header height for mobile */
  }

  .header-container {
    padding: 8px 15px; /* Smaller padding for mobile */
    width: 100%;
    max-width: none; /* Important: no max-width on mobile */
    justify-content: space-between;
  }

  .logo {
    font-size: 24px;
    flex: 1; /* Allows logo to take available space for centering */
    text-align: center; /* Centers the text logo */
    padding: 0;
  }

  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
    order: -1; /* Place it first */
    margin-right: 10px;
  }

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

  .mobile-nav-buttons {
    display: flex !important; /* Show mobile buttons on mobile */
    gap: 8px;
    flex-shrink: 0;
    margin-left: 10px;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header */
    left: 0;
    width: 75%; /* Drawer width */
    max-width: 300px; /* Max width for drawer */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    background-color: #1a1a1a; /* Darker background for drawer */
    padding: 20px;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.4);
    transform: translateX(-100%); /* Slide out of view */
    transition: transform 0.3s ease-in-out;
    align-items: flex-start; /* Align links to the left */
    overflow-y: auto; /* Enable scrolling for long menus */
  }

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

  .main-nav .nav-link {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid #3A2A12; /* Border for menu items */
    font-size: 18px;
  }

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

  .main-nav .nav-link::after {
    display: none; /* Hide underline effect on mobile menu */
  }

  .footer-content {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .footer-col.footer-about {
    text-align: center;
  }

  .footer-logo {
    font-size: 22px;
  }

  .footer-description {
    font-size: 13px;
  }

  .footer-nav ul {
    text-align: center;
  }

  .footer-nav ul li a {
    font-size: 14px;
  }

  .footer-bottom {
    font-size: 12px;
  }
}

/* Body no-scroll class for mobile menu */
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;
  }
}
