html, body { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #FFF5E1; background-color: #B71C1C; }
:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); }

/* Header Styles */
.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 {
  background-color: #7A0E0E; /* Deep Red */
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

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

.logo {
  color: #FFF5E1; /* Text Main */
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.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 {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  color: #FFF5E1; /* Text Main */
  font-weight: bold;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  border: 1px solid #F2B544; /* Border */
  transition: all 0.3s ease;
  white-space: nowrap;
  box-sizing: border-box;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }

.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden by default on desktop */
  min-height: 48px;
}

.main-nav {
  background-color: #F4D34D; /* Gold */
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

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

.nav-link {
  color: #7A0E0E; /* Deep Red for contrast */
  text-decoration: none;
  padding: 0 15px;
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.nav-link:hover { color: #C91F17; /* Main Color */ }

.hamburger-menu {
  display: none; /* Hidden by default on desktop */
  position: absolute;
  left: 15px;
  top: 18px;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}
.hamburger-icon, .hamburger-icon::before, .hamburger-icon::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFF5E1; /* Text Main */
  position: absolute;
  transition: all 0.3s ease;
}
.hamburger-icon { top: 50%; transform: translateY(-50%); }
.hamburger-icon::before { top: -10px; }
.hamburger-icon::after { top: 10px; }
.hamburger-menu.active .hamburger-icon { background-color: transparent; }
.hamburger-menu.active .hamburger-icon::before { top: 0; transform: rotate(45deg); }
.hamburger-menu.active .hamburger-icon::after { top: 0; transform: rotate(-45deg); }

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
}
.overlay.active { display: block; }

/* Footer Styles */
.site-footer {
  background-color: #B71C1C; /* Background */
  color: #FFF5E1; /* Text Main */
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.8;
  box-sizing: border-box;
}
.site-footer a { color: #FFF5E1; text-decoration: none; transition: color 0.3s ease; }
.site-footer a:hover { color: #FFD86A; /* Button gradient start color for hover */ }

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

.footer-col h3 {
  color: #FFD86A; /* Button gradient start color */
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-col.footer-about .footer-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
}
.footer-col.footer-about .footer-description {
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li { margin-bottom: 8px; }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin: 0 auto;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  :root { --header-offset: 110px; }

  /* Mobile Overflow Protection */
  .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 {
    min-height: 60px !important;
    height: 60px !important;
    position: relative; /* For absolute positioning of logo */
  }
  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
    justify-content: flex-start; /* Align hamburger to start */
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
    position: absolute; /* To center independently of hamburger */
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 100px); /* Account for hamburger and potential right-side elements */
  }
  .logo img { max-height: 56px !important; }

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

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: #C91F17; /* Main Color for mobile buttons section */
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    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 */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Position below fixed header and mobile buttons */
    left: 0;
    width: 250px;
    height: calc(100% - var(--header-offset));
    background-color: #B71C1C; /* Background color for mobile menu */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 20px;
    box-sizing: border-box;
    z-index: 1002;
  }
  .main-nav.active {
    display: flex; /* Display when active */
    transform: translateX(0);
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
    height: auto;
    max-width: none;
  }
  .nav-link {
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
  }
  .nav-link:last-child { border-bottom: none; }

  .hamburger-menu { display: block; top: 18px; left: 15px; }
  .hamburger-menu.active { top: 18px; left: 15px; }

  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-col {
    text-align: center;
  }
  .footer-col.footer-about .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
