.horizontal-scroll-section {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
}

.horizontal-scroll-section .horizontal-scroll-wrapper {
    display: flex;
    flex-direction: row;
    height: 100vh !important;
    max-height: 100vh;
    flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
    position: relative;
    overflow-x: hidden !important; 
    overflow-y: hidden !important;
    padding-top: calc(var(--menu-height) + var(--sticky-h-height));
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container {        
    width: auto;
    min-width: 100vw;
    max-width: 1920px;
    height: 100%;   
    flex-shrink: 0;
    display: flex;
    box-sizing: border-box;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container-inner {
    display: flex;
    height: 100%;
    width: auto;
}

/*.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container:not(.active) .hs-full-height-img-block,
.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container:not(.active) .hs-textual-block {
    opacity: 0;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container:not(.active) .hs-full-height-img-block img {
    height: 0;
}*/

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container,
.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container-inner,
.horizontal-scroll-section .horizontal-scroll-wrapper .hs-full-height-img-block,
.horizontal-scroll-section .horizontal-scroll-wrapper .img-container,
.horizontal-scroll-section .horizontal-scroll-wrapper picture,
.horizontal-scroll-section .horizontal-scroll-wrapper img,
.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-textual-block {
    height: 100%;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .img-container {
    width: auto;
    /*width: max-content;*/
    position: relative;
    overflow: hidden;
    display: block;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-full-height-img-block {
    position: relative;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-full-height-img-block img {
    width: auto;
    height: 100%;
    display: block;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-textual-block {
    min-width: 60vw;
    flex-shrink: 0;
    display: flex;
    /*opacity: 1;*/
    align-items: center;
}
.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-textual-block .text-wrapper { 
    max-width: 556px;
    margin-left: 74px;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container:nth-child(1) .reveal-panel {
    height: 0;
}

.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .split-line .h2-style:not(:last-child) {
    padding-bottom: 0px;
}

/* SMALL IMAGE */
.horizontal-scroll-section .horizontal-container-wrp .horizontal-container:first-child.is-small-card {
    margin-right: 40px;
}
.horizontal-scroll-section .horizontal-container.is-small-card {
    min-width: 325px;
    width: 325px;
    margin-right: 135px;
}

.horizontal-scroll-section .horizontal-container.is-small-card .img-container { 
    display: flex;
}
.horizontal-scroll-section .horizontal-container.is-small-card .img-container img,
.horizontal-scroll-section .horizontal-container.is-small-card .img-container picture {
    height: auto;
}
.horizontal-scroll-section .horizontal-container.is-small-card.pos-bottom .img-container { 
    align-items: end;
    padding-bottom: 40px;
}
.horizontal-scroll-section .horizontal-container.is-small-card.pos-center .img-container { 
    align-items: center;
}
.horizontal-scroll-section .horizontal-container.is-small-card .img-container img {
    border-radius: 16px;
}

/* BOX TEXT */
.horizontal-scroll-section .horizontal-container.is-box-text {
    min-width: auto;
    width: auto;
    margin-left: 135px;
    margin-right: 135px;
}

.horizontal-scroll-section .horizontal-container.is-box-text .text-wrapper {
    display: flex; 
    min-width: 438px;
    width: 438px;    
}

.horizontal-scroll-section .horizontal-container.is-box-text .text-wrapper-inner {
    padding: 40px 24px;
    border-radius: 16px;
}

.horizontal-scroll-section .horizontal-container.is-box-text.pos-center .text-wrapper { 
    align-items: center;
}

/*.horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container:last-child {
    margin-right: 0 !important;
}*/

.horizontal-scroll-section .horizontal-container-wrp {
    display: flex;
    flex-direction: row;
}

/* accessibility */

/* --- SCROLLBAR --- */
.horizontal-scroll-section .horizontal-scrollbar {
    position: absolute;
    bottom: 25px;
    left: 10%;
    width: 80%;
    height: 4px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.horizontal-scroll-section.is-active .horizontal-scrollbar,
.horizontal-scroll-section:focus-within .horizontal-scrollbar {
    opacity: 1;
}

.horizontal-scroll-section .scrollbar-thumb {
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 4px;
    transform-origin: left center;
    transform: scaleX(0);
    height: 4px;
}

/* ACCESSIBILITÀ: REVEAL AUTOMATICO SU FOCUS */

/* Quando un elemento dentro il container ha il focus... */
.horizontal-scroll-section .horizontal-container:focus-within .reveal-panel {
    height: 0 !important; /* ...apri il sipario immediatamente */
    opacity: 0 !important;
}

/* Mostra anche il testo immediatamente */
.horizontal-scroll-section .horizontal-container:focus-within .text-wrapper-inner {
    opacity: 1 !important;
    transform: none !important;
}

.horizontal-scroll-section .horizontal-container:focus-within {
    outline: none;
}


@media screen and (max-width: 1024px) {

    .horizontal-scroll-section .horizontal-scroll-wrapper {
        height: auto !important;
        max-height: inherit;
        width: 100%;
        padding-right: 0px;
        padding-top: 0px;
    }

    .horizontal-scroll-section {
        height: auto !important;
        padding-bottom: 80px;
    }

    .horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container {
        max-width: 100%;
    }

    .horizontal-scroll-section .horizontal-scroll-wrapper,
    .horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container,
    .horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .horizontal-container-inner {
        flex-direction: column;
    }   

    .horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-full-height-img-block,
    .horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-textual-block,
    .horizontal-scroll-section .horizontal-scroll-wrapper .img-container {
        width: 100%;
        min-width: inherit;
    }

    .horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-textual-block .text-wrapper {
        max-width: 100%;
        margin-left: 0px;
        padding: 24px 24px 40px;
    }

    .horizontal-scroll-section .horizontal-scroll-wrapper .horizontal-container .hs-full-height-img-block img {
        width: 100%;
        height: 100%;
    }

    .horizontal-scroll-section .horizontal-container.is-box-text {
        margin-left: 24px;
        margin-right: 24px;
        width: auto;
        align-items: center;
        margin-top: 40px;
        margin-bottom: 24px;
    }

    .horizontal-scroll-section .horizontal-container.is-box-text .text-wrapper {
        min-width: auto;
        max-width: 438px;
        width: auto;
    }

    .horizontal-scroll-section .horizontal-container-wrp .horizontal-container.is-small-card .img-container {
        display: block;
    }

    .horizontal-scroll-section .horizontal-container-wrp .horizontal-container.is-small-card {
        max-width: 180px;
    }

    .horizontal-scroll-section  .horizontal-container.is-small-card.pos-bottom .img-container {
        padding-bottom: 0px;
    }

    .horizontal-scroll-section .horizontal-container-wrp .horizontal-container.is-small-card .img-container img {
        height: 180px;
        width: 100%;
        object-fit: cover;
        padding-bottom: 0px;
    }    

    .horizontal-scroll-section .horizontal-container-wrp .horizontal-container.is-small-card {
        margin: 0px;
    }

    .horizontal-scroll-section .horizontal-container-wrp .horizontal-container:first-child.is-small-card {
        padding-top: 80px;
        margin-right: 15px;
    }

    .horizontal-scroll-section .horizontal-container.is-small-card .img-container img {
        height: 325px;
        width: 100%;
        object-fit: cover;
    }

    .horizontal-scroll-section .horizontal-container-wrp {
        justify-content: center;
        padding-top: 80px;
    }  
    
    .horizontal-scroll-section .horizontal-container.is-small-card {        
        width: 100%;
        max-width: 325px;
        flex-shrink: inherit;
        min-width: auto;
        margin: 0 auto;
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .horizontal-scroll-section .horizontal-container.is-small-card .img-container {
        display: block;
    }
    
    .horizontal-scroll-section .curve-effect.hide-curve-on-mobile {
        display: none;
    }

    .horizontal-scroll-section .horizontal-scrollbar {
        display: none;
    }
}
