/* Animations for Grace Branding App Cost Calculator */

/* General transitions */
.app-type-card,
.platform-icon,
.contact-option,
.btn-continue,
.btn-back,
.step-circle,
.form-check-input,
.app-cost-btn,
.nav-link {
    transition: all 0.3s ease-out;
}

/* Progress tracker animations */
.progress-line {
    position: relative;
    overflow: hidden;
}

.progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: #0099ff;
    transition: width 0.5s ease-out;
}

.step-item:nth-child(1).active ~ .progress-line::after { width: 0%; }
.step-item:nth-child(2).active ~ .progress-line::after { width: 25%; }
.step-item:nth-child(3).active ~ .progress-line::after { width: 50%; }
.step-item:nth-child(4).active ~ .progress-line::after { width: 75%; }
.step-item:nth-child(5).active ~ .progress-line::after { width: 100%; }

/* Step circle animations */
.step-circle {
    transform: scale(1);
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.step-circle.active {
    transform: scale(1.1);
}

/* App type card animations */
.app-type-card {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.app-type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.app-type-card.selected {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,153,255,0.2);
}

.app-type-card .app-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.app-type-card:hover .app-icon {
    transform: scale(1.1);
}

.app-type-card.selected .app-icon {
    transform: scale(1.1);
}

/* Platform icon animations */
.platform-icon {
    transform: scale(1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.platform-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.platform-icon.selected, .platform-icon.active {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,153,255,0.3);
}

/* Button animations */
.btn-continue, .btn-back, .app-cost-btn {
    position: relative;
    overflow: hidden;
}

.btn-continue::after, .btn-back::after, .app-cost-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: 0;
}

.btn-continue:hover::after, .btn-back:hover::after, .app-cost-btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-continue:hover, .app-cost-btn:hover {
    box-shadow: 0 5px 15px rgba(0,153,255,0.3);
}

.btn-back:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-continue i, .btn-back i, .app-cost-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.btn-continue:hover i.fa-arrow-right {
    transform: translateX(3px);
}

.btn-back:hover i.fa-arrow-left {
    transform: translateX(-3px);
}

/* Checkbox animations */
.form-check-input {
    position: relative;
    cursor: pointer;
}

.form-check-input:checked {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Step transition animations */
.step-content {
    opacity: 0;
    transform: translateY(20px);
    transition: none;
}

.step-content.active {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact options animations */
.contact-option {
    transform: translateY(0);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Results page animations */
#step5-3 .circle-check,
#step5-3 .app-icon-container,
#step5-3 .card {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* Ensure platform icons and hour tags are visible by default */
#step5-3 .platform-icon,
#step5-3 .hours-tag {
    opacity: 1;
}

#step5-3 .circle-check {
    animation-delay: 0.1s;
}

#step5-3 .app-icon-container {
    animation-delay: 0.3s;
}

#step5-3 .platform-selection {
    animation-delay: 0.5s;
}

#step5-3 .features-selection {
    animation-delay: 0.7s;
}

#step5-3 .additional-apps {
    animation-delay: 0.9s;
}

#step5-3 .total-hours {
    animation-delay: 1.1s;
}

#step5-3 .grand-cost {
    animation-delay: 1.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chevron animations */
.fa-chevron-down {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Hours tag animations */
.hours-tag {
    transition: all 0.3s ease;
}

.hours-tag.active {
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Feature check animations */
.fa-check-square {
    opacity: 0;
    animation: fadeInCheck 0.3s ease forwards;
}

@keyframes fadeInCheck {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Price tag animation */
.price-tag {
    position: relative;
    display: inline-block;
}

.price-tag::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0099ff;
    transition: width 0.5s ease;
}

.price-tag:hover::after {
    width: 100%;
}

/* Cost card hover effect */
.cost-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cost-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Contact form animations */
.contact-form input,
.contact-form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 0.2rem rgba(0, 153, 255, 0.25);
    animation: focusPulse 1s ease;
}

@keyframes focusPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.4); }
    70% { box-shadow: 0 0 0 0.5rem rgba(0, 153, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 153, 255, 0); }
}
