/* ========================================= */
/* DEFAULT / DESKTOP             */
/* ========================================= */

.center-carousel {
    position: relative;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Carousel Inner */
.carousel-inner {
    height: 500px; 
    overflow: visible; 
    display: flex;
    align-items: center; 
}

/* Carousel Item Base */
.carousel-item {
    position: absolute;
    display: block !important; 
    opacity: 0;
    width: 60%; /* Desktop Width */
    height: 100%;
    top: 0;
    left: 20%; 
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, z-index 0s linear 0.25s;
    z-index: 1;
    pointer-events: none; 
}

/* Image Card Styling */
.slide-content {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* --- STATES (Desktop) --- */

/* Active (Center) */
.carousel-item.active {
    opacity: 1;
    z-index: 10;
    transform: scale(1.1);
    pointer-events: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.carousel-item.active .slide-overlay { opacity: 1; }

/* Immediate Neighbors */
.carousel-item.prev-slide {
    opacity: 0.6; 
    transform: translateX(-65%) scale(0.9);
    z-index: 5;
}
.carousel-item.next-slide {
    opacity: 0.6; 
    transform: translateX(65%) scale(0.9);
    z-index: 5;
}

/* Far Neighbors (The wireframe drawings) */
.carousel-item.far-prev-slide {
    opacity: 0.3; 
    transform: translateX(-110%) scale(0.75); 
    z-index: 2;   
    display: block !important;
}
.carousel-item.far-next-slide {
    opacity: 0.3; 
    transform: translateX(110%) scale(0.75); 
    z-index: 2;   
    display: block !important; 
}

/* Controls */
.carousel-control-prev, .carousel-control-next {
    width: 5%;
    z-index: 20;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 2rem;
    background-size: 50% 50%;
}

/* Page Typography */
.section-header { text-align: center; margin-bottom: 2rem; }
.section-header h2 { font-size: 3rem; }
.section-header p { font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.btn-custom {
    background-color: #5a3e5d; color: white; border-radius: 0; padding: 10px 30px;
    letter-spacing: 1px; text-transform: uppercase; font-size: 0.8rem; margin-top: 1rem;
}
.btn-custom:hover { background-color: #442d46; color: white; }


/* ========================================= */
/* TABLET STYLES (768px - 991px)   */
/* ========================================= */
@media (max-width: 991px) {
    .carousel-inner {
        height: 400px; /* Slightly shorter on tablet */
    }

    /* On Tablet, Hide the "Far" slides to prevent overcrowding */
    .carousel-item.far-prev-slide,
    .carousel-item.far-next-slide {
        opacity: 0;
        transform: translateX(0) scale(0.8);
    }
    
    /* Bring the immediate neighbors slightly closer */
    .carousel-item.prev-slide { transform: translateX(-55%) scale(0.85); }
    .carousel-item.next-slide { transform: translateX(55%) scale(0.85); }
}


/* ========================================= */
/* MOBILE STYLES (< 768px)         */
/* ========================================= */
@media (max-width: 767px) {
    .center-carousel {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
    
    .carousel-inner {
        height: 300px; /* Shorter on mobile */
    }

    /* Make the active card much wider on mobile */
    .carousel-item {
        width: 85%;
        left: 7.5%;
    }
    
    /* Hide ALL neighbors on mobile. Only show active card. */
    .carousel-item.prev-slide,
    .carousel-item.next-slide,
    .carousel-item.far-prev-slide,
    .carousel-item.far-next-slide {
        transform: translateX(0) scale(0.85); 
        opacity: 0; 
        pointer-events: none;
    }
    
    /* Typography Adjustments */
    .section-header h2 { font-size: 2rem; }
    .section-header p { font-size: 0.9rem; padding: 0 1rem; }
    
    /* Make buttons smaller */
    .carousel-control-prev-icon, .carousel-control-next-icon {
        padding: 1.5rem;
    }
}