:root { --header-offset: 122px; }
body { padding-top: var(--header-offset); margin: 0; font-family: Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: #08162B; color: #F3F8FF; }

/* Site Header - Fixed Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background-color: #113B7A; /* Primary Blue */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.header-top {
    box-sizing: border-box;
    height: 68px; /* Fixed desktop height */
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #08162B; /* Deep Navy, distinct from main-nav */
    width: 100%;
    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 {
    font-size: 28px;
    font-weight: bold;
    color: #F2C14E; /* Gold */
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.logo img {
    display: block;
    max-height: 60px; /* Max height for desktop logo */
    height: auto;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.desktop-nav-buttons {
    display: flex; /* Desktop default: visible */
    gap: 12px;
    align-items: center;
}

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Desktop default: hidden */
    min-height: 48px; /* Placeholder min-height, but display:none */
    width: 100%;
}

.hamburger-menu {
    display: none; /* Desktop default: hidden */
    width: 30px;
    height: 24px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #F3F8FF; /* Text Main */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

.main-nav {
    box-sizing: border-box;
    height: 52px; /* Fixed desktop height */
    display: flex; /* Desktop default: visible */
    align-items: center;
    overflow: hidden;
    background-color: #113B7A; /* Primary blue, distinct from header-top */
    width: 100%;
    border-top: 1px solid #1B3357; /* Divider */
}

.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;
    gap: 25px; /* Spacing between nav links */
}

.nav-link {
    color: #F3F8FF; /* Text Main */
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #F2C14E; /* Gold */
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    color: #F3F8FF; /* Text Main */
    background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button gradient */
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

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

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

/* Footer styles (desktop first) */
.site-footer {
    background-color: #08162B; /* Deep Navy */
    color: #AFC4E8; /* Text Secondary */
    padding: 40px 20px 20px;
    font-size: 14px;
    box-sizing: border-box;
}

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

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

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #F2C14E; /* Gold */
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-description {
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #AFC4E8;
}

.footer-col h3 {
    color: #F3F8FF; /* Text Main */
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    color: #AFC4E8; /* Text Secondary */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #F2C14E; /* Gold */
}

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    text-align: center;
    color: #AFC4E8;
}

/* Mobile styles */
@media (max-width: 768px) {
    :root { --header-offset: 108px; } /* 60px (header-top) + 48px (mobile-nav-buttons) */
    body {
        padding-top: var(--header-offset);
        overflow-x: hidden;
    }

    .site-header {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        overflow-x: hidden;
    }

    .header-top {
        height: 60px !important; /* Fixed mobile height */
        padding: 0 15px;
        justify-content: space-between;
    }

    .header-container {
        width: 100%;
        max-width: none; /* Important for mobile */
        padding: 0;
        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); /* Leave space for hamburger */
        font-size: 24px;
    }

    .logo img {
        max-height: 56px !important; /* Max height for mobile logo */
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons on mobile */
        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;
        background-color: #1D5FD1; /* Auxiliary color for mobile button bar */
        border-top: 1px solid #2B73F6;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px); /* Two buttons with 10px gap */
        box-sizing: border-box;
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hamburger-menu {
        display: flex; /* Show hamburger on mobile */
    }

    .main-nav {
        display: none; /* Hide main nav by default on mobile */
        flex-direction: column; /* Vertical layout for mobile menu */
        position: fixed; /* Fixed position for mobile menu */
        top: var(--header-offset); /* Position below fixed header and mobile buttons */
        left: 0;
        width: 80%; /* Menu width */
        max-width: 300px;
        height: auto;
        min-height: calc(100vh - var(--header-offset)); /* Ensure it covers full viewport height */
        background-color: #08162B; /* Deep Navy for mobile menu */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%); /* Initially off-screen */
        transition: transform 0.3s ease;
        overflow-y: auto; /* Scroll if menu content is long */
        border-top: none;
        padding-bottom: 20px;
    }

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

    .nav-container {
        flex-direction: column; /* Vertical nav links */
        align-items: flex-start; /* Align links to left */
        padding: 20px 15px;
        gap: 15px; /* Spacing between mobile nav links */
        width: 100%; /* Important for mobile */
        max-width: none; /* Important for mobile */
    }

    .nav-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #1B3357; /* Divider for mobile links */
    }
    .nav-link:last-child {
        border-bottom: none;
    }

    /* Footer mobile styles */
    .site-footer {
        padding: 30px 15px 15px;
    }

    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column layout for mobile */
        gap: 25px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .footer-col h3 {
        margin-bottom: 10px;
        font-size: 16px;
    }

    .footer-logo {
        font-size: 20px;
    }

    .footer-description {
        font-size: 13px;
    }

    .footer-nav a {
        font-size: 13px;
    }

    .footer-bottom {
        margin-top: 15px;
        font-size: 12px;
    }

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