.hero-slider-wrapper {
  position: relative;
  width: 100%;

  &:not(.swiper-3d) {
    overflow: hidden;
  }

  &.swiper-3d,
  &.swiper-cube,
  &.swiper-flip {
    overflow: visible;
    perspective: 1200px;
    -webkit-perspective: 1200px;
  }
}

.swiper-slide {
  height: auto;
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform-style: preserve-3d !important;
  -webkit-transform-style: preserve-3d !important;
}

.hero-slide-wrapper,
.hero-video-banner-section,
.hero-content-group {
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

.swiper-flip .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-next):not(.swiper-slide-prev) {
  opacity: 0 !important;
  pointer-events: none;
}

.hero-video-banner-section {
  position: relative;
  overflow: hidden;
  min-height: 550px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background-color: var(--overlay-color, #0f172a);
}

.hero-video-banner-section .wp-block-image {
  position: absolute;
  z-index: 2;
  height: 100%;
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
}

.hero-video-banner-section .wp-block-image img {
  height: 100%;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

// Image object fit
.hero-slide-wrapper[data-image-object-fit="cover"] .hero-video-banner-section .wp-block-image img {
  object-fit: cover;
}

.hero-slide-wrapper[data-image-object-fit="contain"] .hero-video-banner-section .wp-block-image img {
  object-fit: contain;
}

.hero-slide-wrapper[data-image-object-fit="fill"] .hero-video-banner-section .wp-block-image img {
  object-fit: fill;
}

.hero-slide-wrapper[data-image-object-fit="none"] .hero-video-banner-section .wp-block-image img {
  object-fit: none;
}

.hero-slide-wrapper[data-image-object-fit="scale-down"] .hero-video-banner-section .wp-block-image img {
  object-fit: scale-down;
}

.hero-video-banner-section .wp-block-video {
  position: absolute;
  z-index: 2;
  height: 100%;
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
}

.hero-video-banner-section .wp-block-video video {
  height: 100%;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.hero-video-banner-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--overlay-color, transparent);
  background-image: var(--overlay-gradient, none);
  z-index: 3;
  opacity: var(--overlay-opacity, 0.85);
  pointer-events: none;
}

.hero-video-banner-section .hero-content-group {
  position: relative;
  z-index: 4;
  top: var(--vertical-align, 50%);
  transform: translate(0, -50%);
  max-width: var(--wp--style--global--content-size, 1400px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  padding: 3rem 2rem;
  box-sizing: border-box;
  width: 100%;
}

// Vertical alignment
.hero-slide-wrapper[data-vertical-align="top"] .hero-video-banner-section .hero-content-group {
  top: 0;
  transform: translate(0, 0);
  justify-content: flex-start;
  padding-top: 4rem;
}

.hero-slide-wrapper[data-vertical-align="center"] .hero-video-banner-section .hero-content-group {
  top: 50%;
  transform: translate(0, -50%);
  justify-content: center;
}

.hero-slide-wrapper[data-vertical-align="bottom"] .hero-video-banner-section .hero-content-group {
  top: auto;
  bottom: 0;
  transform: translate(0, 0);
  justify-content: flex-end;
  padding-bottom: 4rem;
}

// Horizontal alignment
.hero-slide-wrapper[data-horizontal-align="left"] .hero-video-banner-section .hero-content-group {
  align-items: flex-start;
  text-align: left;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-slide-wrapper[data-horizontal-align="center"] .hero-video-banner-section .hero-content-group {
  align-items: center;
  text-align: center;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-slide-wrapper[data-horizontal-align="right"] .hero-video-banner-section .hero-content-group {
  align-items: flex-end;
  text-align: right;
  margin-left: auto !important;
  margin-right: auto !important;
}

// Content width
.hero-slide-wrapper[data-content-width="full"] .hero-video-banner-section .hero-content-group {
  max-width: 100% !important;
  padding-left: 1rem;
  padding-right: 1rem;
}

.hero-slide-wrapper[data-content-width="wide"] .hero-video-banner-section .hero-content-group {
  max-width: var(--wp--style--global--wide-size, 1200px) !important;
}

.hero-slide-wrapper[data-content-width="narrow"] .hero-video-banner-section .hero-content-group {
  max-width: 650px !important;
}

.hero-video-banner-section .hero-content-group > * {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-video-banner-section .hero-content-group .wp-block-buttons {
  width: 100%;
}

// Animations
.hero-slide-wrapper[data-animation-type="fade-in"] .hero-content-group,
.swiper-slide-active .hero-slide-wrapper[data-animation-type="fade-in"] .hero-content-group {
  animation: fadeIn 0.8s ease-in-out forwards;
  animation-delay: calc(var(--animation-delay, 0) * 1ms);
}

.hero-slide-wrapper[data-animation-type="slide-up"] .hero-content-group,
.swiper-slide-active .hero-slide-wrapper[data-animation-type="slide-up"] .hero-content-group {
  animation: slideUp 0.8s ease-out forwards;
  animation-delay: calc(var(--animation-delay, 0) * 1ms);
}

.hero-slide-wrapper[data-animation-type="slide-down"] .hero-content-group,
.swiper-slide-active .hero-slide-wrapper[data-animation-type="slide-down"] .hero-content-group {
  animation: slideDown 0.8s ease-out forwards;
  animation-delay: calc(var(--animation-delay, 0) * 1ms);
}

.hero-slide-wrapper[data-animation-type="slide-left"] .hero-content-group,
.swiper-slide-active .hero-slide-wrapper[data-animation-type="slide-left"] .hero-content-group {
  animation: slideLeft 0.8s ease-out forwards;
  animation-delay: calc(var(--animation-delay, 0) * 1ms);
}

.hero-slide-wrapper[data-animation-type="slide-right"] .hero-content-group,
.swiper-slide-active .hero-slide-wrapper[data-animation-type="slide-right"] .hero-content-group {
  animation: slideRight 0.8s ease-out forwards;
  animation-delay: calc(var(--animation-delay, 0) * 1ms);
}

.hero-slide-wrapper[data-animation-type="zoom-in"] .hero-content-group,
.swiper-slide-active .hero-slide-wrapper[data-animation-type="zoom-in"] .hero-content-group {
  animation: zoomIn 0.8s ease-out forwards;
  animation-delay: calc(var(--animation-delay, 0) * 1ms);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 40px));
  }
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(calc(-50% - 40px));
  }
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translate(40px, -50%);
  }
  to {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translate(-40px, -50%);
  }
  to {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(-50%);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(-50%);
  }
}

// Video controls and poster
.hero-video-banner-section .wp-block-video video[data-video-controls="true"] {
  // Controls will be handled by video element attributes
}

@media (max-width: 783px) {
  .hero-slide-wrapper[data-vertical-align="top"] .hero-video-banner-section .hero-content-group {
    padding-top: 2rem;
  }

  .hero-slide-wrapper[data-vertical-align="bottom"] .hero-video-banner-section .hero-content-group {
    padding-bottom: 2rem;
  }
}
