/* ============================================================================
   SHIKSHAPATH - ANIMATIONS & TRANSITIONS
   Modern, smooth animations for marketing and user experience
   ============================================================================ */

/* ============================================================================
   1. FADE & VISIBILITY ANIMATIONS
   ============================================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ============================================================================
   2. SCALE & ZOOM ANIMATIONS
   ============================================================================ */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ============================================================================
   3. GLOW & SHADOW ANIMATIONS
   ============================================================================ */

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    }
}

@keyframes shadowPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    }
}

/* ============================================================================
   4. SLIDE ANIMATIONS
   ============================================================================ */

@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 slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

/* ============================================================================
   5. ROTATE & SPIN ANIMATIONS
   ============================================================================ */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(5deg);
    }
}

/* ============================================================================
   6. GRADIENT ANIMATIONS
   ============================================================================ */

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ============================================================================
   7. BOUNCE & ELASTIC ANIMATIONS
   ============================================================================ */

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes elasticBounce {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.95);
    }
}

@keyframes wobble {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ============================================================================
   8. FLIP & TRANSFORM ANIMATIONS
   ============================================================================ */

@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

@keyframes flipOut {
    from {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
    to {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }
}

/* ============================================================================
   9. BUTTON ANIMATIONS
   ============================================================================ */

.btn-animate {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-animate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-animate:active {
    transform: translateY(0);
}

.btn-glow:hover {
    animation: glow 1.5s ease-in-out;
}

.btn-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.btn-bounce:hover {
    animation: bounce 0.6s ease-out;
}

/* ============================================================================
   10. CARD ANIMATIONS
   ============================================================================ */

.card-animate {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animate:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-flip {
    perspective: 1000px;
}

.card-flip:hover {
    animation: flipIn 0.6s ease-out;
}

/* ============================================================================
   11. TEXT ANIMATIONS
   ============================================================================ */

.text-gradient-animate {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

.text-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

.text-typewriter {
    overflow: hidden;
    border-right: 3px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    from, 50% {
        border-color: transparent;
    }
    50% {
        border-color: white;
    }
}

/* ============================================================================
   12. LOADING ANIMATIONS
   ============================================================================ */

.loader {
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

.loader-pulse {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-dots {
    display: flex;
    gap: 5px;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ============================================================================
   13. NAVIGATION ANIMATIONS
   ============================================================================ */

nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.nav-item-stagger {
    animation: slideInRight 0.5s ease-out;
}

.nav-item-stagger:nth-child(2) {
    animation-delay: 0.1s;
}

.nav-item-stagger:nth-child(3) {
    animation-delay: 0.2s;
}

.nav-item-stagger:nth-child(4) {
    animation-delay: 0.3s;
}

.nav-item-stagger:nth-child(5) {
    animation-delay: 0.4s;
}

/* ============================================================================
   14. FORM ANIMATIONS
   ============================================================================ */

.form-input,
.form-textarea,
.form-select {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
}

.form-label {
    transition: color 0.3s ease;
}

.form-input:focus ~ .form-label,
.form-input:valid ~ .form-label {
    color: #3b82f6;
    transform: translateY(-10px);
}

.form-error {
    animation: shake 0.5s ease;
    border-color: #ef4444 !important;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ============================================================================
   15. HOVER EFFECTS
   ============================================================================ */

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-skew {
    transition: transform 0.3s ease;
}

.hover-skew:hover {
    transform: skewX(-5deg);
}

/* ============================================================================
   16. PAGE TRANSITION ANIMATIONS
   ============================================================================ */

.page-enter {
    animation: fadeInUp 0.5s ease-out;
}

.page-exit {
    animation: fadeOut 0.3s ease-out;
}

.section-reveal {
    animation: fadeInUp 0.8s ease-out;
}

/* ============================================================================
   17. PROGRESS ANIMATIONS
   ============================================================================ */

.progress-bar {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-animated {
    animation: shimmer 2s infinite;
}

.progress-ring {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease;
}

/* ============================================================================
   18. MODAL & POPUP ANIMATIONS
   ============================================================================ */

.modal-open {
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close {
    animation: fadeOut 0.2s ease-out;
}

/* ============================================================================
   19. NOTIFICATION ANIMATIONS
   ============================================================================ */

.notification-enter {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-exit {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) reverse;
}

.notification-success {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #10b981;
}

.notification-error {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #ef4444;
}

.notification-warning {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #f59e0b;
}

/* ============================================================================
   20. STAGGER & SEQUENCE ANIMATIONS
   ============================================================================ */

.stagger-item {
    animation: fadeInUp 0.6s ease-out both;
}

.stagger-item:nth-child(1) {
    animation-delay: 0s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.5s;
}

/* ============================================================================
   21. CONTAINER ANIMATIONS
   ============================================================================ */

.container-fade {
    animation: fadeIn 0.8s ease-out;
}

.container-slide {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.container-expand {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================================
   22. UTILITY ANIMATION CLASSES
   ============================================================================ */

.animate-none {
    animation: none !important;
}

.animate-slow {
    animation-duration: 2s;
}

.animate-normal {
    animation-duration: 1s;
}

.animate-fast {
    animation-duration: 0.5s;
}

.transition-fast {
    transition-duration: 0.2s;
}

.transition-normal {
    transition-duration: 0.3s;
}

.transition-slow {
    transition-duration: 0.6s;
}

/* ============================================================================
   23. COURSE CARD ANIMATIONS (SPECIAL)
   ============================================================================ */

.course-card {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.3);
}

.course-card-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.course-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

.course-card-badge {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================================
   24. HERO SECTION ANIMATIONS
   ============================================================================ */

.hero-title {
    animation: fadeInDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta-button {
    animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.hero-background {
    animation: gradientShift 15s ease infinite;
    background-size: 200% 200%;
}

/* ============================================================================
   25. RESPONSIVE ANIMATIONS
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .card-animate:hover {
        transform: translateY(-5px);
    }

    .btn-animate:hover {
        transform: translateY(-1px);
    }

    .nav-item-stagger {
        animation: slideInLeft 0.5s ease-out;
    }
}

/* ============================================================================
   END OF ANIMATIONS
   ============================================================================ */
