.csshover-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: var(--ratio, 66.66%);
  overflow: hidden;
}

.csshover-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Effetti */
.csshover-fade .csshover-after {
  opacity: 0;
  transition: opacity var(--dur, .5s);
}
.csshover-fade:hover .csshover-after {
  opacity: 1;
}

.csshover-zoom .csshover-after {
  transform: scale(1.2);
  opacity: 0;
  transition: transform var(--dur, .5s), opacity var(--dur, .5s);
}
.csshover-zoom:hover .csshover-after {
  transform: scale(1);
  opacity: 1;
}

.csshover-swipe .csshover-after {
  transform: translateX(100%);
  transition: transform var(--dur, .5s);
}
.csshover-swipe:hover .csshover-after {
  transform: translateX(0);
}

.csshover-cycle .csshover-after {
  opacity: 0;
  animation: cycle var(--dur, .5s) infinite alternate;
}
@keyframes cycle {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Allineamento inline */
.wp-caption[class*="csshover-"] {
  display: inline-block;
  vertical-align: middle;
  margin: 0 1em 1em 0;
  padding-bottom: 5px; /* ← aggiunto */
}
.wp-caption.csshover-left   { float: left;  margin-right: 10px;}
.wp-caption.csshover-right  { float: right;  margin-left: 10px;}
.wp-caption.csshover-center { display: block; margin-left: auto; margin-right: auto; }
