/* 
 * Belle Reve Animation Styles
 * CSS for scroll-based animations
 */

/* Base styles for animation-ready elements */
.animate-ready {
    visibility: hidden;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Animation when element enters viewport */
.animate-in {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animation when element leaves viewport */
.animate-out {
    visibility: visible;
    opacity: 0;
    transform: translateY(100px) scale(0.95);
}

/* Individual element animations within sections */
.animate-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: 0s; /* Will be overridden in JS with staggered delays */
}

/* When parent has animate-in, animate child elements */
.animate-in .animate-element {
    opacity: 1;
    transform: translateY(0);
}

/* When parent has animate-out, animate child elements out */
.animate-out .animate-element {
    opacity: 0;
    transform: translateY(30px);
}

/* Special animation for service cards */
.service-card {
    transition: all 0.4s ease-in-out;
}

.animate-in .service-card {
    transform: translateY(0) scale(1);
}

.animate-out .service-card {
    transform: translateY(50px) scale(0.9);
}

/* Animation for testimonials */
.nonloop-block-13 .item {
    transition: all 0.6s ease-in-out;
}

.animate-in .nonloop-block-13 .item {
    transform: translateX(0);
    opacity: 1;
}

.animate-out .nonloop-block-13 .item {
    transform: translateX(-50px);
    opacity: 0;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 40px;
    left: 40px; /* Positioned on the left to not overlap with WhatsApp button */
    width: 50px;
    height: 50px;
    background-color: #3395ff;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    line-height: 50px;
    box-shadow: 2px 2px 3px #999;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #2980b9;
    color: #fff;
    cursor: pointer;
}

/* Animation for hero slider */
.slide-one-item .site-blocks-cover {
    transition: transform 0.7s ease-out, opacity 0.7s ease-out;
}

.animate-out .slide-one-item .site-blocks-cover {
    transform: scale(0.95);
    opacity: 0;
}

.animate-in .slide-one-item .site-blocks-cover {
    transform: scale(1);
    opacity: 1;
}

/* Animation for About section */
.site-section .overlap-left {
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.animate-out .site-section .overlap-left {
    transform: translateX(50px);
    opacity: 0;
}

.animate-in .site-section .overlap-left {
    transform: translateX(0);
    opacity: 1;
}

/* Animation for images */
.site-section img {
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.animate-out .site-section img {
    transform: translateX(-50px);
    opacity: 0;
}

.animate-in .site-section img {
    transform: translateX(0);
    opacity: 1;
}

/* Animation for Popular Destinations */
.unit-1 {
    overflow: hidden;
    transition: transform 0.5s ease;
}

.animate-in .unit-1 {
    transform: translateY(0);
}

.animate-out .unit-1 {
    transform: translateY(30px);
}

.unit-1 img {
    transition: transform 0.5s ease;
}

.unit-1:hover img {
    transform: scale(1.1);
}

/* Custom animations for header text elements */
.animate-in h1, .animate-in h2, .animate-in h3 {
    animation: fadeInDown 0.8s forwards;
}

.animate-in p {
    animation: fadeInUp 0.8s forwards;
}

.animate-in .btn {
    animation: fadeInUp 1s forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
