/* animations.css - CSS cho các hiệu ứng và animations bổ sung */

/* Các hiệu ứng hover */
.btn.primary:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn.secondary:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.1);
}

/* Hiệu ứng xuất hiện khi scroll */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

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

/* Hiệu ứng Pulse cho CTA */
.btn.primary.large {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
    }
}

/* Hiệu ứng shake error */
.error {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border: 2px solid #dc2626 !important;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Form success message */
.form-success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

/* Mobile menu styles */
body.menu-open {
    overflow: hidden;
}

.mobile-menu-toggle {
    position: relative;
    z-index: 999;
}

/* Hiệu ứng hover cho các phần tử */
.feature:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.benefit-item:hover h3 {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

.pricing-plan:nth-child(1):hover {
    border-top: 3px solid var(--primary-color);
}

.pricing-plan:nth-child(3):hover {
    border-top: 3px solid var(--accent-color);
}

/* Hiệu ứng float */
.intro-image img {
    animation: float 6s ease-in-out infinite;
}

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

/* Hiệu ứng background gradient chuyển màu */
#dang-ky {
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

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

/* Hiệu ứng đổ bóng khi hover */
.testimonial-content:hover,
.pricing-plan:hover,
.feature:hover,
.pain-item:hover,
.benefit-item:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* Hiệu ứng loading cho nút gửi form */
@keyframes buttonLoading {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

button:disabled {
    animation: buttonLoading 1s infinite;
}

/* Hiệu ứng ripple khi click nút */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Animation for background shapes */
@keyframes shapesAnimation {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}