.rotate {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-content: center;
    padding: 5% 0;
    background-color: #000;
    color: #ffffff;
    overflow-x: hidden;
    padding: 0 20%;
}

#viewer {
    width: 450px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease;
    /* Smooth transition for zoom effect */
}

#viewer:hover {
    transform: scale(1.5);
    /* Increase the scale to 1.5x on hover */
}

.viewer-wrapper {
    width: 500px;
    height: 500px;
    overflow: hidden;
    margin-left: 14%;
    /* This contains the zoomed image within the set boundaries */
}


/* Ensure the canvas images are scaled down but maintain aspect ratio */
canvas {
    width: 100%;
    /* Adjust the canvas to fit the viewer */
    height: 100%;
    object-fit: contain;
    /* Scale the image to fit within the box while maintaining aspect ratio */
    margin-right: 200px;
}

.text-content {
    padding: 20px;
    font-size: 1.2rem;
    margin-left: 20%;
    margin-right: 20%;
}

@media (max-width: 2000px) {
    .rotate {
        padding: 0 5%;
    }
}

@media (max-width: 1024px) {
    .rotate {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 0;
    }
    
    .viewer-wrapper {
        margin-left: 0;
    }
}