/* ==========================================================================
   Module Custom Styles (Global Grid Cards)
   ========================================================================== */
.site-stripe-small-card {
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.site-stripe-small-card-image {
    /*width: 100%;
    height: 240px;*/
    max-height: 240px;
    object-fit: cover;
}

/* ==========================================================================
   Carousel Main Base Container
   ========================================================================== */
#gibsSSCarousel {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: visible; /* Allows custom high-z-index buttons to hang off edges safely */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

    #gibsSSCarousel .carousel-inner {
        border-radius: 8px;
    }

    /* ==========================================================================
   Carousel Item Layout Structure (FIXED TRANSITION LAYER BUG)
   ========================================================================== */
    #gibsSSCarousel .carousel-item {
        position: relative;
        padding: 1.5rem 5rem;
        min-height: auto;
        /* 
       CRITICAL FIX: Dropped display: flex. 
       Forcing flexbox on .carousel-item overrode Bootstrap's inline 'display: none',
       which caused slides 5-8 to load flatly behind slides 1-4.
    */
    }

        /* Safety override rule to ensure Bootstrap manages visible states perfectly */
        #gibsSSCarousel .carousel-item.active {
            display: block !important;
        }

    #gibsSSCarousel .carousel-slide-content {
        width: 100%;
        margin: 0;
    }

    /* ==========================================================================
   Inner Slider Card Aesthetics
   ========================================================================== */
    #gibsSSCarousel .site-stripe-carousel-card {
        border: 1px solid rgba(0, 0, 0, 0.125);
        overflow: hidden;
    }

    #gibsSSCarousel .carousel-card-image-link {
        display: block;
        width: 100%;
        text-decoration: none;
    }

    #gibsSSCarousel .carousel-card-image {
        display: block;
        width: 100%;
        max-height: 240px;
        object-fit: cover;
    }

/* ==========================================================================
   Enhanced Custom Navigation Buttons
   ========================================================================== */
.carousel-control-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 28px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    text-decoration: none;
    opacity: 1 !important;
}

.carousel-control-prev.carousel-control-btn {
    left: 20px;
}

.carousel-control-next.carousel-control-btn {
    right: 20px;
}

.carousel-control-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-btn:focus {
    outline: none;
}

.carousel-control-btn:active {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.carousel-control-btn i {
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* ==========================================================================
   Mobile Responsive Rules
   ========================================================================== */
@media (max-width: 768px) {
    #gibsSSCarousel .carousel-item {
        padding: 1rem 3.5rem;
    }

    #gibsSSCarousel .carousel-card-image {
        height: 200px;
    }

    #gibsSSCarousel .carousel-control-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .carousel-control-prev.carousel-control-btn {
        left: 10px;
    }

    .carousel-control-next.carousel-control-btn {
        right: 10px;
    }
}

/* ==========================================================================
   Unused / Legacy Single-Image Overlay Reference Rules
   (Kept intact for backward compatibility)
   ========================================================================== */
.carousel-item-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.carousel-image {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.carousel-image-link:hover .carousel-image {
    transform: scale(1.05);
}

.carousel-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    text-decoration: none;
    transition: background 0.3s ease;
}

    .carousel-info-overlay:hover {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    }

.carousel-info-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.carousel-info-category {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.carousel-info-description {
    font-size: 0.8rem;
    opacity: 0.85;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
