body {
    background-color: #A5C8E7;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    height: 100%;
}

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.text-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 40%;
    height: 100vh;
    padding: 5%;
    display: flex;
    flex-direction: column;
    justify-content: start;
    z-index: 10;
}

.text-overlay h1 {
    color: #333;
}

.text-overlay p {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.contact-button {
    display: inline-block;
    background-color: #333;
    color: white;
    font-size: 1.1rem;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    align-self: flex-start;
    transition: background-color 0.3s;
}

.contact-button:hover {
    background-color: #555;
}

img {
    width: 1800px;
    display: inline-block;
    vertical-align: bottom;
}

#background-video {
    width: 100%;
    height: auto;
    display: block;
}

.video-layer {
    position: fixed;
    z-index: 0;
    width: 40%;
    top: 5%;
    right: 5%;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.layers {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.layer {
    position: absolute;
    bottom: 0;
    left: 0;
    white-space: nowrap;
    will-change: transform;
    transition: transform 0.05s ease-out;
    font-size: 0; /* This removes whitespace gaps */
}

.layer img {
    display: inline-block;
    vertical-align: bottom; /* Ensures alignment is perfect */
}

.layer1 {
    z-index: 1;
    top: 10%;
}

.layer2 {
    z-index: 2;
    bottom: 0;
}

.layer3 {
    z-index: 3;
    bottom: -50px;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 768px) {
    .text-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 90%;
        height: auto;
        min-height: 40vh;
        font-size: 0.6rem;
        padding: 5%;
    }

    .contact-button {
        font-size: 0.8rem;
    }

    img {
        width: 800px;
    }

    .layer1 {
        top: 50%;
    }

    .video-layer {
        position: fixed;
        top: auto;
        bottom: 16vh;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        transition: none;
    }

    /* For mobile, restore the animation */
    .layer1 {
        animation: bannermove 180s linear infinite;
    }
    
    .layer2 {
        animation: bannermove 90s linear infinite;
    }
    
    .layer3 {
        animation: bannermove 60s linear infinite;
    }
}

@keyframes bannermove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-50%, 0);
    }
}
