.starpath-image-gallery {
    width: min(100%, 620px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(112px, 8vw, 134px);
    gap: 14px 28px;
}

.starpath-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    background: #f4f4f4;
}

.starpath-gallery-item:nth-child(1) {
    grid-row: span 2;
}

.starpath-gallery-item:nth-child(3) {
    grid-row: span 3;
}

.starpath-gallery-item:nth-child(5) {
    grid-row: span 2;
}

.starpath-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.starpath-gallery-item:hover img {
    transform: scale(1.06);
}

@media (max-width: 767px) {
    .starpath-image-gallery {
        width: 100%;
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .starpath-gallery-item:nth-child(1),
    .starpath-gallery-item:nth-child(3),
    .starpath-gallery-item:nth-child(5) {
        grid-row: auto;
    }

    .starpath-gallery-item img {
        height: auto;
    }
}
