/* 主要CSS样式 - 分离到独立文件 */

/* 重写一些内联样式，增加更多优化 */

/* ===== 全局头部样式 ===== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 0 0 !important;
    position: fixed;
    width: 100%;
    height: 70px;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

header.scrolled {
    height: 60px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

header.hidden {
    transform: translateY(-100%);
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--white);
}

.logo i {
    color: var(--secondary);
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 22px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 0;
    position: relative;
}

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

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: all 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

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

.cta-button {
    background-color: var(--secondary);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(249, 168, 38, 0.3);
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .header-container {
        padding: 0 15px;
        position: relative;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* 移动端菜单按钮样式 */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 6px;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        width: 46px;
        height: 46px;
        margin-left: 10px;
        transition: all 0.3s ease;
        z-index: 1001;
        position: relative;
    }
    
    .mobile-menu-btn:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: var(--secondary);
        transform: scale(1.05);
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
    .mobile-menu-btn[aria-label*="关闭"] {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: var(--secondary);
        color: var(--secondary);
    }
    
    /* 确保移动端菜单按钮可见 */
    .header-container .mobile-menu-btn {
        display: flex !important;
    }
}

/* 移动端菜单按钮 - 由JavaScript完全控制显示/隐藏 */
.mobile-menu-btn {
    /* 不设置display属性，由JavaScript动态控制 */
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
}

/* 确保PC端显示桌面导航 */
@media (min-width: 769px) {
    .mobile-menu-btn,
    .mobile-menu {
        display: none !important;
    }
    
    .header-container nav > ul {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    /* 移动端菜单按钮样式 */
    .mobile-menu-btn {
        display: flex !important; /* 确保在移动端显示 */
        background: transparent;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 6px;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        width: 46px;
        height: 46px;
        align-items: center;
        justify-content: center;
        margin-left: 10px;
        transition: all 0.3s ease;
        z-index: 1001;
        position: relative;
    }
    
    .mobile-menu-btn:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: var(--secondary);
        transform: scale(1.05);
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
    /* 移动端导航布局调整 */
    .header-container {
        position: relative;
    }
    
    .header-container nav {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 1;
    }
    
    /* 在移动端隐藏桌面导航 */
    .header-container nav > ul {
        display: none !important;
    }
    
    /* 确保移动端菜单按钮只在移动端显示 - 已包含在上面的移动端样式中 */
    
    /* 移动端菜单内容 - 默认隐藏 */
    .mobile-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
        flex-direction: column;
        padding: 10px 0;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu.active {
        display: block;
        transform: translateY(0);
        opacity: 1;
        max-height: 500px;
        animation: slideDown 0.4s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-menu li {
        width: 100%;
        text-align: center;
        margin: 0;
        animation: fadeIn 0.5s ease-out forwards;
        animation-delay: calc(var(--item-index, 0) * 0.1s);
        opacity: 0;
        transform: translateY(10px);
    }
    
    @keyframes fadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-menu li a {
        display: block;
        padding: 18px 25px;
        font-size: 1.15rem;
        font-weight: 500;
        color: white;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .mobile-menu li a:before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.6s ease;
    }
    
    .mobile-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.08);
        color: var(--secondary);
        padding-left: 35px;
    }
    
    .mobile-menu li a:hover:before {
        left: 100%;
    }
    
    .mobile-menu li:last-child a {
        border-bottom: none;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    
    .mobile-menu li:first-child a {
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }
    
    /* 调整CTA按钮位置 - 在移动端显示为菜单项 */
    .header-container > .cta-button {
        display: none;
    }
    
    /* 添加移动端菜单提示 */
    .mobile-menu-btn[aria-label*="关闭"] {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: var(--secondary);
        color: var(--secondary);
    }
}

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

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animated {
    animation: fadeInUp 0.8s ease forwards;
}

/* 加载优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 性能优化 */
.feature-card, .stat-card {
    will-change: transform;
}

/* 表单验证样式 */
.form-control.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* 改进的按钮样式 */
.cta-button:active, .secondary-button:active {
    transform: translateY(-1px);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column .logo {
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--white);
}

.footer-column .logo i {
    color: var(--secondary);
}

.footer-column p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.footer-column h3 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.footer-column ul li {
}

.footer-column ul a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-contact, .contact-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i, .contact-info i {
    color: var(--secondary);
    margin-top: 3px;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
}

.copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 40px 0 25px;
    }
    
    .footer-content {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-column {
        background: rgba(255, 255, 255, 0.03);
        -webkit-border-radius: 12px;
        border-radius: 12px;
        padding: 25px 20px;
        margin: 0 -5px;
    }
    
    .footer-column .logo {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    
    .footer-column h3 {
        position: relative;
        padding-bottom: 12px;
        margin-bottom: 15px;
    }
    
    .footer-column h3::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
        width: 40px;
        height: 2px;
        background: -webkit-gradient(linear, left top, right top, from(transparent), color-stop(var(--secondary)), to(transparent));
        background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    }
    
    .footer-column ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-items: center;
        gap: 10px 16px;
    }
    
    .footer-column ul li {
    }
    
    .footer-contact, .contact-info {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    
    .contact-info {
        padding: 5px 0;
    }
    
    .footer-qrcode {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .footer-qrcode img {
        margin: 0 auto;
        display: block;
    }
}

/* 打印样式 */
@media print {
    header, footer, .cta-section {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
}

/* 提高可访问性 */
a:focus, button:focus, input:focus {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }
    
    .feature-card, .stat-card {
        background-color: #2d2d2d;
        color: #f0f0f0;
    }
    
    .form-control {
        background-color: #333;
        color: #f0f0f0;
        border-color: #555;
    }
    
    .form-control:focus {
        border-color: var(--primary-light);
    }
}

/* 新CTA样式 */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0 30px;
    flex-wrap: wrap;
}

.cta-secondary {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.cta-secondary:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
}

/* 增强CTA按钮效果 */
.cta-secondary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    font-weight: 600;
}

.cta-secondary:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.cta-secondary:hover:before {
    left: 100%;
}

.cta-secondary:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba87e 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.cta-button {
    transition: all 0.3s ease;
    font-weight: 500;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* 增强CTA标题效果 */
.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-section p {
    font-size: 1.3rem; /* 稍微增大字体 */
    line-height: 1.8; /* 增加行高 */
    color: #f5f9ff; /* 更亮的浅蓝色 */
    max-width: 800px;
    margin: 0 auto 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); /* 增强阴影效果 */
    font-weight: 500; /* 增加字体粗细 */
    letter-spacing: 0.5px; /* 轻微字间距 */
}

/* 新CTA图标样式 */
.cta-note {
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.cta-note p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
}

.cta-note i {
    color: var(--secondary);
    margin-right: 8px;
}

.cta-note strong {
    color: var(--secondary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        margin: 30px 0 20px;
    }
    
    .cta-button {
        margin: 0 !important;
        text-align: center;
    }
}

/* ===== 回到顶部按钮样式 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 86, 219, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 86, 219, 0.5);
}