/* Global Styles */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --background-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #FFFFFF;
    --header-top-bg: #1A2B3C; /* Dark professional blue-grey */
    --main-nav-bg: #FFFFFF;
    --header-offset: 122px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    color: var(--text-color-dark);
    background-color: var(--background-color);
    padding-top: var(--header-offset);
    overflow-x: hidden;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--header-top-bg); /* Fallback, specific sections have their own bg */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--header-top-bg);
    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;
}

.logo {
    color: var(--text-color-light);
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    display: block;
    line-height: 1;
}

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

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px;
    width: 100%;
    background-color: var(--header-top-bg); /* Same as header-top */
    padding: 0 20px;
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex; /* Desktop default */
    align-items: center;
    overflow: hidden;
    background-color: var(--main-nav-bg);
    width: 100%;
}

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

.nav-link {
    color: var(--text-color-dark);
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.btn-primary:hover {
    background-color: #1a8cc2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--login-button-color);
    color: var(--text-color-light);
}

.btn-secondary:hover {
    background-color: #c46800;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color-light);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s ease;
}

.hamburger-icon::before, .hamburger-icon::after {
    content: '';
    width: 24px;
    height: 2px;
    background-color: var(--text-color-light);
    position: absolute;
    transition: transform 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

.hamburger-menu.active .hamburger-icon {
    background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Site Footer */
.site-footer {
    background-color: var(--header-top-bg);
    color: var(--text-color-light);
    padding: 40px 20px 20px;
    font-size: 14px;
}

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

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

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

.footer-description {
    line-height: 1.6;
    margin-top: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

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

.footer-nav a {
    color: var(--text-color-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure element exists for injection */
    margin-top: 15px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px;
    }
    body {
        overflow-x: hidden;
    }
    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }

    .site-header {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        justify-content: space-between;
    }

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

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

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

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

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        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); /* 5px for half of the 10px gap */
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
    }

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

    .main-nav {
        min-height: 48px !important;
        height: 48px !important;
        display: none; /* Hidden by default */
        position: fixed; /* Fixed position for mobile menu */
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 100%;
        max-width: 300px; /* Max width for side menu */
        height: calc(100% - var(--header-offset));
        flex-direction: column; /* Vertical menu */
        justify-content: flex-start;
        align-items: flex-start;
        background-color: var(--main-nav-bg);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%); /* Off-screen by default */
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }

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

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 15px;
        height: auto;
        width: 100%;
        max-width: none; /* Remove max-width for mobile */
    }

    .nav-link {
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-col:not(:first-child) {
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-title {
        margin-top: 0;
    }

    .hamburger-menu {
        display: flex; /* Ensure it's visible */
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .hamburger-menu.active .hamburger-icon {
        background-color: transparent;
    }
    
    .hamburger-menu.active .hamburger-icon::before,
    .hamburger-menu.active .hamburger-icon::after {
        background-color: var(--text-color-light);
    }

    .overlay.active {
        display: block;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 20px;
    }
    .logo img {
        max-height: 50px !important;
    }
    .mobile-nav-buttons .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
