/**
 * Metalist Carousel Styles
 * Lightweight replacement for Splide.js with crossfade transitions
 */

.metalist-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* All slides stacked on top of each other, faded out */
.metalist-carousel__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

/* Active slide: visible and sets the container height */
.metalist-carousel__slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* Arrows */
.metalist-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border-radius: 2px;
}

.metalist-carousel__arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.metalist-carousel__arrow--prev {
    left: 8px;
}

.metalist-carousel__arrow--next {
    right: 8px;
}

/* RTL arrow positions */
[dir="rtl"] .metalist-carousel__arrow--prev,
.metalist-carousel[dir="rtl"] .metalist-carousel__arrow--prev {
    left: auto;
    right: 8px;
}

[dir="rtl"] .metalist-carousel__arrow--next,
.metalist-carousel[dir="rtl"] .metalist-carousel__arrow--next {
    right: auto;
    left: 8px;
}

/* Mobile: smaller arrows */
@media (max-width: 480px) {
    .metalist-carousel__arrow {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}
