/* ==========================================================================
   Homepage hero carousel (index.php #heroCarousel, js/hero-carousel.js)
   Slides are stacked in one grid cell and cross-fade, so the carousel is as
   tall as its tallest slide and nothing jumps. Lightweight, no library.
   ========================================================================== */
.hero-carousel {
  --hc-speed: 0.7s;
  --hc-ui: rgba(255, 255, 255, 0.85);
  --hc-duration: 3000ms;            /* time per slide, read by JS too */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #070d24;
}
.hero-carousel__track { display: grid; }
.hero-carousel__slide {
  grid-area: 1 / 1;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
}
.hero-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  animation: hc-in var(--hc-speed) cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-carousel__slide.is-leaving {          /* outgoing slide fades out underneath */
  visibility: visible;
  animation: hc-out var(--hc-speed) ease both;
}
@keyframes hc-in  { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes hc-out { from { opacity: 1; } to { opacity: 0; } }

/* every slide fills the carousel height (the banner image covers it) */
.hero-carousel__slide > section,
.hero-carousel__slide > .pg { height: 100%; }
.hero-carousel__slide > .home-banner { display: flex; }
.hero-carousel__slide > .home-banner > .owl-carousel,
.hero-carousel__slide > .home-banner .item { height: 100%; width: 100%; }
.hero-carousel__slide > .home-banner .item { position: relative; }
.hero-carousel__slide > .home-banner .home-slider-img-wrapper { height: 100%; }
.hero-carousel__slide > .home-banner .home-slider-img-wrapper img.video-background,
.hero-carousel__slide > .home-banner .home-slider-img-wrapper img.mob-video-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

/* ---------- controls ---------- */
.hero-carousel__controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: clamp(48px, 5vw, 64px);       /* above the next section's overlapping "Alliance Partners" card */
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(7, 13, 36, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-carousel__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--hc-ui);
  font-size: var(--fs-sm, 0.85rem);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.hero-carousel__arrow:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.hero-carousel__dots { display: flex; gap: 8px; }
.hero-carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-carousel__dot:hover { background: rgba(255, 255, 255, 0.75); }
.hero-carousel__dot.is-active {
  background: #3ea6ff;
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(62, 166, 255, 0.3);
}
.hero-carousel__dot span { display: none; }
.hero-carousel__arrow:focus-visible,
.hero-carousel__dot:focus-visible { outline: 2px solid #3ea6ff; outline-offset: 3px; }

@media (max-width: 991.98px) {
  /* The stacked statement slide can make the carousel taller than the artwork.
     Fit the selected phone/tablet image without cutting off its sides. */
  .hero-carousel__slide > .home-banner .home-slider-img-wrapper img.video-background,
  .hero-carousel__slide > .home-banner .home-slider-img-wrapper img.mob-video-background {
    object-fit: contain;
    object-position: 50% 50%;
    background-color: #e8efff;
  }
}

@media (max-width: 767.98px) {
  .hero-carousel__arrow { display: none; }
  .hero-carousel__controls { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__slide { animation: none !important; }
}
