/* MorphSlider (React Bits WebGL morph slider) adapted for CubePass 21:9 hero banners */
.morph-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  direction: ltr;
}

.morph-slider-stage {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: grab;
  outline: none;
}

.morph-slider-stage:active {
  cursor: grabbing;
}

.morph-slider-stage:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.morph-slider-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: transparent;
  pointer-events: none;
}

.morph-slider-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.morph-slider.is-webgl-ready .morph-slider-fallback {
  opacity: 0;
  visibility: hidden;
}

.morph-slider.is-webgl-ready .morph-slider-canvas {
  opacity: 1;
}

.morph-slider-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  text-decoration: none;
}

.morph-slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  transform: translateY(-50%);
  pointer-events: none;
}

.morph-slider-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 12, 14, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease,
    border-color 0.25s ease;
}

.morph-slider-btn:hover {
  background: rgba(24, 24, 28, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.06);
}

.morph-slider-btn:active {
  transform: scale(0.96);
}

.morph-slider-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.morph-slider-indicators {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.morph-slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition:
    width var(--ms-dot, 0.495s) cubic-bezier(0.16, 1, 0.3, 1),
    background var(--ms-dot, 0.495s) ease;
}

.morph-slider-dot.is-active {
  width: 22px;
  background: rgba(255, 255, 255, 0.95);
}

.morph-slider-dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .morph-slider-controls {
    padding: 0 10px;
  }
  .morph-slider-indicators {
    bottom: 10px;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .morph-slider-btn {
    width: 34px;
    height: 34px;
  }
  .morph-slider-dot {
    width: 6px;
    height: 6px;
  }
  .morph-slider-dot.is-active {
    width: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .morph-slider-btn,
  .morph-slider-dot {
    animation: none;
    transition: none;
  }
}
