/* Container Base Styles */
.bplan-gallery-container-a402dfec {
    width: 100%;
    display: flex;
    flex-direction: column;
    /* Default padding, overridden by controls if set */
    padding: 20px;
}

.bplan-gallery-container-a402dfec.is-transparent {
    background-color: transparent !important;
}

.bplan-gallery-grid-a402dfec {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Gap is controlled by Elementor widget settings */
}

/* Hide items beyond the 4th on desktop */
.bplan-gallery-item-a402dfec:nth-child(n+5) {
    display: none;
}

.bplan-gallery-item-a402dfec {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #000;
}

.bplan-gallery-item-a402dfec img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.bplan-gallery-overlay-a402dfec {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bplan-zoom-icon-a402dfec {
    color: #D6AD60;
    font-size: 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.bplan-gallery-item-a402dfec:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

.bplan-gallery-item-a402dfec:hover .bplan-gallery-overlay-a402dfec {
    opacity: 1;
}

.bplan-gallery-item-a402dfec:hover .bplan-zoom-icon-a402dfec {
    transform: translateY(0);
}

.bplan-gallery-actions-a402dfec {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Maintain custom glassmorphism styling just for the button */
.bplan-gallery-btn-a402dfec {
    background: rgba(214, 173, 96, 0.1);
    color: #D6AD60;
    border: 1px solid rgba(214, 173, 96, 0.4);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.bplan-gallery-btn-a402dfec:hover {
    background: rgba(214, 173, 96, 0.2);
    border-color: #D6AD60;
    transform: translateY(-2px);
}

/* Lightbox Styles (Glassmorphism) */
.bplan-lightbox-a402dfec {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bplan-lightbox-a402dfec.active {
    opacity: 1;
    pointer-events: all;
}

.bplan-lightbox-content-a402dfec {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    border: 1px solid rgba(214, 173, 96, 0.4);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    padding: 10px;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
}

.bplan-lightbox-content-a402dfec img {
    max-width: 100%;
    max-height: calc(90vh - 20px);
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.bplan-lightbox-close-a402dfec {
    position: absolute;
    top: -40px;
    right: 0;
    color: #D6AD60;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
}

.bplan-lightbox-close-a402dfec:hover {
    color: #fff;
}

.bplan-lightbox-nav-a402dfec {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(214, 173, 96, 0.3);
    color: #D6AD60;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.bplan-lightbox-nav-a402dfec:hover {
    background: rgba(214, 173, 96, 0.2);
    border-color: #D6AD60;
    color: #fff;
}

.bplan-lightbox-prev-a402dfec {
    left: -50px;
}

.bplan-lightbox-next-a402dfec {
    right: -50px;
}

/* Responsive */
@media (max-width: 1023px) {
    .bplan-gallery-grid-a402dfec {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Show 2 items on tablet, hide the rest */
    .bplan-gallery-item-a402dfec:nth-child(n+3) {
        display: none;
    }
    
    .bplan-lightbox-prev-a402dfec { left: 10px; }
    .bplan-lightbox-next-a402dfec { right: 10px; }
}

@media (max-width: 767px) {
    .bplan-gallery-grid-a402dfec {
        grid-template-columns: 1fr;
    }
    
    /* Show 1 item on mobile, hide the rest */
    .bplan-gallery-item-a402dfec:nth-child(n+2) {
        display: none;
    }
}