/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 公司名称打字机效果 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #2c8a6b }
}

@keyframes scale-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 公司名称动画应用 */
.company-full-name {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: 
        typing 3.5s steps(30, end),
        blink-caret .75s step-end infinite,
        scale-in 1s ease-out;
    border-right: 3px solid #2c8a6b;
    box-sizing: border-box;
    animation-fill-mode: forwards;
    text-align: center;
}

/* 响应式动画调整 */
@media (max-width: 768px) {
    .company-full-name {
        white-space: normal;
        animation: scale-in 1.5s ease-out;
        border-right: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 为各个部分添加动画类 */
.section-header.animate h2 {
    animation: fadeInUp 1s ease forwards;
}

.section-header.animate .divider {
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.about-text.animate h3,
.about-text.animate p {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.value-item.animate,
.service-card.animate,
.team-member.animate,
.contact-item.animate {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* 为不同元素设置不同的动画延迟 */
.value-item:nth-child(1).animate,
.service-card:nth-child(1).animate,
.team-member:nth-child(1).animate,
.contact-item:nth-child(1).animate {
    animation-delay: 0.1s;
}

.value-item:nth-child(2).animate,
.service-card:nth-child(2).animate,
.team-member:nth-child(2).animate,
.contact-item:nth-child(2).animate {
    animation-delay: 0.2s;
}

.value-item:nth-child(3).animate,
.service-card:nth-child(3).animate,
.team-member:nth-child(3).animate,
.contact-item:nth-child(3).animate {
    animation-delay: 0.3s;
}

.value-item:nth-child(4).animate,
.service-card:nth-child(4).animate,
.team-member:nth-child(4).animate,
.contact-item:nth-child(4).animate {
    animation-delay: 0.4s;
}

.value-item:nth-child(5).animate,
.service-card:nth-child(5).animate {
    animation-delay: 0.5s;
}

.value-item:nth-child(6).animate,
.service-card:nth-child(6).animate {
    animation-delay: 0.6s;
}

/* 图标动画效果 */
.value-icon i,
.service-icon i,
.member-photo i,
.contact-icon i {
    transition: all 0.3s ease;
}

.value-item:hover .value-icon i,
.service-card:hover .service-icon i {
    animation: pulse 1s infinite;
    color: #236e55;
}

.team-member:hover .member-photo i,
.contact-item:hover .contact-icon i {
    transform: scale(1.1);
    color: #236e55;
}

/* 响应式动画调整 */
@media (max-width: 768px) {
    .value-item.animate,
    .service-card.animate,
    .team-member.animate,
    .contact-item.animate {
        animation-name: fadeIn;
    }
}