/**
 * Blog Post & Event Detail Page Animations
 * Professional animations for blog and event detail pages
 */

/* ======================== */
/* Fade In Up Animation     */
/* ======================== */

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================== */
/* Slide In Animation       */
/* ======================== */

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ======================== */
/* Glow Animation           */
/* ======================== */

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(58, 134, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(58, 134, 255, 0.8);
    }
}

/* ======================== */
/* Bounce Animation         */
/* ======================== */

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ======================== */
/* Pulse Animation          */
/* ======================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ======================== */
/* Slide In Up Animation    */
/* ======================== */

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================== */
/* Scale Entrance Animation */
/* ======================== */

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ======================== */
/* Reading Progress Bar     */
/* ======================== */

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.reading-progress-bar {
    animation: progressPulse 3s ease-in-out infinite;
}

/* ======================== */
/* Button Hover Effects     */
/* ======================== */

@keyframes buttonHoverGlow {
    0% {
        box-shadow: 0 4px 15px rgba(58, 134, 255, 0.2);
    }
    100% {
        box-shadow: 0 8px 25px rgba(58, 134, 255, 0.4);
    }
}

/* ======================== */
/* Image Hover Effects      */
/* ======================== */

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

/* ======================== */
/* Underline Animation      */
/* ======================== */

@keyframes underlineGrow {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* ======================== */
/* Text Highlight          */
/* ======================== */

@keyframes highlightBackground {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(58, 134, 255, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

/* ======================== */
/* Smooth Color Transition  */
/* ======================== */

@keyframes colorShift {
    0% {
        color: var(--dark-color);
    }
    50% {
        color: var(--primary-color);
    }
    100% {
        color: var(--dark-color);
    }
}

/* ======================== */
/* Rotation Animation       */
/* ======================== */

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ======================== */
/* Float Animation          */
/* ======================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ======================== */
/* Shimmer Loading Effect   */
/* ======================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ======================== */
/* Icon Pulse              */
/* ======================== */

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Apply icon pulse to event info icons */
.event-info-box li i {
    animation: iconPulse 2s ease-in-out infinite;
}

/* ======================== */
/* Text Reveal Animation    */
/* ======================== */

@keyframes textReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* Apply to post header for dramatic effect */
.post-header h1 {
    animation: textReveal 1s ease-out forwards;
}

/* ======================== */
/* Ripple Effect on Click   */
/* ======================== */

@keyframes ripple {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(4);
    }
}

/* ======================== */
/* Gradient Animation       */
/* ======================== */

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ======================== */
/* Shake Animation          */
/* ======================== */

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* ======================== */
/* Media Queries for Mobile */
/* ======================== */

@media (max-width: 768px) {
    /* Reduce animation duration on mobile for better performance */
    @keyframes fadeInUp {
        0% {
            opacity: 0;
            transform: translateY(20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes slideInUp {
        0% {
            opacity: 0;
            transform: translateY(20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
