/* Keep both slides composed while Bootstrap blends the incoming image over
 * the outgoing one. The torn-paper frame stays above both layers. */
.view-hero-carousel .hero-carousel .carousel-inner {
  aspect-ratio: 9 / 4;
  isolation: isolate;
}
.view-hero-carousel .hero-carousel .carousel-item {
  height: 100%;
  transition: opacity 850ms cubic-bezier(.22, .61, .36, 1);
}
.view-hero-carousel .hero-carousel .carousel-item > img {
  display: block;
  object-fit: cover;
}
.view-hero-carousel .hero-carousel .active.carousel-item-start,
.view-hero-carousel .hero-carousel .active.carousel-item-end {
  z-index: 0;
  transition: opacity 0s 850ms;
}
.view-hero-carousel .hero-carousel .carousel-item-next .hero-content,
.view-hero-carousel .hero-carousel .carousel-item-prev .hero-content {
  animation: hero-caption-enter 850ms cubic-bezier(.22, .61, .36, 1) both;
}
.view-hero-carousel .hero-carousel .active.carousel-item-start .hero-content,
.view-hero-carousel .hero-carousel .active.carousel-item-end .hero-content {
  animation: hero-caption-exit 160ms ease-out both;
}
@keyframes hero-caption-exit {
  to { opacity: 0; transform: translateY(-6px); }
}
@keyframes hero-caption-enter {
  from { opacity: 0; transform: translateY(14px); }
  20% { opacity: 0; }
  to { opacity: 1; transform: translateY(0); }
}
.view-hero-carousel .hero-carousel .carousel-inner::before,
.view-hero-carousel .hero-carousel .carousel-inner::after {
  pointer-events: none;
}

/* Small visual controls with generous, consistent touch targets. */
.view-hero-carousel .hero-carousel .custom-carousel-nav-wrapper {
  position: absolute;
  right: 0;
  bottom: -4px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.view-hero-carousel .hero-carousel .carousel-indicators {
  position: static;
  margin: 0;
}
.view-hero-carousel .hero-carousel .carousel-control-prev,
.view-hero-carousel .hero-carousel .carousel-control-next {
  display: none;
  position: static;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #29669a;
  opacity: 1;
  transition: color 180ms ease;
}
.view-hero-carousel .hero-carousel .carousel-control-prev-icon,
.view-hero-carousel .hero-carousel .carousel-control-next-icon {
  position: relative;
  width: 24px;
  height: 24px;
  background: none;
}
.view-hero-carousel .hero-carousel .carousel-control-prev-icon::before,
.view-hero-carousel .hero-carousel .carousel-control-next-icon::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 3px;
  width: 18px;
  border-top: 1.5px solid currentColor;
}
.view-hero-carousel .hero-carousel .carousel-control-prev-icon::after,
.view-hero-carousel .hero-carousel .carousel-control-next-icon::after {
  content: '';
  position: absolute;
  top: 7px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}
.view-hero-carousel .hero-carousel .carousel-control-prev-icon::after {
  left: 3px;
  transform: rotate(-135deg);
}
.view-hero-carousel .hero-carousel .carousel-control-next-icon::after {
  right: 3px;
  transform: rotate(45deg);
}
.featured-top .hero-carousel .carousel-indicators [data-bs-slide-to],
.featured-top .hero-carousel .carousel-indicators [data-bs-slide-to].active {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 0;
  background: transparent;
  opacity: 1;
}
.featured-top .hero-carousel .carousel-indicators [data-bs-slide-to]::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  margin: auto;
  border-radius: 20px;
  background: #94b7cc;
  transition: width 300ms ease, background-color 300ms ease;
}
.featured-top .hero-carousel .carousel-indicators [data-bs-slide-to].active::after {
  width: 26px;
  background: #29669a;
}
.view-hero-carousel .hero-carousel:focus-visible,
.view-hero-carousel .hero-carousel button:focus-visible {
  outline: 3px solid #29669a;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px white;
}
@media (hover: hover) {
  .view-hero-carousel .hero-carousel .carousel-control-prev:hover,
  .view-hero-carousel .hero-carousel .carousel-control-next:hover {
    color: #123e60;
  }
}
@media (max-width: 991px) {
  .view-hero-carousel .hero-carousel .carousel-inner { aspect-ratio: 3 / 2; }
}
@media (max-width: 575px) {
  /* Leave room for longer captions between the torn edges on small phones. */
  .view-hero-carousel .hero-carousel .carousel-inner { min-height: 300px; }
  .view-hero-carousel .hero-carousel .custom-carousel-nav-wrapper {
    left: 0;
    justify-content: center;
  }
  .view-hero-carousel .hero-carousel .hero-content { padding-left: 16px; }
  .view-hero-carousel .hero-carousel .hero-content h5 {
    font-size: 16px;
    line-height: 1.4;
  }
}
@media (max-width: 359px) {
  .featured-top .hero-carousel .carousel-indicators [data-bs-slide-to],
  .featured-top .hero-carousel .carousel-indicators [data-bs-slide-to].active {
    width: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .view-hero-carousel .hero-carousel .carousel-item,
  .view-hero-carousel .hero-carousel .active.carousel-item-start,
  .view-hero-carousel .hero-carousel .active.carousel-item-end,
  .view-hero-carousel .hero-carousel button,
  .view-hero-carousel .hero-carousel button::after {
    transition: none;
  }
  .view-hero-carousel .hero-carousel .carousel-item .hero-content { animation: none !important; }
}
