/* Testimonials Section */
.testimonials {
    position: relative;
    padding: 50px 20px;
    text-align: center;
    background: url('picture/online/marina-yalanska-0EC98bHKTJw-unsplash.jpg') no-repeat center center/cover; /* Background image */
    color: #fff; /* Optional: Text color for better contrast */
    z-index:0;
}

.testimonial-container {
    position: relative;
    max-width: 1200px; /* Adjust according to design needs */
    margin: 0 auto;
    z-index: 1; /* Ensure it is above the background image */
}

.testimonial {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.testimonial-left .testimonial-box {
    align-self: flex-start;
    margin-right: auto; /* Align to the left */
}

.testimonial-right .testimonial-box {
    align-self: flex-end;
    margin-left: auto; /* Align to the right */
}

.testimonial-box {
    background: rgba(255, 255, 255, 0.9); /* White background with slight transparency */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 50%; /* About half the width of the background image */
    max-width: 500px; /* Optional: limit the maximum width */
    text-align: left;

    font-style: italic; /* Italicize text */
    z-index: 2; /* Ensure it is above the background image */
}

.testimonial-box p, .testimonial-box h3 {
    color: #000; /* Set a color that contrasts with the box background */
}

/* Define keyframes for sliding out */
@keyframes slideOut {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Add a class for sliding animation */
.testimonial-box {
    animation: slideOut 1s ease-out;
    opacity: 0; /* Start hidden */
    transform: translateX(-100%); /* Start off-screen */
}

.testimonial-box:hover p, .testimonial-box:hover h3, .testimonial-box:hover {
    transform: scale(1.1);
}

/* Class to be added when element is visible */
.testimonial-box.visible {
    opacity: 1;
    transform: translateX(0);
}

.newsletter form {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.newsletter input {
    padding: 10px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.newsletter button {
    padding: 10px 20px;
    border: none;
    background: #2a6ef5;
    color: #fff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter button:hover {
    background: #173d88;
}