.home-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.gallery {
    position: relative;
    width: 100%;
    height: clamp(300px, 42vw, 420px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-inline: auto;
}

.gallery input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.card {
    position: absolute;
    inset: 0 auto 0 50%;
    width: 62%;
    height: 100%;
    transform: translateX(-50%) scale(0.75);
    opacity: 0.35;
    transition: 0.35s ease;
    cursor: pointer;
    z-index: 1;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

#s1:checked~.cards label:nth-child(1),
#s2:checked~.cards label:nth-child(2),
#s3:checked~.cards label:nth-child(3) {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    z-index: 3;
}

#s1:checked~.cards label:nth-child(3),
#s2:checked~.cards label:nth-child(1),
#s3:checked~.cards label:nth-child(2) {
    transform: translateX(-102%) scale(0.78);
    opacity: 0.6;
    z-index: 2;
}

#s1:checked~.cards label:nth-child(2),
#s2:checked~.cards label:nth-child(3),
#s3:checked~.cards label:nth-child(1) {
    transform: translateX(2%) scale(0.78);
    opacity: 0.6;
    z-index: 2;
}

@media (max-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .gallery {
        height: 320px;
    }

    .card {
        width: 82%;
    }
}
