.cps-slider {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px; /* Altezza minima di sicurezza */
  overflow: hidden;
}

.cps-main-slider-wrapper {
  overflow: hidden;
  position: relative;
  height: 100%;
}

.cps-slider-track {
  display: flex;
  height: 100%;
  will-change: transform;
  /* Transizione solo per slide, non per fade */
  transition: transform 0.5s ease-in-out;
}

.cps-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center; /* Allinea il contenuto al centro */
	width: 100%;
}

/* Gradiente sfumato in basso */
.cps-slide::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 40%;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  z-index: 1;
}

/* Testo slide sopra il gradiente */
.cps-slide-content {
  bottom: 30px;
  left: 30px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cps-read-more {
  display: inline-block;
  margin-top: 10px;
  background: #fff;
  color: #000;
  padding: 5px 10px;
  text-decoration: none !important;
	position:relative;
	z-index:1000;
	
}

/* Miniature sovrapposte in basso */
.cps-thumbnails {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  background: rgba(42, 65, 108, 0.6);
  z-index: 3;
}

.cps-thumb {
  flex: 1;
  text-align: center;
  cursor: pointer;
  padding: 15px;
  background: transparent;
  color: white;
  position: relative;
  overflow: hidden;
}

.cps-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cps-thumb-title {
  font-size: 14px;
  z-index: 2;
  position: relative;
  line-height: 1.5;
}

/* Barra di caricamento */
.cps-thumb-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  background: #e91e63;
  width: 0%;
  transition: none;
  z-index: 1;
}

.cps-thumb-progress.animate {
  animation: cps-progress-bar linear forwards;
}

@keyframes cps-progress-bar {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Frecce navigazione */
.cps-slider .cps-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  z-index: 4;
  transform: translateY(-50%);
  pointer-events: none;
	padding: 0 50px;
}

.cps-slider .cps-nav button {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 24px;
  padding: 10px;
  pointer-events: all;
  cursor: pointer;
}

.cps-slider.cps-site-width .cps-thumbnails {
  width: 1140px;
  margin: 0 auto;
}

.cps-slider.cps-site-width .cps-slide-content-wrapper {
  width: 1140px;
  margin: 0 auto;
}

.cps-slider.cps-full-width .cps-thumbnails {
  width: 100%;
  padding: 0;
}

.cps-slider.cps-full-width .cps-slide-content-wrapper {
  width: 100%;
  padding: 0;
}

.cps-thumbnails-wrapper {
    display: flex;
    justify-content: center;
}

/* TRANSIZIONI FADE - Specifiche per il tipo fade */
.cps-slider-track.cps-fade-transition {
    transform: none !important;
    transition: none !important; /* Rimuovi transizione per fade */
}

.cps-slider-track.cps-fade-transition .cps-slide {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.cps-slider-track.cps-fade-transition .cps-slide.active {
    opacity: 1;
}
h2.frase-chiave
{
    position: absolute;
    width: 100%;
    top: 0px;
    left: 0px;
    display: block;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 10px 20px;
	color: #FFF;
	font-size:22px;
}

.cps-slide-content
{
  background-color: transparent !important;
}
.cps-slide-content h2
{
  color: #FFF !important;
  font-size: clamp(1.75rem, 1.625rem + 0.3125vw, 2rem); !important;
  /* max-width: 50%; */
  background-color: #2a416c;
  padding: 5px 10px;
  border-radius: 5px;
}

/* Media queries */
@media (min-width: 641px) and (max-width: 1024px) 
{ 
	.cps-slider.cps-site-width .cps-slide-content-wrapper {
  		width: 100%;
  		margin: 0 auto;
		padding: 0 100px;
	}
	.cps-slider.cps-site-width .cps-thumbnails {
  		width: 100%;
  		margin: 0 auto;
		padding: 0 20px;
	}
	
	.cps-thumb {
	  padding: 5px;
	}
}
@media (max-width: 640px) 
{ 
	.cps-slider.cps-site-width .cps-slide-content-wrapper {
  		width: 100%;
  		margin: 0 auto;
		padding: 0 40px;
	}
	.cps-thumbnails {
		display:none;
	}
	.cps-slide
	{
		align-items: flex-end;
	}
	
	.cps-slider .cps-nav {
		padding: 0;
		height:100%;
	}

	.cps-slider .cps-nav button {
  		font-size: 24px;
		padding-left:15px;
		padding-right:15px;
	}
	.cps-slide-content h2
	{
  		/*font-size: clamp(1.625rem, 1.5rem + 0.625vw, 1.75rem); !important;*/
	}
	h2.frase-chiave
	{
		font-size:16px !important;
		padding-left:50px !important;
		padding-right:50px !important;
	}	
}

@media (max-width: 768px) {
  .cps-thumb-title {
    font-size: 12px;
  }

}