/**
 * Accessible Slider v01 Styles
 * Stili per slider con swipe migliorato e loop infinito
 */

/* Container principale */
.accessible-slider-cycle {
    position: relative;
    width: 100%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden;
}

/* Track container */
.accessible-slider-cycle .slider-track {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: grab;
    height: 100%;
}

/* Durante il drag */
.accessible-slider-cycle.is-dragging .slider-track {
    cursor: grabbing;
}

/* Lista slides */
.accessible-slider-cycle .slider-list {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0;
    padding: 0;
    list-style: none;
    will-change: transform;
    height: 100%;
}

/* Durante drag rimuovi transizione */
.accessible-slider-cycle.is-dragging .slider-list {
    transition: none !important;
}

/* Singola slide */
.accessible-slider-cycle .slider-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
}

/* Cloni per loop infinito */
.accessible-slider-cycle .slider-slide.clone {
    /* I cloni non devono essere letti dagli screen reader */
    aria-hidden: true !important;
}

.accessible-slider-cycle .slider-slide picture {
    width: 100%;
    height: 100%;
}

/* Immagini nelle slide */
.accessible-slider-cycle .slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    pointer-events: none; /* Previeni drag delle immagini */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Frecce di navigazione */
.accessible-slider-cycle .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.accessible-slider-cycle .slider-arrow.slider-prev.bottomRight{
    top: unset;
    bottom: 52px;
    right: 219px;
    left: unset;
    transform: none;
}

.accessible-slider-cycle .slider-arrow.slider-next.bottomRight{
    top: unset;
    bottom: 52px;
    right: 123px;
    left: unset;
    transform: none;
}

.accessible-slider-cycle span.slider-count-slide{
    display: none;
}

.accessible-slider-cycle span.slider-count-slide.bottomRight{
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 14px;
    line-height: 14px;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(5px);
    top: unset;
    bottom: 52px;
    right: 171px;
    left: unset;
}



.accessible-slider-cycle .slider-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.accessible-slider-cycle .slider-arrow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.6);
}

.accessible-slider-cycle .slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.accessible-slider-cycle .slider-prev {
    left: 20px;
}

.accessible-slider-cycle .slider-next {
    right: 20px;
}

/* Dots navigazione */
.accessible-slider-cycle .slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
    padding: 10px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.accessible-slider-cycle .slider-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--etg-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
}

.accessible-slider-cycle .slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.accessible-slider-cycle .slider-dot:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.6);
}

.accessible-slider-cycle .slider-dot.active {
    background: var(--etg-primary);
    transform: scale(1.3);
}

/* Controllo autoplay */
.accessible-slider-cycle .slider-autoplay-control {
    position: absolute;
    bottom: 52px;
    right: 75px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.accessible-slider-cycle .slider-autoplay-control:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.accessible-slider-cycle .slider-autoplay-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.6);
}

/* Animazione fade */
.accessible-slider-cycle.fade .slider-list {
    display: block;
    position: relative;
}

.accessible-slider-cycle.fade .slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.accessible-slider-cycle.fade .slider-slide.active {
    position: relative;
    opacity: 1;
}

/* Visual feedback durante swipe */
.accessible-slider-cycle.is-dragging {
    cursor: move;
    cursor: -webkit-grabbing;
    cursor: -moz-grabbing;
    cursor: grabbing;
}

/* Indicatore di swipe per mobile */
/*
@media (hover: none) and (pointer: coarse) {
    .accessible-slider-cycle::after {
        content: '';
        position: absolute;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 2px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .accessible-slider-cycle:hover::after {
        opacity: 1;
    }
}
*/

/* Responsive */
@media (max-width: 768px) {
    .accessible-slider-cycle .slider-arrow {
        width: 40px;
        height: 40px;
    }

    .accessible-slider-cycle .slider-prev {
        left: 10px;
    }

    .accessible-slider-cycle .slider-next {
        right: 10px;
    }

    .accessible-slider-cycle .slider-dots {
        bottom: 10px;
        padding: 8px;
        gap: 8px;
    }


    .accessible-slider-cycle .slider-autoplay-control {
        bottom: 30px;
        right: 10px;
    }

    .accessible-slider-cycle .slider-arrow.slider-prev.bottomRight{
        bottom: 30px;
        right: 158px;
    }

    .accessible-slider-cycle .slider-arrow.slider-next.bottomRight{
        bottom: 30px;
        right: 66px;
    }

    .accessible-slider-cycle span.slider-count-slide{
        display: none;
    }

    .accessible-slider-cycle span.slider-count-slide.bottomRight{
        bottom: 30px;
        right: 114px;
    }

}

/* Touch/mobile specific styles */
@media (hover: none) and (pointer: coarse) {
    .accessible-slider-cycle .slider-arrow {
        background: rgba(0, 0, 0, 0.3);
    }

    .accessible-slider-cycle .slider-track {
        /* Smooth scrolling per iOS */
        -webkit-overflow-scrolling: touch;
    }
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .accessible-slider-cycle .slider-list,
    .accessible-slider-cycle .slider-slide,
    .accessible-slider-cycle .slider-arrow,
    .accessible-slider-cycle .slider-dot {
        transition: none !important;
        animation: none !important;
    }
}

/* Focus visible for better keyboard navigation */
.accessible-slider-cycle .slider-arrow:focus-visible,
.accessible-slider-cycle .slider-dot:focus-visible,
.accessible-slider-cycle .slider-autoplay-control:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Loading state */
.accessible-slider-cycle.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.accessible-slider-cycle.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: accessible-slider-cycle-animation-spin 1s linear infinite;
    z-index: 10;
}

@keyframes accessible-slider-cycle-animation-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Performance optimizations */
.accessible-slider-cycle .slider-slide {
    transform: translateZ(0); /* Enable hardware acceleration */
}

/* Previeni selezione testo durante drag */
.accessible-slider-cycle.is-dragging * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/*
xs      <576px      col-            smart-phone
sm      ≥576px 	    col-sm
md      ≥768px 	    col-md          ipad
lg      ≥992px 	    col-lg          ipad pro
xl      ≥1200px 	col-xl          desktop
xxl     ≥1400px     col-xxl
*/

/*============================================================
 *
 * XXL  desktop large
 *
 */
@media (min-width: 1400px) {

}

/*============================================================
 *
 * XL   desktop
 *
 */
@media (max-width: 1399px) {

}

/*============================================================
 *
 * LG   small desktop
 *
 */

@media (max-width: 1199px) {

}

/*============================================================
 *
 * LG   ipadpro
 *
 */
@media (pointer:coarse) and (max-width: 1199px) {

}


/*============================================================
 *
 *  MD  ipad
 *
 */
@media (max-width: 991px) {

}


/*============================================================
 *
 *  SM smart-phone 576-767
 *  XS 0-567
 */
@media (max-width: 767px) {
    .accessible-slider-cycle .slider-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}


/*============================================================
 *
 * XS   smartphone
 *
 */
@media (min-width: 10px)  and (max-width: 575px) {

}


/*
.container-list-images-preview {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


.container-list-images-preview img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    object-position: center center;
}
*/

.container-list-images-preview {
    width: 100%;
    height: 100%;
    position: relative;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
}

.container-list-images-preview picture {
    width: 100%;
    height: 100%;
}

.container-list-images-preview picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}
