/* General Reset & Base Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* IMPORTANT: Body padding for fixed header */
    background-color: #F5F7FA; /* Background color */
    color: #333333; /* Text Main */
    overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

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

/* Header Top Bar */
.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #E53935; /* Primary color for header-top */
    width: 100%;
}
.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;
    padding: 0 20px; /* Padding for logo and buttons */
}

/* Logo */
.logo {
    font-size: 28px;
    font-weight: bold;
    color: #FFFFFF; /* White text for logo on primary background */
    display: block;
    height: 100%; /* Ensure logo text aligns vertically */
    display: flex;
    align-items: center;
}
.logo img { /* For image logos */
    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;
    gap: 12px;
    align-items: center;
}
.desktop-nav-buttons .btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    color: #FFFFFF;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none; /* No underline for buttons */
    white-space: nowrap;
}
.desktop-nav-buttons .btn:hover {
    opacity: 0.9;
}

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px; /* Min height for mobile button bar */
    width: 100%;
    background-color: #F5F7FA; /* Background for mobile button bar */
    border-bottom: 1px solid #E0E0E0; /* Border color */
    padding: 0 15px; /* Padding for mobile buttons */
}

/* Main Navigation Bar */
.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex; /* Display flex for desktop */
    align-items: center;
    overflow: hidden;
    background-color: #FF5A4F; /* Secondary color for main-nav */
    width: 100%;
}
.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;
    padding: 0 20px;
}
.main-nav ul {
    display: flex;
    gap: 25px;
}
.main-nav a {
    color: #FFFFFF;
    font-weight: bold;
    padding: 5px 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}
.main-nav a:hover {
    opacity: 0.8;
}

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* Above header */
}
.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF; /* White lines on red header-top */
    transition: all 0.3s ease;
}
.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);
}

/* Mobile Menu Overlay (hidden by default) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Footer Styles */
.site-footer {
    background-color: #333333; /* Dark background for footer */
    color: #FFFFFF;
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
}
.footer-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}
.footer-col h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #FF5A4F; /* Secondary color for footer headings */
}
.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 15px;
    display: block;
}
.footer-description {
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.footer-nav li {
    margin-bottom: 8px;
}
.footer-nav a {
    color: #FFFFFF;
    transition: color 0.3s ease;
}
.footer-nav a:hover {
    color: #FF5A4F;
}
.footer-slot-anchor-inner {
    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);
}
.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

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

    /* Header Top Bar */
    .header-top {
        min-height: 60px !important;
        height: 60px !important;
    }
    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: space-between;
        position: relative;
    }
    .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);
        height: 100%;
        color: #FFFFFF; /* Ensure text color is still white */
    }
    .logo img {
        max-height: 56px !important;
    }
    .desktop-nav-buttons {
        display: none !important;
    }
    .hamburger-menu {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    /* Mobile Navigation Buttons */
    .mobile-nav-buttons {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        height: 48px; /* Fixed height for mobile button bar */
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: #FFFFFF;
    }
    .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;
        text-align: center;
    }

    /* Main Navigation Bar (Mobile Menu) */
    .main-nav {
        display: none; /* Hidden by default for mobile menu */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header + mobile buttons */
        left: 0;
        width: 280px;
        height: calc(100vh - var(--header-offset)); /* Full height below header */
        background-color: #333333;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 20px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    .main-nav.active {
        display: flex; /* Show menu when active */
        transform: translateX(0);
    }
    .main-nav .nav-container {
        width: 100%;
        max-width: none;
        padding: 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .main-nav a {
        padding: 15px 20px;
        display: block;
        width: 100%;
        color: #FFFFFF;
    }

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

    /* Footer Mobile */
    .footer-top-grid {
        grid-template-columns: 1fr;
        padding-bottom: 20px;
    }
    .footer-col {
        margin-bottom: 20px;
    }
    .footer-col:last-child {
        margin-bottom: 0;
    }
    .footer-bottom {
        padding-top: 15px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
}
