/* General Reset & Body */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: var(--text-main);
    background-color: var(--deep-navy-color); /* A darker background for the body */
    line-height: 1.6;
    padding-top: var(--header-offset); /* Fixed header offset */
    overflow-x: hidden; /* Prevent horizontal scroll on desktop too */
}

/* Color Palette */
:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    --card-bg: #10233F;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy-color: #08162B;

    /* Header offset */
    --header-offset: 122px; /* Desktop: header-top (68) + main-nav (52) + 2px buffer */
}

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

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Suspended effect */
    background-color: var(--primary-color); /* Fallback, specific sections have their own */
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent header content from causing horizontal scroll */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px; /* Desktop height */
    height: 68px; /* Desktop height */
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--deep-navy-color); /* Different from main-nav */
    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 {
    color: var(--gold-color); /* Logo color */
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    line-height: 1; /* Ensure text logo fits */
    display: flex; /* For potential image logo centering */
    align-items: center;
    justify-content: flex-start; /* Default desktop alignment */
}

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

/* Hamburger Menu (Desktop hidden) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001; /* Above logo on mobile */
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

/* Hamburger active state (X icon) */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

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

/* Desktop Nav Buttons */
.desktop-nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto; /* Push to right */
}

/* Mobile Nav Buttons (Desktop hidden) */
.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px; /* Mobile height */
    align-items: center;
    justify-content: center; /* Center buttons */
    width: 100%;
    background-color: var(--primary-color); /* Matches main nav background */
    padding: 0 15px; /* Adjust padding for mobile */
    gap: 10px;
    flex-wrap: nowrap; /* Ensure buttons stay in one line */
    overflow: hidden; /* Prevent overflow */
}

/* Main Navigation */
.main-nav {
    box-sizing: border-box;
    min-height: 52px; /* Desktop height */
    height: 52px; /* Desktop height */
    display: flex; /* Desktop default */
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Different from header-top */
    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-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Desktop default */
    gap: 25px; /* Spacing between nav items */
}

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

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--gold-color); /* Hover/active state */
}

/* Buttons */
.btn {
    background: var(--button-gradient);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex; /* Use flex for vertical centering of text */
    align-items: center;
    justify-content: center;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Overlay for Mobile Menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below mobile menu, above header */
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Footer */
.site-footer {
    background-color: var(--card-bg); /* Darker background for footer */
    color: var(--text-secondary);
    padding: 40px 0 20px;
    font-size: 14px;
    box-sizing: border-box;
}

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

.footer-slot-anchor { /* For top_row_1 */
    grid-column: 1 / -1; /* Spans all columns */
    margin-bottom: 20px; /* Space above first content row */
}

.footer-col h3 {
    color: var(--text-main);
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}

.footer-col h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--gold-color);
    margin-top: 8px;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--gold-color);
}

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

.footer-description {
    margin-bottom: 20px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-slot-anchor-inner {
    margin-top: 20px; /* Space for injected content */
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 20px 20px 0;
    border-top: 1px solid var(--divider-color);
    text-align: center;
    color: var(--text-secondary);
}

.footer-bottom p {
    margin: 0;
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
    body {
        padding-top: var(--header-offset); /* Ensure mobile padding-top is correct */
    }

    /* Header */
    .site-header {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .header-top {
        min-height: 60px; /* Mobile height */
        height: 60px; /* Mobile height */
        justify-content: flex-start; /* Align hamburger to left */
        padding-left: 15px; /* Hamburger padding */
        padding-right: 15px; /* Right side padding */
    }

    .header-container {
        width: 100%;
        max-width: none; /* Remove max-width on mobile */
        padding: 0; /* Container itself doesn't need padding as header-top has it */
        position: relative; /* For absolute logo positioning */
        height: 100%;
        box-sizing: border-box;
        justify-content: flex-start; /* Ensure hamburger is at the start */
    }

    /* Mobile Logo Centering (Image) */
    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important; /* For img tag to be centered within logo link */
        align-items: center !important;
        justify-content: center !important;
        max-width: calc(100% - 100px); /* Leave space for hamburger */
        padding-right: 0; /* Reset padding */
    }

    .logo img {
        max-height: 56px !important; /* Mobile image logo height */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        position: relative; /* Keep it in flow to define left edge */
        z-index: 1002; /* Ensure hamburger is clickable */
        left: 0;
        margin-right: 0;
        padding: 10px;
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px; /* Mobile height */
        height: auto; /* Allow content to dictate height if it wraps */
        padding-left: 15px;
        padding-right: 15px;
        background-color: var(--primary-color);
        box-shadow: inset 0 -1px 0 var(--divider-color); /* Separator from main nav */
    }

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

    .main-nav {
        min-height: auto; /* Allow content to dictate height */
        height: auto;
        flex-direction: column; /* Mobile menu is vertical */
        position: fixed; /* Fixed for off-canvas menu */
        top: var(--header-offset); /* Position below header + mobile buttons */
        left: 0;
        width: 100%;
        max-width: 300px; /* Max width for off-canvas menu */
        transform: translateX(-100%); /* Hidden by default */
        transition: transform 0.3s ease;
        background-color: var(--primary-color);
        padding: 20px 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 1001; /* Above overlay */
        display: none; /* Crucial: hidden by default */
        overflow-y: auto; /* Allow scrolling for long menus */
        max-height: calc(100vh - var(--header-offset)); /* Max height to fit viewport */
    }

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

    .nav-container {
        width: 100%;
        max-width: none; /* Remove max-width on mobile */
        padding: 0 15px;
    }

    .nav-list {
        flex-direction: column; /* Vertical list for mobile */
        gap: 0; /* Remove gap */
    }

    .nav-list li a {
        padding: 12px 0;
        border-bottom: 1px solid var(--divider-color); /* Separator */
        white-space: normal; /* Allow text to wrap if needed */
    }

    .nav-list li:last-child a {
        border-bottom: none;
    }

    /* Footer */
    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 25px;
        padding: 0 15px;
    }

    .footer-col {
        text-align: center; /* Center align footer columns */
    }

    .footer-col h3::after {
        margin: 8px auto 0; /* Center underline */
    }

    .footer-bottom {
        padding: 15px 15px 0;
    }

    /* Mobile content overflow fix */
    .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.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;
}
