.gallery-2 {
    padding: 64px 0;
}

.gallery-2 .boxes-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.gallery-2 .gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    gap: 8px;
}

.gallery-2 .gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-2 .gallery-item:nth-child(2) {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-2 .gallery-item:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-2 .gallery-item:nth-child(4) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-2 .gallery-item:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-2 .gallery-item:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-2 .gallery-item {
    position: relative;
}

.gallery-2 .gallery-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    opacity: 0.3;
    transition: opacity .3s ease;
}

.gallery-2 .gallery-item span {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transition: opacity .3s ease;
    opacity: 1;

    padding: 8px 16px;
    color: #FFF;
    text-align: center;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.00);
    font-family: Ysabeau;
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-2 .gallery-item:hover::before {
    opacity: 0;
}

.gallery-2 .gallery-item:hover span {
    opacity: 0;
}

.gallery-2 .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    display: block;
}

@media (max-width:1440px) {
    .gallery-2 .gallery-item span {
        font-size: 36px;
    }
}

@media (max-width:1199px) {
    .gallery-2 .gallery-item span {
        font-size: 28px;
    }
}

@media (max-width:991px) {
    .gallery-2 {
        padding: 32px 0;
    }

    .gallery-2 .gallery-item span {
        font-size: 20px;
    }

    .gallery-2 .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 200;
    }

    .gallery-2 .gallery-item {
        grid-column: span 2 !important;
        grid-row: span 1 !important;
    }
}