.vc-betheme-portfolio {
    margin: 0 auto;
    max-width: 1200px;
}

.vc-portfolio-section-title {
    font-size: 24px;
    margin: 20px 0;
    text-align: center;
}

/* --- New Filter Styles --- */
.vc-portfolio-filters {
    text-align: center;
    margin-bottom: 20px;
}

.vc-portfolio-filters .vc-filter-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 15px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.vc-portfolio-filters .vc-filter-button:hover,
.vc-portfolio-filters .vc-filter-button.active {
    background-color: #0073aa; /* WordPress primary blue */
    color: #fff;
    border-color: #0073aa;
}
/* --- End New Filter Styles --- */


.vc-portfolio-image-grid {
    display: grid;
    grid-gap: 20px;
    margin-bottom: 30px;
}

.vc-portfolio-cols-2 { grid-template-columns: repeat(2, 1fr); }
.vc-portfolio-cols-3 { grid-template-columns: repeat(3, 1fr); }
.vc-portfolio-cols-4 { grid-template-columns: repeat(4, 1fr); }
.vc-portfolio-cols-5 { grid-template-columns: repeat(5, 1fr); }
.vc-portfolio-cols-6 { grid-template-columns: repeat(6, 1fr); }

.vc-portfolio-item {
    position: relative;
    overflow: hidden;
    /* Added for filter transition */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, height 0.3s ease-in-out, margin 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.vc-portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none; /* Make item non-interactive when hidden */
    height: 0; /* Collapse height for hidden items */
    margin: 0 !important; /* Remove margin for hidden items */
    padding: 0 !important; /* Remove padding for hidden items */
}


.vc-portfolio-item-title {
    font-size: 18px;
    margin: 10px 0;
    text-align: center;
}

.vc-portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.vc-portfolio-item:hover img {
    transform: scale(1.05);
}

.vc-portfolio-gallery {
    display: grid;
    margin: 10px 0;
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    gap: 10px;
}

.vc-portfolio-gallery[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.vc-portfolio-gallery[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.vc-portfolio-gallery[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.vc-portfolio-gallery[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.vc-portfolio-gallery[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }

.vc-portfolio-gallery-item {
    display: flex;
    padding: 5px;
    border: 1px solid #eee;
    background: #fff;
    justify-content: center;
    align-items: center;
}

.vc-portfolio-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.vc-portfolio-gallery-item:hover img {
    transform: scale(1.05);
}

.vc-no-items {
    text-align: center;
    padding: 20px;
    color: #666;
}

.vc-error {
    text-align: center;
    padding: 20px;
    color: #d00;
}

/* Lightbox Styles */
.vc-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.vc-lightbox.active {
    display: flex;
}

.vc-lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    margin: auto;
}

.vc-lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 10px;
    padding: 0 20px;
}

.vc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    font-weight: bold;
    z-index: 1001;
}

.vc-lightbox-prev,
.vc-lightbox-next {
    position: absolute;
    color: white;
    font-size: 40px;
    cursor: pointer;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    user-select: none;
}

.vc-lightbox-prev {
    left: 20px;
}

.vc-lightbox-next {
    right: 20px;
}