.cp-igt-root {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cp-igt-root *,
.cp-igt-root *::before,
.cp-igt-root *::after {
  box-sizing: border-box;
}

.cp-igt-slider {
  --cp-igt-gap: 24px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.cp-igt-slider *,
.cp-igt-slider *::before,
.cp-igt-slider *::after {
  box-sizing: border-box;
}

.cp-igt-viewport {
  overflow: hidden;
  width: 100%;
}

.cp-igt-track {
  display: flex;
  gap: var(--cp-igt-gap);
  transition: transform 360ms ease;
  will-change: transform;
}

.cp-igt-slide {
  flex: 0 0
    calc(
      (100% - (var(--cp-igt-gap) * (var(--cp-igt-items, 4) - 1))) /
        var(--cp-igt-items, 4)
    );
  min-width: 0;
}

.cp-igt-video-card {
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 16px;
  background: #111;
}

.cp-igt-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

.cp-igt-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
}

.cp-igt-prev {
  left: -12px;
}

.cp-igt-next {
  right: -12px;
}

.cp-igt-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.cp-igt-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 14px;
  margin-top: 16px;
  overflow: hidden;
}

.cp-igt-dot[hidden] {
  display: none !important;
}

.cp-igt-dot {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  max-width: 8px;
  max-height: 8px;
  flex: 0 0 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.28);
  cursor: pointer;
  line-height: 0;
}

.cp-igt-dot.is-active {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  max-width: 10px;
  max-height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
}

.cp-igt-dots--move-next {
  animation: cpIgtDotsMoveNext 280ms ease;
}

.cp-igt-dots--move-prev {
  animation: cpIgtDotsMovePrev 280ms ease;
}

.cp-igt-dot--pulse {
  animation: cpIgtDotCircularPulse 320ms ease;
}

@keyframes cpIgtDotsMoveNext {
  from {
    transform: translateX(9px);
    opacity: 0.72;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes cpIgtDotsMovePrev {
  from {
    transform: translateX(-9px);
    opacity: 0.72;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes cpIgtDotCircularPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 23, 42, 0);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.12);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(15, 23, 42, 0);
  }
}

.cp-igt-empty {
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 14px;
}

@media (max-width: 767px) {
  /* Video más pequeño y centrado cuando se muestra uno */
  html body .cp-igt-root .cp-igt-slider[data-mobile="1"] .cp-igt-video-card {
    width: 82% !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Flechas móviles */
  html body .cp-igt-root .cp-igt-slider[data-mobile="1"] .cp-igt-arrow {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    font-size: 24px !important;

    box-shadow:
      0 2px 5px rgba(15, 23, 42, 0.16),
      0 1px 2px rgba(15, 23, 42, 0.1) !important;
  }

  /* Flecha izquierda junto al video */
  html body .cp-igt-root .cp-igt-slider[data-mobile="1"] .cp-igt-prev {
    left: max(4px, calc(50% - min(41%, 160px) - 42px)) !important;
  }

  /* Flecha derecha junto al video */
  html body .cp-igt-root .cp-igt-slider[data-mobile="1"] .cp-igt-next {
    right: max(4px, calc(50% - min(41%, 160px) - 42px)) !important;
  }
}

@media (max-width: 500px) {
  .cp-igt-slider {
    --cp-igt-gap: 16px;
  }

  .ct-shortcode:has(.cp-igt-root),
  .ct-div-block:has(.cp-igt-root),
  .ct-section-inner-wrap:has(.cp-igt-root),
  .elementor-widget-shortcode:has(.cp-igt-root),
  .elementor-widget-container:has(.cp-igt-root),
  .wp-block-shortcode:has(.cp-igt-root),
  .wp-block-group:has(.cp-igt-root),
  .wp-block-column:has(.cp-igt-root) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .cp-igt-root,
  .cp-igt-root .cp-igt-slider,
  .cp-igt-root .cp-igt-viewport {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .cp-igt-root .cp-igt-track {
    max-width: none !important;
  }
}

@media (min-width: 501px) and (max-width: 1023px) {
  html body .ct-shortcode:has(.cp-igt-root),
  html body .ct-div-block:has(.cp-igt-root),
  html body .ct-section-inner-wrap:has(.cp-igt-root),
  html body .elementor-widget-shortcode:has(.cp-igt-root),
  html body .elementor-widget-container:has(.cp-igt-root),
  html body .wp-block-shortcode:has(.cp-igt-root),
  html body .wp-block-group:has(.cp-igt-root),
  html body .wp-block-column:has(.cp-igt-root) {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  html body .cp-igt-root,
  html body .cp-igt-root .cp-igt-slider {
    --cp-igt-gap: 16px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html body .cp-igt-root .cp-igt-viewport {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  html body .cp-igt-root .cp-igt-track {
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: flex-start !important;
  }

  html body .cp-igt-root .cp-igt-slide,
  html body .cp-igt-root .cp-igt-video-card {
    height: auto !important;
    min-height: 0 !important;
  }
}
