/* =========================================
   3 Dog Photography - Animations
   ========================================= */

/* ===== Keyframe Animations ===== */

/* Fade in from bottom */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Bounce (for scroll indicator) */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Ken Burns effect (slow zoom on hero image) */
@keyframes ken-burns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

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

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

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

/* ===== Animation Classes ===== */

/* Fade in up animation */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Animation delays */
.delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

.delay-3 {
    animation-delay: 0.6s;
    animation-fill-mode: backwards;
}

/* ===== Scroll-triggered Animations ===== */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-on-scroll.delay-1 {
    transition-delay: 0.1s;
}

.fade-on-scroll.delay-2 {
    transition-delay: 0.2s;
}

.fade-on-scroll.delay-3 {
    transition-delay: 0.3s;
}

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

/* Image zoom on hover */
.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.5s ease;
}

.hover-zoom:hover img {
    transform: scale(1.1);
}

/* Lift on hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px 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(49, 151, 149, 0.5);
}

/* ===== Loading Animations ===== */

/* Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #319795;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== Page Transition ===== */
.page-transition {
    animation: fadeIn 0.5s ease-in-out;
}

/* ===== Smooth Scrolling Enhancement ===== */
@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: smooth;
    }
}

/* Respect user's motion preferences */
@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;
    }
}
