.detail-gallery {
    max-width: 1250px;
    margin: 38px auto 0;
    padding: 0 40px;
}

.detail-gallery__head {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.detail-gallery__head h2 {
    margin: 0;
    font-size: clamp(44px, 5.2vw, 72px);
}

.detail-gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
}

.detail-gallery__item {
    grid-column: span 4;
    height: 250px;
    overflow: hidden;
}

.detail-gallery__item:nth-child(5n + 1) {
    grid-column: span 6;
    height: 360px;
}

.detail-gallery__item:nth-child(5n + 2) {
    grid-column: span 6;
    height: 360px;
}

.detail-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .detail-gallery {
        padding: 0 20px;
        margin-top: 24px;
    }

    .detail-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .detail-gallery__item,
    .detail-gallery__item:nth-child(5n + 1),
    .detail-gallery__item:nth-child(5n + 2) {
        grid-column: span 1;
        height: 230px;
    }
}

@media (max-width: 640px) {
    .detail-gallery__grid {
        grid-template-columns: 1fr;
    }

    .detail-gallery__item,
    .detail-gallery__item:nth-child(5n + 1),
    .detail-gallery__item:nth-child(5n + 2) {
        grid-column: auto;
        height: 220px;
    }
}
