/* Animations and Transitions */

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Slide In 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 slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Envelope Opening Animation */
@keyframes envelopeFlapOpen {
    0% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(-130deg);
    }
}

@keyframes sealLift {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -80%) scale(0.85);
        opacity: 0.2;
    }
}

.envelope-opening .envelope-flap {
    transform-origin: top center;
    animation: envelopeFlapOpen 1.2s ease forwards;
}

.envelope-opening .wax-seal {
    animation: sealLift 1.1s ease forwards;
}

@keyframes pageFlapOpen {
    0% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(-145deg);
    }
}

@keyframes pageSealFade {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -80%) scale(0.8);
        opacity: 0;
    }
}

@keyframes pageEnvelopeShift {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(30px) scale(0.98);
        opacity: 0.9;
    }
}

@keyframes pageContentReveal {
    0% {
        opacity: 0;
        transform: translateY(140px);
        clip-path: inset(35% 0 0 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0);
    }
}

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

/* Fade In Delay Classes */
.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}

.fade-in-delay-3 {
    animation-delay: 0.6s;
}

.fade-in-delay-4 {
    animation-delay: 0.8s;
}

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

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Smooth Transitions */
.smooth-transition {
    transition: all 0.3s ease;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in-fast {
    animation: fadeIn 0.5s ease;
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glowing Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(93, 98, 78, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(93, 98, 78, 0.8);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}
