/* ANIMATION ENHANCEMENTS - PRESERVING ALL ORIGINAL DYNAMISM */

/* Enhanced animations for pricing cards and elements */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@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);
    }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

/* Animation classes */
.animate-slideInUp {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-glow {
    animation: glow 2s infinite;
}

/* Enhanced card hover effects with preserved animations */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-pricing.featured:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 25px 50px rgba(var(--secondary-500-rgb), 0.3);
}

/* Hover lift effect enhancement */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced button animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::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: left 0.5s;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Enhanced pricing toggle animations */
.billing-toggle {
    position: relative;
}

.billing-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

.billing-option.active {
    color: var(--primary-600);
    font-weight: 600;
    transform: scale(1.05);
}

/* Mini toggle for hero section */
.billing-toggle-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 14px;
}

.billing-option-mini {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    font-weight: 500;
}

.billing-option-mini.active {
    color: white;
    transform: scale(1.05);
}

.save-badge-mini {
    background: var(--success-500);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
    animation: pulse 2s infinite;
}

.toggle-switch-mini {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch-mini input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-mini {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 22px;
}

.toggle-slider-mini:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider-mini {
    background-color: var(--success-500);
}

input:checked + .toggle-slider-mini:before {
    transform: translateX(18px);
}

/* Enhanced feature item animations */
.feature-item {
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 0 -12px;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
}

/* Card feature icon animations */
.card-feature-icon {
    position: relative;
    overflow: hidden;
}

.card-feature-icon i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-feature:hover .card-feature-icon i {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary-600);
}

/* Trust banner animations */
.trust-banner {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    position: relative;
    overflow: hidden;
}

.trust-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.trust-item {
    transition: all 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-2px);
    color: rgba(255, 255, 255, 1);
}

/* Modal animations */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.7) translateY(-50px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Enhanced comparison table animations */
.comparison-table-grid {
    animation: slideInUp 0.5s ease-out;
}

.comparison-table-grid td,
.comparison-table-grid th {
    transition: all 0.2s ease;
}

.comparison-table-grid tr:hover td {
    background: var(--primary-50);
    transform: scale(1.02);
}

/* Enhanced scroll animations */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animations for dynamic content */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced pricing card special effects */
.card-pricing.featured {
    position: relative;
}

.card-pricing.featured::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--secondary-500), var(--secondary-400), var(--secondary-600), var(--secondary-500));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
}

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

/* Responsive animation adjustments */
@media (max-width: 768px) {
    .animate-slideInUp,
    .animate-fadeInUp,
    .animate-slideInLeft,
    .animate-slideInRight {
        animation-duration: 0.4s;
    }
    
    .card-hover:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .hover-lift:hover {
        transform: translateY(-2px);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}