/* ============================================
   BluBeam Gallery Carousel Component
   Reusable auto-carousel for project galleries
   Multi-slide responsive carousel
   ============================================ */

/* Section Wrapper */
.bb-gallery-carousel-section {
    padding: 80px 0;
    background: #f8f9fa;
    overflow: hidden;
}

.bb-gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

/* Carousel Wrapper */
.bb-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Carousel Container */
.bb-carousel-container {
    overflow: hidden;
    border-radius: 0;
}

/* Carousel Track */
.bb-carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 20px;
}

/* Individual Slide - Desktop: 3 images */
.bb-carousel-slide {
    min-width: calc((100% - 40px) / 3); /* 3 images with 20px gap */
    flex-shrink: 0;
}

/* Image Wrapper */
.bb-carousel-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio for better multi-column display */
    overflow: hidden;
    background: #1a1a2e;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Carousel Image */
.bb-carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.bb-carousel-slide:hover .bb-carousel-image {
    transform: scale(1.08);
}

/* Overlay */
.bb-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    padding: 30px 20px 20px;
    transform: translateY(0);
    transition: all 0.4s ease;
    opacity: 0;
}

.bb-carousel-slide:hover .bb-carousel-overlay {
    opacity: 1;
}

/* Content in Overlay */
.bb-carousel-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.bb-carousel-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.4;
}

/* Navigation Buttons */
.bb-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bb-carousel-nav:hover {
    background: #0066FF;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

.bb-carousel-nav:hover i {
    color: white;
}

.bb-carousel-nav i {
    font-size: 24px;
    color: #0066FF;
    transition: color 0.3s ease;
}

.bb-carousel-prev {
    left: 0;
}

.bb-carousel-next {
    right: 0;
}

/* Indicators */
.bb-carousel-indicators {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

.bb-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d0d0d0;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.bb-carousel-indicator:hover {
    background: #a0a0a0;
    transform: scale(1.2);
}

.bb-carousel-indicator.active {
    background: #0066FF;
    width: 32px;
    border-radius: 6px;
}

/* Tablet: 2 images */
@media (max-width: 992px) {
    .bb-carousel-slide {
        min-width: calc((100% - 20px) / 2); /* 2 images with 20px gap */
    }

    .bb-carousel-wrapper {
        padding: 0 50px;
    }

    .bb-carousel-content h3 {
        font-size: 17px;
    }

    .bb-carousel-content p {
        font-size: 13px;
    }

    .bb-carousel-nav {
        width: 45px;
        height: 45px;
    }

    .bb-carousel-nav i {
        font-size: 22px;
    }
}

/* Mobile: 1 image */
@media (max-width: 768px) {
    .bb-gallery-carousel-section {
        padding: 50px 0;
    }

    .bb-gallery-header {
        margin-bottom: 40px;
    }

    .bb-carousel-slide {
        min-width: 100%; /* 1 image, full width */
    }

    .bb-carousel-track {
        gap: 0;
    }

    .bb-carousel-wrapper {
        padding: 0 40px;
    }

    .bb-carousel-overlay {
        opacity: 1; /* Always show on mobile */
    }

    .bb-carousel-content h3 {
        font-size: 18px;
    }

    .bb-carousel-content p {
        font-size: 14px;
    }

    .bb-carousel-nav {
        width: 40px;
        height: 40px;
    }

    .bb-carousel-nav i {
        font-size: 20px;
    }

    .bb-carousel-indicator {
        width: 10px;
        height: 10px;
    }

    .bb-carousel-indicator.active {
        width: 24px;
    }
}

@media (max-width: 480px) {
    .bb-carousel-wrapper {
        padding: 0 35px;
    }

    .bb-carousel-content h3 {
        font-size: 16px;
    }

    .bb-carousel-content p {
        font-size: 13px;
    }

    .bb-carousel-nav {
        width: 36px;
        height: 36px;
    }

    .bb-carousel-nav i {
        font-size: 18px;
    }
}

/* Animation Classes */
.bb-carousel-fade-in {
    animation: bbCarouselFadeIn 0.6s ease;
}

@keyframes bbCarouselFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pause on Hover */
.bb-carousel-container:hover .bb-carousel-track {
    animation-play-state: paused !important;
}

/* Custom Variant: Dark Theme */
.bb-gallery-carousel-section.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.bb-gallery-carousel-section.dark-theme .eyebrow-default {
    color: rgba(255, 255, 255, 0.8);
}

.bb-gallery-carousel-section.dark-theme .h2 {
    color: #ffffff;
}

.bb-gallery-carousel-section.dark-theme .bb-gallery-header p {
    color: rgba(255, 255, 255, 0.7);
}

/* Custom Variant: Compact */
.bb-carousel-wrapper.compact {
    max-width: 900px;
}

.bb-carousel-wrapper.compact .bb-carousel-image-wrapper {
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
}

/* Custom Variant: Wide */
.bb-carousel-wrapper.wide {
    max-width: 100%;
}

.bb-carousel-wrapper.wide .bb-carousel-image-wrapper {
    padding-top: 60%; /* Slightly shorter for wide layouts */
}
