/* General Reset & Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #FFF1E8; background-color: #140C0C; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Header Offset - MUST BE PRESENT */
:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); }
@media (max-width: 768px) {
  :root { --header-offset: 110px; }
}

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

/* Header Top Section (Desktop Default) */
.header-top {
  min-height: 68px;
  height: 68px;
  background-color: #7E0D0D; /* Deep Red */
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  padding: 0 20px; /* Add padding here for smaller screens that don't hit max-width */
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block; /* Ensure logo is block for proper sizing/alignment */
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.desktop-nav-buttons {
  display: flex; /* Desktop default: show */
  gap: 12px;
  align-items: center;
}

.btn {
  padding: 10px 18px;
  border-radius: 25px;
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button gradient */
  color: #FFF1E8;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none; /* Remove underline for buttons */
}
.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Mobile Nav Buttons (Hidden on Desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Desktop default: hide */
  min-height: 48px; /* Placeholder height */
  background-color: #2A1212; /* Card BG, distinct from header-top and main-nav */
  width: 100%;
  padding: 0 15px; /* Add padding for mobile */
  border-bottom: 1px solid #6A1E1E;
}

/* Main Navigation (Desktop Default) */
.main-nav {
  min-height: 52px;
  height: 52px;
  background-color: #2A1212; /* Card BG */
  display: flex; /* Desktop default: show */
  align-items: center;
  overflow: hidden;
  width: 100%;
  border-top: 1px solid #6A1E1E; /* Border */
}

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

.main-nav ul {
  display: flex;
  gap: 25px;
}

.main-nav a {
  color: #FFF1E8; /* Text Main */
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: #F3C54D; /* Gold */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Desktop default: hide */
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001; /* Above header */
}
.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #FFF1E8; /* 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: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

/* Overlay (Hidden on Desktop) */
.overlay {
  display: none; /* Desktop default: hide */
  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;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Header Top */
  .header-top {
    min-height: 60px;
    height: 60px;
    padding: 0 15px; /* Smaller padding for mobile */
  }
  .header-container {
    padding: 0; /* Container itself doesn't need padding if header-top handles it */
    justify-content: space-between;
  }

  /* Hamburger Menu (Visible on Mobile) */
  .hamburger-menu {
    display: block; /* Mobile: show */
    order: -1; /* Place at the beginning of flex container */
  }

  /* Logo Centering (Mobile) */
  .logo {
    flex: 1 !important; /* Take available space */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px; /* Adjust font size for mobile */
  }
  .logo img {
    max-height: 56px !important; /* Adjust image logo height for mobile */
  }

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

  /* Mobile Nav Buttons (Visible on Mobile) */
  .mobile-nav-buttons {
    display: flex !important; /* Mobile: show */
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    background-color: #2A1212; /* Card BG */
    border-top: 1px solid #6A1E1E;
    border-bottom: 1px solid #6A1E1E;
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Account for gap */
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Main Navigation (Mobile) */
  .main-nav {
    min-height: auto; /* Auto height for expanded menu */
    height: auto;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 280px; /* Sidebar width */
    max-width: 80%;
    background-color: #140C0C; /* Background */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    padding: 20px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
    display: none; /* Hide by default, will be block/flex on active */
    border-top: none; /* Remove border from desktop */
    overflow-y: auto; /* Allow scrolling if content is long */
    bottom: 0; /* Extends to bottom of viewport */
  }
  .main-nav.active {
    transform: translateX(0); /* Show menu */
    display: flex; /* Ensure it's visible when active */
  }
  .nav-container {
    width: 100%;
    max-width: none; /* No max-width on mobile */
    padding: 0 15px;
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start;
  }
  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 15px;
  }
  .main-nav li {
    width: 100%;
  }
  .main-nav a {
    display: block;
    padding: 10px 0;
    font-size: 17px;
    border-bottom: 1px solid rgba(106, 30, 30, 0.5); /* Border for menu items */
  }
  .main-nav li:last-child a {
    border-bottom: none;
  }

  /* Mobile Container Protection */
  .header-container, .nav-container {
    width: 100%;
    max-width: none; /* Crucial for mobile */
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Page Content Mobile Overflow Protection - MUST BE PRESENT */
  .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.no-scroll {
    overflow: hidden;
  }
}

/* Footer Styles */
.site-footer {
  background-color: #140C0C; /* Background */
  padding: 40px 20px 20px;
  border-top: 1px solid #6A1E1E; /* Border */
  color: #FFF1E8; /* Text Main */
}

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

.footer-col h3 {
  font-size: 18px;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.footer-col ul {
  padding: 0;
  list-style: none;
}

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

.footer-col ul li a {
  color: #FFF1E8; /* Text Main */
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: #E53030; /* Accent */
}

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

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 241, 232, 0.8); /* Slightly faded Text Main */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Footer Slots - MUST BE PRESENT AND VISIBLE */
.footer-slot-anchor-inner {
  min-height: 1px; /* Ensure visibility for system injection */
  margin-top: 15px;
}
.footer-dynamic-col .footer-slot-anchor-inner {
  margin-top: 0; /* No extra margin for the dynamic column */
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #6A1E1E; /* Border */
  font-size: 13px;
  color: rgba(255, 241, 232, 0.7); /* Faded Text Main */
}

.footer-bottom p {
  margin: 0;
}

/* Mobile Footer Styles */
@media (max-width: 768px) {
  .site-footer {
    padding: 30px 15px 15px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 25px;
    margin-bottom: 25px;
  }
  .footer-col h3 {
    margin-bottom: 10px;
  }
  .footer-col ul li {
    margin-bottom: 6px;
  }
  .footer-col ul li a {
    font-size: 13px;
  }
  .footer-logo {
    font-size: 22px;
  }
  .footer-description {
    font-size: 13px;
  }
  .footer-bottom {
    margin-top: 25px;
    padding-top: 15px;
    font-size: 12px;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
