/**
 * Works Video Slider Styles
 * 
 * @package Kadence Child
 * @version 1.0.0
 */

/* ===== MASTER CONTAINER ===== */
.works-swiper-wrapper {
  width: 100%;
  background: #000;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow: hidden;
  contain: content; /* Performance: Isolates painting and layout */
}

/* ===== SWIPER CORE ===== */
.swiper {
  width: 100%;
  height: auto;
}

.swiper-wrapper {
  transition-timing-function: linear !important;
  will-change: transform;
  transform: translate3d(0, 0, 0); /* Force GPU acceleration */
}

.swiper-slide {
  flex-shrink: 0;
  overflow: hidden;
  transform: translateZ(0); /* GPU layer */
  box-sizing: border-box;
  opacity: 0.5; /* Dim videos on edges */
  transition: opacity 0.4s ease;
}

/* Highlight centered/visible slides */
.swiper-slide.swiper-slide-visible {
  opacity: 1;
}

/* ===== VIDEO CONTAINER ===== */
.video-inner {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  position: relative;
  mask-image: -webkit-radial-gradient(white, black);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.video-inner video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Only show video when actively playing */
.video-inner video.is-playing {
  opacity: 1;
}

/* ===== PLACEHOLDER SLIDES ===== */
.dummy-content {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #333;
}

.dummy-text {
  color: #444;
  font-family: sans-serif;
  font-weight: 700;
  font-size: 12px;
}

/* ===== LAYOUT SIZES ===== */
/* Row 1: ~35vw (2 center + edges cut) */
.swiper-row-1 .swiper-slide {
  width: 35vw;
  height: 20vw;
  margin-right: 20px;
}

/* Row 2: ~18vw (4 center + edges cut) */
.swiper-row-2 .swiper-slide {
  width: 18vw;
  height: 32vw;
  margin-right: 20px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 768px) {
  .swiper-row-1 .swiper-slide {
    width: 70vw;
    height: 40vw;
    margin-right: 15px;
  }
  .swiper-row-2 .swiper-slide {
    width: 40vw;
    height: 71vw;
    margin-right: 15px;
  }
}
