/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

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

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

/* Page Header */
.page-header {
    animation: fadeIn 1s ease-out;
}

.page-header h1 {
    animation: fadeInUp 0.8s ease-out;
}

.page-header p {
    animation: fadeInUp 0.8s ease-out 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Survey Types */
.survey-type-card {
    animation: scaleIn 0.6s ease-out;
    animation-fill-mode: forwards;
    opacity: 0;
    transition: all 0.3s ease;
}

.survey-type-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.survey-type-card .icon {
    transition: all 0.3s ease;
}

.survey-type-card:hover .icon {
    animation: rotateIcon 1s ease-in-out;
    color: var(--fenix-red);
}

/* Survey Tabs */
.nav-tabs .nav-link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out calc(var(--tab-index) * 0.1s);
    opacity: 0;
    animation-fill-mode: forwards;
}

.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--fenix-red);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-tabs .nav-link:hover::after,
.nav-tabs .nav-link.active::after {
    transform: scaleX(1);
}

/* Survey Cards */
.survey-card {
    animation: scaleIn 0.6s ease-out;
    transition: all 0.3s ease;
}

.survey-header {
    animation: fadeInUp 0.6s ease-out;
}

/* Form Elements */
.form-control, .form-select {
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Rating Stars */
.rating-star {
    transition: all 0.3s ease;
}

.rating-star:hover {
    transform: scale(1.2);
}

/* Submit Button */
.btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(221, 38, 41, 0.3);
}

/* Thank You Message */
.thank-you {
    animation: scaleIn 0.6s ease-out;
}

.thank-icon {
    animation: pulseEffect 2s infinite;
}

/* CTA Section */
.cta-section {
    animation: fadeIn 1s ease-out;
}

.cta-content {
    animation: fadeInUp 0.8s ease-out;
}

/* Responsive Animations */
@media (max-width: 768px) {
    .survey-type-card {
        animation-delay: 0.2s;
    }
    
    .nav-tabs .nav-link {
        animation-delay: calc(var(--tab-index) * 0.2s);
    }
}
