.wrap {
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
}

.portfolio {
    text-align: center;
    padding: 40px 0;
}

.gallery-wrap,
#gallery {
    overflow: hidden;
}

#filters {
    margin: 1%;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

#filters li {
    float: left;
}

#filters li span {
    display: block;
    padding: 5px 20px;
    text-decoration: none;
    color: #666;
    cursor: pointer;
    text-transform: uppercase;
    transition: all ease-in-out 0.25s;
}

#filters li:hover span {
    color: #000;
}

#filters li span.active {
    background: #1fbae7;
    color: #fff;
}

.gallery-item {
    float: left;
    width: calc(35.333% - 20px);
    /* height: 200px; */
    /* Mengatur lebar item grid dan mengurangi padding */
    padding: 10px;
    position: relative;
    z-index: 10;
    display: none;
}

.inside {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
}

.details,
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.details {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    transition: all 0.3s ease-in-out;
}

.details h2 {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    margin: 0;
}

.details p {
    color: #fff;
    font-size: 1em;
    letter-spacing: 2px;
    text-align: center;
    margin: 0;
    text-transform: uppercase;
}

.inside img,
.inside iframe,
.inside video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.overlay {
    background: rgba(31, 186, 231, 0.8);
    z-index: 1;
}

.gallery-item:hover .details,
.gallery-item:hover .overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery-item {
        width: calc(50% - 20px);
        /* Menyesuaikan ukuran pada layar lebih kecil */
    }

    .portfolio {
        text-align: center;
        padding: 20px 0;
    }

    .portfolio h1 {
        /* text-align: center; */
        padding: 0 0 20px 0;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: calc(100% - 20px);
        /* Menyesuaikan ukuran pada layar sangat kecil */
    }
}
