/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* 图片优化 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    loading: lazy;
}

/* 性能优化 */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU加速 */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 页面加载动画 */
body.loaded {
    animation: fadeInPage 0.8s ease-in-out;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动显示动画 */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* 导航栏 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo h1 {
    font-size: 24px;
    color: #003366;
    margin: 0;
    transition: all 0.3s ease;
}

.logo h1:hover {
    transform: scale(1.05);
}

.logo p {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
}

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

.nav ul li {
    position: relative;
}

.nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 5px;
    display: block;
}

.nav ul li a:hover,
.nav ul li a.active {
    color: #003366;
    background-color: rgba(0, 51, 102, 0.1);
}

.mobile-menu {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    transition: transform 0.3s ease;
}

.mobile-menu:hover {
    transform: scale(1.1);
}

/* 移动端导航 */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.4s ease;
        z-index: 999;
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 5px;
    }
    
    .nav ul li a {
        padding: 15px;
        text-align: center;
    }
    
    .mobile-menu {
        display: block;
    }
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: #fff;
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    background-size: 100px 100px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    animation: slideInDown 1s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInUp 1s ease-out 0.3s backwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content .btn {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: #fff;
    color: #003366;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(0, 51, 102, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

/* 链接下划线动画 */
.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #003366;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* 按钮涟漪效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 51, 102, 0.3);
    border-radius: 50%;
    border-top-color: #003366;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 通用部分样式 */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #003366;
    margin-bottom: 10px;
}

.section-title p {
    font-size: 16px;
    color: #666;
}

/* 公司介绍 */
.about-section {
    padding: 100px 0;
    background-color: #fff;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 24px;
    color: #003366;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 业务范围 */
.services-overview {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.service-item:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.2);
}

.service-item:hover::before {
    opacity: 1;
}

.service-item:hover .service-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.service-item:hover h3,
.service-item:hover p {
    color: #fff;
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: #e6f0ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #003366;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.service-item h3 {
    font-size: 20px;
    color: #003366;
    margin-bottom: 15px;
    transition: color 0.4s ease;
    position: relative;
    z-index: 1;
}

.service-item p {
    color: #666;
    line-height: 1.6;
    transition: color 0.4s ease;
    position: relative;
    z-index: 1;
}

/* 核心优势 */
.advantages {
    padding: 100px 0;
    background-color: #fff;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    padding: 30px;
    text-align: center;
}

.advantage-item h3 {
    font-size: 20px;
    color: #003366;
    margin-bottom: 15px;
}

.advantage-item p {
    color: #666;
    line-height: 1.6;
}

/* 客户评价 */
.testimonials {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-item {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author h4 {
    font-size: 16px;
    color: #003366;
    margin-bottom: 5px;
}

.testimonial-author p {
    font-size: 14px;
    color: #666;
    font-style: normal;
    margin: 0;
}

/* 联系我们 */
.contact-section {
    padding: 100px 0;
    background-color: #fff;
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 24px;
    color: #003366;
    margin-right: 20px;
    margin-top: 5px;
}

.contact-item h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.contact-item p {
    color: #666;
    margin: 0;
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ff4444;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group input.success,
.form-group textarea.success {
    border-color: #00cc66;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 表单提交按钮样式 */
.form-submit .btn {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
}

.form-submit .btn:active {
    transform: translateY(0);
}

.form-submit .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 页脚 */
.footer {
    background-color: #003366;
    color: #fff;
    padding: 50px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.footer-logo p {
    font-size: 14px;
    color: #ccc;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #fff;
}

.footer-social h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #fff;
    color: #003366;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero-content h2 {
        font-size: 36px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* 移动端触摸优化 */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    input, textarea {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* 移动端按钮优化 */
    .btn {
        padding: 18px 30px;
        font-size: 16px;
    }
    
    /* 移动端表单优化 */
    .form-group input,
    .form-group textarea {
        padding: 18px;
        font-size: 16px;
    }
    
    /* 移动端服务卡片优化 */
    .service-item {
        padding: 30px 20px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .service-item,
    .testimonial-item {
        padding: 30px;
    }
}