/* =========================================================================
   Sistel Slider - styles for [sistel_gallery] and [sistel_valori]
   (replacement for Smart Slider 3 Pro). BEM prefix: ssl
   ========================================================================= */

.ssl {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    --ssl-gap: 10px;
    --ssl-slide-w: 350px;
    outline: none;
}

.ssl:focus-visible {
    outline: 2px solid #b80412;
    outline-offset: 4px;
}

.ssl__viewport {
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.ssl--dragging .ssl__viewport {
    cursor: grabbing;
}

.ssl ul.ssl__track {
    display: flex;
    gap: var(--ssl-gap);
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    line-height: 0;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.ssl li.ssl__slide {
    flex: 0 0 var(--ssl-slide-w);
    width: var(--ssl-slide-w);
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    line-height: normal;
}

.ssl__slide img {
    display: block;
    max-width: 100%;
    -webkit-user-drag: none;
    user-select: none;
}

.ssl li.ssl__slide--empty {
    visibility: hidden;
}

/* ---------- arrows (shared) ---------- */

.ssl .ssl__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.67);
    color: #fff;
    line-height: 0;
    cursor: pointer;
    box-shadow: none;
    transform: translateY(-50%);
    transition: background 0.3s, opacity 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.ssl .ssl__arrow:hover,
.ssl .ssl__arrow:focus-visible {
    background: #b80412;
    color: #fff;
}

.ssl__arrow[disabled] {
    opacity: 0.35;
    cursor: default;
}

.ssl__arrow--prev {
    left: 15px;
}

.ssl__arrow--next {
    right: 15px;
}

.ssl__arrow svg {
    display: block;
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* ---------- gallery carousels (3 x 350x180 inside a 1080x200 canvas) ---------- */

.ssl--gallery {
    padding: 10px 5px;
    box-sizing: border-box;
}

.ssl--gallery .ssl__media {
    position: relative;
    display: block;
    cursor: pointer;
    margin: 0;
    padding: 0;
    aspect-ratio: 35 / 18;
    overflow: hidden;
    background: #000;
}

.ssl--gallery .ssl__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.8s;
    will-change: transform;
}

.ssl--gallery .ssl__slide:hover .ssl__media img {
    transform: scale(1.1);
}

@media (max-width: 900px) and (orientation: landscape) {
    .ssl--gallery .ssl__arrow {
        display: none;
    }
}

/* ---------- Valori numbered carousel (3 x 340x340) ---------- */

.ssl--valori {
    --ssl-gap: 30px;
}

.ssl--valori .ssl__card {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #042541;
    font-family: "Barlow", Helvetica, Arial, Lucida, sans-serif;
}

.ssl--valori .ssl__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.8s;
    will-change: transform;
}

.ssl--valori .ssl__slide:hover .ssl__bg {
    transform: scale(1.1);
}

.ssl--valori .ssl__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.43);
    pointer-events: none;
}

.ssl--valori .ssl__number,
.ssl--valori .ssl__title {
    position: absolute;
    left: 0;
    margin: 0;
    color: #fff;
    font-family: inherit;
    pointer-events: none;
}

.ssl--valori .ssl__number {
    top: 0;
    padding: 20px;
    font-size: 60px;
    font-weight: 700;
    line-height: 0.7;
    text-transform: none;
}

.ssl--valori .ssl__title {
    bottom: 30px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
}

.ssl--valori .ssl__arrow {
    top: -130px;
    width: 45px;
    height: 45px;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #657a8b;
    transform: none;
}

.ssl--valori .ssl__arrow--prev {
    left: 0;
}

.ssl--valori .ssl__arrow--next {
    right: auto;
    left: 60px;
}

.ssl--valori .ssl__arrow img {
    display: block;
    width: 25px;
    height: 25px;
    max-width: none;
}

.ssl--valori .ssl__arrow:hover,
.ssl--valori .ssl__arrow:focus-visible {
    background: #b80412;
}

@media (max-width: 1199px) {
    .ssl--valori .ssl__arrow {
        width: 40px;
        height: 40px;
    }

    .ssl--valori .ssl__arrow img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 700px) {
    .ssl--valori .ssl__arrow {
        display: none;
    }

    .ssl--valori .ssl__number {
        font-size: 44px;
    }

    .ssl--valori .ssl__title {
        font-size: 28px;
    }
}

/* ---------- lightbox (replaces Smart Slider "litebox") ---------- */

html.ssl-lightbox-open {
    overflow: hidden;
}

.ssl-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000000;
    display: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-width: 280px;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.4s;
    -webkit-user-select: none;
    user-select: none;
    touch-action: pan-y;
}

.ssl-lightbox.is-visible {
    display: block;
}

.ssl-lightbox.is-open {
    opacity: 1;
}

.ssl-lightbox *,
.ssl-lightbox *::before,
.ssl-lightbox *::after {
    box-sizing: border-box;
}

.ssl-lightbox__stage {
    position: absolute;
    top: 10%;
    right: 10%;
    bottom: 10%;
    left: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ssl-lightbox .ssl-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    transition: opacity 0.2s;
    -webkit-user-drag: none;
}

.ssl-lightbox.is-loading .ssl-lightbox__img {
    opacity: 0.4;
}

.ssl-lightbox .ssl-lightbox__close,
.ssl-lightbox .ssl-lightbox__nav {
    position: absolute;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    cursor: pointer;
    line-height: 0;
    -webkit-appearance: none;
    appearance: none;
}

.ssl-lightbox .ssl-lightbox__close {
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
}

.ssl-lightbox .ssl-lightbox__nav {
    top: 50%;
    z-index: 2;
    width: 60px;
    height: 60px;
    margin-top: -30px;
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
}

.ssl-lightbox .ssl-lightbox__nav:hover,
.ssl-lightbox .ssl-lightbox__nav:focus-visible {
    opacity: 0.8;
}

.ssl-lightbox .ssl-lightbox__nav--prev {
    left: 20px;
}

.ssl-lightbox .ssl-lightbox__nav--next {
    right: 20px;
}

.ssl-lightbox svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ssl-lightbox .ssl-lightbox__close:focus-visible,
.ssl-lightbox .ssl-lightbox__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ssl-lightbox__counter {
    position: absolute;
    bottom: 3%;
    left: 0;
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 20px;
    text-align: center;
    pointer-events: none;
}

@media (max-width: 479px) {
    .ssl-lightbox .ssl-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .ssl-lightbox__stage {
        right: 4%;
        left: 4%;
    }

    .ssl-lightbox .ssl-lightbox__nav {
        width: 44px;
        height: 44px;
        margin-top: -22px;
    }

    .ssl-lightbox .ssl-lightbox__nav--prev {
        left: 6px;
    }

    .ssl-lightbox .ssl-lightbox__nav--next {
        right: 6px;
    }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    .ssl-lightbox {
        transition: none !important;
    }

    .ssl ul.ssl__track {
        transition: none !important;
    }

    .ssl--gallery .ssl__media img,
    .ssl--valori .ssl__bg {
        transition: none;
    }
}
