/* ================================================================
   Carousel Slider Widget - Styles
   Center-focused carousel with faded side slides
   ================================================================ */

/* --- Wrapper --- */
.csw-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    -webkit-user-select: none;
    user-select: none;
}

/* --- Viewport clips overflow --- */
.csw-carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* --- Track holds slides --- */
.csw-carousel-track {
    position: relative;
    width: 100%;
    height: 400px; /* default, overridden by Elementor control */
}

/* --- Slide: absolute positioned, JS sets translateX --- */
.csw-slide {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    transform-origin: center center;
    will-change: transform, opacity, filter;
    /* transition is set by JS */
}

.csw-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    border-radius: inherit;
    -webkit-user-drag: none;
}

.csw-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- State classes (visual hints, z-index handled by JS) --- */
.csw-slide.is-active {
    cursor: default;
}

.csw-slide.is-prev,
.csw-slide.is-next {
    cursor: pointer;
}

/* ================================================================
   Navigation Arrows - FIXED position via CSS, never moved by JS
   Prev arrow: center of left side area
   Next arrow: center of right side area
   ================================================================ */
.csw-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1e2a4a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    /* Only animate bg color + shadow, NOT position/transform */
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.csw-nav-btn:hover {
    background-color: #2c3e6b;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.csw-nav-btn:active {
    background-color: #1a2340;
}

.csw-nav-btn svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
    stroke: #ffffff;
    fill: none;
    flex-shrink: 0;
}

/* Prev arrow - 11% from left edge (center of left side slide area) */
.csw-nav-prev {
    left: 11%;
}

/* Next arrow - 11% from right edge */
.csw-nav-next {
    right: 11%;
}

/* ================================================================
   Elementor height control - targets the track
   ================================================================ */
.csw-carousel-track {
    /* Elementor selector: {{WRAPPER}} .csw-carousel-track */
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 768px) {
    .csw-carousel-wrapper {
        padding: 12px 0;
    }

    .csw-carousel-track {
        height: 260px;
    }

    .csw-nav-btn {
        width: 38px;
        height: 38px;
    }

    .csw-nav-btn svg {
        width: 15px;
        height: 15px;
    }

    .csw-nav-prev {
        left: 6%;
    }

    .csw-nav-next {
        right: 6%;
    }
}

@media (max-width: 480px) {
    .csw-carousel-track {
        height: 180px;
    }

    .csw-nav-btn {
        width: 32px;
        height: 32px;
    }

    .csw-nav-btn svg {
        width: 12px;
        height: 12px;
    }

    .csw-nav-prev {
        left: 4%;
    }

    .csw-nav-next {
        right: 4%;
    }
}
