.herocarousel-component {
  display: flex;
  width: 100%;
}

.herocarousel-outer {
  width: 100%;
  height: 600px;
  position: relative;
  overflow-y: hidden;
}

.herocarousel-item {
  width: 100%;
}

.herocarousel-item-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
  padding: 32px 0 64px 80px;
  gap: 8px
}

.herocarousel-item .eyebrow {
  color: #fff;
  font-family: "HyundaiSansText-Bold";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
}

.herocarousel-item .title {
    color: #fff;
    font-family: "HyundaiSansHead-Medium";
    font-size: 38px;
    font-weight: 500;
    line-height: 133.333%;
    max-width: 600px;
}

.herocarousel-item .subheading {
    color: #fff;
    font-family: "HyundaiSansText-Regular";
    font-size: 18px;
    font-style: normal;
    line-height: 133.33%;
    font-weight: 400;
    max-width: 600px;
}

/* Hero Image Container */
.herocarousel-item-media-container {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.herocarousel-item-media-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* please don't remove this style */
}


.herocarousel-item-media-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient Overlay */

/* .herocarousel-item-gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            rgba(0 0 0 / 62%) 0%,
            rgba(0 0 0 / 54%) 32%,
            rgba(0 0 0 / 0%) 100%
        ),
        linear-gradient(90deg, rgba(0 0 0 / 54%) 0%, rgba(0 0 0 / 0%) 100%),
        linear-gradient(90deg, rgba(0 0 0 / 0%) 0%, rgba(0 0 0 / 0%) 100%);
    top: 0;
    left: 0;
} */

.herocarousel-item-gradient-overlay {
  position: relative;
  background: linear-gradient(90deg,rgba(0 0 0 / 85%),rgba(0 0 0 / 54%) 22%,transparent 38%);
  height: -webkit-fill-available;
  height: -moz-available;         /* Firefox older versions */
  height: fill-available;         /* Older spec */
  height: 600px;
}

.herocarousel-item .hero-content-container {
  display: flex;
  gap: 4px;
  flex-direction: column;
  align-items: flex-start;
  max-width: 600px;
  width: 24%;
}

.herocarousel-item .button-container {
  display: flex;
  align-items: center;
  align-content: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.herocarousel-slider {
  display: flex;
  align-items: baseline;
  width: 100%;
  flex: 1 0 0;
  gap: 8px;
  padding: 0 80px;
  background: linear-gradient(0deg, rgb(0 0 0 / 72%) 0%, rgb(17 17 17 / 0%) 100%);
  z-index: 1;
  position: absolute;
  bottom: 0;
  height: 40px;
}

.hc-indicator-dash {
  height: 4px;
  flex: 1 0 0;
  background: rgb(255 255 255 / 70%);
  margin: 12px 0 24px;
  position: relative;
  overflow: hidden;
} 

.hc-indicator-dash.indicator-dash-active{
  background-color: rgb(255 255 255 / 70%);
}

.hc-indicator-dash.indicator-dash-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #00a2c7;
  transform-origin: left center;
  transform: scaleX(0);
  animation: progress-fill 15s linear forwards;
}

.herocarousel-slider-navigation {
  display: flex;
  align-items: baseline;
  width: 100%;
  flex: 1 0 0;
  padding: 0 80px;
  z-index: 1;
  position: absolute;
  top: calc(50% - 40px);
  justify-content: space-between;
}

.herocarousel-slider-navigation .hNav {
  width: 40px;
  height: 40px;
  color: #fff;
  font-size: 40px;
  position: relative;
  left: -64px;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 60%));
  background: transparent;
  border: none;
}

.herocarousel-slider-navigation .hNav.nav-right {
  left: auto;
  right: -64px;
}

.carousel-paused .hc-indicator-dash.indicator-dash-active::before {
  animation-play-state: paused;
}

@keyframes progress-fill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.video-control-container {
  position: absolute;
  bottom: 64px;
  right: 80px;
  z-index: 3;
}

.video-control-btn {
  align-self: stretch;
  padding: 4px 8px;
  background: rgb(0 0 0 / 54%);
  border-radius: 4px;
  border: none;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
  min-width: 68px;
  width: auto;
}

.video-control-btn:hover {
  background: rgb(0 0 0 / 70%);
}

.video-control-content {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-control-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.video-control-icon .icon-icon-pause,
.video-control-icon .icon-icon-play {
  font-size: 16px;
}

.video-control-text {
  color: white;
  font-size: 12px;
  font-family: "HyundaiSansText-Bold";
  font-weight: 700;
  line-height: 16px;
}

.herocarousel-item-btnwrapper {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.herocarousel-item-btnwrapper a {
  text-decoration: none;
}

.herocarousel-item-btnwrapper span.icon {
  margin-left: 8px;
  font-size: 14px;
}

.herocarousel-item-btnwrapper .btn-secondary{
  display: flex;
  height: 48px;
  max-width: 344px;
  padding: 16px 24px;
  justify-content: center;
  align-items: center;
  border: 1px solid #002C5F;
  color: #002C5F;
  text-align: center;
  font-family: "HyundaiSansHead-Medium";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 125%;
  width: 225px;
  min-width: 140px;
  background-color: #fff;
}

.herocarousel-item-btnwrapper .btn-primary{
  display: flex;
  height: 48px;
  width: 225px;
  min-width: 140px;
  max-width: 344px;
  padding: 16px 24px;
  justify-content: center;
  align-items: center;
  color: #FFF;
  text-align: center;
  font-family: "HyundaiSansHead-Medium";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 125%;
  background: #002C5F;
}

.herocarousel-item-btnwrapper .btn-secondary.caret,
.herocarousel-item-btnwrapper .btn-primary.caret,
.herocarousel-item-btnwrapper .btn-secondary.link,
.herocarousel-item-btnwrapper .btn-primary.link {
  background: none;
  border: none;
  color: #002C5F !important;
}

.herocarousel-item-btnwrapper .btn-secondary.link,
.herocarousel-item-btnwrapper .btn-primary.link {
  text-decoration: underline ;
}

.herocarousel-slider.author-fix {
  width: 92%;
}

.herocarousel-slider-navigation.author-fix {
  width: 88%;
}

/* Tablet */
@media (max-width: 1199px) and (min-width: 768px) {
   .herocarousel-outer {
    min-height: 560px;
    height: auto;
    max-height: 560px;
  }

  .herocarousel-outer .herocarousel-holder {
    height: 100%;
  }


  .herocarousel-item .eyebrow {
    color: #000;
  }

  .herocarousel-item .title {
    font-size: 35px;
    line-height: 120%;
    max-width: none;
    color: #000;
  }

  .herocarousel-item-content {
    padding: 16px 40px 24px;
  }

  .herocarousel-item .subheading {
      font-size: 18px;
      max-width: none;
      color: #000;
  }

  .herocarousel-item .hero-content {
      max-width: 500px;
      min-height: 240px;
      padding: 0;
      margin: unset;
  }

  .herocarousel-item .hero-content-container {
    width: 100%;
    max-width: none;
  }

  .herocarousel-item .video-control-container {
      bottom: 32px;
      right: 40px;
  }
  
  .herocarousel-item .hero-media-container img,
  .herocarousel-item .hero-media-container video {
      object-fit: cover;

  }  
     
  .herocarousel-item .hero-content.image,
  .herocarousel-item .hero-content.video {
      min-height: 240px;
      padding: 32px 40px;
  }

  .herocarousel-slider {
    padding: 16px 40px;
  }

  .herocarousel-slider-navigation {
    padding: 0 16px;
    top: calc(27% - 40px);
    z-index: 3;
  }
  
  .herocarousel-slider-navigation .hNav {
    left: -16px;
  }

  .herocarousel-slider-navigation .hNav.nav-right {
    right: -16px;
  }
  
  /* .herocarousel-item-gradient-overlay {
    height: 480px;
  } */

 .herocarousel-item {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .herocarousel-media-wrapper {
    order: 1;
    min-height: 50.6%;
    position: relative; /* This allows absolute positioning of child elements like video controls within this wrapper */
  }

  .herocarousel-item-content.herocarousel-item-gradient-overlay {
    order: 2;
    padding-top: 16px;
    justify-content: center;
    height: 100%;
    background: transparent;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .herocarousel-outer {
    min-height: 560px;
    height: auto;
    max-height: 560px;
  }

  .herocarousel-outer .herocarousel-holder {
    height: 100%;
  }

  .herocarousel-item-media-container {
    height: 100%;
  }

  .herocarousel-item-content {
    padding: 0 16px 24px;
    justify-content: flex-end;
    gap: 4px;
  }

  .herocarousel-item .title {
    font-size: 25px;
    line-height: 125%;
    color: #000;
  }

  .herocarousel-item .subheading {
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 137.5%;
    max-width: 100%;
    color: #000;
  }

  .herocarousel-item .hero-content-container {
      gap: 2px;
      width: 100%;
  }

  .herocarousel-item .hero-content {
    gap: 4px;
    width: 100%;
    margin: unset;
    padding: unset;
    justify-content: flex-end;
  }

  .herocarousel-item .hero-content.image {
    background: none;
    min-height: unset;
  }

  .herocarousel-item .hero-banner-container {
    padding: 64px 16px 24px;
    flex-direction: column;
  }

  .herocarousel-item .gradient-overlay {
    background: linear-gradient(
        90deg,
        rgba(0 0 0 / 54%) 0%,
        rgba(0 0 0 / 0%) 100%
    ),
    linear-gradient(
        90deg,
        rgba(0 0 0 / 62%) 0%,
        rgba(0 0 0 / 54%) 32%,
        rgba(0 0 0 / 0%) 100%
    );
  }

  .herocarousel-item .hero-image-container .gradient-overlay {
    background: linear-gradient(
    to top,
    rgba(0 0 0 / 54%) 0%,      /* Bottom: 54% opacity */
    rgba(0 0 0 / 54%) 32%,     /* Maintain 54% until 32% height */
    rgba(0 0 0 / 0%) 100%      /* Top: Fade to transparent */);
    display: block;
  }

  .herocarousel-item-gradient-overlay {
    height: 544px;
    
    /* background: linear-gradient(
    0deg,
    rgba(0 0 0 / 54%) 0%,
    rgba(0 0 0 / 54%) 41.5%,
    rgba(0 0 0 / 0%) 69.3%,
    rgba(0 0 0 / 0%) 100%); */
    background: transparent;
  }

  .herocarousel-item .eyebrow {
    line-height: 128.571%;
    font-size: 14px;
    color: #000;
  }

  .herocarousel-item .button-container {
    margin-top: 12px;
  }

  .herocarousel-item .video-control-container {
    top: 16px;
    right: 16px;
    z-index: 2;
    display: none;
  }

  .video-control-btn {
    padding: 8px;
    width: auto;
    min-width: auto;
  }

  .video-control-icon {
    width: 20px;
    height: 20px;
  }

  .video-control-icon svg {
    width: 16px;
    height: 16px;
  }

  .video-control-text {
    display: none;
  }

  .video-placeholder-container {
    height: 102px;
    display: flex;
    align-items: center;
    width: 100%;
  }

  .hero-media-container img,
  .hero-media-container video {
    object-fit: cover;
  } 

  .hero-media-container img {
    height: 100%;
  }

  .hero-banner-container.image {
    min-height: 240px;
    padding-top: 166px;
  }

  .herocarousel-slider {
    padding: 0 16px;
  }

  .herocarousel-slider-navigation {
    padding: 0 16px;
    top: calc(27% - 40px);
    z-index: 3;
  }

  .herocarousel-slider-navigation .hNav {
    left: -16px;
  }

  .herocarousel-slider-navigation .hNav.nav-right {
    right: -16px;
  }

  .herocarousel-item-btnwrapper {
    margin: 16px 0 24px;
  }

  .herocarousel-item-btnwrapper .btn-primary,
  .herocarousel-item-btnwrapper .btn-secondary {
    width: auto;
  }

  .herocarousel-item {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .herocarousel-media-wrapper {
    order: 1;
    min-height: 50.6%;
    position: relative; /* This allows absolute positioning of child elements like video controls within this wrapper */
  }

  .herocarousel-item-content.herocarousel-item-gradient-overlay {
    order: 2;
    padding-top: 16px;
    justify-content: center;
    height: 100%;
  }

}
