/*
===============================================
    MOBIELE FOTOGRAFIE CAROUSEL
    Pair with js/mf-carousel.js
===============================================
*/

.mf-carousel {
    position: relative;
    flex: 0 0 auto;
    width: min(280px, 68vw);
    z-index: 1;
}

.mf-carousel-viewport {
    aspect-ratio: 4 / 5;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(232, 184, 74, 0.35);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.45),
        0 0 24px rgba(232, 184, 74, 0.15);
    background: #141210;
}

.mf-carousel-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.mf-carousel-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    margin: 0;
}

.mf-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mf-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.mf-carousel-dot {
    position: relative;
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(243, 237, 226, 0.35);
    overflow: hidden;
    cursor: pointer;
    transition: width 0.3s ease, background 0.25s ease;
}

.mf-carousel-dot.is-active {
    width: 24px;
    background: rgba(232, 184, 74, 0.28);
}

.mf-carousel-dot.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #e8b84a;
    transform: scaleX(0);
    transform-origin: left center;
    animation: mf-dot-progress var(--mf-interval, 2.2s) linear forwards;
}

.mf-carousel.is-paused .mf-carousel-dot.is-active::after {
    animation-play-state: paused;
}

.mf-carousel-dot:focus-visible {
    outline: 2px solid #f0c96a;
    outline-offset: 3px;
}

@keyframes mf-dot-progress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mf-carousel-track {
        transition: none;
    }

    .mf-carousel-dot {
        transition: none;
    }

    .mf-carousel-dot.is-active {
        background: #e8b84a;
    }

    .mf-carousel-dot.is-active::after {
        animation: none;
        transform: scaleX(1);
    }
}

@media (max-width: 700px) {
    .mf-carousel {
        width: min(250px, 78vw);
        align-self: center;
    }
}
