:root {
    --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) = 120px + 2px buffer */
    --primary-color: #E53935;
    --auxiliary-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --background-color: #F5F7FA;
    --border-color: #E0E0E0;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Apply header offset */
    color: var(--text-main-color);
    background-color: var(--background-color);
    overflow-x: hidden; /* Prevent horizontal scroll for desktop too */
}

body.no-scroll {
    overflow: hidden;
}

/* Site Header - Fixed Navigation */
.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: var(--card-bg-color); /* Overall header background, inner parts will have specific colors */
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent header content from overflowing */
}

/* Header Top Area */
.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px; /* Fixed height for desktop */
    display: flex;
    align-items: center;
    background-color: var(--primary-color); /* Distinct background color */
    width: 100%;
    padding: 0 20px; /* Default padding for desktop */
}

.header-container {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* For logo absolute centering on mobile */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--card-bg-color); /* White text for logo on primary red background */
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
}

/* If logo is an image (example, not in current HTML but for robustness) */
.logo img {
    display: block;
    max-height: 60px; /* Max height for desktop logo */
    height: auto;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

/* Desktop Navigation Buttons */
.desktop-nav-buttons {
    display: flex; /* Default: visible on desktop */
    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; /* Fixed height for mobile */
    background-color: var(--background-color); /* A light background for this row */
    padding: 0 15px; /* Adjust padding for mobile */
    border-bottom: 1px solid var(--border-color);
}

/* Main Navigation Area */
.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px; /* Fixed height for desktop */
    display: flex; /* Default: visible on desktop */
    align-items: center;
    background-color: var(--auxiliary-color); /* Distinct background color */
    width: 100%;
    padding: 0 20px; /* Default padding for desktop */
}

.nav-container {
    box-sizing: border-box;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row; /* Desktop: horizontal */
    justify-content: center;
    align-items: center;
    gap: 25px; /* Spacing between nav links */
}

.nav-link {
    color: var(--card-bg-color); /* White text on auxiliary red background */
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap; /* Prevent wrapping */
}

.nav-link:hover,
.nav-link.active {
    color: rgba(255, 255, 255, 0.8);
}

/* Buttons Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    color: var(--card-bg-color); /* White text on button gradient */
    background: linear-gradient(180deg, var(--auxiliary-color) 0%, var(--primary-color) 100%);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001; /* Above header-top content */
    margin-right: auto; /* Pushes logo to center if no other element on right */
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--card-bg-color); /* White lines on primary red background */
    margin-bottom: 5px;
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

.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 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 main nav but above page content */
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu-overlay.visible {
    display: block;
    opacity: 1;
}

/* Footer Styles */
.site-footer {
    background-color: var(--text-main-color); /* Dark background for footer */
    color: var(--card-bg-color); /* White text on dark background */
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Light border */
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--card-bg-color);
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--card-bg-color);
    text-decoration: none;
    margin-bottom: 15px;
    display: block;
}

.footer-description {
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 0.7);
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--auxiliary-color);
}

.footer-dynamic-col {
    /* This column is specifically for data-slot-anchor="footer_slot_col_4" */
}

.footer-slot-anchor-inner {
    /* Placeholder for injected content - must not be hidden */
}

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

.footer-bottom p {
    margin: 0;
}

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

    body {
        padding-top: var(--header-offset);
        overflow-x: hidden; /* Ensure body itself does not scroll horizontally */
    }

    /* Mobile Header adjustments */
    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        padding: 0 15px;
    }

    .header-container {
        width: 100%;
        max-width: none; /* Remove max-width for mobile container */
        padding: 0; /* Remove padding from container, handled by header-top */
        justify-content: space-between; /* Keep space-between for hamburger and potential right element */
    }
    
    .logo {
        position: absolute !important; /* Force absolute positioning for centering */
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: calc(100% - 100px); /* Leave space for hamburger */
        z-index: 1; /* Below hamburger menu */
    }
    
    .logo img {
        max-height: 56px !important; /* Max height for mobile logo */
    }

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

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        order: -1; /* Place hamburger on the left */
        margin-right: 0; /* No auto-margin here as logo is absolute */
        height: 100%; /* Make hamburger clickable area full height */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding-left: 0; /* Remove default padding */
        padding-right: 15px;
        z-index: 2; /* Above logo */
    }
    .hamburger-menu span {
        background-color: var(--card-bg-color); /* White lines */
    }

    /* Mobile Navigation Buttons */
    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px;
        align-items: center;
        justify-content: center; /* Center buttons if less than 2 */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden; /* Prevent buttons from overflowing */
        gap: 10px; /* Space between buttons */
        flex-wrap: nowrap; /* Keep buttons on one line */
        background-color: var(--background-color);
    }
    .mobile-nav-buttons .btn {
        flex: 1; /* Distribute space evenly */
        min-width: 0; /* Allow shrinking */
        max-width: calc(50% - 5px); /* Max width for two buttons with 10px gap */
        box-sizing: border-box;
        padding: 8px 12px; /* Smaller padding for mobile buttons */
        font-size: 13px; /* Smaller font size for mobile buttons */
        white-space: normal; /* Allow text wrapping */
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
    }

    /* Main Navigation (Mobile Menu) */
    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 80%; /* Menu width */
        max-width: 300px; /* Max menu width */
        height: calc(100% - var(--header-offset)); /* Full height below header */
        background-color: var(--card-bg-color); /* White background for mobile menu */
        flex-direction: column; /* Vertical layout */
        align-items: flex-start;
        padding: 20px 0;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%); /* Initially off-screen */
        transition: transform 0.3s ease;
        z-index: 1001; /* Above overlay */
        overflow-y: auto; /* Allow scrolling for long menus */
        min-height: auto; /* Allow content to dictate height, not fixed */
        height: auto; /* Allow content to dictate height */
    }

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

    .nav-container {
        flex-direction: column; /* Vertical menu items */
        align-items: flex-start;
        padding: 0 20px;
        gap: 15px; /* Spacing between mobile nav links */
        width: 100%;
        max-width: none; /* Remove max-width for mobile */
        height: auto; /* Allow content to dictate height */
    }

    .nav-link {
        color: var(--text-main-color); /* Dark text for mobile menu links */
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-link:last-child {
        border-bottom: none;
    }

    /* Mobile Footer adjustments */
    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column layout for mobile */
        gap: 20px;
    }
    .footer-col {
        text-align: center;
    }
    .footer-logo {
        margin: 0 auto 15px;
    }
    .footer-col h3 {
        text-align: center;
    }
    .footer-nav {
        text-align: center;
    }

    /* Mobile content overflow prevention */
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: 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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
