/**
 * Mauritius Carousel Elementor - Carousel Styles
 * 3D Coverflow carousel styles
 * Optimized for all devices - Mobile to Desktop
 */

/* Main Carousel Container */
.mce-destination-carousel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 5px auto !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
    overflow: hidden;
    min-height: 500px !important;
    /* Hardware acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Better touch scrolling */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

/* Force height in Elementor */
.elementor-widget-container .mce-destination-carousel-wrapper,
.elementor-element .mce-destination-carousel-wrapper,
.elementor .mce-destination-carousel-wrapper {
    min-height: 500px !important;
    height: auto !important;
}

/* Swiper Container */
.mce-destination-slider {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
    display: block;
    text-align: center;
    overflow: visible;
}

/* Coverflow Effect Styles */
.mce-destination-slider.swiper-coverflow {
    overflow: visible;
}

.mce-destination-slider.swiper-coverflow .swiper-wrapper {
    transform-style: preserve-3d;
}

.mce-destination-slider.swiper-coverflow .swiper-slide {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Swiper Slide - Fixed size for all devices */
.mce-destination-slider .swiper-slide {
    width: 320px !important;
    height: 450px !important;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
    margin: 0;
    line-height: 0;
    font-size: 0;
    flex-shrink: 0;
    /* Hardware acceleration for smoother animations */
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
    /* Better touch interaction on mobile/tablet */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    /* Touch-action for better mobile scrolling */
    touch-action: pan-x;
}

.mce-destination-slider .swiper-slide-active {
    transform: scale(1.05);
    z-index: 10;
}

/* Coverflow 3D Effect */
.mce-destination-slider.swiper-3d .swiper-slide-shadow-left,
.mce-destination-slider.swiper-3d .swiper-slide-shadow-right {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
}

.mce-destination-slider.swiper-3d .swiper-slide-shadow-left {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
}

.mce-destination-slider.swiper-3d .swiper-slide-shadow-right {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
}

/* Destination Box */
.mce-destination-box {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    line-height: 0;
    font-size: 0;
}

/* Destination Image */
.mce-destination-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 0;
    margin: 0;
    line-height: 0;
    font-size: 0;
}

.mce-destination-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    max-width: 100%;
    max-height: 100%;
    min-width: 100%;
    min-height: 100%;
}

/* Destination Content */
.mce-destination-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 25px;
    color: #D1CBA4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.6);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.mce-media-left {
    text-align: center;
    width: 100%;
}

.mce-box-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.mce-box-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mce-box-title a:hover {
    color: #fff;
}

.mce-subcategories {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

.mce-button-with-icon {
    margin-top: 15px;
}

.mce-button-icon {
    display: inline-block;
    background: rgba(148, 109, 67, 0.8);
    color: #D1CBA4;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid rgba(209, 203, 164, 0.3);
}

.mce-button-icon:hover {
    background: rgba(148, 109, 67, 1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Fixed Design - Same on All Devices */

/* Force same styling on all screen sizes */
.mce-destination-carousel-wrapper {
    overflow-x: hidden;
}

/* Ensure carousel container allows horizontal scroll on small screens */
.mce-destination-slider {
    overflow: visible !important;
}

/* Tablet Landscape (1024px to 1200px) */
@media (min-width: 1024px) and (max-width: 1200px) {
    .mce-destination-carousel-wrapper,
    .elementor-widget-container .mce-destination-carousel-wrapper,
    .elementor-element .mce-destination-carousel-wrapper {
        min-height: 650px !important;
        margin: 0 auto 5px auto !important;
        padding: 0 !important;
    }
    
    .mce-destination-slider .swiper-slide {
        width: 400px !important;
        height: 600px !important;
    }
    
    .mce-destination-content {
        padding: 35px;
        min-height: 250px;
    }
    
    .mce-box-title {
        font-size: 1.8rem;
    }
    
    .mce-subcategories {
        font-size: 1.2rem;
    }
    
    .mce-button-icon {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Tablet Portrait (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .mce-destination-carousel-wrapper,
    .elementor-widget-container .mce-destination-carousel-wrapper,
    .elementor-element .mce-destination-carousel-wrapper {
        min-height: 630px !important;
        margin: 0 auto 5px auto !important;
        padding: 0 !important;
    }
    
    .mce-destination-slider .swiper-slide {
        width: 380px !important;
        height: 580px !important;
    }
    
    .mce-destination-content {
        padding: 32px;
        min-height: 240px;
    }
    
    .mce-box-title {
        font-size: 1.7rem;
    }
    
    .mce-subcategories {
        font-size: 1.15rem;
    }
    
    .mce-button-icon {
        padding: 12px 22px;
        font-size: 1rem;
    }
}

/* Keep desktop appearance on mobile */
@media (max-width: 767px) {
    .mce-destination-carousel-wrapper {
        padding: 0 !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 360px !important;
        margin: 0 auto 5px auto !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Better touch scrolling */
        touch-action: pan-x;
        /* Hardware acceleration */
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .mce-destination-carousel-wrapper::-webkit-scrollbar {
        display: none;
    }

    .mce-destination-slider {
        padding: 0;
        /* Ensure horizontal touch events work properly */
        touch-action: pan-x;
    }

    /* Reduced height for mobile */
    .mce-destination-slider .swiper-slide {
        width: 280px !important;
        height: 360px !important;
    }

    .mce-destination-content {
        padding: 20px;
        min-height: 150px;
    }

    .mce-box-title {
        font-size: 1.3rem;
    }

    .mce-subcategories {
        font-size: 0.9rem;
    }

    .mce-button-icon {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}
