/* General Reset & Body */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main */
  background-color: #B71C1C; /* Background */
  padding-top: var(--header-offset); /* Critical: body padding for fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}
body.no-scroll {
  overflow: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

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

/* Site Header - Fixed & Floating */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Header Top */
.header-top {
  background-color: #7A0E0E; /* Deep Red */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Padding for logo and buttons */
  height: 100%;
}

/* Logo */
.logo, .footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: #F4D34D; /* Gold */
  text-transform: uppercase;
  display: block; /* Ensure visibility */
  white-space: nowrap;
  line-height: 1;
}
/* If logo is an image, use these: */
.logo img, .footer-logo img {
  display: block;
  max-height: 60px; /* Desktop */
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Nav Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 10px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 25px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
  color: #7A0E0E; /* Deep Red for contrast */
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  border: none;
  text-decoration: none; /* Remove underline */
}
.btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* Mobile Nav Buttons (Desktop hidden) */
.mobile-nav-buttons {
  display: none; /* Hidden on desktop */
}

/* Main Navigation */
.main-nav {
  background-color: #C91F17; /* Primary color */
  min-height: 52px;
  height: 52px;
  display: flex; /* Desktop default: flex */
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Desktop default: row */
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  height: 100%;
  gap: 20px; /* Spacing between nav links */
}
.nav-link {
  color: #FFF5E1; /* Text Main */
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover {
  color: #F4D34D; /* Gold */
}

/* Hamburger Menu (Desktop hidden) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001; /* Above header */
}
.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #FFF5E1; /* Text Main */
  margin: 5px 0;
  transition: all 0.3s ease;
}
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Overlay (Desktop hidden) */
.mobile-overlay {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999; /* Below menu, above content */
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* Footer */
.site-footer {
  background-color: #B71C1C; /* Background color */
  padding: 40px 20px 20px;
  color: #FFF5E1; /* Text Main */
}
.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 30px;
}
.footer-col h3 {
  color: #F4D34D; /* Gold */
  font-size: 18px;
  margin-bottom: 15px;
}
.footer-about .footer-logo {
  font-size: 24px;
  margin-bottom: 10px;
  color: #F4D34D;
}
.footer-about .footer-description {
  font-size: 14px;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.footer-nav li a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: #FFF5E1;
  transition: color 0.3s ease;
}
.footer-nav li a:hover {
  color: #F4D34D;
}
.footer-dynamic-col .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 5px;
}
.footer-dynamic-row {
  max-width: 1200px;
  margin: 0 auto 20px;
  width: 100%;
}
.footer-dynamic-row .footer-slot-anchor-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFF5E1; /* Text Main */
}
.footer-bottom a {
  text-decoration: none;
  color: inherit;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Header Offset for Mobile */
  :root {
    --header-offset: 110px; /* Mobile: 60px (header-top) + 48px (mobile-nav-buttons) + 2px buffer */
  }
  body {
    padding-top: var(--header-offset);
  }
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }

  /* Header Top Mobile */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }
  .header-container {
    padding: 0 15px; /* Smaller padding for mobile */
    width: 100%;
    max-width: none; /* No max-width on mobile */
    position: relative; /* For absolute logo centering */
  }

  /* Logo Mobile Centering (Method 1: Flex + !important) */
  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Leave space for hamburger */
  }
  .logo img {
    max-height: 56px !important; /* Mobile max-height */
  }

  /* Hamburger Menu Mobile */
  .hamburger-menu {
    display: block; /* Visible on mobile */
    order: -1; /* Place on the left */
    margin-right: auto; /* Push logo to center */
  }

  /* Desktop Nav Buttons (Hidden on Mobile) */
  .desktop-nav-buttons {
    display: none;
  }

  /* Mobile Nav Buttons (Visible on Mobile) */
  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%; max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #E53935; /* Auxiliary color, distinct from header-top and main-nav */
  }
  .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 Navigation Mobile */
  .main-nav {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Vertical layout */
    position: fixed;
    top: var(--header-offset); /* Start below header */
    left: 0;
    width: 280px; /* Width of the mobile menu */
    height: calc(100% - var(--header-offset)); /* Full height below header */
    overflow-y: auto;
    transform: translateX(-100%); /* Off-screen by default */
    transition: transform 0.3s ease;
    z-index: 1000;
    background-color: #C91F17; /* Primary color */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    min-height: auto; /* Allow height to adjust */
    height: auto;
  }
  .main-nav.active {
    display: flex; /* Show when active */
    transform: translateX(0); /* Slide into view */
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
    height: auto;
    max-width: none; /* No max-width on mobile */
    gap: 10px; /* Adjust gap for vertical links */
  }
  .nav-link {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-link:last-child {
    border-bottom: none;
  }

  /* Mobile Overlay (Active state) */
  .mobile-overlay.active {
    top: 0; /* Cover entire screen */
    height: 100%;
  }

  /* Footer Mobile */
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .footer-col {
    text-align: center;
  }
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 10px; /* Adjust gap for wrapped links */
  }
  .footer-nav li {
    flex: 0 0 auto; /* Allow items to wrap */
  }
  .footer-nav li a {
    padding: 3px 5px;
  }
  .footer-dynamic-col .footer-slot-anchor-inner {
    justify-content: center;
  }
  .footer-dynamic-row .footer-slot-anchor-inner {
    justify-content: center;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
