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

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding-top: var(--header-offset);
    color: var(--text-main);
    background-color: var(--page-bg);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg); /* Fallback, specific colors for header-top and main-nav */
}

/* Header Top Bar */
.header-top {
    box-sizing: border-box;
    height: 68px; /* Desktop fixed height */
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Darker background */
    width: 100%;
    padding: 0 20px; /* Outer padding for the entire header-top bar */
}

.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;
}

.site-header .logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--card-bg); /* White text for dark background */
    text-decoration: none;
    display: flex; /* For potential image logo alignment */
    align-items: center;
    height: 100%; /* Ensure logo is vertically centered in header-top */
}

.site-header .logo img {
    display: block;
    max-height: 60px; /* Desktop max height */
    height: auto;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.desktop-nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Mobile Nav Buttons (Hidden by default on desktop) */
.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden on desktop */
    min-height: 48px; /* Mobile fixed height, but display:none */
}

/* Main Navigation Bar */
.main-nav {
    box-sizing: border-box;
    height: 52px; /* Desktop fixed height */
    display: flex; /* Desktop default display */
    align-items: center;
    overflow: hidden;
    background-color: var(--card-bg); /* Lighter background, contrasting with header-top */
    width: 100%;
    border-top: 1px solid var(--border-color); /* Separator */
    padding: 0 20px; /* Outer padding for the entire main-nav bar */
}

.main-nav .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;
    width: 100%; /* Ensure it spans max-width */
}

.main-nav .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px; /* Spacing between desktop nav items */
}

.main-nav .nav-list li a {
    color: var(--text-main); /* Dark text for light background */
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    white-space: nowrap; /* Prevent text wrapping */
    transition: color 0.3s ease;
}

.main-nav .nav-list li a:hover,
.main-nav .nav-list li a.active {
    color: var(--primary-color);
}

/* Hamburger Menu (Hidden by default on desktop) */
.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 logo on mobile if needed */
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--card-bg); /* White bars for dark header-top */
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu .bar:nth-child(3) { bottom: 0; }

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

/* Overlay for Mobile Menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: inline-block;
    box-sizing: border-box;
    color: var(--card-bg); /* White text on buttons */
}

.btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(var(--primary-color), 0.3);
}

.btn-secondary {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%); /* Inverted gradient for secondary */
    border: none;
}

.btn-secondary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(var(--secondary-color), 0.3);
}

/* Footer */
.site-footer {
    background-color: var(--text-main); /* Dark footer background */
    color: #f0f0f0;
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.8;
}

.site-footer h3 {
    color: var(--card-bg); /* White heading for dark background */
    font-size: 18px;
    margin-bottom: 20px;
}

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

.footer-col {
    display: flex;
    flex-direction: column;
}

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

.footer-description {
    margin-top: 0;
    margin-bottom: 15px;
    color: #cccccc;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

.site-footer .footer-nav li:last-child {
    margin-bottom: 0;
}

.site-footer .footer-nav a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-mid-area {
    max-width: 1200px;
    margin: 0 auto 20px;
}

.footer-slot-anchor-outer, .footer-slot-anchor-inner {
    display: block;
    min-height: 1px;
}

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

.footer-bottom p {
    margin: 0;
}

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

    /* Header Top Bar */
    .header-top {
        height: 60px; /* Mobile fixed height */
        padding: 0 15px;
    }

    .header-container {
        width: 100%;
        max-width: none; /* No max-width on mobile */
        justify-content: space-between; /* Hamburger left, Logo center, space right */
        position: relative; /* For absolute positioning of logo */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        position: relative;
        z-index: 1001; /* Ensure it's clickable */
    }

    .site-header .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: calc(100% - 100px); /* Account for hamburger menu width */
        z-index: 1000; /* Below hamburger, above content */
    }

    .site-header .logo img {
        max-height: 56px !important; /* Mobile max height */
        max-width: 100%;
    }
    
    .desktop-nav-buttons {
        display: none !important; /* Hide desktop buttons on mobile */
    }

    /* Mobile Nav Buttons (Visible on mobile) */
    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons on mobile */
        min-height: 48px;
        align-items: center;
        justify-content: center; /* Center buttons if only one */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden; /* Prevent horizontal scroll */
        gap: 10px;
        flex-wrap: nowrap; /* Prevent buttons from wrapping */
        background-color: var(--page-bg); /* Light background for button bar */
        border-top: 1px solid var(--border-color);
        box-shadow: 0 1px 5px rgba(0,0,0,0.05); /* Subtle shadow */
    }

    .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 gap */
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal; /* Allow text wrapping */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Main Navigation (Mobile) */
    .main-nav {
        height: auto; /* Auto height for expanded menu */
        min-height: 100vh; /* Full viewport height when active */
        position: fixed; /* Fixed position for mobile menu */
        top: var(--header-offset); /* Below header and mobile buttons */
        left: 0;
        width: 280px; /* Width of the mobile menu sidebar */
        background-color: var(--card-bg); /* White background for menu */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%); /* Hide by default */
        transition: transform 0.3s ease;
        flex-direction: column; /* Vertical layout */
        align-items: flex-start;
        justify-content: flex-start;
        padding: 20px 0; /* Vertical padding */
        display: none; /* Hidden by default, JS will change this */
        border-top: none; /* Remove desktop border */
    }

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

    .main-nav .nav-container {
        width: 100%;
        max-width: none; /* No max-width on mobile */
        flex-direction: column;
        align-items: flex-start;
        padding: 0 15px; /* Inner padding */
    }

    .main-nav .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0; /* No gap for vertical list */
    }

    .main-nav .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border-color); /* Separator for menu items */
    }
    .main-nav .nav-list li:last-child {
        border-bottom: none;
    }

    .main-nav .nav-list li a {
        padding: 15px 0;
        color: var(--text-main);
    }

    /* Footer Mobile */
    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column layout on mobile */
        gap: 20px;
    }
    .footer-col:not(:last-child) { /* Add spacing between columns when stacked */
        margin-bottom: 20px;
    }

    /* Mobile 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;
    }
}

/* Ensure no-scroll class works */
body.no-scroll {
    overflow: 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;
}
