/*
* Kylinkin 网站动画样式
* Animations for Kylinkin Website
*/

/* 全局滚动设置 */
html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 80px;
}

.business-card, .solution-card, .team-member, .feature-card {
    scroll-margin-top: 100px;
}

/* 确保所有AOS元素有统一的基础过渡效果 */
[data-aos] {
    transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
    transform-origin: center;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

/* 基础动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shine {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

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

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

/* 应用于具体元素的动画类 */
.fade-in {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.fade-in-down {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-down.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.zoom-in.active {
    opacity: 1;
    transform: scale(1);
}

.float {
    animation: float 3s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

/* 动画延迟类 */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

.delay-600 {
    transition-delay: 0.6s;
}

.delay-700 {
    transition-delay: 0.7s;
}

.delay-800 {
    transition-delay: 0.8s;
}

.delay-900 {
    transition-delay: 0.3s !important;
}

.delay-1000 {
    transition-delay: 1s;
}

/* 交互效果 */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    transition: 0s;
}

.hover-shine:hover::after {
    left: 125%;
    transition: 0.7s ease-in-out;
}

.hover-scale {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* 加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* 3D 效果 */
.tilt-effect {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.tilt-effect:hover {
    transform: rotateX(5deg) rotateY(5deg);
}

/* 按钮动画效果 */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0.5s ease;
    z-index: 1;
}

.btn:hover::after {
    left: 100%;
}

/* 手机版适配 */
@media (max-width: 768px) {
    .fade-in-left, .fade-in-right {
        animation: fadeInUp 0.8s ease forwards;
    }
}

/* 扩展卡片悬停效果 */
.hover-scale {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.hover-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 卡片图像效果 */
.solution-card .solution-image {
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.solution-card:hover .solution-image {
    transform: scale(1.05);
}

.solution-card .solution-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.solution-card:hover .solution-image::after {
    opacity: 1;
}

/* 卡片悬停3D效果 */
.feature-card, .solution-card, .platform-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.feature-card:hover, .solution-card:hover, .platform-card:hover {
    animation: cardPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes cardPop {
    0% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.02) translateY(-5px);
    }
    100% {
        transform: scale(1.05) translateY(-8px);
    }
}

/* 特性标签动画 */
.feature-tag, .feature-bullet {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-tag:hover, .feature-bullet:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.feature-tag::before, .feature-bullet::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0.5s ease;
    z-index: 1;
}

.feature-card:hover .feature-tag::before,
.solution-card:hover .feature-bullet::before,
.feature-tag:hover::before,
.feature-bullet:hover::before {
    left: 100%;
}

/* 卡片图标动画 */
.feature-icon, .solution-icon {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .feature-icon,
.solution-card:hover .solution-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i, .solution-icon i {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .feature-icon i,
.solution-card:hover .solution-icon i {
    transform: rotate(-5deg);
}

/* 卡片入场动画 */
.feature-card, .solution-card, .platform-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card.visible, .solution-card.visible, .platform-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 统一特性标签样式 */
.feature-tag, .feature-bullet {
    display: inline-block;
    background-color: rgba(37, 99, 235, 0.06);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin: 4px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.feature-tag:hover, .feature-bullet:hover {
    background-color: rgba(37, 99, 235, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-tags, .solution-features {
    display: flex;
    flex-wrap: wrap;
    margin: 10px -4px;
    justify-content: center;
}

/* 解决方案卡片布局 */
.solution-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.solution-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 25px;
}

.solution-content p {
    margin-bottom: 15px;
    flex-grow: 0;
}

.solution-features {
    margin-bottom: 20px;
}

.solution-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* 增强按钮样式 */
.btn.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn.btn-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transition: left 0.6s ease;
}

.btn.btn-primary:hover::after {
    left: 100%;
}

/* Logo动画效果 */
.logo {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0.7s ease;
    z-index: 1;
}

.logo:hover::before {
    left: 100%;
}

.logo img {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* 技术规格部分动画优化 */
.tech-specs {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tech-specs.active {
    opacity: 1;
    transform: translateY(0);
}

.tech-specs .spec-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tech-specs .spec-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* 确保首次加载时立即显示动画 */
.tech-specs.loaded {
    opacity: 1;
}

/* 修改延迟动画类，加快显示速度 */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* 添加高性能动画属性 */
.fade-in-up, .hover-lift {
    will-change: opacity, transform;
    backface-visibility: hidden;
}

/* 联系我们部分动画效果 */
.contact .info-item {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border-radius: 12px;
    overflow: hidden;
}

.contact .info-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact .info-item i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact .info-item:hover i {
    transform: scale(1.2);
    color: var(--primary-color);
}

.contact .visual-item {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border-radius: 12px;
    overflow: hidden;
}

.contact .visual-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact .image-wrapper {
    overflow: hidden;
    border-radius: 8px;
}

.contact .image-wrapper img {
    transition: transform 0.5s ease;
}

.contact .image-wrapper:hover img {
    transform: scale(1.05);
}

.contact .map-overlay {
    transition: opacity 0.3s ease;
}

.contact .static-map:hover .map-overlay {
    opacity: 1;
    background-color: rgba(94, 44, 44, 0.7);
}

/* 页脚动画效果 */
.footer-col {
    transition: transform 0.3s ease;
}

.footer-col:hover {
    transform: translateY(-5px);
}

.footer-col a {
    position: relative;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-col a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
    transition: transform 0.3s ease;
    opacity: 0;
}

.footer-col a:hover {
    color: var(--primary-color);
    padding-left: 12px;
}

.footer-col a:hover::before {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* 价格表动画效果 */
.pricing-column {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
    z-index: 1;
}

.pricing-column:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.pricing-column .pricing-header {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pricing-column:hover .pricing-header {
    background-color: var(--primary-color);
    color: white;
}

.pricing-column:hover .pricing-header h3,
.pricing-column:hover .pricing-header .amount,
.pricing-column:hover .pricing-header .period {
    color: white;
    transform: scale(1.05);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.pricing-column .price {
    transition: transform 0.3s ease;
}

.pricing-column:hover .price {
    transform: translateY(-5px);
}

.pricing-column .amount {
    transition: all 0.3s ease;
    display: inline-block;
}

.pricing-column:hover .amount {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

.pricing-column .feature-item {
    transition: all 0.3s ease;
}

.pricing-column:hover .feature-item {
    background-color: rgba(94, 44, 44, 0.05);
}

.pricing-column:hover .feature-value {
    color: var(--primary-color);
    font-weight: 600;
}

/* 价格卡片特性项悬停效果 */
.pricing-column .feature-item {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.pricing-column .feature-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(94, 44, 44, 0.05);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.pricing-column .feature-item:hover::after {
    transform: translateX(0);
}

.pricing-column .feature-value {
    position: relative;
    transition: all 0.3s ease;
}

.pricing-column .feature-item:hover .feature-value {
    transform: scale(1.1);
    color: var(--primary-color);
}

/* 价格卡片特殊动画效果 */
@keyframes priceHighlight {
    0% {
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
        transform: translateY(0) scale(1);
    }
    50% {
        box-shadow: 0 25px 50px rgba(94, 44, 44, 0.2);
        transform: translateY(-20px) scale(1.05);
    }
    100% {
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
        transform: translateY(0) scale(1);
    }
}

/* 价格数字跳动动画 */
@keyframes priceJump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 突出显示企业版 */
.pricing-section .pricing-column:nth-child(4) {
    animation: priceHighlight 5s infinite alternate;
    animation-play-state: paused;
}

/* 企业版卡片hover状态 */
.pricing-section .pricing-column:nth-child(4):hover {
    animation-play-state: running;
    box-shadow: 0 20px 40px rgba(94, 44, 44, 0.2);
}

/* 为所有价格卡片设置统一的动画效果，确保同步显示 */
.pricing-section .pricing-column {
    transition-delay: 50ms !important;
}

.pricing-section .pricing-column .pricing-header,
.pricing-section .pricing-column .price,
.pricing-section .pricing-column .pricing-features,
.pricing-section .pricing-column .pricing-action {
    transition-delay: 50ms !important;
}

/* 价格数字动画 */
.pricing-section .pricing-column:hover .amount {
    animation: priceJump 1s infinite;
    color: white;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

/* 模态框过渡动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.modal.open {
    animation: modalFadeIn 0.3s ease forwards;
}

.modal.open .modal-content {
    animation: modalContentSlideIn 0.4s ease-out forwards;
}

/* 为模态框内部元素添加交错动画 */
.modal.open .policy-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.modal.open .policy-section:nth-child(1) { animation-delay: 0.1s; }
.modal.open .policy-section:nth-child(2) { animation-delay: 0.15s; }
.modal.open .policy-section:nth-child(3) { animation-delay: 0.2s; }
.modal.open .policy-section:nth-child(4) { animation-delay: 0.25s; }
.modal.open .policy-section:nth-child(5) { animation-delay: 0.3s; }
.modal.open .policy-section:nth-child(6) { animation-delay: 0.35s; }
.modal.open .policy-section:nth-child(7) { animation-delay: 0.4s; }
.modal.open .policy-section:nth-child(8) { animation-delay: 0.45s; }
.modal.open .policy-section:nth-child(9) { animation-delay: 0.5s; }