/* Global Reset & Body Padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--deep-navy);
    padding-top: var(--header-offset); /* IMPORTANT: This handles fixed header spacing */
    overflow-x: hidden; /* Prevent body overflow on mobile */
}

/* Color Variables */
:root {
    --primary-color: #113B7A;
    --accent-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;

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

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

/* Header Top Section */
.header-top {
    background-color: var(--deep-navy);
    min-height: 68px; /* Desktop height */
    height: 68px; /* Desktop height */
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Desktop padding */
    height: 100%;
}

/* Logo */
.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--gold-color); /* Use gold for logo for premium feel */
    text-decoration: none;
    display: block; /* Ensures it's always visible */
    white-space: nowrap; /* Prevent line break for logo text */
    max-height: 60px; /* Desktop logo height */
    display: flex; /* For vertical centering of text */
    align-items: center;
}

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

/* Mobile Navigation Buttons (hidden by default on desktop) */
.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden on desktop */
    min-height: 48px; /* Mobile height */
    background-color: var(--card-bg); /* Distinct background for mobile buttons */
    padding: 0 15px; /* Mobile padding */
}

/* Main Navigation */
.main-nav {
    background-color: var(--primary-color);
    min-height: 52px; /* Desktop height */
    height: 52px; /* Desktop height */
    display: flex; /* Desktop default: show nav links */
    align-items: center;
    overflow: hidden;
    width: 100%;
}

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

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

.nav-link:hover, .nav-link.active {
    color: var(--gold-color);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Hamburger Menu (hidden by default on desktop) */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* Above header */
}

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

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

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

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

/* Overlay (hidden by default) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999; /* Below menu, above content */
    display: none;
}

.overlay.active {
    display: block;
}

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

.btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 10px var(--glow-color); /* Add glow on hover */
}

/* Footer */
.site-footer {
    background-color: var(--deep-navy);
    color: var(--text-secondary);
    padding: 40px 20px 20px;
    font-size: 14px;
    border-top: 1px solid var(--divider-color);
}

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

.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);
    text-decoration: none;
    margin-bottom: 15px;
    display: block;
}

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

.footer-nav {
    list-style: none;
}

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

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

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

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

.footer-bottom p {
    margin: 0;
}

/* Dynamic Slot Anchors - ensure visibility */
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure they take up space for potential content */
}

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

    /* Header Top Section */
    .header-top {
        min-height: 60px !important; /* Mobile height */
        height: 60px !important; /* Mobile height */
        display: flex;
        align-items: center;
        padding: 0 15px; /* Mobile padding for content */
        position: relative; /* For absolute positioning of logo */
    }

    .header-container {
        width: 100%;
        max-width: none; /* No max-width on mobile */
        margin: 0;
        padding: 0;
        height: 100%;
        display: flex; /* Arrange its children */
        justify-content: space-between; /* Hamburger left, desktop-nav-buttons right (if not hidden) */
        align-items: center;
        position: static; /* Reset if header-top is relative */
    }

    /* Hamburger Menu */
    .hamburger-menu {
        display: flex; /* Show hamburger on mobile */
        z-index: 1002;
    }

    /* Mobile Logo Centering (Method 2: Absolute Positioning - adapted for text logo) */
    .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 and potential right items */
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: 1001; /* Below hamburger */
        max-height: 56px; /* Mobile logo height */
    }
    
    /* Desktop Nav Buttons (hidden on mobile) */
    .desktop-nav-buttons {
        display: none !important;
    }

    /* Mobile Nav Buttons (visible on mobile) */
    .mobile-nav-buttons {
        display: flex !important; /* Show on mobile */
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%; /* Ensure it doesn't overflow */
        box-sizing: border-box;
        padding: 0 15px; /* Mobile padding */
        overflow: hidden; /* Prevent button overflow */
        gap: 10px; /* Space between buttons */
        flex-wrap: nowrap; /* Keep buttons on one line */
        background-color: var(--card-bg); /* Distinct background for mobile buttons */
    }

    .mobile-nav-buttons .btn {
        flex: 1; /* Distribute space evenly */
        min-width: 0; /* Allow shrinking */
        max-width: calc(50% - 5px); /* Max width for 2 buttons with 10px gap */
        padding: 8px 12px; /* Smaller padding */
        font-size: 13px; /* Smaller font size */
        white-space: normal; /* Allow text wrapping */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Main Navigation (mobile specific) */
    .main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 70%; /* Side menu width */
        height: calc(100% - var(--header-offset)); /* Full height below header */
        flex-direction: column; /* Vertical menu */
        align-items: flex-start;
        padding: 20px 15px;
        background-color: var(--primary-color);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(-100%); /* Start off-screen */
        transition: transform 0.3s ease;
        z-index: 1001; /* Above overlay */
        overflow-y: auto; /* Enable scrolling for long menus */
    }

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

    .nav-container {
        flex-direction: column; /* Vertical links */
        align-items: flex-start;
        padding: 0;
        width: 100%;
        max-width: none; /* No max-width on mobile */
    }

    .nav-link {
        width: 100%;
        padding: 12px 10px;
        text-align: left;
        border-bottom: 1px solid var(--divider-color);
    }

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

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

    .footer-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    /* Mobile Overflow Protection */
    .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;
}
