
/* ----------------------------------------------------------------------------- dancarousel styles */

.dancarousel .backg {
  background-position: center center !important;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size:cover;
  padding-bottom:100%;
  display: block;
  width: 100%;
}
.dancarousel .backg.crop {
  background-size: cover;
}
.dancarousel .backg.contain {
  background-size: contain;
}
.dancarousel .backg.fixed {
  background-attachment: fixed;
}

@media screen and (max-width: 800px) {
  .dancarousel .backg,
  .dancarousel .backg.fixed {
    /* La riga seguente è stata commentata per permettere l'effetto di sfondo fisso anche su mobile. */
    /* Attenzione: questo potrebbe impattare le performance su alcuni dispositivi. */
    background-size: cover !important;
    background-position: center !important;
    box-sizing: content-box;
  }
}

/* --------------------------------------------- danimgintro styles */


.dancarousel .banner .bar {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 99;
  line-height: 1em;
  background-color: rgba(255, 255, 255, 0.7);
  box-sizing: border-box;
  padding: 1vw !important;
  -webkit-transition: all 3s ease;
  -o-transition: all 1s ease;
  -moz-transition: all 1s ease;
  -ms-transition: all 1s ease;
  -kthtml-transition: all 1s ease;
  transition: all 1s ease;
}

.dancarousel .slider.article .bar.active a {
  color: #fff;
}
.dancarousel .slider.article .bar.active {
  -moz-transform: translateX(0px) translateY(-20px);
  -webkit-transform: translateX(0px) translateY(-20px);
  -o-transform: translateX(0px) translateY(-20px);
  -ms-transform: translateX(0px) translateY(-20px);
  transform: translateX(0px) translateY(-20px);
  background-color: rgba(255, 255, 255, 0.4);
}
.dancarousel .slider.article .data {
  float: left;
}
.dancarousel .slider.article .prezzo {
  float: right;
}
/* --------------------------------------------- danimgintro styles END */

/* -------------------------------- content */
.dancarousel .contentbox {
  position: absolute;
  top: 15%;
  left: 0;
  z-index: 9;
  text-shadow: 0px 0px 4px #fff;
  box-sizing: border-box;
  width: 100%;
}
.dancarousel .contentbox > a {
  display: block;
  width: 100%;
  height: 100%;
}
.dancarousel .innerbox {
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
}


.dancarousel .autoplay-progress {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--swiper-theme-color);
  opacity:.5;
}

.dancarousel .autoplay-progress svg {
  --progress: 0;
  position: absolute;
  left: 0;
  top: 0px;
  z-index: 10;
  width: 100%;
  height: 100%;
  stroke-width: 4px;
  stroke: var(--swiper-theme-color);
  fill: none;
  stroke-dashoffset: calc(125.6 * (1 - var(--progress)));
  stroke-dasharray: 125.6;
  transform: rotate(-90deg);
}



/* Layout Flexbox per lo stile "Immagine e Testo" */
.img-text-layout {
  display: flex;
  flex-wrap: wrap; /* Permette di andare a capo su schermi piccoli */
  height: 100%;
  width: 100%;
  align-items: stretch; /* Assicura che le colonne abbiano la stessa altezza */
}

.img-text-layout__image,
.img-text-layout__content {
  flex: 1 1 100%; /* Su mobile, ogni elemento occupa il 100% della larghezza */
  box-sizing: border-box;
}

.img-text-layout__image .backg {
  min-height: 250px; /* Altezza minima per l'immagine su mobile */
}

.img-text-layout__content {
    padding: 1.5rem; /* Sostituisce la classe p-4 di Bootstrap */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Stili per schermi più grandi (es. tablet e desktop) */
@media (min-width: 768px) {
  .img-text-layout {
    flex-wrap: nowrap; /* Impedisce di andare a capo */
  }

  .img-text-layout__image,
  .img-text-layout__content {
    flex: 1 1 50%; /* Ogni colonna occupa il 50% dello spazio */
  }

  .img-text-layout__image .backg {
    min-height: unset; /* Rimuove l'altezza minima su desktop */
    height: 100%;
  }
}
