/* Color Palette */
:root {
    --primary-color: #C91F17;
    --secondary-color: #E53935;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
    --card-bg: #D32F2F;
    --background-color: #B71C1C;
    --text-main-color: #FFF5E1;
    --border-color: #F2B544;
    --glow-color: #FFCC66;
    --gold-color: #F4D34D;
    --deep-red-color: #7A0E0E;
    --header-offset: 122px; /* Desktop: 68px (header-top) + 52px (main-nav) + 2px buffer */
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color);
    background-color: var(--background-color);
    padding-top: var(--header-offset); /* Important for fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.no-scroll {
    overflow: hidden;
}

/* General Link Styles */
a {
    text-decoration: none;
    color: var(--text-main-color);
    transition: color 0.3s ease;
}

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

/* Button Base Styles */
.btn {
    background: var(--button-gradient);
    color: var(--deep-red-color); /* Contrasting text color for the button gradient */
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex; /* Use flex for button content alignment */
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* Prevent text wrapping on desktop */
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    color: var(--deep-red-color); /* Keep text color consistent on hover */
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: transparent; /* Actual background provided by header-top and main-nav */
    box-sizing: border-box;
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--deep-red-color); /* Deep Red for top bar */
    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 content inside container */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-main-color);
    text-decoration: none;
    display: block; /* Ensure logo is block-level for proper alignment */
    line-height: 1; /* Adjust line-height for text logo */
}

.desktop-nav-buttons {
    display: flex; /* Visible on desktop */
    gap: 12px;
    align-items: center;
}

/* Mobile nav buttons - hidden by default on desktop */
.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden on desktop */
    min-height: 48px; /* Min height for mobile */
    background-color: var(--background-color); /* Background color for mobile button bar */
    width: 100%;
    padding: 0 15px; /* Default padding for mobile buttons */
    overflow: hidden; /* Prevent overflow */
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex; /* Visible on desktop */
    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; /* Horizontal on desktop */
    justify-content: center; /* Center nav items */
    align-items: center;
    padding: 0 20px;
}

.nav-link {
    display: block;
    padding: 15px 20px; /* Adjust padding to fit 52px height */
    color: var(--text-main-color);
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--gold-color);
}

/* Hamburger menu - hidden on desktop */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1002; /* Above other header elements */
    position: relative;
    padding: 5px; /* To make it easier to click */
}

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

.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 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: 999; /* Below mobile menu, above main content */
}

.overlay.active {
    display: block;
}

/* Footer Styles */
.site-footer {
    background-color: var(--deep-red-color); /* Deep Red for footer background */
    padding: 40px 20px 20px;
    color: var(--text-main-color);
    font-size: 14px;
}

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

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

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

.footer-description {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    word-wrap: break-word; /* Ensure description wraps */
    overflow-wrap: break-word;
}

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

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

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

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

.footer-mid-dynamic-area {
    max-width: 1200px;
    margin: 0 auto 20px;
    /* This container for dynamic slots, keep it flexible */
}

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

/* Dynamic slot anchor inner - must be visible */
.footer-slot-anchor-inner {
    min-height: 1px; /* Ensure it occupies space for visibility */
    display: block;
}

/* Mobile Responsive 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;
    }

    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }

    .site-header {
        /* No change needed for fixed positioning */
    }

    .header-top {
        min-height: 60px !important;
        height: 60px !important;
        padding-left: 15px; /* Adjust padding for mobile */
        padding-right: 15px;
    }

    .header-container {
        padding: 0; /* Container padding handled by header-top */
        max-width: none; /* No max-width on mobile */
        justify-content: space-between; /* Hamburger left, Logo center, empty space right */
        position: relative; /* For absolute positioning of logo if needed */
    }

    /* Hamburger menu visible on mobile */
    .hamburger-menu {
        display: flex;
        order: -1; /* Place it to the left */
        margin-right: auto; /* Push logo to center */
    }

    /* Logo centering on mobile */
    .logo {
        flex: 1 !important; /* Allow logo to take available space */
        display: flex !important; /* Use flex to center text logo */
        justify-content: center !important; /* Center the text */
        align-items: center !important;
        max-width: calc(100% - 100px); /* Restrict width to allow hamburger */
        height: 100%; /* Take full height of header-top for vertical centering */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

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

    /* Mobile nav buttons - visible on mobile */
    .mobile-nav-buttons {
        display: flex !important; /* Show mobile buttons */
        min-height: 48px;
        align-items: center;
        justify-content: center; /* Center buttons horizontally */
        width: 100%; max-width: 100%;
        box-sizing: border-box;
        padding-left: 15px; padding-right: 15px;
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap; /* Keep buttons on one line */
    }

    .mobile-nav-buttons .btn {
        flex: 1; min-width: 0;
        max-width: calc(50% - 5px); /* Max width for two buttons with gap */
        box-sizing: border-box;
        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;
    }

    /* Mobile main nav (hamburger menu content) */
    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: 108px; /* Position below fixed header-top (60px) + mobile-nav-buttons (48px) */
        left: 0;
        width: 80%; /* Menu width */
        height: calc(100vh - 108px); /* Full viewport height minus fixed header */
        background-color: var(--deep-red-color); /* Dark background for menu */
        flex-direction: column; /* Vertical navigation */
        justify-content: flex-start;
        align-items: flex-start; /* Align menu items to left */
        transform: translateX(-100%); /* Slide out from left */
        transition: transform 0.3s ease;
        overflow-y: auto; /* Scroll if content overflows */
        z-index: 1001; /* Above overlay */
        box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    }

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

    .nav-container {
        flex-direction: column; /* Vertical links */
        padding: 0; /* No horizontal padding for nav container */
        width: 100%;
        max-width: none;
        align-items: flex-start; /* Align links to left */
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Footer mobile styles */
    .footer-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .footer-col {
        text-align: center;
    }

    .footer-col:not(:last-child) {
        margin-bottom: 30px; /* Space between columns */
    }

    .footer-col h3 {
        text-align: center;
    }

    .footer-nav {
        text-align: center;
    }

    .footer-nav li {
        display: block; /* Stack list items vertically */
        margin: 0 0 8px; /* Adjust margin for stacked items */
    }

    .footer-bottom {
        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;
  }
}
/* 内容保护（系统追加，请勿删除） */
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;
}
