/* =========================================
   CARD CAROUSEL – BASE
   File: assets/css/bali-carousel.css
   ========================================= */
.bl-card-carousel {
    padding: 60px 0;
    background-color: transparent !important;
}

.bl-card-carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.bl-card-carousel-track {
    display: flex;
    gap: 24px;
}

.bl-card-carousel-card {
    flex: 1 1 0;
    position: relative;
}

/* --- BADGE STYLING --- */
.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background-color: rgba(125, 141, 255, 0.3); 
    color: #ffffff;            
    padding: 5px 5px !important; 
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- IMAGE BLOCK --- */
.bl-card-carousel-image {
    width: 88%;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    aspect-ratio: 4 / 5;
    position: relative;
    z-index: 1; 
}

.bl-card-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- HIDDEN OVERLAY (Blue Glass) --- */
.bali-card-overlay {
    position: absolute;
    inset: 0; 
    background-color: rgba(76, 110, 245, 0.96); /* Brand Blue */
    opacity: 0; 
    display: flex;
    align-items: center; 
    justify-content: center;
    padding: 25px; 
    text-align: center;
    color: white;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
    z-index: 20; 
    pointer-events: none; 
}

/* Overlay Typography (Default Desktop) */
.bali-card-overlay .overlay-content p { 
    font-family: 'Open Sans', sans-serif;
    font-size: 15px; 
    line-height: 1.6; 
    color: #fff;
    margin: 0;
}
.overlay-content strong { color: #fff; font-weight: 700; }

/* --- CARD BODY (White Area) --- */
.bl-card-carousel-body-wrap {
    margin-top: -26px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 5; 
}

.bl-card-carousel-body {
    width: 94%;
    background: #ffffff;
    border-radius: 24px;
    padding: 18px 22px 22px;
    border: none;
    box-shadow: 0 15px 30px rgba(0,0,0,0.10);
    position: relative; /* Anchor for button */
}

/* --- CROSS BUTTON (Far Right Bottom of White Card) --- */
.bali-fab-btn {
    position: absolute;
    bottom: 10px; /* Far Bottom */
    right: 10px;  /* Far Right */
    width: 44px;  
    height: 44px; 
    
    background-color: #f3f4f6; /* Light gray */
    color: #111827; 
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30; 
    transition: all 0.3s ease;
    padding: 0;
}
.bali-plus-icon { transition: transform 0.3s ease; }

/* --- TITLE (Original Style Preserved) --- */
.bl-card-carousel-title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    color: #111827;
    padding-right: 45px; /* Prevent text hitting the button */
}

/* --- CTA LINK (Trigger) --- */
.bl-card-carousel-cta {
    font-size: 16px;
    font-weight: 600;
    color: #7d8dff;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-decoration-color: #FFA685 !important;
    text-underline-offset: 4px;
    cursor: pointer;
    display: inline-block;
    float: right;
}

/* --- INTERACTIVE STATES (When Open) --- */
.interactive-card.is-open .bali-card-overlay { opacity: 1; pointer-events: auto; }
.interactive-card.is-open .bali-fab-btn { background-color: #e5e7eb; }
.interactive-card.is-open .bali-plus-icon { transform: rotate(45deg); }

/* --- MOBILE STYLES (Fixes Scrollbar & Text Size) --- */
@media (max-width: 767px) {
    /* 1. SCROLLBAR FIX */
    .bl-card-carousel {
        padding: 0;
        background: transparent !important;
        overflow: hidden; /* Clips negative margins */
    }
    .bl-card-carousel-wrapper {
        overflow: hidden;
    }

    /* Track (Scrollable) */
    .bl-card-carousel-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 16px 40px;
        margin: 0 -16px;
        gap: 8px !important; 
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .bl-card-carousel-track::-webkit-scrollbar { display: none; }

    /* Card Sizing */
    .bl-card-carousel-card {
        flex: 0 0 85vw !important; 
        scroll-snap-align: center;
        background: transparent !important;
        min-width: 0;
    }

    .bl-card-carousel-image {
        width: 100%;
        border-radius: 24px;
        display: block;
    }

    /* 2. OVERLAY TEXT FIX (Big & Readable) */
    .bali-card-overlay .overlay-content p {
        font-size: 20px !important; /* Force Big Text */
        line-height: 1.5;
        font-weight: 500;
        padding: 0 10px;
    }

    /* Body Layout */
    .bl-card-carousel-body-wrap {
        margin-top: -30px; 
        padding: 0 6px;
        position: relative;
        z-index: 10;
    }

    .bl-card-carousel-body {
        width: 100%;
        background: #ffffff;
        border-radius: 24px;
        padding: 14px 15px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    }

    /* 3. TITLE FIX (Restored Original Mobile Size) */
    .bl-card-carousel-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .bl-card-carousel-cta {
        font-size: 15px;
    }
    
    /* 4. BUTTON FIX (Far Right) */
    .bali-fab-btn {
        bottom: 10px;
        right: 10px;
        width: 26px !important;  /* Reduced from 44px */
        height: 26px !important;
    }
}