/**
 * Block: Press Image
 * Immagine singola o galleria full width con caption
 */

.s4w-press-image {
  width: 100%;
  padding: 48px 0 !important;
  margin: 0 !important;
}
.s4w-press-image.s4w-pt-0 {
  width: 100%;
  padding-top: 0 !important;
}
.s4w-press-image.s4w-pb-0 {
  width: 100%;
  padding-bottom: 0 !important;
}

.s4w-press-image__wrapper {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.s4w-press-image__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.s4w-press-image__caption {
  margin-top: 16px;
  font-family: var(--font-secondary);
  font-size: var(--paragraph-small);
  font-style: normal;
  font-weight: var(--weight-regular);
  line-height: 160%;
  color: var(--text-soft-400);
}

/* ==========================================================================
   GALLERIA SWIPER
   ========================================================================== */
.s4w-press-image__slider-container {
  position: relative;
  width: 100%;
}

.s4w-press-image__slider {
  position: relative;
  width: 100%;
}

.s4w-press-image__slider .swiper-slide {
  width: 100%;
}

.s4w-press-image__slider .s4w-press-image__slide-content {
  position: relative;
  width: 100%;
}

.s4w-press-image__slider .s4w-press-image__wrapper {
  position: relative;
  width: 100%;
}

/* Gradient overlay - from 40% transparent to 60% black */
.s4w-press-image__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Navigation controls wrapper - posizionati dentro lo swiper, sul bordo inferiore immagine wrapper */
.s4w-press-image__slider .s4w-press-image__navigation {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
  pointer-events: none;
}

/* Rendi cliccabili solo pagination e button */
.s4w-press-image__pagination,
.s4w-press-image__toggle-btn {
  pointer-events: auto;
}

/* Pagination bullets */
.s4w-press-image__pagination {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.s4w-press-image__pagination .swiper-pagination-bullet {
  width: 100%;
  max-width: none;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  margin: 0;
  flex: 1;
  transition: background 0.3s ease;
}

.s4w-press-image__pagination .swiper-pagination-bullet-active {
  background: rgba(255, 255, 255, 0.7);
}

/* Pause/Play button */
.s4w-press-image__toggle-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.25s ease;
}

.s4w-press-image__toggle-btn:hover {
  opacity: 0.7;
}

.s4w-press-image__toggle-btn:active {
  opacity: 0.5;
}

.s4w-press-image__toggle-btn:focus {
  outline: none;
}

/* Icons */
.s4w-press-image__icon {
  width: 32px;
  height: 32px;
  display: block;
}

.s4w-press-image__icon--play {
  display: none;
}

/* When paused, show play icon */
.s4w-press-image__toggle-btn.is-paused .s4w-press-image__icon--pause {
  display: none;
}

.s4w-press-image__toggle-btn.is-paused .s4w-press-image__icon--play {
  display: block;
}

/* Caption dentro slide della galleria */
.s4w-press-image__slider .s4w-press-image__caption {
  margin-top: 16px;
}

/* Width modes */
.s4w-press-image--contained > .s4w-press-image__wrapper,
.s4w-press-image--contained .s4w-press-image__slider-container {
  padding: 0 80px;
}

.s4w-press-image--narrow .s4w-press-image__wrapper,
.s4w-press-image--narrow .s4w-press-image__slider-container {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile */
@media (max-width: 768px) {
  .s4w-press-image {
    padding: 32px 0 !important;
  }

  .s4w-press-image__caption {
    font-size: 13px;
  }

  .s4w-press-image__navigation {
    bottom: 16px;
    left: 12px;
    right: 12px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .s4w-press-image__slider .swiper-wrapper {
    transition: none !important;
  }
}
