.vsg-carousel,
.vsg-carousel * {
  box-sizing: border-box;
}

.vsg-carousel {
  --vsg-carousel-height: 620px;
  --vsg-active-width: 1080px;
  --vsg-active-height: 560px;
  --vsg-gap: 26px;
  --vsg-nav-size: 58px;
  --vsg-side-scale-height: 0.9;
  --vsg-radius: 18px;

  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 30px 0;
  color: #fff;
}

.vsg-carousel .vsg-viewport {
  position: relative;
  width: 100%;
  height: var(--vsg-carousel-height);
  margin: 0 auto;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.vsg-carousel.is-dragging .vsg-viewport {
  cursor: grabbing;
}

.vsg-carousel .vsg-track {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  touch-action: pan-y;
}

.vsg-carousel .vsg-card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--vsg-radius);
  background: #111;
  color: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  will-change: transform, opacity, width, height;
  transition:
    transform 0.8s cubic-bezier(.2, .8, .2, 1),
    opacity 0.8s cubic-bezier(.2, .8, .2, 1),
    filter 0.8s cubic-bezier(.2, .8, .2, 1),
    width 0.8s cubic-bezier(.2, .8, .2, 1),
    height 0.8s cubic-bezier(.2, .8, .2, 1),
    box-shadow 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

.vsg-carousel .vsg-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95);
}

.vsg-carousel.is-dragging .vsg-card {
  transition: none !important;
}

.vsg-carousel .vsg-card *,
.vsg-carousel img,
.vsg-carousel iframe {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.vsg-carousel .vsg-card.is-hidden {
  z-index: 1;
  pointer-events: none !important;
}

.vsg-carousel .vsg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #000;
}

.vsg-carousel .vsg-poster,
.vsg-carousel .vsg-media iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit;
}

.vsg-carousel .vsg-poster {
  z-index: 1;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.vsg-carousel .vsg-media iframe {
  z-index: 2;
  border: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vsg-carousel .vsg-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.52) 24%,
    rgba(0, 0, 0, 0.10) 54%,
    rgba(0, 0, 0, 0.20) 100%
  );
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.vsg-carousel .vsg-copy {
  position: absolute;
  left: clamp(22px, 4.8%, 52px);
  bottom: clamp(22px, 5.2%, 48px);
  z-index: 4;
  max-width: min(72%, 720px);
  margin: 0;
  pointer-events: none;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.vsg-carousel .vsg-title {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 2.4vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.vsg-carousel .vsg-subtitle {
  margin: 8px 0 0;
  color: #fff;
  font-size: clamp(15px, 1.45vw, 22px);
  font-weight: 400;
  line-height: 1.25;
}

.vsg-carousel .vsg-play {
  position: absolute;
  top: clamp(18px, 4.5%, 32px);
  right: clamp(18px, 4.5%, 32px);
  z-index: 4;
  display: grid;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.vsg-carousel .vsg-play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 14px solid #fff;
}

.vsg-carousel .vsg-card:hover .vsg-play {
  transform: scale(1.06);
}

.vsg-carousel .vsg-card.is-playing .vsg-poster {
  opacity: 0;
}

.vsg-carousel .vsg-card.is-playing .vsg-media iframe {
  opacity: 1;
  pointer-events: auto;
}

.vsg-carousel .vsg-card.is-playing::after,
.vsg-carousel .vsg-card.is-playing .vsg-copy,
.vsg-carousel .vsg-card.is-playing .vsg-play {
  opacity: 0;
}

.vsg-carousel .vsg-card.is-playing .vsg-copy {
  transform: translateY(8px);
}

.vsg-carousel .vsg-nav {
  position: absolute;
  top: 50%;
  z-index: 60;
  width: var(--vsg-nav-size);
  height: var(--vsg-nav-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, opacity 0.2s ease;
}

.vsg-carousel .vsg-nav:hover,
.vsg-carousel .vsg-nav:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  border-radius: 50px !important;
}

.vsg-carousel .vsg-prev {
  left: 18px;
}

.vsg-carousel .vsg-next {
  right: 18px;
}

.vsg-carousel.has-single-card .vsg-nav {
  display: none;
}

@media (max-width: 1400px) {
  .vsg-carousel {
    --vsg-active-width: 940px;
    --vsg-active-height: 520px;
  }
}

@media (max-width: 1200px) {
  .vsg-carousel {
    --vsg-carousel-height: 520px;
    --vsg-active-width: 760px;
    --vsg-active-height: 470px;
    --vsg-gap: 18px;
  }
}

@media (max-width: 860px) {
  .vsg-carousel {
    --vsg-carousel-height: auto;
    --vsg-nav-size: 44px;
    --vsg-radius: 14px;
    padding: 10px 0;
  }

  .vsg-carousel .vsg-viewport {
    height: auto;
    min-height: 240px;
  }

  .vsg-carousel .vsg-prev {
    left: 8px;
  }

  .vsg-carousel .vsg-next {
    right: 8px;
  }

  .vsg-carousel .vsg-copy {
    left: 22px;
    bottom: 20px;
    max-width: calc(100% - 90px);
  }

  .vsg-carousel .vsg-title {
    font-size: clamp(20px, 6vw, 30px);
  }

  .vsg-carousel .vsg-subtitle {
    margin-top: 5px;
    font-size: clamp(14px, 4vw, 18px);
  }

  .vsg-carousel .vsg-play {
    top: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
  }

  .vsg-carousel .vsg-play::before {
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vsg-carousel .vsg-card,
  .vsg-carousel .vsg-copy,
  .vsg-carousel .vsg-play,
  .vsg-carousel .vsg-poster,
  .vsg-carousel .vsg-media iframe {
    transition-duration: 0.01ms !important;
  }
}
