/* NexGen Frontend Styles */
.bp-widget-gallery { width: 100%; }

/* Hover Effects */
.bp-gallery-item.bp-hover-zoom:hover .bp-img-container img {
    transform: scale(1.1);
}

.bp-gallery-item.bp-hover-grayscale .bp-img-container img {
    filter: grayscale(100%);
}
.bp-gallery-item.bp-hover-grayscale:hover .bp-img-container img {
    filter: grayscale(0%);
}

.bp-gallery-item.bp-hover-opacity:hover .bp-img-container img {
    opacity: 0.7;
}

/* Meta Grid Styling */
.bp-gallery-meta {
    transition: all 0.3s ease;
}
.bp-gallery-item:hover .bp-gallery-meta {
    background: #f8fafc !important;
}

/* Lightbox Styles */
#bp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 999999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    backdrop-filter: blur(8px);
}

#bp-lightbox img {
    max-width: 85%;
    max-height: 75%;
    object-fit: contain;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    border-radius: 4px;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#bp-lightbox.active img {
    transform: scale(1);
}

.bp-lightbox-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    text-align: center;
    pointer-events: none;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

#bp-lightbox.active .bp-lightbox-meta {
    transform: translateY(0);
    opacity: 1;
}

.bp-lb-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.bp-lb-caption {
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto;
}

#bp-lightbox .close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

#bp-lightbox .close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* NexGen Button Effects */
.bp-btn-primary:hover, .bp-btn-secondary:hover { opacity: 0.9; transform: translateY(-1px); }
.bp-btn-outline:hover { background: #6366f1 !important; color: #fff !important; }
.bp-btn-ghost:hover { background: rgba(99, 102, 241, 0.1) !important; }

/* Carousel Styles */
.bp-carousel-container { position: relative; width: 100%; }
.bp-carousel-track { display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* Read More Hover */
.bp-read-more:hover { opacity: 0.7; }

/* NexGen Testimonial Carousel Scrollbar Hide */
.bp-testimonial-carousel::-webkit-scrollbar { display: none; }

/* Responsive Hiding */
@media (min-width: 1025px) { .bp-hide-desktop { display: none !important; } }
@media (min-width: 768px) and (max-width: 1024px) { .bp-hide-tablet { display: none !important; } }
@media (max-width: 767px) { .bp-hide-mobile { display: none !important; } }

/* Entrance Animations */
.bp-animate { animation-duration: 0.8s; animation-fill-mode: both; }
.fadeInUp { animation-name: fadeInUp; }
.fadeInDown { animation-name: fadeInDown; }
.fadeInLeft { animation-name: fadeInLeft; }
.fadeInRight { animation-name: fadeInRight; }
.zoomIn { animation-name: zoomIn; }
.bounceIn { animation-name: bounceIn; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); }
    0% { opacity: 0; transform: scale3d(.3, .3, .3); }
    20% { transform: scale3d(1.1, 1.1, 1.1); }
    40% { transform: scale3d(.9, .9, .9); }
    60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
    80% { transform: scale3d(.97, .97, .97); }
    to { opacity: 1; transform: scale3d(1, 1, 1); }
}

@keyframes bp-slide-up { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
.bp-slider-track::-webkit-scrollbar { display: none; }

/* Advanced Interactions & Motion Effects */
[data-bp-interaction="1"] {
    transition-property: transform, opacity, filter;
    transition-duration: var(--bp-duration, 600ms);
    transition-timing-function: var(--bp-easing, cubic-bezier(0.25, 0.46, 0.45, 0.94));
    will-change: transform, opacity;
}

/* Base states for effects - only if trigger is NOT hover/click or if we want them to start from a state */
[data-bp-effect="fade"]:not(.bp-interaction-active):not([data-bp-trigger="hover"]):not([data-bp-trigger="click"]) { 
    opacity: 0; 
}
[data-bp-effect="zoom"]:not(.bp-interaction-active):not([data-bp-trigger="hover"]):not([data-bp-trigger="click"]) { 
    opacity: 0; transform: scale(0.85); 
}

/* Slide directionals */
[data-bp-effect="slide"]:not(.bp-interaction-active):not([data-bp-trigger="hover"]):not([data-bp-trigger="click"]) { opacity: 0; }
[data-bp-effect="slide"][data-bp-direction="up"]:not(.bp-interaction-active):not([data-bp-trigger="hover"]):not([data-bp-trigger="click"]) { transform: translateY(40px); }
[data-bp-effect="slide"][data-bp-direction="down"]:not(.bp-interaction-active):not([data-bp-trigger="hover"]):not([data-bp-trigger="click"]) { transform: translateY(-40px); }
[data-bp-effect="slide"][data-bp-direction="left"]:not(.bp-interaction-active):not([data-bp-trigger="hover"]):not([data-bp-trigger="click"]) { transform: translateX(40px); }
[data-bp-effect="slide"][data-bp-direction="right"]:not(.bp-interaction-active):not([data-bp-trigger="hover"]):not([data-bp-trigger="click"]) { transform: translateX(-40px); }

/* Active states (Triggered by JS) */
.bp-interaction-active {
    opacity: 1 !important;
    transform: translate(0,0) scale(1) !important;
}

/* Specific Hover Behaviors (Trigger is hover) */
[data-bp-trigger="hover"][data-bp-effect="zoom"].bp-interaction-active {
    transform: scale(1.08) !important;
}
[data-bp-trigger="hover"][data-bp-effect="fade"].bp-interaction-active {
    opacity: 0.8 !important;
}
[data-bp-trigger="hover"][data-bp-effect="slide"][data-bp-direction="up"].bp-interaction-active { transform: translateY(-10px) !important; }
[data-bp-trigger="hover"][data-bp-effect="slide"][data-bp-direction="down"].bp-interaction-active { transform: translateY(10px) !important; }

/* Responsive Integrity & Performance */
@media (max-width: 767px) {
    [data-bp-interaction="1"] {
        transition-duration: 400ms; /* Faster on mobile */
    }
    [data-bp-effect="slide"]:not(.bp-interaction-active) {
        transform: translateY(20px) !important; /* Smaller offset on mobile to prevent overflow */
    }
}

[data-bp-scrolling_effects="1"], [data-bp-mouse_effects="1"] {
    transition: transform 0.1s linear, opacity 0.2s ease, filter 0.2s ease;
}

.bp-animated {
    visibility: visible !important;
}

/* Form Feedback */
.bp-form-msg {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.5;
    display: none;
    animation: bp-slide-up 0.4s ease;
}

.bp-form-msg.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.bp-form-msg.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (max-width: 767px) {
    .bp-form-msg {
        padding: 12px 16px;
        font-size: 14px;
        margin-top: 15px;
    }
}
