<script>
export let service = 'Lorem Ipsum';
export let serviceImage = '/default_image.jpg';
export let serviceImageAlt = 'Image';
export let imageOnRight = false;
import ZoomInImage from '$lib/ZoomInImage.svelte'
</script>

<style>
.service{
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-content{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 2em;
}

.image-right{
    flex-direction: column-reverse;
}

.service-text{
    width: 100%;
    font-size: 1.3em;
    color: #bcc0c2;
}

.service-name{
    text-transform: uppercase;
}

h2{
    text-align: center;
    width: 100%;
}

@media (min-width: 900px){

    .service-content{
        flex-direction: row;
        align-items: start;
    }

    .image-right{
        flex-direction: row-reverse;
    }
}

h2{
    font-size: 2em;
}
</style>

<div class="service">
    <div class="service-name">
        <h2>
            {service}
        </h2>
    </div>
    <div class="service-content" class:image-right={imageOnRight}>
        <ZoomInImage serviceImage={serviceImage} serviceImageAlt={serviceImageAlt}>

        </ZoomInImage>
        <div class="service-text">
            <slot />
        </div>
    </div>
</div>