/* Horizontal scroll component */

.horizontal-scroll-spacer {
  height: 0;
}

.accademia .horizontal-scroll-spacer, .storia .horizontal-scroll-spacer {
    display: none;
  }

#paragrafi .hscroll-container {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  align-items: stretch;
  overflow: visible;
}

#paragrafi .hscroll-container .panel:nth-child(1) {
  flex: 0 0 100vw;
}

body:not(.home) #paragrafi .hscroll-container .panel:nth-child(1) {
    flex: 0 0 auto;
}

#paragrafi .hscroll-container .panel {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 100vh;
}

section.panel {
  align-self: stretch;
  padding: 0 60px;
}

.storia section.panel:nth-child(2 + n) {
  align-self: stretch;
  padding: 0 10px;
}

@media screen and (min-width:967px) {.storia .layout16 h3 {
    height:200px;
}


.storia .layout16 .col-80 {
        height:200px;
}}


#paragrafi .hscroll-container section.bg-none.panel figure, #paragrafi .hscroll-container section.bg-none.panel figure a, #paragrafi .hscroll-container section.bg-none.panel figure img {
    max-height: 80vh;
    max-width: 800px;
    object-fit: cover;
}

.panel .layout6 video {
    border-radius: 10px;
    max-height: 80vh;
    max-width: 800px;
    padding: 0;
}

.panel svg {
    max-width: 650px;
    max-height: 400px;
}


section.final,
section.final .margin-auto {
  margin: 0 !important;
}

.final {
  width: 100%;
}

#page .hscroll-container {
  height: auto !important;
}

.hscroll-container {
  max-height: none;
  min-height: 100vh;
}

.page-card-title {
  position: absolute;
  bottom: 0;
  padding: 20px;
}

.figure-page {
  display: block;
}

.page-card {
  height: 100%;
  position: relative;
}

.hscroll-container .page-card {
  width: 100%;
  max-width: 660px;
  overflow: hidden;
  max-height: 450px;
  border-radius: 5px;
}

.hscroll-container .dynamic-grid {
  flex-direction: column;
}

.hscroll-container .paddingbasey10 {
  padding: 0 !important;
}

.panel {
  height: 100vh;
  align-content: center;
}

.hscroll-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 20px auto 10px;
  cursor: pointer;
}

.hscroll-toggle.hscroll-toggle--inline {
  vertical-align: middle;
}

.hscroll-toggle.is-active {
  opacity: 0.5;
  pointer-events: none;
}

.hscroll-skip {
  position: fixed;
  right: 50%;
  bottom: 0;
  transform: translateY(-50%);
  z-index: 9998;
  display: inline-flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

button.hscroll-skip.btn.btn-small {
    background: white;
    border-radius: 5px;
    cursor: pointer;
}

.hscroll-skip.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hscroll-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.hscroll-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s;
}

.hscroll-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hscroll-modal__panel {
  position: relative;
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: calc(100% - 8px);
  background: #fff;
  overflow: auto;
  padding: 10px 10px;
  margin: 0;
  border-radius: 0;
  transform: translate3d(0, 30px, 0);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.25s ease;
  will-change: transform, opacity;
}


.hscroll-modal__panelItem .paddingbasey10{
    padding: 0
}

.hscroll-modal__panelItem a.btn.btn-style-1 {
    margin-top: 30px;
}

.hscroll-modal.is-open .hscroll-modal__panel {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}


.hscroll-modal__close {
  position: sticky;
  top: 0;
  padding: 0;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hscroll-modal__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hscroll-modal__panelItem {
  height: auto;
  min-height: auto;
}

.hscroll-modal__panelItem video, .hscroll-modal__panelItem figure {
    border-radius: 5px;
    overflow: hidden;
}

body.hscroll-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}


body .storia  #paragrafi .hscroll-container section.bg-none.panel:after{
    content: '';
    height: 2px;
    left: 0;
    top: 50%;
    position: absolute;
    background: var(--accent-color);
    width: 100vw;
    opacity: 0.2;
    z-index:0;
}

#paragrafi .hscroll-container section.bg-none.panel:first-child:after {
    left: 10%;
}

#paragrafi .hscroll-container section.bg-none.panel:last-child:after {
  display: none;
}

body .storia  #paragrafi .hscroll-container .panel.final {
  width: max-content;

}

#paragrafi .hscroll-container section.bg-none.panel figure {
    z-index:100;
}
.layout16 .box-card .absolute {
  z-index: 100;
}


#paragrafi .hscroll-container section.bg-none.panel {
    position:relative;
}
#paragrafi .hscroll-container .panel div.layout6 {
    z-index: 1!important;
    position: relative;
}

body .storia .hscroll-container .layout16 h3.Normale {
    font-family: var(--font-principale);
    font-size: var(--size-h2);
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  #paragrafi .hscroll-container .panel:nth-child(1) .layout1 .col-50:nth-child(2) {
    width: 50%;
  }
}

@media screen and (min-width: 1025px) {
  .storia .pin-spacer {
    margin-bottom: 100px !important;
  }
} 

@media (max-width: 1024px) {
  #paragrafi .hscroll-container.hscroll-locked {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .col-100.bottom-link-mob {
    display: none !important;
}

  #paragrafi .hscroll-container.hscroll-locked .panel {
    display: none;
  }

  #paragrafi .hscroll-container.hscroll-locked .panel:first-of-type {
    display: block;
  }

  #paragrafi .hscroll-container.hscroll-revealed {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
  }

  #paragrafi .hscroll-container.hscroll-revealed .panel {
    flex: 1 1 auto;
    width: 100%;
    min-height: auto;
    height: auto;
  }

  #paragrafi .hscroll-container.hscroll-locked .panel,
  #paragrafi .hscroll-container.hscroll-revealed .panel {
    height: auto;
    min-height: auto;
  }

  #paragrafi .hscroll-container.hscroll-locked,
  #paragrafi .hscroll-container.hscroll-revealed {
    min-height: auto;
  }

  #paragrafi .hscroll-container.hscroll-revealed figure,
  #paragrafi .hscroll-container.hscroll-revealed img {
    width: 100%;
    height: auto;
    display: block;
  }

  .horizontal-scroll-spacer {
    display: none;
  }

  .hscroll-toggle {
    display: inline-flex;
  }

  .hscroll-skip {
    display: none !important;
  }

  
  body.home .panel .layout1 .bottom-link-mob {
    justify-content: left;
    gap: 0px;
  }

  .hscroll-modal__panelItem svg {
    height: auto;
  }

  .layout16__rightScrollInner .title-h4-middle {
    font-size: 16px;
  }

   #paragrafi .hscroll-container .panel {
    flex: auto;
    padding: 0;
  }

  .hscroll-modal__content .panel {
    padding: 0;
    height: auto;
    width: 100%;
  }

  .panel.hscroll-modal__panelItem .gap-150px {
    gap: 0;
  }

  .panel.hscroll-modal__panelItem .paddingbasebottom4 {
    padding-bottom: 0;
  }

  .panel.hscroll-modal__panelItem .layout16.paragrafo .flex .flex {
    flex-direction: column;
    width:100%;
  }

  .hscroll-modal__panelItem .gap-140px {
    gap: 20px;
  }
}

.storia .layout6 p {
    display: none;
}

@media screen and (max-width: 1023px) {

 html .layout16__rightScrollInner .flex {
    gap: 10px!important;
  }

 .hscroll-modal.is-open .layout16.paragrafo .flex .flex:not(.gapbase), .layout6.paragrafo.paddingbasey5.marginbasey6  {
      gap: 0!important;
      margin:0;
  }
  .layout16__rightScrollInner {
    margin-top: 30px;
  }
    
  .hscroll-modal.is-open .layout6 {
      flex-direction: column-reverse;
      display: flex;
  }
}
