.gallery-header {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 24px;
}

.gallery-header__btn {
    height: 40px;
    padding: 0 16px;
    border: 1px solid #d1d0d5;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    font-family: Ploni, sans-serif;
    background-color: transparent;
    transition: 0.2s ease;
}

.gallery-header__btn.selected,
.gallery-header__btn:hover {
    color: #01af74;
    box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.13);
}

.gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 60px;
}

.gallery-item {
    width: calc(100% / 3 - 20px);
    background: rgba(63, 66, 74, 0);
    padding: 4px;
    border-radius: 4px;
    border: 2px solid #d1d0d5;
    position: relative;
}

.gallery-item__inner {
    padding-top: 75%;
    position: relative;
}

.gallery-item img {
    width: 100%;
    object-fit: cover;
    position: absolute;
    height: 100%;
    top: 0;
}

.gallery-overlay {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.gallery-item.hovered .gallery-overlay {
    opacity: 1;
    visibility: visible;
}

.gallery-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: 0.2s ease;
    cursor: pointer;
}

.gallery-icon:hover {
    background: rgba(0, 0, 0, 0.5);
}

.gallery-info {
    font-size: 14px;
    line-height: 1.2;
    color: #fff;
    font-weight: 500;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    font-family: Ploni, sans-serif;
}



/*modals*/
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

#overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    border-radius: 16px;
    padding: 48px 24px 24px;
    max-width: 90vw;
    width: 100%;
    position: relative;
    max-height: 90dvh;
    overflow-y: auto;
    display: none;
    height: 100%;
    pointer-events: none;
}

.modal.active {
    display: block;
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 24px;
    height: 24px;
    border: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cg clip-path='url(%23clip0_492_9910)'%3E%3Cpath d='M18 6L6 18M6 6L18 18' stroke='%23020202' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_492_9910'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E") no-repeat center;
    cursor: pointer;
    pointer-events: auto;

    display: none;
}

.modal__body {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.modal__body img {
    max-width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
}

.modal__nav {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(30, 30, 30, .6);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    transition: 0.2s ease;
    pointer-events: auto;
}

.modal__nav:hover {
    background-color: rgba(0, 0, 0, .8);
}

.modal__nav svg {
    fill: #fff;
}

.modal__nav--prev {
    left: 0;
}

.modal__nav--next {
    right: 0;
}

@media screen and (max-width: 991px) {
    .gallery-item {
        width: calc(100% / 2 - 15px);
    }
}

@media screen and (max-width: 767px) {
    #overlay {
        padding: 0;
    }

    .modal {
        padding: 0;
        border-radius: 0;
        max-width: 100vw;
        max-height: 100dvh;
    }

    .modal__close {
        z-index: 2;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cg%3E%3Cpath d='M18 6L6 18M6 6L18 18' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E");
    }
}

@media screen and (max-width: 640px) {
    .gallery-item {
        width: 100%;
    }
}