/* Image-only carousels keep the existing first image in the document flow. */
figure.media-carousel,
.inner-page .hero-layout > figure.media-carousel {
  position: relative;
  isolation: isolate;
  touch-action: pan-y;
  overflow: hidden;
}
.media-carousel > img.media-carousel-image {
  display: block;
  position: relative;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.media-carousel > img.media-carousel-image:not(:first-of-type) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.media-carousel > img.media-carousel-image.is-active {
  visibility: visible;
  opacity: 1;
  z-index: 2;
}
.media-carousel > img.media-carousel-image.is-leaving {
  visibility: visible;
  opacity: 1;
  z-index: 1;
}
.media-carousel .media-carousel-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #ffffffa6;
  border-radius: 50%;
  background: #ffffffd9;
  backdrop-filter: blur(12px);
  box-shadow: 0 3px 14px #18352718;
  color: #2f5341;
  transform: translateY(-50%);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    opacity 0.2s,
    background 0.25s,
    box-shadow 0.25s;
}
.media-carousel .media-carousel-prev {
  left: 14px;
}
.media-carousel .media-carousel-next {
  right: 14px;
}
.media-carousel .media-carousel-arrow svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.media-carousel .media-carousel-prev svg {
  transform: rotate(180deg);
}
.media-carousel .media-carousel-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 18px #18352725;
}
.media-carousel .media-carousel-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid #ffffff40;
  border-radius: 20px;
  background: #173b2b24;
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}
.media-carousel .media-carousel-dots button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.media-carousel .media-carousel-dots button span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: #ffffff80;
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s;
}
.media-carousel .media-carousel-dots button[aria-pressed="true"] span {
  width: 18px;
  background: #fff;
}
.media-carousel .media-carousel-dots button:hover span {
  background: #fff;
}
.media-carousel :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.media-carousel .media-carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.inner-page .news-richtext figure.media-carousel {
  border-radius: 4px;
}
/* Reveal mouse controls on demand; touch and keyboard navigation stay available. */
@media (hover: hover) and (pointer: fine) {
  .media-carousel .media-carousel-arrow,
  .hero-carousel .hero-side-arrow {
    opacity: 0;
    pointer-events: none;
  }
  .media-carousel:hover .media-carousel-arrow,
  .media-carousel:has(:focus-visible) .media-carousel-arrow,
  .hero-carousel:hover .hero-side-arrow,
  .hero-carousel:has(:focus-visible) .hero-side-arrow {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (max-width: 640px) {
  .media-carousel .media-carousel-arrow {
    width: 32px;
    height: 32px;
  }
  .media-carousel .media-carousel-prev {
    left: 10px;
  }
  .media-carousel .media-carousel-next {
    right: 10px;
  }
  .media-carousel .media-carousel-dots {
    bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .media-carousel .media-carousel-arrow,
  .media-carousel .media-carousel-dots button span {
    transition: none;
  }
}

.media-carousel > figcaption {
  top: 14px;
  bottom: auto;
  z-index: 3;
}

/* Empty data groups and rich-text articles retain a usable layout. */
.hero-split .hero-layout:not(:has(figure)) {
  grid-template-columns: 1fr;
}
.portal-no-home-banner .hero-entrances {
  margin-top: 32px;
}

.growth-story-cover:not(:has(figure)) {
  display: none;
}
