/**
 * Block: Press Video
 * Video full width per articoli press
 */

.s4w-press-video {
  width: 100%;
  padding: 48px 0 !important;
  margin: 0 !important;
}
.s4w-press-video.s4w-pt-0 {
  width: 100%;
  padding-top: 0 !important;
}
.s4w-press-video.s4w-pb-0 {
  width: 100%;
  padding-bottom: 0 !important;
}

/* Container video con aspect ratio 16:9 */
.s4w-press-video__wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-strong-900);
  overflow: hidden;
}
.news-article__wrapper .s4w-press-video {
    padding-left: 40px !important;
    padding-right: 40px !important;
}
@media (min-width: 1601px) {
  .news-article__wrapper .s4w-press-video {
    padding-left: 80px !important;
    padding-right: 80px !important;
  }
}

/* Wrapper con copertina */
.s4w-press-video__wrapper--has-cover {
  cursor: pointer;
}

/* Video nascosto quando c'è la copertina */
.s4w-press-video__wrapper--has-cover .s4w-press-video__iframe,
.s4w-press-video__wrapper--has-cover .s4w-press-video__player {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Video visibile dopo il click (rimozione copertina) */
.s4w-press-video__wrapper--has-cover.is-playing .s4w-press-video__iframe,
.s4w-press-video__wrapper--has-cover.is-playing .s4w-press-video__player {
  opacity: 1;
}

/* Iframe (YouTube) */
.s4w-press-video__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* HTML5 Video */
.s4w-press-video__player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   COPERTINA VIDEO CON PLAY BUTTON
   ========================================================================== */

/* Copertina overlay */
.s4w-press-video__cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: auto;
}

/* Stato nascosto (dopo click) */
.s4w-press-video__cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Immagine/GIF copertina */
.s4w-press-video__cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play button centrato */
.s4w-press-video__play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.3s ease;
}

.s4w-press-video__play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.s4w-press-video__play-button:active {
  transform: translate(-50%, -50%) scale(0.95);
}

/* Cerchio bianco del play button */
.s4w-press-video__play-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 102px;
  height: 102px;
  background-color: var(--bg-white-0);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

.s4w-press-video__play-button:hover .s4w-press-video__play-circle {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Testo PLAY */
.s4w-press-video__play-text {
  color: var(--text-main-900);
  user-select: none;
}

/* Focus accessibilità */
.s4w-press-video__play-button:focus-visible {
  outline: 2px solid var(--color-blu);
  outline-offset: 4px;
}

.s4w-press-video__play-button:focus:not(:focus-visible) {
  outline: none;
}

/* Mobile */
@media (max-width: 768px) {
  .s4w-press-video {
    padding: 32px 0 !important;
  }

  /* Play button più piccolo su mobile */
  .s4w-press-video__play-circle {
    width: 80px;
    height: 80px;
  }
}
