/* animations.css - Animation styles for the website */

/* Flying Animation */
.floating {
    animation: floating 4s ease-in-out infinite;
}

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

/* Button Hover Animation */
.button {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.primary-cta:hover,
.secondary-cta:hover {
    transform: translateY(-3px);
}

.primary-cta:active,
.secondary-cta:active {
    transform: translateY(1px);
}

/* Pattern Option Hover */
.pattern-option {
    transition: transform 0.2s ease-out, border-color 0.2s ease;
}

.pattern-option:hover {
    transform: translateY(-5px);
}

/* Color Option Pulse */
.color-option.selected {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(28, 176, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(28, 176, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(28, 176, 246, 0);
    }
}

/* Feature Card Animation */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* FAQ Question Toggle Animation */
.toggle-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

/* Navigation Link Underline Animation */
.nav-link:not(.cta)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--duolingo-blue);
    transition: width 0.3s ease;
}

.nav-link:not(.cta):hover::after {
    width: 100%;
}

/* Mobile Menu Animation */
.mobile-menu-toggle {
    transition: transform 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] {
    transform: rotate(90deg);
}

.mobile-menu-toggle[aria-expanded="true"] .icon-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .icon-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .icon-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Page Transition Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.main-content {
    animation: fadeIn 0.5s ease-in-out;
}
