:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --page-bg-color: #F5F7FA;
    --border-color: #E0E0E0;
    --header-top-bg: #C62828;
    --main-nav-bg: #E53935;
    --header-offset: 122px;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--header-top-bg);
}

.header-top {
    box-sizing: border-box;
    min-height: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--header-top-bg);
    color: #fff;
    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 for better spacing */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 0;
    line-height: 1;
}

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

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Using same gradient for both, per instructions */
}

.btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.mobile-nav-buttons {
    box-sizing: border-box;
    display: none; /* Hidden by default on desktop */
    min-height: 48px; /* Fixed height for mobile */
}

.main-nav {
    box-sizing: border-box;
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--main-nav-bg);
    width: 100%;
    color: #fff;
}

.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;
    flex-wrap: nowrap; /* Prevent wrapping on desktop */
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 0 15px;
    font-size: 16px;
    font-weight: bold;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

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

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-color: #fff;
    position: absolute;
    transition: transform 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}

.hamburger-menu.active .hamburger-icon {
    background-color: transparent;
}

.hamburger-menu.active .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}

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

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

.site-footer {
    background-color: #222;
    color: #eee;
    padding: 40px 20px 20px;
    font-size: 14px;
    line-height: 1.8;
}

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

.footer-col h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}

.footer-description {
    color: #bbb;
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

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

.footer-nav a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    color: #bbb;
}

.footer-bottom p {
    margin: 0;
}

/* Ensure footer slot anchors are not hidden by default */
.footer-slot-anchor, .footer-slot-anchor-inner {
    min-height: 1px; /* Ensure it takes up at least some space */
    display: block;
}

@media (max-width: 768px) {
    :root {
        --header-offset: 110px;
    }

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

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0;
        justify-content: space-between;
    }

    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 24px;
        position: absolute; /* To center the logo */
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 100px); /* Account for hamburger menu width */
    }

    .logo img {
        max-height: 56px !important;
    }

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

    .hamburger-menu {
        display: block;
        order: -1; /* Move to the left */
        margin-left: -10px; /* Adjust for padding */
    }

    .mobile-nav-buttons {
        display: flex !important;
        min-height: 48px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Consistent mobile padding */
        overflow: hidden;
        gap: 10px;
        flex-wrap: nowrap;
        background-color: var(--main-nav-bg); /* Use main nav background for consistency */
        justify-content: center;
    }

    .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;
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-nav {
        display: none; /* Hidden by default, shown by JS */
        position: fixed;
        top: var(--header-offset); /* Position below fixed header */
        left: 0;
        width: 80%;
        max-width: 300px;
        height: calc(100% - var(--header-offset));
        background-color: #333; /* Darker background for mobile menu */
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .main-nav.active {
        display: flex; /* Must be flex to show */
        transform: translateX(0);
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .nav-link {
        width: 100%;
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        justify-content: flex-start;
    }

    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .footer-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-nav li {
        width: 100%;
        text-align: center;
    }

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

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