/* General Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #F5F7FA;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

body {
  padding-top: var(--header-offset);
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background-color: #FFFFFF; /* Ensure solid background */
}

/* Header Top Section */
.header-top {
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #E53935; /* Primary color for header top */
  width: 100%;
  color: #FFFFFF;
}

.header-container {
  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 */
}

/* Logo */
.logo {
  font-size: 28px;
  font-weight: bold;
  color: #FFFFFF;
  display: block; /* Ensure logo is visible */
  text-transform: uppercase;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

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

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none; /* Hidden on desktop */
  min-height: 48px;
  background-color: #FF5A4F; /* Accent color for mobile buttons */
  color: #FFFFFF;
}

/* Main Navigation */
.main-nav {
  min-height: 52px;
  height: 52px;
  display: flex; /* Display flex by default for desktop */
  align-items: center;
  overflow: hidden;
  background-color: #FF5A4F; /* Accent color for main nav */
  width: 100%;
}

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

.nav-link {
  color: #FFFFFF;
  padding: 10px 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  white-space: nowrap; /* Prevent wrapping */
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
  position: relative; /* For positioning the spans */
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #FFFFFF;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  border: none;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Overlay for 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.5);
  z-index: 999;
  cursor: pointer;
}
.overlay.active {
  display: block;
}

/* Footer Styles */
.site-footer {
  background-color: #333333; /* Dark background for footer */
  color: #E0E0E0; /* Light text color */
  padding: 40px 20px 20px;
}

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

.footer-col h3 {
  color: #FF5A4F; /* Accent color for footer headings */
  margin-bottom: 15px;
  font-size: 18px;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  color: #FFFFFF;
  margin-bottom: 15px;
  display: block;
  text-transform: uppercase;
}

.footer-description {
  font-size: 14px;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.footer-nav a {
  color: #E0E0E0;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #FF5A4F;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #555555; /* Lighter border for separation */
  font-size: 13px;
  color: #AAAAAA;
}

/* Footer dynamic slots - ensure they are visible */
.footer-slot-anchor, .footer-slot-anchor-inner {
  min-height: 1px;
}

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

  /* Header Top Section */
  .header-top {
    min-height: 60px !important;
    height: 60px !important;
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .header-container {
    padding: 0;
    justify-content: flex-start;
    position: relative;
  }

  .hamburger-menu {
    display: flex; /* Show hamburger menu on mobile */
    margin-right: 15px;
  }

  .logo {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 24px;
  }
  .logo img {
    max-height: 56px !important;
  }
  
  /* Hide desktop buttons on mobile */
  .desktop-nav-buttons {
    display: none !important;
  }

  /* Show mobile buttons on mobile */
  .mobile-nav-buttons {
    display: flex !important;
    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;
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px); /* Adjusted for 2 buttons and 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: 48px !important;
    height: auto; /* Allow height to adjust for content */
    flex-direction: column;
    position: fixed;
    top: var(--header-offset); /* Below header and mobile buttons */
    left: 0;
    width: 280px;
    transform: translateX(-100%); /* Hidden by default */
    transition: transform 0.3s ease;
    background-color: #333333; /* Dark background for mobile menu */
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none; /* Hidden by default, JS will change */
  }

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

  .nav-container {
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: none;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    color: #FFFFFF;
  }
  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* Hamburger Menu Active State */
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  /* Page Content 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;
  }
  body.no-scroll {
    overflow: hidden;
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    text-align: center;
  }
  .footer-col h3 {
    margin-top: 20px;
  }
  .footer-about .footer-logo {
    margin: 0 auto 15px;
  }
  .footer-about .footer-description {
    text-align: center;
  }
  .footer-nav {
    padding-left: 0;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
