.mfs-slider {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.mfs-slider-container {
    position: relative;
    width: 100%;
    height: clamp(240px, 52vw, 500px);
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
}

.mfs-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; /* Qui regoli la velocità del fade */
    z-index: 1;
}

.mfs-slide.active {
    opacity: 1;
    z-index: 2;
}

.mfs-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    -webkit-user-drag: none;
    user-select: none;
}

.mfs-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    z-index: 3;
}

.mfs-thumbnails {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.mfs-thumb {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 2px solid transparent;
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #e9ebee;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.mfs-thumb-progress {
    position: absolute;
    inset: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    transform: rotate(-90deg);
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
}

.mfs-thumb-progress-track,
.mfs-thumb-progress-fill {
    fill: none;
    stroke-width: 2;
}

.mfs-thumb-progress-track {
    stroke: rgba(0, 97, 167, 0.2);
}

.mfs-thumb-progress-fill {
    stroke: #0061a7;
    stroke-linecap: round;
    stroke-dasharray: 113.1;
    stroke-dashoffset: 113.1;
}

.mfs-thumb.active {
    opacity: 1;
    transform: translateY(-2px);
    border-color: transparent;
}

.mfs-thumb.active .mfs-thumb-progress {
    opacity: 1;
}

.mfs-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
    border-color: #0061a7;
}

.mfs-thumb img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 768px) {
    .mfs-slider {
        padding: 0 12px;
        box-sizing: border-box;
    }

    .mfs-slider-container {
        height: clamp(220px, 58vw, 360px);
    }

    .mfs-thumbnails {
        gap: 12px;
        margin-top: 16px;
    }

    .mfs-thumb {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 480px) {
    .mfs-slider {
        padding: 0 8px;
    }

    .mfs-slider-container {
        height: clamp(200px, 62vw, 280px);
    }

    .mfs-thumbnails {
        /* gap: 10px;
        margin-top: 14px; */
        display: none;
    }

    .mfs-thumb {
        width: 56px;
        height: 56px;
        border-width: 1px;
    }

    .mfs-thumb-progress-track,
    .mfs-thumb-progress-fill {
        stroke-width: 1.5;
    }
}