.text-overlay {
    position: relative;
    z-index: 2; /* Above the video */
    background: rgba(0, 0, 0, 0.0); /* Black background with 50% transparency */
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
}

/* Animated text style */
.animated-text {
    font-size: 4rem; /* Default size for large screens */
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9); /* White text with slight transparency */
    animation: bounce 2s infinite; /* Applying bounce animation */
}

    /* Paragraph text style */
    .animated-text + p {
        font-size: 1.5rem; /* Default size for large screens */
        animation: fadeIn 3s ease-in-out; /* Applying fade-in animation */
    }

/* Animation keyframes */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Media Query for screens 768px or smaller (e.g., tablets, small desktops) */
@media (max-width: 768px) {
    .animated-text {
        font-size: 2.5rem;
        padding: 0px !important /* Adjust size for tablets */
    }

        .animated-text + p {
            font-size: 1.2rem; /* Adjust size for tablets */
            margin: 0px !important /* Adjust size for tablets */
            /*						color()
*/
        }

    h1 {
        margin: 0px !important /* Adjust size for tablets */
    }
}

/* Media Query for screens 480px or smaller (e.g., smartphones) */
@media (max-width: 480px) {
    .animated-text {
        font-size: 2rem; /* Adjust size for smartphones */
    }

        .animated-text + p {
            font-size: 1rem; /* Adjust size for smartphones */
        }
}
