.gallery-wrap {
    padding: 16px;
    background: #fff;
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 10px;
}

.gallery-grid.collapsed .thumb.is-hiding {
    opacity: 0;
    transform: scale(0.95);
}

.gallery-grid.collapsed .thumb.is-hidden {
    display: none;
}

.gallery-grid .thumb {
    position: relative;
    padding-top: 66%;
    overflow: hidden;
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
    transition: opacity 200ms ease, transform 200ms ease;
}

.gallery-grid .thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.gallery-grid .thumb:hover img {
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns:repeat(2, 1fr);
    }
}


.show-images-btn {
    background: transparent;
    border: 0;
    padding: 0;
    color: #45b8e8;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.4;
    cursor: pointer;
    text-align: center;
}

.gallery-grid:not(.collapsed) .show-images-btn {
    display: none;
}

.show-images-btn:hover,
.show-images-btn:focus {
    color: #467F8E;
    outline: none;
}

.show-images-icon {
    display: block;
    width: 34px;
    height: 24px;
    margin: 0 auto 8px;
}

.show-images-text {
    display: block;
}

/*gallery modal*/
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    padding: 30px;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

.image-modal.is-open {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.image-modal-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.image-modal-info {
    position: absolute;
    bottom: 5px;
    right: 5px;

    background: rgba(0, 0, 0, 0.75);
    color: #fff;

    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.4;

    z-index: 2;
}

.image-modal-title {
    font-weight: 600;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
}


