:root {
    --background-color: white;
    --primary-color: #2f2f93; /* Primary color */
    --contrast-color: rgba(128, 128, 128, 0.16); /* Contrast color */
    --text-color: black;
    --font-family: 'Montserrat', sans-serif;
}

/*----------------------------------------------------------- Text-Left Image-Right Section -----------------------------------------------------------*/
.text-left-image-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
}

.text-left-image-right .text-content {
    flex: 1;
    padding-right: 1.25rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.text-left-image-right .text-content.visible {
    animation: slideInLeft 1s ease-out forwards;
    opacity: 1;
}

.text-left-image-right .text-content.out-of-view {
    animation: slideOutLeft 1s ease-out forwards;
}

.text-left-image-right .image-content {
    flex: 1;
    max-width: 100%;
}

.text-left-image-right img {
    width: 100%;
    height: auto;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

/* Enlarge image on hover */
.text-left-image-right img:hover {
    transform: scale(0.9); /* Slightly increase the scale on hover */
}

/*----------------------------------------------------------- Image-Left Text-Right Section -----------------------------------------------------------*/
.image-left-text-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background-color: var(--contrast-color);
    overflow: hidden;
}

.image-left-text-right .image-content {
    flex: 1;
    padding-right: 1.25rem;
}

.image-left-text-right .text-content {
    flex: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.image-left-text-right .text-content.visible {
    animation: slideInRight 1s ease-out forwards;
    opacity: 1;
}

.image-left-text-right .text-content.out-of-view {
    animation: slideOutRight 1s ease-out forwards;
}

.image-left-text-right img {
    width: 100%;
    height: auto;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

/* Enlarge image on hover */
.image-left-text-right img:hover {
    transform: scale(0.9);
}

/*----------------------------------------------------------- Slideshow container styling -----------------------------------------------------------*/
.slideshow-container {
    position: relative;
    width: 40%; /* Set the width to 80% of the parent container */
    max-width: 40%; /* Ensure the container doesn't exceed 80% */
    overflow: hidden;
    margin: 50px 20px; /* Center the container horizontally */
}

.slideshow-container1,
.slideshow-container2
.slideshow-container3
.slideshow-container4
.slideshow-container5 {
    position: relative;
    width: 40%;
    max-width: 40%;
    overflow: hidden;
    margin: 50px 20px;
}

.slide {
    display: none;
}

.slide1 
.slide2
.slide3
.slide4
.slide5 {
    display: none;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover; /* Ensures image fills container without distortion */
    object-position: center; /* Center the image within the container */
    transition: transform 0.3s ease;
}

.slide.active img {
    transform: scale(1);
} 

/* Fade effect for smoother transitions */
.fade {
    animation: fadeEffect 1.5s;
}

@keyframes fadeEffect {
    from {opacity: 0.4;}
    to {opacity: 1;}
}

/*----------------------------------------------------------- Animation for sliding text -----------------------------------------------------------*/
@keyframes slideInLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutRight {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/*----------------------------------------------------------- Media Queries -----------------------------------------------------------*/
@media (max-width: 768px) {
    .text-left-image-right, .image-left-text-right {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .image-left-text-right .image-content {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-left: 20px;
        margin-bottom: 1rem;
    }

    .text-left-image-right .image-content,
    .image-left-text-right .image-content {
        order: -1;
        margin-bottom: 1rem;
        width: 100%;
    }

    .text-left-image-right .text-content,
    .image-left-text-right .text-content {
        font-size: 1rem; /* Adjust font size */
    }

    .text-left-image-right .image-content img,
    .image-left-text-right .image-content img {
        transform: scale(0.85); /* Scale down images for mobile */
    }

    .text-left-image-right img:hover,
    .image-left-text-right img:hover {
        transform: scale(0.85);
    }
}

@media (max-width: 480px) {
    .text-left-image-right, .image-left-text-right {
        padding: 0.75rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .text-left-image-right .text-content,
    .image-left-text-right .text-content {
        font-size: 0.9rem; /* Slightly smaller font size */
    }

    .text-left-image-right .image-content img,
    .image-left-text-right .image-content img {
        transform: scale(0.75); /* Further reduce image scale */
    }

    .text-left-image-right img:hover,
    .image-left-text-right img:hover {
        transform: scale(0.75); /* Keep consistent scale on hover */
    }
}

@media (max-width: 320px) {
    .text-left-image-right, .image-left-text-right {
        padding: 0.5rem;
    }

    .text-left-image-right .text-content,
    .image-left-text-right .text-content {
        font-size: 0.8rem;
    }

    .text-left-image-right .image-content img,
    .image-left-text-right .image-content img {
        transform: scale(0.6); /* Smallest image scale */
    }

    .text-left-image-right img:hover,
    .image-left-text-right img:hover {
        transform: scale(0.6); /* Consistent hover scale */
    }
}
