/**
 * ============================================
 * Glen Infotech - Animations Stylesheet
 * ============================================
 * 
 * Table of Contents:
 * 1. Page Transitions
 * 2. Element Animations
 * 3. Hover Effects
 * 4. Loading Animations
 * 5. Scroll Animations
 */


/* ============================================
   1. PAGE TRANSITIONS
   ============================================ */

/* Fade In on Load */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up on Load */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ============================================
   2. ELEMENT ANIMATIONS
   ============================================ */

/* Apply fade in to sections */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Apply slide up to elements */
.slide-up {
    animation: slideUp 0.6s ease-out;
}

/* Apply slide down to elements */
.slide-down {
    animation: slideDown 0.6s ease-out;
}

/* Apply scale in to elements */
.scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* Delayed animations for staggered effects */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}


/* ============================================
   3. HOVER EFFECTS
   ============================================ */

/* Lift on Hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Glow on Hover */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 112, 67, 0.5);
}

/* Gradient Shift on Hover */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}


/* ============================================
   4. LOADING ANIMATIONS
   ============================================ */

/* Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 112, 67, 0.1);
    border-top-color: #FF7043;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Dots Loading */
@keyframes dotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
    }
    40% {
        opacity: 1;
    }
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF7043;
    margin: 0 4px;
    animation: dotPulse 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}


/* ============================================
   5. SCROLL ANIMATIONS
   ============================================ */

/* Fade In on Scroll */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In from Left on Scroll */
.scroll-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide In from Right on Scroll */
.scroll-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Zoom In on Scroll */
.scroll-zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}


/* ============================================
   SMOOTH SCROLLING
   ============================================ */
html {
    scroll-behavior: smooth;
}


/* ============================================
   TRANSITION UTILITIES
   ============================================ */

/* Smooth transitions for all interactive elements */
button,
a,
input,
select,
textarea {
    transition: all 0.3s ease;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
