* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

section {
    position: relative;
    width: 100%;
    height: 150px;
    background: #44BFBF; /*44BFBF*/
    overflow: hidden;
}

section .wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    /* Necesitarás una imagen de ola similar a la del video */
    background: url('../images/wave.png');
    background-size: 1000px 100px;
}

section .wave.wave1 {
    animation: animate 30s linear infinite;
    z-index: 1000;
    opacity: 1;
    animation-delay: 0s;
    bottom: 0;
}

section .wave.wave2 {
    animation: animate2 15s linear infinite;
    z-index: 999;
    opacity: 0.5;
    animation-delay: -5s;
    bottom: 10px;
}

section .wave.wave3 {
    animation: animate 30s linear infinite;
    z-index: 997;
    opacity: 0.3;
    animation-delay: -2s;
    bottom: 15px;
}

section .wave.wave4 {
    animation: animate2 5s linear infinite;
    z-index: 997;
    opacity: 0.7;
    animation-delay: -5s;
    bottom: 20px;
}

@keyframes animate {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1000px;
    }
}

@keyframes animate2 {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: -1000px;
    }
}

/* Ajustes para dispositivos móviles (pantallas menores a 768px) */
@media (max-width: 768px) {
    section {
        height: 100px; /* Reducimos la altura total del contenedor */
    }

    section .wave {
        height: 40px; /* Reducimos la altura de la ola (era 58px) */
        background-size: 640px 40px; /* Reducimos el ancho a la mitad (era 1280px) */
    }

    /* Ajustamos la animación para que coincida con el nuevo ancho de 640px */
    @keyframes animate {
        0% {
            background-position-x: 0;
        }
        100% {
            background-position-x: 640px; 
        }
    }

    @keyframes animate2 {
        0% {
            background-position-x: 0;
        }
        100% {
            background-position-x: -640px;
        }
    }
    
    /* Opcional: Ajustar la separación entre capas para que no se amontonen */
    section .wave.wave2 { bottom: 3px; }
    section .wave.wave3 { bottom: 6px; }
    section .wave.wave4 { bottom: 8px; }
}

section .wave.wave1 {
    animation-duration: 40s; /* Más lenta en móvil */
}