.image-container {
	    /* Scoped CSS variables for spacing */
    --gap-x: 10px;
    --gap-y: 10px;
    overflow: hidden;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

@media (min-width: 993px) {
    .image-container {
        max-width: 1280px;
        height: 720px; /* Adjust height as needed */	
    }

.image {
    position: absolute;
    width: calc(50% - var(--gap-x)); /* Responsive width */
    height: auto;
    max-width: none; /* Remove fixed limit */
}

    .image:nth-child(1) { z-index: 4; }
    .image:nth-child(2) { z-index: 3; }
    .image:nth-child(3) { z-index: 2; }
    .image:nth-child(4) { z-index: 1; }

    .image-container.expanded .image:nth-child(1) {
        animation: expand1 1.8s forwards;
    }

    .image-container.expanded .image:nth-child(2) {
        animation: expand2 1.8s forwards;
    }

    .image-container.expanded .image:nth-child(3) {
        animation: expand3 1.8s forwards;
    }

    .image-container.expanded .image:nth-child(4) {
        animation: expand4 1.8s forwards;
    }

    @keyframes expand1 {
        to {
            transform: translate(calc(-50% - var(--gap-x) / 2), calc(-50% - var(--gap-y) / 2));
        }
    }

    @keyframes expand2 {
        to {
            transform: translate(calc(50% + var(--gap-x) / 2), calc(-50% - var(--gap-y) / 2));
        }
    }

    @keyframes expand3 {
        to {
            transform: translate(calc(-50% - var(--gap-x) / 2), calc(50% + var(--gap-y) / 2));
        }
    }

    @keyframes expand4 {
        to {
            transform: translate(calc(50% + var(--gap-x) / 2), calc(50% + var(--gap-y) / 2));
        }
    }
}

@media (max-width: 992px) {
    .image-container {
        height: auto;
    }

    .image {
        position: relative;
        width: 100%;
        max-width: none;
		margin-bottom:10px;
    }
}
