/* Animations CSS File */

/* Base animation transitions */
.animated {
    transition: all 0.3s ease-in-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Apply animations to elements */
.animated.fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animated.slideUp {
    animation: slideUp 0.6s ease forwards;
}

.animated.slideInLeft {
    animation: slideInLeft 0.6s ease forwards;
}

.animated.slideInRight {
    animation: slideInRight 0.6s ease forwards;
}

.animated.scaleUp {
    animation: scaleUp 0.6s ease forwards;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide up animation */
@keyframes slideUp {
    from {
        transform: translateY(15px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide in from left animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide in from right animation */
@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scale up animation */
@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Subtle pulse animation for buttons */
@keyframes subtlePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

/* Subtle border glow animation */
@keyframes borderGlow {
    0% {
        box-shadow: 0 0 3px rgba(75, 62, 232, 0.2);
    }
    50% {
        box-shadow: 0 0 8px rgba(75, 62, 232, 0.3);
    }
    100% {
        box-shadow: 0 0 3px rgba(75, 62, 232, 0.2);
    }
}

/* Hover animations for cards */
.content-card, .step-card, .resource-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover, .step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
}

/* Hover animations for buttons (enhancing existing styles) */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Hero section - subtle gradient animation */
.hero {
    background: linear-gradient(135deg, rgba(75, 62, 232, 0.85), rgba(12, 17, 137, 0.85));
    background-size: 200% 200%;
    animation: gradientFlow 20s ease infinite; /* Slowed down from 15s to 20s */
}

/* Subtle gradient flow animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Hero CTA button - subtle glow animation */
.btn-hero-cta {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: subtleBorderGlow 5s infinite; /* Slowed down from 4s to 5s */
}

.btn-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Very subtle border glow animation for hero CTA */
@keyframes subtleBorderGlow {
    0% {
        box-shadow: 0 0 2px rgba(75, 62, 232, 0.1);
    }
    50% {
        box-shadow: 0 0 5px rgba(75, 62, 232, 0.2);
    }
    100% {
        box-shadow: 0 0 2px rgba(75, 62, 232, 0.1);
    }
}

/* Accordion header hover effect */
.accordion-header:hover {
    background-color: #d8d4f8;
}

/* Accordion icon rotation */
.accordion-header .accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

/* Step number - subtle animation */
.step-number {
    animation: subtlePulse 4s ease infinite;
}

/* Custom animations for specific elements */
.logo h1 {
    position: relative;
    display: inline-block;
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.logo h1:hover::after {
    width: 100%;
}

/* Header scroll effect */
.site-header {
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.98);
}

/* Active nav link style */
.nav-links a.active {
    color: var(--primary-color);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Button hover effect */
.btn-hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Accessibility considerations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
}
