.portfolio-filter {
    margin-bottom: 20px;
    text-align: center;
}
.filter-btn {
    margin: 5px;
    padding: 8px 15px;
    background: #eee;
    border: none;
    cursor: pointer;
    color: #8537dd
}
.filter-btn.active,
.filter-btn:hover{
    background: #ac43ca !important;
    color: #fff;
}
.portfolio-grid {
    /*display: grid;*/
    /*gap: 15px;*/
}
.columns-3 .portfolio-grid-container{
    grid-template-columns: repeat(3, 1fr);
    display: grid

}
.columns-4 .portfolio-grid-container{
    grid-template-columns: repeat(4, 1fr);
    display: grid

}
.portfolio-item img {
    width: 100%;
    display: block;
    cursor: pointer;
}
.item_wrapper button.prev-image, .item_wrapper button.next-image {
    display: none !important;
}
/* Popup */
.popup-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.popup-modal img {
    max-width: 90%;
    max-height: 90%;
}
/* Portfolio Grid Layout */
.portfolio-grid-container {
    /*display: grid;*/
    /*grid-template-columns: repeat(3, 1fr);*/
    gap: 20px;
    margin: 20px 0;
}

/* For 4 columns - add this class when using columns="4" in shortcode */
.portfolio-grid-container.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.portfolio-thumbnail {
    position: relative;
    padding-top: 100%; /* Square aspect ratio */
    overflow: hidden;
}

.portfolio-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.zoom-icon {
    color: white;
    font-size: 30px;
    font-weight: bold;
}

.portfolio-popup {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Lightbox styles */
.portfolio-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.portfolio-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    width: 100%;
}

.portfolio-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    
}

.portfolio-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.portfolio-lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.portfolio-lightbox-nav button {
    background: rgba(255,255,255,0.5);
    border: none;
    color: black;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
}
/* Video Lightbox Styles */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: auto;
    max-width: 800px;
    max-height: 70vh;
    align-items: center;
    padding-bottom: 36%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Update the zoom icon for videos */
.portfolio-item.has-video .zoom-icon {
    font-size: 40px;
    line-height: 1;
}
.item_wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    flex-flow: column;
}
.portfolio-overlay a img[draggable="false"] {
    width: 50px !important;
    height: 50px !important;
    margin: 0 auto !important;
    position: static !important;
}

.portfolio-overlay a  span.zoom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 100%;
    height: 100%;
}
/*-------respo---------*/
@media(max-width: 767px){
.columns-4 .portfolio-grid-container{
 grid-template-columns: repeat(2, 1fr);
}

 }