/* ============================================
   公共样式 - Common Styles
   包含：基础样式、Header、Footer、按钮等通用组件
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1890ff;
    --dark-blue: #096dd9;
    --light-blue: #e6f7ff;
    --orange: #ff7a45;
    --dark-orange: #ff4d00;
    --gray: #f5f5f5;
    --dark-gray: #595959;
    --text-dark: #262626;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   Header 样式
   ============================================ */

.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 48px;
}

.logo img {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 30px;
    list-style: none;
    position: relative;
}

.nav > li {
    position: relative;
}

/* 为有下拉菜单的项添加额外的底部区域，方便鼠标移动到下拉菜单 */
.nav > li:has(.dropdown) {
    padding-bottom: 12px;
}

.nav > li > a {
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    position: relative;
}

.nav > li > a::after {
    content: '';
    width: 0;
    height: 2px;
    background: var(--white);
    position: absolute;
    bottom: 0;
    left: 0;
    transition: width 0.3s;
}

.nav > li:hover > a::after {
    width: 100%;
}

.nav > li > a:hover {
    opacity: 0.9;
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: calc(100% + 0px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    max-width: 280px;
    max-height: 500px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out, transform 0.2s ease-out;
    padding: 12px 0 8px 0;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* 右侧菜单的下拉菜单右对齐 */
.nav > li.dropdown-right .dropdown {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(-10px);
}

.nav > li.dropdown-right .dropdown.show {
    transform: translateX(0) translateY(0);
}

/* 自定义滚动条样式 */
.dropdown::-webkit-scrollbar {
    width: 6px;
}

.dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 不可见的连接区域，连接一级菜单和下拉菜单，防止鼠标离开时菜单消失 */
.dropdown::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
    pointer-events: auto;
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--white);
    z-index: 1;
}

.nav > li.dropdown-right .dropdown::before {
    left: auto;
    right: 20px;
    transform: translateX(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s;
}

.dropdown-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding-left: 28px;
}

.dropdown-item:hover::before {
    width: 4px;
}

/* Dropdown Icon */
.dropdown-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--white);
    margin-left: 4px;
    transition: transform 0.3s;
}

.nav > li.show .dropdown-icon {
    transform: rotate(180deg);
}

/* ============================================
   按钮样式
   ============================================ */

.btn-primary {
    background: var(--orange);
    color: var(--white);
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--dark-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 69, 0.4);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

/* ============================================
   Footer 样式
   ============================================ */

.footer {
    background: rgb(30, 41, 59);
    color: var(--white);
    padding: 64px 20px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 32px;
    justify-content: center;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
    font-size: 15px;
}

.footer-nav a:hover {
    opacity: 1;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 24px;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-copyright {
    flex: 1;
    min-width: 300px;
}

.footer-copyright a{
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer-copyright p:last-child {
    margin-bottom: 0;
}

.footer-slogan {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    align-self: center;
}

.footer-qrcodes {
    display: flex;
    gap: 16px;
    flex: 0 0 auto;
}

.qrcode-item {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    padding: 0;
    position: relative;
}

.qrcode-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.qrcode-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qrcode-item.logo-item {
    background: transparent;
    padding: 10px;
}

.qrcode-item.logo-item img {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.qrcode-item.logo-item:hover {
    background: transparent;
}

.qrcode-item:empty::before {
    content: '加载中...';
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

/* ============================================
   CTA Section 样式
   ============================================ */

.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    padding: 64px 20px;
    text-align: center;
}

.cta-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cta-title {
    font-size: 32px;
    color: var(--white);
    margin-bottom: 16px;
    font-weight: 600;
}

.cta-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

/* ============================================
   通用容器和工具类
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.section-subtitle {
    text-align: center;
    color: var(--dark-gray);
    font-size: 16px;
    margin-bottom: 50px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        height: 40px;
    }

    .logo img {
        height: 40px;
        max-width: 180px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .dropdown {
        position: static;
        transform: none;
        margin-top: 8px;
        width: 100%;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .dropdown::before {
        display: none;
    }

    .nav > li:hover .dropdown {
        transform: none;
    }

    .cta-title {
        font-size: 24px;
    }

    .cta-subtitle {
        font-size: 14px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .footer-slogan {
        align-self: flex-start;
    }

    .footer-qrcodes {
        align-self: flex-start;
    }

    .footer-nav {
        gap: 20px;
        padding: 24px 0;
    }
}

/* ============================================
   微信二维码悬浮窗 - WeChat Modal
   ============================================ */

.wechat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.wechat-modal.show {
    opacity: 1;
    visibility: visible;
}

.wechat-modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.wechat-modal.show .wechat-modal-content {
    transform: scale(1) translateY(0);
}

.wechat-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--orange), var(--primary-blue));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.wechat-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.wechat-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.wechat-modal-subtitle {
    font-size: 14px;
    color: var(--dark-gray);
}

.wechat-qrcode-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--gray);
    border-radius: 12px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.wechat-qrcode-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.wechat-qrcode {
    width: 200px;
    height: 200px;
    background: var(--white);
    border-radius: 8px;
    padding: 12px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wechat-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.wechat-modal-tip {
    text-align: center;
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.wechat-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--dark-gray);
    font-size: 20px;
    line-height: 1;
}

.wechat-modal-close:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: rotate(90deg);
}

.wechat-modal-close::before,
.wechat-modal-close::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 16px;
    background: currentColor;
    border-radius: 1px;
}

.wechat-modal-close::before {
    transform: rotate(45deg);
}

.wechat-modal-close::after {
    transform: rotate(-45deg);
}

.wechat-modal-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.wechat-contact-info {
    font-size: 14px;
    color: var(--dark-gray);
    margin-top: 12px;
}

.wechat-contact-info a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.wechat-contact-info a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wechat-modal-content {
        padding: 30px 20px;
        max-width: 90%;
        margin: 20px;
    }

    .wechat-modal-title {
        font-size: 20px;
    }

    .wechat-qrcode {
        width: 180px;
        height: 180px;
    }

    .wechat-modal-close {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
    }
}

