/* =========================================================================
   Gallery masonry
   ========================================================================= */

.mvg-gallery {
  column-count: 3;
  column-gap: 10px;
}

.mvg-item {
  break-inside: avoid;
  margin-bottom: 10px;
}

.mvg-item img {
  width: 100%;
  display: block;
  cursor: pointer;
}

/* Wrapper video con icona play sovrapposta */
.mvg-video {
  position: relative;
  display: block;
}

.mvg-video::after {
  content: "▶";
  font-size: 50px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.8;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

/* =========================================================================
   Lightbox
   ========================================================================= */

.mvg-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.mvg-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.mvg-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  line-height: 1;
  z-index: 10000;
  user-select: none;
}

.mvg-lightbox-close:hover {
  color: #ccc;
}

/* =========================================================================
   Controlli video custom
   ========================================================================= */

.mvg-video-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
}

.mvg-video-wrapper video {
  max-width: 90vw;
  max-height: calc(90vh - 50px);
  display: block;
  cursor: pointer;
}

.mvg-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  border-radius: 0 0 6px 6px;
}

/* Play/Pausa e Fullscreen */
.mvg-play-btn,
.mvg-fs-btn,
.mvg-mute-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.mvg-play-btn:hover,
.mvg-fs-btn:hover,
.mvg-mute-btn:hover {
  opacity: 0.7;
}

/* Barra di avanzamento */
.mvg-progress {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.mvg-progress-bar {
  height: 100%;
  background: #fff;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

/* Tempo */
.mvg-time {
  color: white;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Volume */
.mvg-volume-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mvg-volume-slider {
  width: 70px;
  cursor: pointer;
  accent-color: #fff;
}
