/* Creative Wave Reveal Animation for Homepage Hero */

/* Base container for the video cover */
.wp-block-cover.hero-video {
    position: relative;
    overflow: hidden;
}

/* Wave animation overlay container */
.wave-reveal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Create a series of wave layers with different timings and depths */
.wave-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* First wave - moves from right to left */
.wave-layer-1 {
    clip-path: polygon(
        100% 0%,
        100% 100%,
        0% 100%,
        0% 0%
    );
    animation: waveReveal1 3.5s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
    background: linear-gradient(135deg, rgba(0, 37, 77, 0.95) 0%, rgba(0, 62, 122, 0.9) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Second wave - different timing and angle */
.wave-layer-2 {
    clip-path: polygon(
        100% 0%,
        100% 100%,
        0% 100%,
        0% 0%
    );
    animation: waveReveal2 3s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
    animation-delay: 0.2s;
    background: linear-gradient(135deg, rgba(0, 28, 64, 0.92) 0%, rgba(0, 50, 99, 0.85) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Third wave - adds depth */
.wave-layer-3 {
    clip-path: polygon(
        100% 0%,
        100% 100%,
        0% 100%,
        0% 0%
    );
    animation: waveReveal3 2.5s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
    animation-delay: 0.4s;
    background: linear-gradient(135deg, rgba(0, 21, 53, 0.9) 0%, rgba(0, 37, 82, 0.8) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Wave reveal animations */
@keyframes waveReveal1 {
    0% {
        clip-path: polygon(
            100% 0%,
            100% 100%,
            0% 100%,
            0% 0%
        );
    }
    100% {
        clip-path: polygon(
            100% 0%,
            100% 100%,
            100% 100%,
            100% 0%
        );
    }
}

@keyframes waveReveal2 {
    0% {
        clip-path: polygon(
            100% 0%,
            100% 100%,
            0% 100%,
            0% 0%
        );
    }
    100% {
        clip-path: polygon(
            100% 0%,
            100% 100%,
            calc(100% + 300px) 100%,
            calc(100% + 300px) 0%
        );
    }
}

@keyframes waveReveal3 {
    0% {
        clip-path: polygon(
            100% 0%,
            100% 100%,
            0% 100%,
            0% 0%
        );
    }
    100% {
        clip-path: polygon(
            100% 0%,
            100% 100%,
            calc(100% + 500px) 100%,
            calc(100% + 500px) 0%
        );
    }
}

/* Ensure the lottie animation container remains hidden until waves complete */
.wp-block-cover.hero-video .lottie-animation-container {
    opacity: 0;
    z-index: 6;
    position: relative;
    animation: fadeInLottie 1s ease-out forwards;
    animation-delay: 3.8s; /* Increased delay to ensure waves are completely gone */
}

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

/* Add a gradient overlay to ensure smooth transition at the bottom on mobile */
.gradient-bottom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 4; /* Below wave layers but above video */
    pointer-events: none;
}

/* Glass reflection removed as requested */

/* Enhance wave decoration effect to be more glass-like without dots */
.wave-decoration {
    display: none; /* Completely removed */
}

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

/* Ensure video is visible */
.wp-block-cover.hero-video video.wp-block-cover__video-background {
    z-index: 1;
    opacity: 1 !important;
}

/* SVG filter for turbulence effect */
.wave-svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}