:root {
    --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) */
    --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: #08162B;
}

/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-offset); /* Fixed header offset */
    background-color: var(--deep-navy); /* Deep Navy for body background */
    color: var(--text-main);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    text-decoration: none;
    color: var(--text-main);
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 10px;
}

/* Header styles */
.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.3);
    background-color: transparent; /* Background set by header-top and main-nav */
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--deep-navy); /* Deep Navy 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 30px; /* Adjusted padding */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--gold-color); /* Gold color for logo text */
    text-transform: uppercase;
    display: flex; /* For potential image centering on mobile */
    align-items: center;
    white-space: nowrap;
}

.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;
    gap: 12px;
    align-items: center;
}

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px;
    background-color: var(--primary-color); /* Primary color for mobile buttons bar */
    padding: 0 15px; /* Adjust padding for mobile */
}

.btn {
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; /* Remove underline for buttons */
    color: var(--text-main); /* Text Main for button text */
    background: var(--button-gradient); /* Button gradient */
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Primary 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;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.nav-list {
    display: flex;
    gap: 25px;
}

.nav-list a {
    color: var(--text-main);
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--gold-color); /* Gold on hover/active */
}

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

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-menu span:nth-child(3) { bottom: 0; }

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

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

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

/* Footer styles */
.site-footer {
    background-color: var(--card-bg); /* Card BG for footer background */
    padding: 60px 0 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

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

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

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--gold-color); /* Gold color for footer logo */
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.footer-description {
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

.footer-nav a:hover {
    color: var(--gold-color); /* Gold on hover */
}

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 30px;
    text-align: center;
    color: var(--text-secondary);
}

.footer-bottom a { /* Ensure no links in footer-bottom */
  pointer-events: none;
  cursor: default;
  color: var(--text-secondary);
}

/* Placeholder for dynamic slots - ensure visibility */
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure it takes up space if empty */
}

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

    body {
        padding-top: var(--header-offset);
        overflow-x: hidden;
    }

    /* Header adjustments */
    .header-top {
        min-height: 60px;
        height: 60px;
    }

    .header-container {
        padding: 0 15px;
        justify-content: space-between; /* Keep space-between for hamburger and logo */
    }

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

    .logo {
        flex: 1 !important; /* Take remaining space */
        display: flex !important;
        justify-content: center !important; /* Center logo */
        align-items: center !important;
        margin-left: -30px; /* Counteract hamburger pushing it right */
    }
    
    .logo img {
        max-height: 56px !important; /* Max height for mobile logo */
    }

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

    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        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; /* Prevent buttons from wrapping */
    }

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

    .main-nav {
        min-height: auto; /* Auto height for expanded menu */
        height: auto;
        position: fixed; /* Fixed position for mobile menu */
        top: var(--header-offset); /* Position below header and mobile buttons */
        left: 0;
        width: 70%; /* Menu width */
        max-width: 300px; /* Max width for menu */
        background-color: var(--primary-color); /* Same as desktop nav */
        flex-direction: column; /* Vertical menu items */
        align-items: flex-start;
        padding: 20px 0;
        transform: translateX(-100%); /* Hidden by default */
        transition: transform 0.3s ease;
        display: none; /* Initially hidden, JS changes to block/flex */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 999; /* Below overlay */
        overflow-y: auto; /* Allow scrolling for long menus */
        height: calc(100vh - var(--header-offset)); /* Fill remaining viewport height */
    }

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

    .nav-container {
        width: 100%;
        max-width: none; /* No max-width for mobile container */
        padding: 0;
        height: auto;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--divider-color); /* Divider for menu items */
    }

    .nav-list a {
        padding: 12px 20px;
        display: block;
        width: 100%;
    }

    /* Footer adjustments */
    .footer-top-grid {
        grid-template-columns: 1fr; /* Single column layout for mobile */
        padding: 0 20px 30px;
        gap: 25px;
    }
    
    .footer-col:not(:last-child) {
        border-bottom: 1px solid var(--divider-color);
        padding-bottom: 25px;
    }
    .footer-col:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

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

    /* Ensure images in content don't overflow */
    .page-content img {
      max-width: 100% !important;
      height: auto !important;
      display: block;
    }
    .page-content {
      overflow-x: hidden;
      max-width: 100%;
    }
    body {
      overflow-x: 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;
}
