/* Structural Mobile-First CSS rules */
.m3d-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden; /* Prevent horizontal scroll on mobile */
    padding: 10px 0 30px 0;
}

.m3d-slider-container {
    width: 100%;
    height: 360px; /* Compact height for mobile */
    overflow: visible !important; /* Allow adjacent slides to show */
    margin: 0 auto;
}

.m3d-slider-container .swiper-wrapper {
    align-items: center;
}

/* Mobile defaults */
.m3d-slider-container .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 260px; /* Explicit width on mobile for absolute alignment */
    height: 300px; /* Explicit height */
    display: flex;
    align-items: flex-end;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.5; /* Dim inactive slides */
}

.m3d-slider-container .swiper-slide-active {
    opacity: 1; /* Highlight active slide */
}

/* Fallback / structure slide inner */
.m3d-slide-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    background: #111;
    text-decoration: none !important;
}

.m3d-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.swiper-slide-active .m3d-slide-bg {
    transform: scale(1.05);
}

.m3d-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.m3d-slide-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

.m3d-slide-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #fff;
    line-height: 1.3;
}

.m3d-slide-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    opacity: 0.85;
}

/* Pagination & Navigation Customization */
.m3d-pagination {
    bottom: 0px !important;
}

.m3d-pagination .swiper-pagination-bullet {
    background: #000;
    opacity: 0.2;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}

.m3d-pagination .swiper-pagination-bullet-active {
    background: #0582ca; /* Classic dental blue */
    opacity: 1;
    width: 20px;
    border-radius: 4px;
}

.m3d-nav-btn {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.m3d-nav-btn::after {
    font-size: 14px;
    font-weight: bold;
}

.m3d-nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Tablet & Desktop layout scaling */
@media (min-width: 768px) {
    .m3d-slider-container {
        height: 450px;
    }
    .m3d-slider-container .swiper-slide {
        width: 320px;
        height: 380px;
    }
    .m3d-slide-title {
        font-size: 1.4rem;
    }
    .m3d-slide-desc {
        font-size: 0.9rem;
    }
    .m3d-nav-btn {
        width: 44px;
        height: 44px;
    }
    .m3d-nav-btn::after {
        font-size: 18px;
    }
}
