html, body { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; scroll-behavior: smooth; color: #333; }
body { padding-top: var(--header-offset); background-color: #FFFFFF; }
:root { --header-offset: 122px; --primary-color: #017439; --secondary-color: #FFFFFF; --register-btn-bg: #C30808; --login-btn-bg: #C30808; --btn-text-color: #FFFF00; }

/* 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.2);
    background-color: var(--secondary-color); /* Fallback, specific colors for sections below */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    background-color: var(--primary-color); /* Distinct from main-nav */
    padding: 0 20px;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
}

.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-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    text-align: center;
}

.btn-register {
    background-color: var(--register-btn-bg);
    color: var(--btn-text-color);
}
.btn-register:hover { background-color: #a00606; transform: translateY(-1px); }

.btn-login {
    background-color: var(--login-btn-bg);
    color: var(--btn-text-color);
}
.btn-login:hover { background-color: #a00606; transform: translateY(-1px); }

.hamburger-menu {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    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) {
    transform: translateY(10.5px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden on desktop, shown on mobile */
    min-height: 48px;
    height: auto; /* Allow content to dictate height */
    background-color: #f0f0f0; /* Light background for this section */
    width: 100%;
    max-width: 100%;
    padding: 8px 15px;
    overflow: hidden;
    gap: 10px;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 -1px 3px rgba(0,0,0,0.05);
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    background-color: var(--secondary-color); /* Distinct from header-top */
    border-top: 1px solid rgba(0,0,0,0.05);
}

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

.nav-link {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 100%;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color);
    background-color: var(--primary-color);
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
    :root { --header-offset: 110px; }
    body { overflow-x: hidden; }

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        padding: 0 15px;
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0;
        justify-content: space-between;
        position: relative; /* For logo absolute positioning if needed */
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* Account for hamburger menu width */
        font-size: 24px;
    }

    .logo img {
        max-height: 56px !important;
    }

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

    .hamburger-menu {
        display: block;
        order: -1; /* Place it at the start */
        margin-right: auto; /* Push logo to center */
    }

    .mobile-nav-buttons {
        display: flex !important;
        flex-wrap: nowrap;
        min-height: 48px;
        height: auto;
        padding: 8px 15px;
    }
    .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 {
        min-height: auto; /* Adjust height for content */
        height: auto; /* Adjust height for content */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 75%; /* Slide-out menu width */
        max-width: 300px;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        transform: translateX(-100%); /* Hidden by default */
        transition: transform 0.3s ease;
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
        z-index: 999;
        display: none; /* Controlled by JS and active class */
    }

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

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

    .nav-link {
        width: 100%;
        padding: 12px 20px;
        color: var(--secondary-color);
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        justify-content: flex-start;
    }
    .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 998;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .overlay.active {
        display: block;
        opacity: 1;
    }
    body.no-scroll {
        overflow: hidden;
    }

    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.6;
}

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

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

.footer-logo {
    display: inline-block;
    font-size: 24px;
    font-weight: bold;
    color: var(--btn-text-color);
    text-decoration: none;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-heading {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    white-space: nowrap;
}

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

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

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

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

.footer-dynamic-col {
    /* This column is specifically for dynamic content injected by the system */
}

.footer-slot-anchor-inner, .footer-slot-anchor-outer {
    /* Placeholder for system injected content */
    min-height: 1px; /* Ensure it takes up space if empty */
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    color: rgba(255,255,255,0.6);
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 30px 15px 15px;
    }
    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    .footer-col {
        align-items: flex-start;
    }
    .footer-logo {
        font-size: 22px;
    }
    .footer-heading {
        font-size: 16px;
    }
    .footer-nav a {
        font-size: 13px;
    }
    .footer-bottom {
        padding-top: 15px;
        margin-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;
}
