/**
 * Business Products Slider Styles - Swiper Compatible
 */

/* Swiper Base Styles */
.swiper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    touch-action: pan-y; /* Allow vertical scrolling but enable horizontal swipe */
}

/* Slider Container */
.bu-products-slider-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto;
    /* padding: 40px 0; Increased padding top and bottom */
}

/* Slider */
.bu-products-slider {
    position: relative;
    width: 100%;
    /* Use the same background color as your content or a matching color */
    background-color: #0046be; /* Using the blue background to prevent white flash */
    height: 650px; /* Increased height */
    overflow: hidden; /* Prevent content from spilling */
}

/* Slide */
.bu-product-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Slide Inner Layout */
.bu-product-slide-inner {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Product Images */
.bu-product-image-left,
.bu-product-image-right {
    flex: 0 0 33.333%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bu-product-image-left {
    background-color: #d8dce1; /* Light green background like in the design */
}

.bu-product-image-right {
    background-color: #d8dce1; /* Light green background like in the design */
}

.bu-product-image-left img,
.bu-product-image-right img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 50%; /* Reduced from 90% to 70% */
    max-width: 50%; /* Reduced from 90% to 70% */
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Product Content */
.bu-product-content {
    flex: 0 0 33.333%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background-color: #0046be; /* Blue background */
    color: #ffffff;
    overflow-y: auto;
    max-height: 100%;
    position: relative;
}

/* Lines below title and below description */
.bu-product-content h2:after,
.bu-product-description:after {
    content: '';
    display: block;
    width: 60%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 20px auto;
}

.bu-product-content h2 {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
}

.bu-product-description {
    margin-bottom: 40px;
    line-height: 1.5;
    font-size: 14px;
    padding: 0 15px;
    color: #ffffff !important;
}

.bu-product-description p {
    margin-bottom: 10px;
    color: #ffffff !important;
}

.bu-product-description p:last-child {
    margin-bottom: 0;
}

/* Navigation Dots - Inside Slider */
.bu-products-slider-nav {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 20;
    /* padding: 8px 20px; */
    border-radius: 30px;

}

.bu-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #c4a624;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1); /* Smoother, more fluid transition */
    margin: 0 5px;
    position: relative;
}

.bu-slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); /* Quick but smooth hover */
}

.bu-slider-dot.active {
    background-color: #000000;
    transform: scale(1.3); /* Larger when active */
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1); /* Fluid scale animation */
}

.bu-slider-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    background-color: #c4a624;
    border-radius: 50%;
    transition: transform 0.3s ease;
    z-index: -1;
}

.bu-slider-dot:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.5;
}

/* Navigation Arrows - Enhanced Circle Design with Blue Background */
.bu-slider-prev,
.bu-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50; /* Increased z-index to ensure visibility */
    transition: all 0.3s ease;
    overflow: visible;
    outline: none; /* Remove outline for better appearance */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

/* Create large circle arrow buttons with dynamic background color and enhanced visibility */
.bu-slider-prev:before,
.bu-slider-next:before {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    background-color: var(--arrow-bg-color, #0046be); /* Use CSS variable with fallback */
    border-radius: 50%; /* Perfect circle */
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1); /* Smoother, more fluid transition */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.2);
    z-index: 1; /* Ensure the pseudo-element is behind the icon */
    opacity: 0.95; /* Slightly transparent for better blending */
}

/* Position the icons on top of the circles with improved visibility */
.bu-slider-prev i,
.bu-slider-next i {
    position: relative;
    z-index: 2;
    font-size: 26px; /* Slightly larger icons */
    color: #ffffff; /* White icons */
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1); /* Smoother, more fluid transition */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Text shadow for better contrast */
}

/* Position arrows with part visible on edges */
.bu-slider-prev {
    left: -20px; /* Adjusted to be more visible */
}

.bu-slider-next {
    right: -20px; /* Adjusted to be more visible */
}

/* Enhanced hover effects */
.bu-slider-prev:hover:before,
.bu-slider-next:hover:before {
    background-color: var(--arrow-bg-color, #0046be); /* Use the same color but with filter */
    filter: brightness(1.1); /* Make it slightly brighter on hover for better visibility */
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), 0 0 0 5px rgba(255, 255, 255, 0.3);
}

.bu-slider-prev:hover i,
.bu-slider-next:hover i {
    transform: scale(1.3);
    color: #ffffff;
}

/* Improved active state when clicked */
.bu-slider-prev:active:before,
.bu-slider-next:active:before {
    transform: scale(0.95);
    background-color: var(--arrow-bg-color, #0046be);
    filter: brightness(0.9);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.bu-slider-prev:active i,
.bu-slider-next:active i {
    transform: scale(0.9);
}


/* Mobile-specific layout for images container */
.bu-product-images-mobile {
    display: none; /* Hidden by default on desktop */
    flex-direction: row;
    width: 100%;
}

/* Mobile image containers */
.bu-product-image-left-mobile,
.bu-product-image-right-mobile {
    flex: 1 1 50%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d8dce1;
}

.bu-product-image-left-mobile img,
.bu-product-image-right-mobile img {
    max-height: 70%; /* Reduced from 90% to 70% */
    max-width: 70%; /* Reduced from 90% to 70% */
    width: auto;
    height: auto;
    object-fit: contain;
}

@media screen and (max-width: 992px) {
    /* Force the slider to be full height of viewport minus some padding */
    .bu-products-slider {
        height: auto !important;
        min-height: auto;
        position: relative !important;
        overflow: hidden !important; /* Keep overflow hidden for Swiper to work */
    }
    
    /* Ensure Swiper wrapper allows proper height on mobile */
    .bu-products-slider .swiper-wrapper {
        height: auto !important;
    }
    
    /* Ensure Swiper slides have proper height on mobile */
    .bu-products-slider .swiper-slide {
        height: auto !important;
    }
    
    .bu-product-slide {
        position: relative !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }
    
    /* Set the slide inner to column layout with exactly two stacked sections */
    .bu-product-slide-inner {
        flex-direction: column;
        height: 100%;
        background-color: transparent;
        display: flex !important;
        position: relative !important;
        width: 100% !important;
    }
    
    /* Hide desktop layout elements */
    .bu-product-image-left,
    .bu-product-image-right {
        display: none !important;
    }
    
    /* Show mobile images container */
    .bu-product-images-mobile {
        display: flex;
        width: 100%;
        height: 280px; /* Increased from 220px to 280px */
        order: 1;
        background-color: #d8dce1;
        transition: transform 0.9s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.9s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    /* Equal width side-by-side images */
    .bu-product-image-left-mobile,
    .bu-product-image-right-mobile {
        flex: 1 1 50%;
        height: 100%;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #d8dce1;
        padding: 15px;
        box-sizing: border-box;
    }
    
    /* Style both images */
    .bu-product-image-left-mobile img,
    .bu-product-image-right-mobile img {
        max-height: 85%; /* Increased from 70% to 85% */
        max-width: 85%; /* Increased from 70% to 85% */
        width: auto;
        height: auto;
        position: relative;
        top: auto;
        left: auto;
        transform: none !important;
        object-fit: contain;
        opacity: 1 !important;
        display: block !important;
        transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    /* Content section below images with blue background */
    .bu-product-content {
        flex: 1 1 auto;
        order: 2;
        padding: 30px 20px 60px;
        background-color: #0046be;
        color: white;
        height: auto;
        min-height: 300px;
        box-sizing: border-box;
        overflow-y: auto;
        display: block;
        position: relative;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10;
        transition: transform 0.9s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.9s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    /* Make sure the description is visible */
    .bu-product-description {
        text-align: left;
        line-height: 1.6;
        font-size: 16px;
        color: #ffffff !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-bottom: 30px;
        padding: 0 10px;
    }
    
    .bu-product-description p {
        color: #ffffff !important;
    }
    
    /* Title styling */
    .bu-product-content h2 {
        font-size: 24px;
        margin-bottom: 15px;
        color: white;
        text-align: center;
    }
    
    /* Add line below title */
    .bu-product-content h2:after {
        content: '';
        display: block;
        width: 80%;
        height: 1px;
        background-color: rgba(255, 255, 255, 0.5);
        margin: 15px auto;
    }
    
    /* Container sizing */
    .bu-products-slider {
        height: auto;
    }
    
    /* Enhanced navigation arrow styling for mobile */
    .bu-slider-prev,
    .bu-slider-next {
        top: 110px; /* Center in the image area */
        width: 50px;
        height: 50px;
        z-index: 50;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .bu-slider-prev {
        left: -10px; /* More visible on mobile */
    }
    
    .bu-slider-next {
        right: -10px; /* More visible on mobile */
    }
    
    .bu-slider-prev:before,
    .bu-slider-next:before {
        width: 50px;
        height: 50px;
        background-color: var(--arrow-bg-color, #0046be); /* Use dynamic color */
        border-radius: 50%; /* Perfect circle */
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.15);
        opacity: 0.95;
    }
    
    .bu-slider-prev i,
    .bu-slider-next i {
        font-size: 20px;
        color: #ffffff; /* White icon */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    /* Improved tap target for mobile */
    .bu-slider-prev:hover:before,
    .bu-slider-next:hover:before,
    .bu-slider-prev:focus:before,
    .bu-slider-next:focus:before {
        filter: brightness(1.1);
        transform: scale(1.05);
    }
    
    /* Active state for better feedback on mobile */
    .bu-slider-prev:active:before,
    .bu-slider-next:active:before {
        transform: scale(0.92);
        filter: brightness(0.9);
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.1);
    }
    
    /* Navigation dots inside the slider content section */
    .bu-products-slider-nav {
        position: absolute;
        bottom: 18px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 30;
        width: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 6px 16px;
        border-radius: 25px;
        background-color: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(2px);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
        gap: 10px;
    }
    
    /* Style dots */
    .bu-slider-dot {
        width: 10px;
        height: 10px;
        background-color: rgba(255, 255, 255, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.3);
        margin: 0 3px;
        transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1); /* Smoother mobile transition */
    }
    
    .bu-slider-dot:hover {
        background-color: rgba(255, 255, 255, 0.6);
        transform: scale(1.1);
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    .bu-slider-dot.active {
        background-color: #000000;
        transform: scale(1.25);
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(0, 0, 0, 0.8);
        transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1); /* Smooth mobile active state */
    }

    /* Overall container sizing */
    .bu-products-slider-container {
        height: auto;
        padding: 0;
        overflow: hidden;
        margin-bottom: 30px;
    }
    
    /* Smooth transitions for mobile slides */
    .bu-products-slider .swiper-slide {
        transition: transform 0.9s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.9s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    /* Ensure smooth slide transitions */
    .bu-product-slide-inner {
        transition: transform 0.9s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
}

/* Fix for Astra Theme compatibility */
.entry-content .bu-products-slider-container {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}
